[CentOS] KVM Setup for Win7 Pro on CentOS 5.x

Fri Aug 17 22:06:30 UTC 2012
Bill Campbell <centos at celestial.com>

On Thu, Aug 16, 2012, Theo Band wrote:
>On 08/16/2012 06:36 PM, Bill Campbell wrote:
>>     + Set up network bridging on the private LAN so that the Windows system
>>       is accessible via OpenVPN connections from the outside world and by
>>       users on the LAN to run a client/server accounting application.
>>> I have done KVM VLANs but I am not sure if it can be done from the
>>> virt-manager.   Experiment and see how far you can go.
>> I will be digging into this later today.  So far I've found the
>> file /var/lib/libvirt/network/default.xml and see a vibr0
>> interface defined.
>> The documentation I found yesterday described setting up briding,
>> but hopefully virt-manager has a nicer way to do it.

>This I find the most difficult part. I have done it a couple of time and 
>made myself a HOWTO. You need to fill in some IP figures of course. I 
>assume a fixed IP address, but DHCP should work as well. The setup 
>creates a bridge and adds and existing interface (ifcfg-ethx) to that 
>bridge. After that you can use the bridge for the VMs:

I got things installed yesterday, adding a routed network section
using virt-manager linked to the private interface, eth1.  I left
the default NAT interface as-is.

After rebooting the machine, two bridge devices, virbr0 and
virbr1 appear in 'ifconfig' output with the appropriate IP
addresses ( and respectively).

The 'route -n' command shows reasonable routes for the VMs.

I am thoroughly confused by the documentation I've found so far,
much of which seems to be out of date.

When the Windows VM is active with the network virbr1 defined
with virt-manager and all other things default, a 'vmnet0' device
appears in 'ifconfig' output.  I can ping the IPs on the private
lan ( in this case), but cannot get to the
outside world, nor can hosts on the LAN ping the VM's assigned IP

If I shut down the VM, manually run 'brctl addif virbr1 eth1', then start
the VM things change:

   + The IP address assigned to the VM is in the block
     instead of defined in virt-manager.

   + I can ping the outside world from the VM.

   + I can ping other hosts in, but *NOT* the Linux boxes
     IP address.

   + I cannot ping anything in from the command line on
     the Linux host (logged in with ssh on the public interface).

   + The command 'brctl show' displays vmnet0 and eth1 vir virbr1.

I'm more than a bit confused at this point.

My main goal is to get LAN and OpenVPN access to the Windows VM.
I really don't care about Internet access from the Windows VM,
although Microsoft really wants it to get updates and such.

>yum install kvm virt-manager qemu bridge-utils
>#create bridge for virt-machine
>cat > /etc/sysconfig/network-scripts/ifcfg-br0 << _END_
>Edit /etc/sysconfig/network-scripts/ifcfg-ethx :
>service network restart
>CentOS mailing list
>CentOS at centos.org

INTERNET:   bill at celestial.com  Bill Campbell; Celestial Software LLC
URL: http://www.celestial.com/  PO Box 820; 6641 E. Mercer Way
Voice:          (206) 236-1676  Mercer Island, WA 98040-0820
Fax:            (206) 232-9186  Skype: jwccsllc (206) 855-5792

Lord, the money we do spend on Government and it's not one bit better
than the government we got for one third the money twenty years ago.
    Will Rogers