EmuGUI icon indicating copy to clipboard operation
EmuGUI copied to clipboard

WHPX acceleration

Open TheFausap opened this issue 1 year ago • 1 comments

Hello I am trying to boot a x86_64 VM using WHPX acceleration. The acceleration mode, according to the logs, is operation, but I receive an error about "injection failed"

WHPX: setting APIC emulation mode in the hypervisor Windows Hypervisor Platform accelerator is operational The VM list was updated successfully. whpx: injection failed, MSI (0, 0) delivery: 0, dest_mode: 0, trigger mode: 0, vector: 0, lost (c0350005)

Is there any specific settings I have to enable to make it working?

thanks, Fausto

TheFausap avatar Feb 12 '24 11:02 TheFausap

I have already been notified about this by someone else. I'll fix it in EmuGUI 2.0. Until then, select your virtual machine, click on "Edit selected virtual machine", then select the "Additional components" tab. There, change the acceleration to "None". For the additional arguments, add -accel whpx,kernel-irqchip=off and click OK. I hope this workaround fixes your issue for now.

Tech-FZ avatar Feb 13 '24 09:02 Tech-FZ

I have already been notified about this by someone else. I'll fix it in EmuGUI 2.0. Until then, select your virtual machine, click on "Edit selected virtual machine", then select the "Additional components" tab. There, change the acceleration to "None". For the additional arguments, add -accel whpx,kernel-irqchip=off and click OK. I hope this workaround fixes your issue for now.

Thanks,

That helped me run my Fedora 41 installation image using Qemu (installed via msys2) on Win11 Pro. For reference and guide to others I used the following batch script (edit shell variables as per your need, notice that I have set your suggestion -accel whpx,kernel-irqchip=off).

Hope that the batch helps others to more quickly manage the task.

@echo off

rem ==================================
rem ARK QEMU VM Installer/Runner
rem ==================================

set "GUEST_NAME=Fedora 41"
set "GUEST_HDA=.\fedora41.qcow2"
set "GUEST_INSTALL_ISO=.\iso\Fedora-Workstation-Live-x86_64-41-1.4.iso"
set "ACCELERATOR=whpx,kernel-irqchip=off"

set "QEMUDIR=E:\msys64\ucrt64\bin\"
set "QEMUBIN=qemu-system-x86_64.exe"

rem ==================================
rem Create VM HDD
rem ==================================
if not exist %GUEST_HDA% (
    rem CREATE a virtual hard disk 
    "%QEMUDIR%qemu-img.exe" create -f qcow2 %GUEST_HDA% 512G
) else (
    echo file %GUEST_HDA% already exist.
)

rem ==================================
rem Run the VM
rem ==================================
"%QEMUDIR%%QEMUBIN%"						^
 -name	"%GUEST_NAME%"			 			^
 -cdrom "%GUEST_INSTALL_ISO%" 					^
 -boot menu=on 							^
 -hda "%GUEST_HDA%" 						^
 -L bios							^
 -accel %ACCELERATOR%						^
 -smp 2								^
 -m 8G								^
 -net nic -net tap,ifname="TAP Local Area Connection (QEMU)"	^
 -usb -device usb-tablet					^
 -usbdevice mouse -usbdevice keyboard				^
 -rtc base=localtime,clock=host					^
 -parallel none -serial none					^
 -device AC97

alirezakazemi avatar Jan 30 '25 12:01 alirezakazemi

Oops, forgot to close this issue.

Tech-FZ avatar Jan 30 '25 17:01 Tech-FZ