QEMU - Windows Virtual Machine Not Working

I have used virtualization for windows 10 multiple times on this computer, and I have had problems with this for some time now, but I haven’t done anything about it. I however need Windows to work on my computer for some applications that I need to use that will not work fluently in Linux however I try to fix the problem. Thank you Microsoft for your involvement in making your platform the only that makes stuff function. It’s irritating!

Every time I try to install a Windows VM this happens.

If I create a Linux VM, there’s no problems at all, except that MS stopped the .NET 4 SDK for linux, and now only works with 6 & 7. I use ArcoLinux atm, and thought It might be a problem using something that is Arch based, so I installed a Ubuntu VM, but when I tried to install the SDK’s the runtimes and aspernet cores were installed instead and the SDK’s were nowhere to be found.

I am currently studying C# programming, but I need an IDE that works. I thought that Visual Studio Code should work as it has done that before, but it was a no-show to be honest. I can’t start the debugger.

Screenshot_20230216_160010

So I have three alternatives now.

  1. Fix the debugger.
  2. Get a Win VM working.
  3. Install Windows… on my hardware… I DON’T WANT TO!

Maybe I can use VirtualBox… I don’t like that application though.
Umm…

image

I think that I need to enter the bios… Something might have changed. "/

Nope, went through the BIOS and everything is as it should be kind of. "/

So I installed VMware Workstation/Player and that starts, but ends up with a message too…
image

So I looked into that, and the answer was that VMware is not capable of working when the OS is in safe mode???
https://kb.vmware.com/s/article/2146460

I’m unsure if the fix actually works, so I’m going to attack my computer… I think I’m going to see if I can install and use VMware/QEMU in another distro, like KDE Neon instead, I don’t have time for this at all to be honest.

run lscpu on the host and make sure virtualization shows as enabled. if it is not, you will need to enter BIOS and set it enabled. Then it will be possible to fix the other issues.

[querzion@vmc ~]$ lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Address sizes: 43 bits physical, 48 bits virtual
Byte Order: Little Endian
CPU(s): 16
On-line CPU(s) list: 0-15
Vendor ID: AuthenticAMD
Model name: AMD Ryzen 7 1700X Eight-Core Processor
CPU family: 23
Model: 1
Thread(s) per core: 2
Core(s) per socket: 8
Socket(s): 1
Stepping: 1
Frequency boost: enabled
CPU(s) scaling MHz: 73%
CPU max MHz: 3400,0000
CPU min MHz: 2200,0000
BogoMIPS: 6802,42
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_go
od nopl nonstop_tsc cpuid extd_apicid aperfmperf rapl pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy sv
m extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb hw_pstate ssbd ibpb vmmcall
fsgsbase bmi1 avx2 smep bmi2 rdseed adx smap clflushopt sha_ni xsaveopt xsavec xgetbv1 xsaves clzero irperf xsaveerptr arat npt lbrv svm_lock nrip_save tsc_scale vm
cb_clean flushbyasid decodeassists pausefilter pfthreshold avic v_vmsave_vmload vgif overflow_recov succor smca sev
Virtualization features:
Virtualization: AMD-V
Caches (sum of all):
L1d: 256 KiB (8 instances)
L1i: 512 KiB (8 instances)
L2: 4 MiB (8 instances)
L3: 16 MiB (2 instances)
NUMA:
NUMA node(s): 1
NUMA node0 CPU(s): 0-15
Vulnerabilities:
Itlb multihit: Not affected
L1tf: Not affected
Mds: Not affected
Meltdown: Not affected
Mmio stale data: Not affected
Retbleed: Mitigation; untrained return thunk; SMT vulnerable
Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl
Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Spectre v2: Mitigation; Retpolines, IBPB conditional, STIBP disabled, RSB filling, PBRSB-eIBRS Not affected
Srbds: Not affected
Tsx async abort: Not affected

This person has a problem with the AMD chipset drivers and audio driver.

https://answers.microsoft.com/en-us/windows/forum/all/22h2-install-causes-bsod-system-thread-exception/c778c7f2-9109-4d28-b934-91726b34c18c

I don’t have audio problems. Might it then be that my chipset drivers aren’t up to date? How do I update them?

you are kind of just throwing things at the wall hoping something sticks. that makes troubleshooting very difficult.

just to make sure i know what the system is lets start from the top.

what OS is on your host?
what type of virtualization are you using?
for the windows VM are you using VirtIO?

Mainly and preferably ONLY QEMU/KVM, but I did install VirtualBox & VMware today to see if they work, and they gave me error codes too.

I have basically followed some kind of this guide right here. So Virt manager is installed.

I have my bots VM running, and it works just fine. It’s Windows that is the problem.

Here you go. The bad news is they use Windows to install. Maybe WinPE on a Hirens USB would work to update them? Never tried it myself.

Wine could work, but it’s risky for obvious reasons.

did complete STEP 5, or did you skip STEP 5?

also here is a guide with links to the VirtIO drivers. probably that is what you are missing.

image
It’s possible that I actually didn’t skip that part, but it’s no big deal since it handles virtualization within virtualization, and even if I activated it or not; it shouldn’t break being able to create Windows VM’s only.

I changed the disk from SATA to VirtIO, that didn’t do much, then I change the cpu from host-passthrough to hypervisor default, and then the installation started. Why Is that?

image

I believe it’s solved?

the cpu passthrough in the GUI might have an issue. qemu64 will work but might hinder performance. you should select a first gen RYZEN or even a first gen EPYC, whatever is available in your list. they should gain you some performance over qemu64.

1 Like

I got a small problem with the installation, so I found this video. I think it’s a good thing to learn and teach others.

SHIFT + F10

regedit + Enter

HKEY_LOCAL_MACHINE >> SYSTEM >> Setup
Create LabConfig in Setup.
Enter Setup, create two DWORD 32Bit files
“BypassTPMCheck” & “BypassSecureBootCheck”
Doubleclick them and change the value to 1.
Close regedit and the powershell, click next. ;D

1 Like

another easy way to fix Windows 11 is to install Windows 10.

4 Likes