2009/9/22 Jim Fehlig
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