[libvirt-users] Using libvirt with a preexisting network infrastructure

I have a server running Ubuntu natty (libvirt 0.8.8) with separate ethernet interfaces. I have created an unnumbered bridge for each interface, these are connected to an already established network infrastructure, with preexisting DHCP and DNS services. I would like to handle *establishment* of these bridges outside libvirt (via /etc/network/interfaces), but still have them defined as networks within libvirt. So, libvirt shall not *configure* the bridges, just be aware of their existence and connect each VM to its configured bridge. This way I can use virt-manager/libvirt to connect my virtual hosts to the correct network. The libvirt commands net-start, net-destroy would become no-ops. It seems that libvirt is geared towards handling all network configuration itself, but I do not need help from libvirt for establishing the bridges, DHCP and DNS. I know that I can edit the <interface> element in the VM XML-files after creation, to assign a virtual host to a bridge, like this: <interface type='bridge'> <source bridge='br22'/> .... </interface> This works, but I would like to do this with libvirt mechanisms. Is this possible? - Vegard V -

On 29/07/11 10:08, Vegard Vesterheim wrote:
I have a server running Ubuntu natty (libvirt 0.8.8) with separate ethernet interfaces. I have created an unnumbered bridge for each interface, these are connected to an already established network infrastructure, with preexisting DHCP and DNS services.
I would like to handle *establishment* of these bridges outside libvirt (via /etc/network/interfaces), but still have them defined as networks within libvirt. So, libvirt shall not *configure* the bridges, just be aware of their existence and connect each VM to its configured bridge. This way I can use virt-manager/libvirt to connect my virtual hosts to the correct network. The libvirt commands net-start, net-destroy would become no-ops. It seems that libvirt is geared towards handling all network configuration itself, but I do not need help from libvirt for establishing the bridges, DHCP and DNS.
If you want to connect your VMs to existing bridges then just ignore all the network stuff in libvirt and tell your VMs to connect to those bridges - virt-manager should offer the bridges as options when you create an interface and you just select the one you want. Tom -- Tom Hughes (tom@compton.nu) http://compton.nu/

On Fri, 29 Jul 2011 10:15:09 +0100 Tom Hughes <tom@compton.nu> wrote:
On 29/07/11 10:08, Vegard Vesterheim wrote:
I have a server running Ubuntu natty (libvirt 0.8.8) with separate ethernet interfaces. I have created an unnumbered bridge for each interface, these are connected to an already established network infrastructure, with preexisting DHCP and DNS services.
I would like to handle *establishment* of these bridges outside libvirt (via /etc/network/interfaces), but still have them defined as networks within libvirt. So, libvirt shall not *configure* the bridges, just be aware of their existence and connect each VM to its configured bridge. This way I can use virt-manager/libvirt to connect my virtual hosts to the correct network. The libvirt commands net-start, net-destroy would become no-ops. It seems that libvirt is geared towards handling all network configuration itself, but I do not need help from libvirt for establishing the bridges, DHCP and DNS.
If you want to connect your VMs to existing bridges then just ignore all the network stuff in libvirt and tell your VMs to connect to those bridges
Yes, this is exactly what I would like to do.
- virt-manager should offer the bridges as options when you create an interface and you just select the one you want.
I do not see my bridges as options in virt-manager, but when configuring a network device for a VM, I can select "Specify shared device name" and manually enter the name of an existing bridge device. It would be nice if virt-manager could present a menu of existing devices, or alternatively, that one could define a network in libvirt which simply refers to the preexisting bridge, but this is good enough for me. Thanks. - Vegard V -

On 07/29/2011 07:19 AM, Vegard Vesterheim wrote:
On Fri, 29 Jul 2011 10:15:09 +0100 Tom Hughes<tom@compton.nu> wrote:
- virt-manager should offer the bridges as options when you create an interface and you just select the one you want. I do not see my bridges as options in virt-manager, but when configuring a network device for a VM, I can select "Specify shared device name" and manually enter the name of an existing bridge device.
It would be nice if virt-manager could present a menu of existing devices, or alternatively, that one could define a network in libvirt which simply refers to the preexisting bridge,
Done, and done. You just don't have a new enough version of virt-manager (for the first) or libvirt (for the second).
participants (3)
-
Laine Stump
-
Tom Hughes
-
Vegard Vesterheim