QEMU/KVM Win7 Client lost network connectivity

Dear Community,

I experience network problems with a win7 client after a relocation of a workstation. Client and workstation are at the same machine. Due to the relocation the IP of eth0 (the host) changed from 192.168.1.43 to 192.168.43.162. Normally no big deal.

virt-manager starts normal and the guest is running well, too.
I have recognized there is no ‘virtual network’ or ‘network adapter’ listed in QEMU/KVM Manager
starting the virt-manager eth0, eth1 and lo are active (ifconfig)

eth0      Link encap:Ethernet  HWaddr 94:DE:80:6E:62:08  
          inet addr:192.168.abc.162  Bcast:192.168.43.255  Mask:255.255.255.0
          inet6 addr: fe80::96de:80ff:fe6e:6208/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:97130 errors:0 dropped:0 overruns:0 frame:0
          TX packets:111774 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:44825155 (42.7 Mb)  TX bytes:17149571 (16.3 Mb)
          Memory:db900000-db9fffff 


starting the guest ‘macvtap’ has been addet

macvtap0  Link encap:Ethernet  HWaddr 52:54:00:C5:B6:82  
          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:500 
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

The guest system WIN7 shows in ipconfig a hardware adapter with the mac address stated in macvtap but neither dhcd nor a fixed ip4 address will connect to the internet.

Before relocation everything worked well (Internet and Network Connectivity) and no system update at the host system or the guest has been performed. I have no clue what information might be lost/or not have been updated after the IP change.

Thank you for any hint how to proceed because I have some “productive data” at the guest… I tried USB as well to copy this files but have issues with the USB forwarding (but that was as well an issue before relocation). So any hint is welcome.

Many thanks
Bret

Sorry, has been my fault. I picked with the cable the wrong ethernet port. Instead of eth0 eth1. To change NIC Port open Virtual Machine Window, show details, select NIC and change interface.

  1. If you look in your vm manager, there should be several defined virtual networks if they were created by it. Typically, any such networks would be labelled “virbr0, virbr1,” etc.
  2. You can connect a Guest to any Linux Bridge device that exists on your machine, even those created by other virtualization apps, by YAST, by command line. Typically devices created by YAST or command line would be labeled “br0, br1,” etc.
  3. Ordinarily, there is no valid reason to use a MacVtap device. IIRC in some prior personal research, MacVtap capabilities are now implemented in common bridge devices by way of the Linux kernel.

Setting up a network connection for a Guest should be simple and uncomplicated unless for some reason you’re setting up a virtual switch and that happens only in fairly advanced configurations for networks with special needs. For anyone running a fairly common network with less than say… 10 servers… ordinary basic virtual networking using Linux Bridge Devices should be sufficient.

Steps to configure a Guest’s virtual networking for practically all virtualization and isolation technologies except Docker…

  1. Create a Bridge Device on the HostOS, fully configured with its own virtual networking features. I highly recommend using vm manager instead of YAST or any other tool to more easily configure optional features like specifying a network address range, configuring DHCP support (without installing a DHCP server), and how the virtual network connects to the physical network… typically Bridging, NAT or Host-Only. It’s OK and perhaps even recommended to also set up br0 during the YAST “Install virtualization” for Xen, KVM or LXC since that device will not conflict with the naming convention used by libvirt’s vm manager.

  2. In the Guest’s Properties, configure networking to point to a selected Bridge Device depending on the type of desired connection to the physical network and what other machines you’d want to share a network with. Rarely should you need to do anything more than specify the Device, advanced settings are only for special situations (you can read the documentation or post a question to these Forums if you need explanation).

  3. Boot up the Guest. If not automatically configured, the Guest should be configured with a wired (802.3) network connection no matter what the physical network the HostOS is using (for instance the HostOS could be using WiFi but unless you’re doing something highly unusual the Guest should still use the same “wired” network connection). Of course, the Guest’s network configuration can use DHCP if the Linux Bridge Device provides DHCP services, otherwise you’d need to configure a static network configuration.

If you follow the above, networking will “just work.”
If you compare the above to what you see on your HostOS, I’d guess that “br0” will be configured for network bridging, and br1 could be anything else (maybe NAT?). I don’t know that there is an easy way to display the contents of a bridge, the standard “brctl show device” command shows some, but not all info… So, I do recommend using vm manager to create and display your bridge device info.

HTH,
TSU