Win7 KVM guest with Virtio network driver can't connect to network

grindstone asked:

I have a ubuntu 15 and KVM. I have an XP guest that appears to basically work. I then set up a Win7 64 bit guest. It would not connect to the LAN.

Then I found out about virtio drivers. I downloaded them and burned them to a dvd that is guest accessible. In the KVM manager I changed the NIC setup for that guest to <network source: Host Device br0 (Empty Bridge)> and <device model: virtio>. I don’t know what empty bridge means, but as I mentioned the XP machine seems to have network access. (although I cannot ping host to xp guest, but I think that may be another issue.)

I then ran the Win7 guest and updated the nic driver to use the virtio drivers from the CD drive. I appeared to work fine. But it cannot connect to the network.

I am very new to virtual machines, so if there is anything additional that needs to be mentioned here please just ask and I will post.

Can anyone suggest something? Thanks.

OK, More information that may be of some use:
my /etc/network/interfaces file reads:

auto lo iface lo inet loopback

auto eth0 iface eth0 inet manual

auto br0 iface br0 inet dhcp
        bridge_ports eth0
        bridge_stp off
        bridge_fd 0
        bridge_maxwait 0

BUT………..

ifconfig returns this……….

br0       Link encap:Ethernet  HWaddr fe:54:00:ca:f4:18  
          inet6 addr: fe80::7c6d:a7ff:fe11:d427/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1166 errors:0 dropped:0 overruns:0 frame:0
          TX packets:928 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:114960 (114.9 KB)  TX bytes:295110 (295.1 KB)

br0:avahi Link encap:Ethernet  HWaddr fe:54:00:ca:f4:18  
          inet addr:169.254.7.2  Bcast:169.254.255.255  Mask:255.255.0.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

enp3s0    Link encap:Ethernet  HWaddr 4c:cc:6a:08:b3:ef  
          inet addr:192.168.0.139  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::4ecc:6aff:fe08:b3ef/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:56707 errors:0 dropped:0 overruns:0 frame:0
          TX packets:24325 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:15903684 (15.9 MB)  TX bytes:3391587 (3.3 MB)

enp5s0    Link encap:Ethernet  HWaddr 60:e3:27:04:a1:b3  
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:839383 errors:0 dropped:0 overruns:0 frame:0
          TX packets:839383 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:214964931 (214.9 MB)  TX bytes:214964931 (214.9 MB)

macvtap0  Link encap:Ethernet  HWaddr 50:54:00:6c:7e:66  
          inet6 addr: fe80::5254:ff:fe6c:7e66/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:14509 errors:0 dropped:0 overruns:0 frame:0
          TX packets:826 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:500 
          RX bytes:983760 (983.7 KB)  TX bytes:122767 (122.7 KB)

virbr0    Link encap:Ethernet  HWaddr 52:54:00:26:85:aa  
          inet addr:192.168.122.1  Bcast:192.168.122.255  Mask:255.255.255.0
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

vnet0     Link encap:Ethernet  HWaddr fe:54:00:ca:f4:18  
          inet6 addr: fe80::fc54:ff:feca:f418/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:651 errors:0 dropped:0 overruns:0 frame:0
          TX packets:183 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:500 
          RX bytes:78092 (78.0 KB)  TX bytes:56139 (56.1 KB)

SO these were clearly automatically set up. I notice some of the interfaces are ip version 6, and I don’t know why. Also, I will note that the XP machine I mentioned that basically works is using the enp3s0 interface as a network source and that the KVM software fully describes this interface as Host device enp3s0: macvtap ( and then warns that such a configuration usually does not work for host to guest communication. Apparently, that is true is this case as well.)

My answer:


An empty bridge is one that is not connected to any other network. So you have placed your VM on a completely isolated network, not connected to anything else, and thus not capable of communicating with anything. It may as well be unplugged.

And the reason your bridge is empty is that you haven’t placed either of your NICs in bridge_ports. Rather, it says eth0, which is not the name of a NIC that you have in your system.

To fix the problem, add the correct NIC to your bridge (and configure IP on the bridge instead of the NIC, if necessary).

(Of course, you aren’t supposed to be doing anything with Windows XP anymore…)


View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.