Description of problem: I have a fullvirt i386 rawhide running inside a Fedora 9 x86_64 host. The problem is that the guest's network will not work until I go to virt-manager, qemu, details, virtual networks and then restart it by hitting stop followed by run. It is interesting that the guest seems to be able to resolve names, looks like it just cannot connect to anything. Version-Release number of selected component (if applicable): libvirt-0.4.6-2.fc9.x86_64 virt-manager-0.5.4-4.fc9.x86_64 How reproducible: always Steps to Reproduce: 1. Install a fully virtualised rawhide guest 2. Run it 3. Attempt to access network from within a guest Actual results: Network is not working. Expected results: Network is working without the need for restart. Additional info: Please let me know what additional useful data I could provide.
This is still the case with Fedora 10 and libvirt-0.5.0-1.fc10.x86_64.
Julian: do you have any special iptables scripts or configuration? Try running these commands before and after the restart and attach the output here: $> brctl show $> iptables -L -v -n $> ps -ef | grep dnsmasq $> ifconfig -a $> cat /proc/sys/net/ipv4/ip_forward
Created attachment 329572 [details] Output of requested commands before restart Nothing that I'm aware of.
Created attachment 329573 [details] Output of requested commands after restart
Created attachment 329574 [details] Differences between the two
There's the problem: [root@snowball jsikorski]# cat /proc/sys/net/ipv4/ip_forward -0 +1 See also bug #240922 Could try and figure out what's loading /etc/sysctl.conf at boot after libvirtd is started ? danpb's theory was that it's NetworkManager, but on F10 with NetworkManager after boot I see: $> grep ip_forward /etc/sysctl.conf net.ipv4.ip_forward = 0 $> cat /proc/sys/net/ipv4/ip_forward 1
On my F10 hosts I see 2 init scripts which either load all sysctl.conf settings, or explicitly set ip_forward - the 'network' script or the 'NetworkManager' script network: sysctl -e -p /etc/sysctl.conf >/dev/null 2>&1 network: sysctl -e -p /etc/sysctl.conf >/dev/null 2>&1 network: action $"Disabling IPv4 packet forwarding: " sysctl -w net.ipv4.ip_forward=0 network: action $"Disabling IPv4 automatic defragmentation: " sysctl -w net.ipv4.ip_always_defrag=0 NetworkManager: sysctl -e -p /etc/sysctl.conf >/dev/null 2>&1 The priority of both of these initscripts means that libvirtd should always be started after they are run. A non-initscript possibility could be that NetworkManager C code has something which sets ip_forward upon connecting to a wifi network ? This could conceivably happen after libvirtd has started, thus breaking connectivity ?
It's possible since I'm using wifi here. Will check that later today.
ip_forward is set to 0 at the time gdm starts, before logging in to the desktop (checked on tty2). But, if the messages appearing during boot-up are right, NM starts after libvirtd, so that should probably explain everything.
*** Bug 463298 has been marked as a duplicate of this bug. ***
The priority is clearly wrong here. How can I assure libvirt gets started after NM?
OK, got it. I had old priorities lying around.
(In reply to comment #12) > I had old priorities lying around. Julian: could you provide a little more info as to what the problem was? e.g. did you have the priority overridden in /etc/chkconfig.d, or had you manually modified the initscripts, or had you manually changed runlevel symlinks? I've added some info to: https://fedoraproject.org/wiki/Reporting_virtualization_bugs#Networking Please make sure that would have helped you resolve the issue. Thanks.
I had old runlevel symlinks lying around, probably from the times when NM wasn't yet moved up in the boot process (S99NetworkManager). It seems that the priorities are not reset during upgrades. Looking at the wiki page, indeed the #chkconfig NetworkManager resetpriorities command was what solved the problem. I *think* I had to reset haldaemon as well so that it starts before NM. Hope that helps.