Hey all
I am trying to set up a VM under QEMU/KVM with virt-manager. The end goal is to use a Windows 10 virtual machine to play games with a GPU passthrough using the instructions on the arch wiki. I have figured out the technicalities with the dedicated GPU, however the network is giving me problems.
When using Windows 10 in a virtual machine, the network adapter does not work. In the Device Manager, it shows the message “Windows is still setting up the class configuration for this device. (Code 56)”
(Screenshots are not available here, since I can’t post any media or links.)
Looking up the error message gave me some clues. One common problem seems to be a VPN software called Checkpoint VPN, installed on Windows. Since it’s a “naked” Windows installation, this can’t be problem. Other articles mention using the Windows built-in network troubleshoot program or using the “Network Reset” function. Both things did not solve this problem for me.
I think it is a categorical problem, since using a USB ethernet adapter and using USB passthrought to directly “connect” it to the virtual machine leads to the same problem. So it seems that no matter what network adapter (virtual or physical) I give the virtual machine, it always has this “code 56” issue.
I reinstalled Manjaro on the host multiple times at this point, thinking it may be caused by a VPN client I have installed on the host system. But there seems to be no connection with this issue and the VPN client being installed or running.
Curiously enough, this error does not manifest in Windows 11. I installed the latest Windows 11 from the Microsoft site and the network worked right away. Unfortunately however, I can’t use Windows 11 just yet because there seems to be a problem with the Nvidia drivers available for Windows 11. I get sporadic freezes, related to the nvlddmkm component.
Windows 8.1 also works without problems. Since this version of Windows has practically already been buried by Microsoft, using this version also isn’t a possibility in my case.
Host system specs:
- MSI GS66 UH11
- Intel 11th Gen Intel(R) Core™ i9-11900H @ 2.50GHz
- Ethernet controller: Intel Killer E3000 2.5GbE Controller
- Wireless controller: Intel Wi-Fi 6 AX210/AX211/AX411 160MHz
Host system software:
- Linux kernel: 5.14.10-1
- QEMU: 6.1.0-2
- virt-manager: 3.2.0-1
- All pacman packages are up to date.
XML configuration of the Windows 10 virtual machine, using mostly default options from virt-manager:
<domain type="kvm">
<name>win10-test</name>
<uuid>273639b5-7ab9-4e5d-8c56-e3b2efcca07c</uuid>
<metadata>
<libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0">
<libosinfo:os id="http://microsoft.com/win/10"/>
</libosinfo:libosinfo>
</metadata>
<memory unit="KiB">8192000</memory>
<currentMemory unit="KiB">8192000</currentMemory>
<vcpu placement="static">10</vcpu>
<os>
<type arch="x86_64" machine="pc-q35-6.1">hvm</type>
<loader readonly="yes" type="pflash">/usr/share/edk2-ovmf/x64/OVMF_CODE.fd</loader>
<nvram>/var/lib/libvirt/qemu/nvram/win10-test_VARS.fd</nvram>
</os>
<features>
<acpi/>
<apic/>
<hyperv>
<relaxed state="on"/>
<vapic state="on"/>
<spinlocks state="on" retries="8191"/>
</hyperv>
<vmport state="off"/>
</features>
<cpu mode="host-model" check="partial">
<topology sockets="1" dies="1" cores="5" threads="2"/>
</cpu>
<clock offset="localtime">
<timer name="rtc" tickpolicy="catchup"/>
<timer name="pit" tickpolicy="delay"/>
<timer name="hpet" present="no"/>
<timer name="hypervclock" present="yes"/>
</clock>
<on_poweroff>destroy</on_poweroff>
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<pm>
<suspend-to-mem enabled="no"/>
<suspend-to-disk enabled="no"/>
</pm>
<devices>
<emulator>/usr/bin/qemu-system-x86_64</emulator>
<disk type="file" device="disk">
<driver name="qemu" type="qcow2"/>
<source file="/var/lib/libvirt/images/win10-test.qcow2"/>
<target dev="vda" bus="virtio"/>
<boot order="1"/>
<address type="pci" domain="0x0000" bus="0x04" slot="0x00" function="0x0"/>
</disk>
<disk type="file" device="cdrom">
<driver name="qemu" type="raw"/>
<source file="/home/test/VMs/Images/Win10_21H1_German_x64.iso"/>
<target dev="sdb" bus="sata"/>
<readonly/>
<boot order="2"/>
<address type="drive" controller="0" bus="0" target="0" unit="1"/>
</disk>
<disk type="file" device="cdrom">
<driver name="qemu" type="raw"/>
<source file="/home/test/VMs/Images/virtio-win-0.1.208.iso"/>
<target dev="sdc" bus="sata"/>
<readonly/>
<address type="drive" controller="0" bus="0" target="0" unit="2"/>
</disk>
<controller type="usb" index="0" model="qemu-xhci" ports="15">
<address type="pci" domain="0x0000" bus="0x02" slot="0x00" function="0x0"/>
</controller>
<controller type="sata" index="0">
<address type="pci" domain="0x0000" bus="0x00" slot="0x1f" function="0x2"/>
</controller>
<controller type="pci" index="0" model="pcie-root"/>
<controller type="pci" index="1" model="pcie-root-port">
<model name="pcie-root-port"/>
<target chassis="1" port="0x10"/>
<address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x0" multifunction="on"/>
</controller>
<controller type="pci" index="2" model="pcie-root-port">
<model name="pcie-root-port"/>
<target chassis="2" port="0x11"/>
<address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x1"/>
</controller>
<controller type="pci" index="3" model="pcie-root-port">
<model name="pcie-root-port"/>
<target chassis="3" port="0x12"/>
<address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x2"/>
</controller>
<controller type="pci" index="4" model="pcie-root-port">
<model name="pcie-root-port"/>
<target chassis="4" port="0x13"/>
<address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x3"/>
</controller>
<controller type="pci" index="5" model="pcie-root-port">
<model name="pcie-root-port"/>
<target chassis="5" port="0x14"/>
<address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x4"/>
</controller>
<controller type="pci" index="6" model="pcie-root-port">
<model name="pcie-root-port"/>
<target chassis="6" port="0x15"/>
<address type="pci" domain="0x0000" bus="0x00" slot="0x02" function="0x5"/>
</controller>
<controller type="virtio-serial" index="0">
<address type="pci" domain="0x0000" bus="0x03" slot="0x00" function="0x0"/>
</controller>
<interface type="network">
<mac address="52:54:00:f5:3c:f5"/>
<source network="default"/>
<model type="e1000e"/>
<address type="pci" domain="0x0000" bus="0x01" slot="0x00" function="0x0"/>
</interface>
<channel type="spicevmc">
<target type="virtio" name="com.redhat.spice.0"/>
<address type="virtio-serial" controller="0" bus="0" port="1"/>
</channel>
<input type="tablet" bus="usb">
<address type="usb" bus="0" port="1"/>
</input>
<input type="mouse" bus="ps2"/>
<input type="keyboard" bus="ps2"/>
<graphics type="spice" autoport="yes">
<listen type="address"/>
<image compression="off"/>
</graphics>
<sound model="ich9">
<address type="pci" domain="0x0000" bus="0x00" slot="0x1b" function="0x0"/>
</sound>
<audio id="1" type="spice"/>
<video>
<model type="qxl" ram="65536" vram="65536" vgamem="16384" heads="1" primary="yes"/>
<address type="pci" domain="0x0000" bus="0x00" slot="0x01" function="0x0"/>
</video>
<redirdev bus="usb" type="spicevmc">
<address type="usb" bus="0" port="2"/>
</redirdev>
<redirdev bus="usb" type="spicevmc">
<address type="usb" bus="0" port="3"/>
</redirdev>
<memballoon model="virtio">
<address type="pci" domain="0x0000" bus="0x05" slot="0x00" function="0x0"/>
</memballoon>
</devices>
</domain>
Most recent stable VirtIO driver packages and guest tools are installed. Latest Spice guest tools are also installed.
Variations I have tried so far:
- Using BIOS and OVMF_CODE.fd UEFI
- VirtIO and SATA disks
- Assigning network adapter after the Windows 10 installation
- NAT and bridge mode for the network adapter
- “e1000e” and VirtIO ethernet adapter
- USB ethernet adapter (directly assigned to the virtual machine via USB passthrough)
Windows 10 versions I have tried:
- Windows 10 1809
- Windows 10 1909
- Windows 10 20H2
- Windows 10 21H1
Another weird bit: During the Windows 10 installation process, there is a phase where it says “Getting devices ready” with a percentage number. When I have a network adapter assigned to the virtual machine during the installation, it stays at a certain percentage (exact number depending on the Windows version) for quiet a long time (ca. 5-10 minutes). When I don’t assign the virtual machine a network adapter for the installation process, the “Getting devices ready” phase passes relatively fast without getting stuck at a particular number.
Has anyone a lead on what could cause this issue?
Thanks in advance