Jump to content

QEMU on Windows exits with error: "WHPX: Failed to emulate MMIO access with EmulatorReturnStatus: 2"

Go to solution Solved by ImTheSquid,

After debating for a while I'm just going to dual boot Manjaro, it's probably the easiest solution.

I have been trying to follow Linus's video on creating a MacOS VM using QEMU, however I am trying to do it on Windows. I am using this post and this repository (different from the one linked in the article, but is almost the same in terms of functionality), as the one linked in the description was outdated. I have an AMD 3900X with a NVIDIA RTX 2080 SUPER as my main GPU and a RX 580 as my MacOS GPU, all running on Windows 10 Pro. I have enabled Hyper-V and all of its associated features, and it works fine, but QEMU doesn't. I have had to modify the commands given in the repository a bit to work with Windows. Here is the command I am currently testing with, which doesn't do GPU passthrough (I'm going to add it later):

qemu-system-x86_64 -m 3072 -cpu Penryn,kvm=on,vendor=GenuineIntel,+invtsc,vmware-cpuid-freq=on,+pcid,+ssse3,+sse4.2,+popcnt,+avx,+aes,+xsave,+xsaveopt,check -machine q35,accel=whpx -smp 4,cores=2 -usb -device usb-kbd -device usb-mouse -device isa-applesmc,osk="ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc" -drive if=pflash,format=raw,readonly,file=./OVMF_CODE.fd -drive if=pflash,format=raw,file=./OVMF_VARS-1024x768.fd -smbios type=2 -device ich9-intel-hda -device hda-duplex -device ich9-ahci,id=sata -drive id=OpenCoreBoot,if=none,snapshot=on,format=qcow2,file=./OpenCore-Catalina/OpenCore.qcow2 -device ide-hd,bus=sata.2,drive=OpenCoreBoot -device ide-hd,bus=sata.3,drive=InstallMedia -drive id=InstallMedia,if=none,file=BaseSystem.img,format=raw -drive id=MacHDD,if=none,file=./mac_hdd.img,format=qcow2 -device ide-hd,bus=sata.4,drive=MacHDD -monitor stdio -vga none

Here is the output I am getting:

Windows Hypervisor Platform accelerator is operational
QEMU 4.2.0 monitor - type 'help' for more information
(qemu) qemu-system-x86_64: WHPX: Failed to emulate MMIO access with EmulatorReturnStatus: 2
qemu-system-x86_64: WHPX: Failed to exec a virtual processor

Which then just exits back to a prompt, however a blank window does show up for a few seconds while the command runs. I cannot find anything about what the status code means. What am I doing wrong here and how can I fix this issue?

Link to comment
Share on other sites

Link to post
Share on other sites

After debating for a while I'm just going to dual boot Manjaro, it's probably the easiest solution.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×