KVM host network restart breaks client's networking

Linux howto's, compile information, information on whatever we learned on working with linux, MACOs and - of course - Products of the big evil....
Post Reply
User avatar
^rooker
Site Admin
Posts: 1483
Joined: Fri Aug 29, 2003 8:39 pm

KVM host network restart breaks client's networking

Post 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! :)
Jumping out of an airplane is not a basic instinct. Neither is breathing underwater. But put the two together and you're traveling through space!
Post Reply