[opensuse-virtual] Xen on 11.1 and network configuration
Hi, i've been using Xen with SLES10SP2 for some time and now I need run some domUs on opensuse 11.1. From the Xen config file I see that the configuration shouldn't be done with the xen scripts but with the distribution's tools.
From virt-manager I can see a option for "Virtual Network" option that states: "Choose this options if your host is disconnected, connected via wireless or dynamically configured with NetworkManager", but there are no entries in the dropdown list and I can't find how to add them.
From the list's archive I found this post: http://lists.opensuse.org/opensuse-virtual/2009-01/msg00018.html. But doesn't seem to work. I need to use NetworkManager and I'm trying to add two interfaces to the domU, one only to communicate with other domUs and with the dom0, and a second one that should be bridged to the public network.
Any pointers would be much appreciated. -- Ciro Iriarte http://cyruspy.wordpress.com -- -- To unsubscribe, e-mail: opensuse-virtual+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-virtual+help@opensuse.org
My understanding is that NetworkManager does not support network bridges, which causes it to be incompatible with XEN networking. Therefore, the only recommendation I have is to switch to traditional networking (with ifup) and to setup your bridges using yast (or manually with custom ifcfg files). Jason
On 9/22/2009 at 08:45 AM, in message <a998a0140909220745pd007573kd69ae249bc9cf968@mail.gmail.com>, Ciro Iriarte <cyruspy@gmail.com> wrote: Hi, i've been using Xen with SLES10SP2 for some time and now I need run some domUs on opensuse 11.1. From the Xen config file I see that the configuration shouldn't be done with the xen scripts but with the distribution's tools.
From virt-manager I can see a option for "Virtual Network" option that states: "Choose this options if your host is disconnected, connected via wireless or dynamically configured with NetworkManager", but there are no entries in the dropdown list and I can't find how to add them.
From the list's archive I found this post: http://lists.opensuse.org/opensuse-virtual/2009-01/msg00018.html. But doesn't seem to work. I need to use NetworkManager and I'm trying to add two interfaces to the domU, one only to communicate with other domUs and with the dom0, and a second one that should be bridged to the public network.
Any pointers would be much appreciated.
-- Ciro Iriarte http://cyruspy.wordpress.com -- -- To unsubscribe, e-mail: opensuse-virtual+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-virtual+help@opensuse.org
-- To unsubscribe, e-mail: opensuse-virtual+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-virtual+help@opensuse.org
Ciro Iriarte wrote:
Hi, i've been using Xen with SLES10SP2 for some time and now I need run some domUs on opensuse 11.1. From the Xen config file I see that the configuration shouldn't be done with the xen scripts but with the distribution's tools.
Correct. Starting with openSUSE11.1 and SLE11 we no longer use the xen networking scripts but instead use YaST to configure bridges and the like.
From virt-manager I can see a option for "Virtual Network" option that states: "Choose this options if your host is disconnected, connected via wireless or dynamically configured with NetworkManager", but there are no entries in the dropdown list and I can't find how to add them.
I've successfully used virt-manager in 11.2 to create networks but these are not known to sysconfig, so actions like 'rcnetwork restart' can wreak havoc. In fact, this is one of the primary reasons we deprecated the xen networking scripts. Using YaST and ifcfg scripts, we can do things like 'rcnetwork restart' - even with vms running! The vm's vifs are reconnected following bridge restart. From vm's perspective, it's as if the lan cable was disconnected then reconnected again. BTW, you can't use NetworkManager with bridged setups - it has no knowledge of bridged configurations. You'll have to use 'traditional networking' mode.
From the list's archive I found this post: http://lists.opensuse.org/opensuse-virtual/2009-01/msg00018.html. But doesn't seem to work. I need to use NetworkManager and I'm trying to add two interfaces to the domU, one only to communicate with other domUs and with the dom0, and a second one that should be bridged to the public network.
Any pointers would be much appreciated.
Just use YaST (yast2 lan) to create your networks. E.g., to create a bridge start yast2 lan, add a device, select 'bridge' device type, and then select the dom0 interface you want enslaved to the bridge. The YaST interface is quite intuitive IMO. Cheers, Jim -- To unsubscribe, e-mail: opensuse-virtual+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-virtual+help@opensuse.org
2009/9/22 Jim Fehlig <jfehlig@novell.com>:
Ciro Iriarte wrote:
Hi, i've been using Xen with SLES10SP2 for some time and now I need run some domUs on opensuse 11.1. From the Xen config file I see that the configuration shouldn't be done with the xen scripts but with the distribution's tools.
Correct. Starting with openSUSE11.1 and SLE11 we no longer use the xen networking scripts but instead use YaST to configure bridges and the like.
From virt-manager I can see a option for "Virtual Network" option that states: "Choose this options if your host is disconnected, connected via wireless or dynamically configured with NetworkManager", but there are no entries in the dropdown list and I can't find how to add them.
I've successfully used virt-manager in 11.2 to create networks but these are not known to sysconfig, so actions like 'rcnetwork restart' can wreak havoc. In fact, this is one of the primary reasons we deprecated the xen networking scripts. Using YaST and ifcfg scripts, we can do things like 'rcnetwork restart' - even with vms running! The vm's vifs are reconnected following bridge restart. From vm's perspective, it's as if the lan cable was disconnected then reconnected again.
BTW, you can't use NetworkManager with bridged setups - it has no knowledge of bridged configurations. You'll have to use 'traditional networking' mode.
From the list's archive I found this post: http://lists.opensuse.org/opensuse-virtual/2009-01/msg00018.html. But doesn't seem to work. I need to use NetworkManager and I'm trying to add two interfaces to the domU, one only to communicate with other domUs and with the dom0, and a second one that should be bridged to the public network.
Any pointers would be much appreciated.
Just use YaST (yast2 lan) to create your networks. E.g., to create a bridge start yast2 lan, add a device, select 'bridge' device type, and then select the dom0 interface you want enslaved to the bridge. The YaST interface is quite intuitive IMO.
Cheers, Jim
Thanks to both. Too bad that I had to disable it, i'm preparing a laptop for managment to do Demos outside the office, try to explain them how to configure Wifi with more than 2 click :s I've setup 3 bridges br0 --> should be "host only/virtual network", no interfaces attached. br1 --> bridged with wlan br2 --> bridged with eth0 In virt-manager, "Virtual network" still doesn't have any selectable entry and "Shared physical device" only allows me to select br2 (eth0 is active). How can I achieve the "interdomU network"?, maybe doing a bridge to loopback? Regards, -- Ciro Iriarte http://cyruspy.wordpress.com -- -- To unsubscribe, e-mail: opensuse-virtual+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-virtual+help@opensuse.org
Ciro Iriarte wrote:
I've setup 3 bridges
br0 --> should be "host only/virtual network", no interfaces attached.
This would be your "interdomU network". - a bridge with no IP address and no dom0 interface attached.
br1 --> bridged with wlan br2 --> bridged with eth0
In virt-manager, "Virtual network" still doesn't have any selectable entry and "Shared physical device" only allows me to select br2 (eth0 is active).
How can I achieve the "interdomU network"?, maybe doing a bridge to loopback?
Just specify br0 in domU config, e.g. vif=[ 'mac=00:16:3e:xx:yy:zz,bridge=br0', ] Any vms connected to br0 will be able to communicate with each other, but not the host. This assumes static IP addrs in the vms. If you want DHCP, you will need to start dnsmasq process for the virtual network (bridge). I have one running for an isolated network now: xen33:~ # ps aux | grep dnsmasq dnsmasq 5843 0.0 0.0 4384 812 ? S 10:18 0:00 /usr/sbin/dnsmasq --keep-in-foreground --strict-order --bind-interfaces --pid-file --conf-file --listen-address 192.168.152.1 --except-interface lo --dhcp-leasefile=/var/lib/libvirt/dhcp-private.leases --dhcp-range 192.168.152.2,192.168.152.254 In this case, the bridge has a IP addr as well (192.168.152.1) - so domUs and dom0 can talk to each other, but domUs can't reach other machines on the LAN. BTW, I created this network via libvirt using the following XML xen33:~ # cat /tmp/virbr2.xml <network> <name>private</name> <bridge name="virbr2" /> <ip address="192.168.152.1" netmask="255.255.255.0"> <dhcp> <range start="192.168.152.2" end="192.168.152.254" /> </dhcp> </ip> </network> xen33:~ # virsh net-create /tmp/virbr0.xml xen33:~ # virsh net-list Name State Autostart ----------------------------------------- br0 active yes private active no See http://libvirt.org/formatnetwork.html for description of network XML format. I'm not aware of any bugs in libvirt networking APIs in 11.1. virt-manager uses these APIs, but you may be hitting some bugs in virt-man itself - which can be circumvented by using libvirt's virsh command directly. Cheers, Jim -- To unsubscribe, e-mail: opensuse-virtual+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-virtual+help@opensuse.org
2009/9/22 Jim Fehlig <jfehlig@novell.com>:
Ciro Iriarte wrote:
I've setup 3 bridges
br0 --> should be "host only/virtual network", no interfaces attached.
This would be your "interdomU network". - a bridge with no IP address and no dom0 interface attached.
br1 --> bridged with wlan br2 --> bridged with eth0
In virt-manager, "Virtual network" still doesn't have any selectable entry and "Shared physical device" only allows me to select br2 (eth0 is active).
How can I achieve the "interdomU network"?, maybe doing a bridge to loopback?
Just specify br0 in domU config, e.g.
vif=[ 'mac=00:16:3e:xx:yy:zz,bridge=br0', ]
Any vms connected to br0 will be able to communicate with each other, but not the host. This assumes static IP addrs in the vms.
If you want DHCP, you will need to start dnsmasq process for the virtual network (bridge). I have one running for an isolated network now:
xen33:~ # ps aux | grep dnsmasq dnsmasq 5843 0.0 0.0 4384 812 ? S 10:18 0:00 /usr/sbin/dnsmasq --keep-in-foreground --strict-order --bind-interfaces --pid-file --conf-file --listen-address 192.168.152.1 --except-interface lo --dhcp-leasefile=/var/lib/libvirt/dhcp-private.leases --dhcp-range 192.168.152.2,192.168.152.254
In this case, the bridge has a IP addr as well (192.168.152.1) - so domUs and dom0 can talk to each other, but domUs can't reach other machines on the LAN. BTW, I created this network via libvirt using the following XML
xen33:~ # cat /tmp/virbr2.xml <network> <name>private</name> <bridge name="virbr2" /> <ip address="192.168.152.1" netmask="255.255.255.0"> <dhcp> <range start="192.168.152.2" end="192.168.152.254" /> </dhcp> </ip> </network>
xen33:~ # virsh net-create /tmp/virbr0.xml xen33:~ # virsh net-list Name State Autostart ----------------------------------------- br0 active yes private active no
See http://libvirt.org/formatnetwork.html for description of network XML format. I'm not aware of any bugs in libvirt networking APIs in 11.1. virt-manager uses these APIs, but you may be hitting some bugs in virt-man itself - which can be circumvented by using libvirt's virsh command directly.
Cheers, Jim
Ok, I tried the virsh procedure. virt-manager inmediately found the new "Virtual Network"and all my domUs could communicate without issues (tried rcnetwork restart before restarting and that didn't work). Tried to restart and the virbr0 interface was gone, BUT virsh net-list found my originally defined br0 and br2 (i'm not sure why br1 is not listed). So I recreated the virtual network cards using this two bridges and the "Virtual Network" option. virsh sounds alien to me, but a "xm list -l > tmp.sxp, vi tmp.sxp, xm delete tmp, xm new -F tmp.sxp" didn't work in this version either, even trying to reimport without modifying the output. Weird. It's funny that the Virtual Network specifically states it's use with NetworkManager, but it doesn't support bridges according with what I've read in forums and maillists... Thanks a lot Regards, Ciro -- Ciro Iriarte http://cyruspy.wordpress.com -- -- To unsubscribe, e-mail: opensuse-virtual+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-virtual+help@opensuse.org
On Tuesday 22 September 2009, Jim Fehlig wrote:
Just use YaST (yast2 lan) to create your networks. E.g., to create a bridge start yast2 lan, add a device, select 'bridge' device type, and then select the dom0 interface you want enslaved to the bridge. The YaST interface is quite intuitive IMO.
Is there any documentation on how to do this programmatically? I know Yast is intuitive, but I need to configure a remote server that is hosting a bunch of VMs and I'd rather have everything scripted. Paul -- Paul Reeves -- To unsubscribe, e-mail: opensuse-virtual+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-virtual+help@opensuse.org
participants (4)
-
Ciro Iriarte
-
Jason Douglas
-
Jim Fehlig
-
Paul Reeves