virtio-win / kvm-guest-drivers-windows

Windows paravirtualized drivers for QEMU\KVM
https://www.linux-kvm.org/page/WindowsGuestDrivers
BSD 3-Clause "New" or "Revised" License
1.99k stars 382 forks source link

0.1.215 - NetKVM install on Win10 20H2 doesn't work - manual W2k12 driver installs fine #745

Open jakieu opened 2 years ago

jakieu commented 2 years ago

Describe the bug With ISO 0.1.215 the installation of NetKVM network driver on Windows 10 20H2 doesn't work. The installer skips the file after a few minutes (timeout) and the manual installation via device manager doesn't work at all, see attached screenshot. Manual install with w2k12 driver works just fine.

To Reproduce Unpatched Win 10 20H2 x64 ISO installed as a Proxmox guest, ISO 0.1.215 mounted to the VM. Start the .MSI or try to install the w10 driver via device manager.

Screenshots pve_win10_20h2_netkvm

Host:

VM:

vrozenfe commented 2 years ago

@jakieu Do you know if it is https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/archive-virtio/virtio-win-0.1.215-1/ , or https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/archive-virtio/virtio-win-0.1.215-2/ ?

Thanks, Vadim.

jakieu commented 2 years ago

downloadlink was https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/latest-virtio/virtio-win.iso

So if it's latest, I assume it is the most recent version... ISO has the following hash values:

MD5 14E5276177A1FB87D3707DB8AAAEE0F9 SHA-1 38364F050257B7C34B9F0C4B5D234C4C2CC5929D SHA-256 B9D8442C53E2383B60E49905A9E5911419A253C6A1838BE3EA90C7209B26B5D7

Edit: Yes, it's the ISO from https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/archive-virtio/virtio-win-0.1.215-2/ hash values match

jakieu commented 2 years ago

One important (!) additional info: I'm running Proxmox VE in nested virtualization. Please excuse that I havn't mentioned it earlier. -.-

Host ist Windows 11 22000.556 with Hyper-V role installed. Proxmox is running on top of Hyper-V (config version 10 to support AMD Ryzen nested virtualization) and inside Proxmox I tried to use Windows 10.

Currently I'm trying to gather some more information. Started an install of Win10 21H2 and will try to install 0.1.215-2 drivers there. And if this doesn't work, I'll try to use 0.1.208. I'm almost a 100% sure that I never faced such an issue before with Proxmox VE on bare metal. Maybe it's not a driver issue at all and something doesn't add up with nested virtualization.

Is there anything useful I can provide for you, anything you want to take a look at?

jakieu commented 2 years ago

0.1.208 (w10) manual install works just as expected. So it seems to be an issue with 0.1.215.

vrozenfe commented 2 years ago

@jakieu By any chance, can you post setupapi.dev.log files ( https://docs.microsoft.com/en-us/windows-hardware/drivers/install/setupapi-logging--windows-vista-and-later- ) for both cases?

Thanks, Vadim.

kostyanf14 commented 2 years ago

Looks like duplicated issue: https://github.com/virtio-win/kvm-guest-drivers-windows/issues/750

kostyanf14 commented 2 years ago

Hi @vrozenfe, @jakieu

I tested clean QEMU and can't reproduce this issue.

My env:

kostyanf14 commented 2 years ago

@jakieu

Did you see the same problem on other distros as well?

jakieu commented 2 years ago

I just tried this on a non-nested Installation of Proxmox with Windows 10 21H1. I got the same issue there. Nothing "fancy" in Proxmox (PVE 7.1-11, Linux 5.13.19-6-pve). Supermicro H12SSW-NTR with AMD Epyc 74F3, 512GB RAM.

grafik

€dit:

750 looks like the exact same issue.

€dit2: Like mentioned in #750 there's a long thread in the Proxmox forums (https://forum.proxmox.com/threads/no-network-adapter-in-fresh-windows-server-after-upgrade-to-proxmox-7.92094/).

kostyanf14 commented 2 years ago

Hi @vrozenfe, @jakieu

I successfully reproduce the issue in non-Proxmox env. I use env from https://github.com/virtio-win/kvm-guest-drivers-windows/issues/750#issuecomment-1079963870. Will investigate and update the thread.

kostyanf14 commented 2 years ago

Hi @vrozenfe, @jakieu

This is setupapi.dev.log when the driver has error code 56.

Stages Setup Import Driver Package and SetupCopyOEMInf are successful, but Device Install (UpdateDriverForPlugAndPlayDevices) is no.

Device start failed with problem 0x38 (CM_PROB_NEED_CLASS_CONFIG). According to MSDN, this problem code is frequently transient. And in my setup reinstall or network reset helps.

Pure QEMU (v6.1.0 from upstream) command line to reproduce issue:

/qemu/u-v6.1.0/bin/qemu-system-x86_64 \
    -machine pc-q35-6.1,accel=kvm \
    -cpu host \
    -m 4096 \
    -smp 4 \
    -uuid 59516d7a-24ab-48af-89cc-7b215b82c40c \
    -no-user-config \
    -nodefaults \
    -boot menu=on,strict=on \
    -device pcie-root-port,port=0x10,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x2 \
    -device pcie-root-port,port=0x11,chassis=2,id=pci.2,bus=pcie.0,addr=0x2.0x1 \
    -device pcie-root-port,port=0x12,chassis=3,id=pci.3,bus=pcie.0,addr=0x2.0x2 \
    -device qemu-xhci,p2=15,p3=15,id=usb,bus=pci.2,addr=0x0 \
    -blockdev '{"driver":"file","filename":"/mnt/user/auto_hck/images/srv2019_de.qcow2","node-name":"libvirt-3-storage","cache":{"direct":false,"no-flush":false},"auto-read-only":true,"discard":"unmap"}' \
    -blockdev '{"node-name":"libvirt-3-format","read-only":false,"discard":"unmap","cache":{"direct":false,"no-flush":false},"driver":"qcow2","file":"libvirt-3-storage","backing":null}' \
    -device virtio-blk-pci,bus=pci.3,addr=0x0,drive=libvirt-3-format,id=virtio-disk0,bootindex=2,write-cache=on \
    -blockdev '{"driver":"file","filename":"/usr/share/virtio-win/virtio-win-0.1.215.iso","node-name":"libvirt-2-storage","auto-read-only":true,"discard":"unmap"}' \
    -blockdev '{"node-name":"libvirt-2-format","read-only":true,"driver":"raw","file":"libvirt-2-storage"}' \
    -device ide-cd,bus=ide.0,drive=libvirt-2-format,id=sata0-0-0 \
    -blockdev '{"driver":"file","filename":"/home/user/Downloads/Win10_21H2_German_x64.iso","node-name":"libvirt-1-storage","auto-read-only":true,"discard":"unmap"}' \
    -blockdev '{"node-name":"libvirt-1-format","read-only":true,"driver":"raw","file":"libvirt-1-storage"}' \
    -device ide-cd,bus=ide.2,drive=libvirt-1-format,id=sata0-0-2,bootindex=1 \
    -netdev tap,script=/etc/qemu-ifup,id=hostnet0,vhost=on \
    -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:25:cf:bc,bus=pci.1,addr=0x0 \
    -device usb-tablet,id=input0,bus=usb.0,port=2 \
    -vnc :0 \
    -device qxl-vga

In conclusion, this looks like a Microsoft issue, not NetKVM.

kostyanf14 commented 2 years ago

One more comment. I always use the same driver: NetKVM/w10/amd64/netkvm.inf

vrozenfe commented 2 years ago

@kostyanf14

can you please reproduce the issue with LogLevel 0x0000FFFF ? https://docs.microsoft.com/en-us/windows-hardware/drivers/install/setting-setupapi-logging-levels

Thanks, Vadim.

kostyanf14 commented 2 years ago

@vrozenfe

Yes. I removed old one file, so this one contains only NetKVM driver fail setupapi.dev-verbose-fail.log

vrozenfe commented 2 years ago

just for the reference https://bugzilla.redhat.com/show_bug.cgi?id=2070400

bokkabonga commented 2 years ago

Has anyone found any workaround for this? Sadly switching to the english ISO or reinstalling all existsing VMs is not an option here.

Spacefish commented 2 years ago

Has anyone found any workaround for this? Sadly switching to the english ISO or reinstalling all existsing VMs is not an option here.

Setting the machine type to 5.1 works for me, it only breaks with machine type 5.2 and later

YanVugenfirer commented 2 years ago

Has anyone found any workaround for this? Sadly switching to the english ISO or reinstalling all existsing VMs is not an option here.

Setting the machine type to 5.1 works for me, it only breaks with machine type 5.2 and later

@kostyanf14 intersting clue.

devZer0 commented 1 year ago
     dvi:                {Install Device - exit(0x00000000)} 17:25:09.716
     dvi:           {Core Device Install - exit(0x00000000)} 17:25:09.716
     dvi:           Waiting for device post-install to complete. 17:25:09.716
!!!  dvi:           Timed out waiting for device post-install to complete. 17:28:54.732
     ump:           Server install process exited with code 0x00000000 17:28:54.732

what exactly is happening in "device post-install" , how can we trace that ?

YanVugenfirer commented 1 year ago

@devZer0 it looks like the verbosity of the output to the setupapi log can be controlled through registry

https://learn.microsoft.com/en-us/windows-hardware/drivers/install/setting-setupapi-logging-levels

YanVugenfirer commented 1 year ago

Just in case something not completely broken with network layer installation, try to increase the timeout: https://techjourney.net/change-device-installation-timeout-in-windows-fix-0x000005b4-error/

devZer0 commented 1 year ago

increasing timeout does not help. more verbose setupapi log has been posted above already

i have some new findings. see https://github.com/virtio-win/kvm-guest-drivers-windows/issues/750#issuecomment-1318962809