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
2.05k stars 387 forks source link

[vioscsi] Windows on ARM64 stops booting with v208 driver #695

Closed jernejs closed 2 years ago

jernejs commented 2 years ago

I've got a Windows 11 VM on RaspberryPi 4 with SSD connected to USB-UASP controller and passed to the VM with

-device virtio-scsi-pci,id=scsi0,iothread=diskthread \
 -blockdev driver=raw,node-name=ssd,cache.direct=on,discard=unmap,file.driver=host_device,file.filename=/dev/sda,file.aio=io_uring \
 -device scsi-block,drive=ssd,bus=scsi0.0 \

After upgrading the vioscsi driver to v0.1.208 (08/30/2021), the VM started hanging at bootup (the Windows bootup swirl would spin, but the VM would never boot to GUI); if I booted the install ISO and tried loading the driver there, the driver never seemed to finish loading (WinPE environment remained responsive, but disk would never appear). I had to revert the VM to v0.1.204 (07/13/2021) to get it to boot up again.

vrozenfe commented 2 years ago

It must be happening due a regression introduced in build 204 and hopefully fixed in one of the recent builds. can you please check what is the volume of "max_segments" reported by $ cat /sys/block/sda/queue/max_segments

Thanks, Vadim.

jernejs commented 2 years ago
skynet ~ # cat /sys/block/sda/queue/max_segments
2048

Driver from the 204 Fedora ISO works for me though.

vrozenfe commented 2 years ago

Sorry, my bad. Introduced in build 205. What distro are you running on RPi and can you please post the entire qemu command line?

Thanks, Vadim.

jernejs commented 2 years ago

I'm running Gentoo AArch64, currently on kernel raspberrypi-sources-5.10.11_p20210201 and qemu-6.0.0-r54. Full qemu command line is

/usr/bin/qemu-system-aarch64 -daemonize -pidfile /run/vm/winarm.pid -monitor unix:/run/vm/winarm.monitor,server,nowait -runas qemu --enable-kvm -M virt -nodefaults -m 6144 -rtc base=localtime -boot menu=on -cpu host -smp cpus=4,cores=4,sockets=1 -uuid ########-####-####-####-############ -drive if=pflash,file=/pub/vm/winarm/flash0.img,format=raw,readonly=on -drive if=pflash,file=/pub/vm/winarm/flash1.img,format=raw -device ramfb -vnc :1 -object iothread,id=diskthread -device virtio-scsi-pci,id=scsi0,iothread=diskthread -blockdev driver=raw,node-name=ssd,cache.direct=on,discard=unmap,file.driver=host_device,file.filename=/dev/sda,file.aio=io_uring -device scsi-block,drive=ssd,bus=scsi0.0 -netdev type=tap,id=lan,ifname=kvm0,script=no,downscript=no -device virtio-net-pci,disable-legacy=on,disable-modern=off,netdev=lan,mac=00:0c:29:cc:a1:ee -device virtio-keyboard-pci -device virtio-tablet-pci -chardev socket,id=qga0,path=/run/vm/winarm.qga,server=on,wait=off -device virtio-serial -device virtserialport,chardev=qga0,name=org.qemu.guest_agent.0

vrozenfe commented 2 years ago

@jernejs Can you please try and let me know if the vioscsi driver from build 215 can solve this problem? https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/archive-virtio/virtio-win-0.1.215-1/

Try reduce the maximum transfer size by adding ',max_sectors=32' parameter to "-device virtio-scsi-pci,id=scsi0,iothread=diskthread"

Thanks, Vadim.

jernejs commented 2 years ago

215 vioscsi driver works for me, even without adjusting max_sectors.

vrozenfe commented 2 years ago

Thanks. Clossing the issue. Vadim.