Page 1 of 1

KVM host network restart breaks client's networking

Posted: Tue Aug 13, 2013 12:39 am
by ^rooker
[PROBLEM]
I had to change the IP of a KVM virtual machine host running Debian 7 (wheezy). I did a "ifdown" and "ifup" of the "br0" interface and didn't expect anymore to do.

I was wrong:

Restarting the KVM host's network breaks the network connectivity for its clients :(
Maybe because the client was still running. I don't know.

I found others who had the same problem. A thread on ubuntuforums called "8.04 KVM Restarting Networking in Host Breaks Networking In Guests" or a post on serverfault.com titled "KVM guests lose connectivity after networking restart" described my problem - but didn't really contain working solutions.

Rebooting the clients also didn't work.


[SOLUTION]
IDEA: Restart the virtualization services :idea:

First, shutdown all client machines. Just to make sure.

Maybe restarting only "libvirtd", but I also restarted the clients:

Code: Select all

$ /etc/init.d/libvirt-guests stop
$/etc/init.d/libvirt-bin stop
Now there should be no services running containing the name "virt". The output of the following command should be rather empty:

Code: Select all

ps aux | grep virt
Restart the services:

Code: Select all

$ /etc/init.d/libvirt-bin start
$ /etc/init.d/libvirt-guests start
You should see "vnet" network interfaces now again. While the problem persisted, they were not there.

If everything went fine, your clients should be able to boot happily with their network interfaces being connected again! :)