[CentOS] Connecting ethX devices directly to a KVM/QEMU guest OS (no bridging)

Tait Clarridge tait at taiter.com
Wed Jan 18 21:49:06 UTC 2012


> 
> I've Googled until I'm blue in the face, but haven't found a clear 
> explanation of how I can assign each ethX device directly to the guest 
> OS rather than going thru the usual bridge configuration. I need to 
> allow the m0n0wall OS to assign the LAN and WAN IP addresses, if that's 
> possible without using a bridge.

I would think that it is a little easier to setup a bridge but not
assign an IP address for it on the CentOS host.

eg.

/etc/sysconfig/network-scripts/ifcfg-br0

DEVICE="br0"
TYPE="Bridge"
BOOTPROTO="none"
ONBOOT="yes"
NM_CONTROLLED="no"

/etc/sysconfig/network-scripts/ifcfg-ethX (where X is the interface
number of one of your intel ports and the HWADDR is the MAC address)

DEVICE="ethX"
ONBOOT="yes"
BRIDGE="br0"
HWADDR="xx:xx:xx:xx:xx:xx"
NM_CONTROLLED="no"


Restart the network service, then run brctl show - the new bridges
should show up.

Create the 8 bridges that you need and go from there, you should be able
to assign them in Virtual Machine Manager to the VMs.

Then in your VM guests you should be able to assign the IPs that you
want.





More information about the CentOS mailing list