I created a Windows10 VM using qemu a LONG time ago and have copied it around to various servers and have been using it with different
-smp levels (I start it just using command line arguments and I just use
-smp 4 or
-smp 8 or whatever) based on the capabilities of the server. Basically I use about 75% of the available CPU cores on the system but never >10. Same with
-mem. I run it with
-snapshot because I just use it for testing installation etc.
All my servers are x86_64 running Ubuntu 20.04 (QEMU 4.2.1)
That has worked fine but I needed to update the Windows VM image with newer patches etc. so I did that (without
-snapshot obviously), and it worked great. Then I copied the VM image around to my other servers, but last night the testing failed on one of them.
Retrying shows that when this image starts on that server it pauses for a long time, then throws a BSOD with the error "power driver state failure", then it finally reboots and it seems fine after that. However, this is not good because by the time it's finally up my tests have all timed out etc.
I searched for this error and didn't come up with much. So I decided to just try random stuff :). The first thing I noticed is that while both my "working" system and the "non-working" system both use
-mem 8G, the working system used
-smp 4 while the non-working system used
-smp 10: the non-working system is a larger server with more CPUs; the end of
processor : 19 vendor_id : GenuineIntel cpu family : 6 model : 79 model name : Intel(R) Xeon(R) CPU E5-2630 v4 @ 2.20GHz
So I tried restarting qemu on the "non-working" system with
-smp 4 and lo and behold it worked! I also tried
-smp 8 and that failed as well, but
-smp 6 worked.
So, that's unfortunate for me. Does anyone have any ideas of why this might happen, why this new version of the image would have this problem when the old one worked fine, if there's any way to fix it from within the image (changing the QEMU startup will be annoying since it requires changing a lot of test scripting throughout a lot of Git branches), or other hints?
My QEMU start line is:
qemu-system-x86_64 -enable-kvm -cpu host,hv_relaxed,hv_spinlocks=0x1fff,hv_vapic,hv_time \ -vnc 0.0.0.0:5 -pidfile qemu-installer-vm.pid -daemonize \ -device nec-usb-xhci -device usb-tablet \ -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0,bootindex=1 \ -drive file=win10-x64.qcow2,if=none,id=drive-ide0-0-0,format=qcow2 -vga std \ -net user,hostfwd=tcp::6350-:22 -net nic -name windows \ -m 8G -smp 10 -snapshot
If I change the
-smp 10 to
-smp 4 it works.