2

I've been messing around with qemu on Windows 10. I found HAXM as a slow accelerator (for me has the same performance as TCG) and I want a better experience. I found that qemu supports WHPX, using -M accel=whpx. I enabled Windows Hypervisor Platform and everything from the Hyper-V category in Windows Features and then I restarted the machine. I tried to run qemu using whpx but I get this error:

qemu-system-x86_64: WHPX: No accelerator found, hr=00000000
qemu-system-x86_64: failed to initialize whpx: No space left on device

Here is the relevant part of systeminfo:

    OS Name:                   Microsoft Windows 10 Pro
    OS Version:                10.0.19043 N/A Build 19043
    OS Manufacturer:           Microsoft Corporation
    OS Configuration:          Standalone Workstation
    OS Build Type:             Multiprocessor Free
    System Manufacturer:       Micro-Star International Co., Ltd.
    System Model:              MS-7C89
    System Type:               x64-based PC
    Processor(s):              1 Processor(s) Installed.
                               [01]: Intel64 Family 6 Model 165 Stepping 3 GenuineIntel ~3600 Mhz
    BIOS Version:              American Megatrends Inc. 1.50, 21/07/2020
    Windows Directory:         C:\Windows
    System Directory:          C:\Windows\system32
    Boot Device:               \Device\HarddiskVolume2
    System Locale:             en-us;English (United States)
    Input Locale:              en-us;English (United States)
    Total Physical Memory:     16,320 MB
    Hotfix(s):                 5 Hotfix(s) Installed.
                               [01]: KB5007289
                               [02]: KB5000736
                               [03]: KB5008212
                               [04]: KB5007273
                               [05]: KB5005699
    Network Card(s):           7 NIC(s) Installed.
    Hyper-V Requirements:      VM Monitor Mode Extensions: Yes
                               Virtualization Enabled In Firmware: Yes
                               Second Level Address Translation: Yes
                               Data Execution Prevention Available: Yes

Do I need to rebuild qemu by myself? NOTE: I used this setup file: https://qemu.weilnetz.de/w64/qemu-w64-setup-20211215.exe

7
  • I would use the most recent release from December 2021 before I tried anything. This error does not seem new by the way.
    – Ramhound
    Feb 27, 2022 at 16:05
  • Yeah I saw that thread, but it didn't help, also the version I linked is the lastest version provided weilnetz
    – anon
    Feb 27, 2022 at 16:12
  • It tells me that the Hyper-V accelerator might not actually be working. This seems more relevant.
    – Ramhound
    Feb 27, 2022 at 16:18
  • Is there any utility that can actually test if Hyper-V is actually working?
    – anon
    Feb 27, 2022 at 16:28
  • Wait.. Hyper-V manager is a thing
    – anon
    Feb 27, 2022 at 16:29

1 Answer 1

1

Most likely the hypervisor's startup is disabled. It may be installed but it needs to be started at boot. Use this command in an admin command prompt and then reboot. This will force Windows to start the hypervisor at each boot.

bcdedit /set hypervisorlaunchtype on
5
  • All research indicates that the only requirement is Windows Hypervisor Platform not Hyper-V itself.
    – Ramhound
    Feb 27, 2022 at 16:49
  • @Ramhound: Yes, but ever since the introduction of WHP, the actual hypervisor is now part of the Hypervisor Platform, not part of Hyper-V – the Platform couldn't do its job otherwise. The bcdedit option is not specific to Hyper-V. Feb 27, 2022 at 18:11
  • @user1686 - In my experience it is. It's certainly not required for WSL2. I have only ever seen hypervisorlaunchtype connected to enabling Hyper-V. In fact, until recently, it had to be off for VMWare and VirtualBox to work.
    – Ramhound
    Feb 27, 2022 at 20:47
  • 1
    @Ramhound: Well, exactly, it had to be off for VirtualBox to work because VBox brings its own hypervisor (which conflicts with the Windows Hypervisor) and until recently didn't support WHP... People only associate the option with Hyper-V because it was pretty much the only user of the hypervisor before Microsoft made WHP available to the public, but now the "Hyper-V" feature is a consumer of WHP. Feb 27, 2022 at 22:22
  • 1
    Due to changes to VirtualBox it’s not technically required for VirtualBox and VMWare. I would like this answer to explore the concept of verifying, Hypervisorlaunchtype is even enabled, before blindly issuing a command
    – Ramhound
    Feb 27, 2022 at 22:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .