Linux – Libvirt: create a network bridged to the LAN (eth0)

libvirtlinuxnetworkingvirtualizationxen

I have a Xen-enabled host and Libvirtd running on a machine. The LAN (on eth0) is 192.168.1.0/24, and the host has 192.168.1.174 as its main IP address.

Now what I want to do is to create a domU instance (using virt-install) and have it on that physical network, giving an IP address like 192.168.1.200.

I have no bridges except one NAT bridge I was able to set up with libvirt:

root@host:~/xen# brctl show
bridge name bridge id       STP enabled interfaces
nat     8000.feffffffffff   yes         vif13.0

The nat network works perfectly. Is there a way to create a bridged network using libvirt alone? Can someone please provide me the XML for it?

Best Answer

You don't need to create the bridge network in libvirt. You create the bridge using the OS tools (bridge-utils for RHEL).

Here is how you can do that in RHEL/Fedora.

Then, when you create the VM, tell virt-install (or virt-manager) to use the bridge you just created.

IMO, if you need to use XEN, use Citrix XenServer, as it has tools that make things easier for managing multiple VMs. Otherwise use KVM, it is going to be the better supported option from Redhat.