Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Problems with CrosVM on Windows 11 Pro (x64)

281 views
Skip to first unread message

Lonnie TC

unread,
Dec 3, 2023, 11:19:58 AM12/3/23
to crosvm-dev
Hello All,

I have HAXM (v7.8.0) installed on a Windows 11 Pro (x64) along with no hyperv installed which is running:

----------------------------------------
D:\haxm\checktool-windows-1.1.0>checktool.exe
CPU vendor          *  GenuineIntel
Intel64 supported   *  Yes
VMX supported       *  Yes
VMX enabled         *  Yes
EPT supported       *  Yes
NX supported        *  Yes
NX enabled          *  Yes
Hyper-V disabled    *  Yes
OS version          *  Windows 10.0.22631
OS architecture     *  x86_64
Guest unoccupied    *  Yes. 0 guest(s)

D:\haxm\checktool-windows-1.1.0>sc query intelhaxm

SERVICE_NAME: intelhaxm
        TYPE               : 1  KERNEL_DRIVER
        STATE              : 4  RUNNING
                                (STOPPABLE, NOT_PAUSABLE, IGNORES_SHUTDOWN)
        WIN32_EXIT_CODE    : 0  (0x0)
        SERVICE_EXIT_CODE  : 0  (0x0)
        CHECKPOINT         : 0x0
        WAIT_HINT          : 0x0
-----------------------------------------

 I have then been able to compile crosvm with Rust [rustc 1.74.0 (79e9716c9 2023-11-13)] which compiled to the crosvm.exe file.

I also compiled the baremetal example just to get a simple test that everything was working, but when I run:

---------------------------------------
.\crosvm.exe run --disable-sandbox .\example\baremetal
[2023-12-03T15:50:30.497163000+00:00 INFO  base::sys::windows::platform_timer_resolution] Successfully set timer res to 0.5ms with NtSetTimerResolution. Measured 1199us.
[2023-12-03T15:50:30.498017400+00:00 INFO  crosvm::sys::windows::main] DLL loaded: "ntmarta.dll"
[2023-12-03T15:50:30.498511900+00:00 WARN  crosvm::sys::windows] Cannot initialize HAXM: The system cannot find the file specified. (os error 2)
[2023-12-03T15:50:30.499053500+00:00 ERROR crosvm] exiting with error -536870763: no enabled hypervisor

Caused by:
    exit code: -536870763 = 0xe0000095

PS D:\Crosvm\test> rustc --version
rustc 1.74.0 (79e9716c9 2023-11-13)
------------------------------------

The main problem seems to be "Cannot initialize HAXM: The system cannot find the file specified. (os error 2)" but I do not know what file it is looking for.

Also as a note, I am still a bit new to Rust.

Any thoughts on how to resolve this?

Thanks in advance and have a great day,
Lonnie


Steven Richman

unread,
Dec 4, 2023, 2:29:54 PM12/4/23
to Lonnie TC, crosvm-dev
Hi Lonnie,

Try running with "--hypervisor Haxm". Without that option, crosvm tries to use an internal Google fork of HAXM.

Steven

--
You received this message because you are subscribed to the Google Groups "crosvm-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to crosvm-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/crosvm-dev/3380c8b9-0135-4c42-85f2-194249ff0be9n%40chromium.org.
For more options, visit https://groups.google.com/a/chromium.org/d/optout.

Dr. Lonnie Cumberland, PhD

unread,
Dec 4, 2023, 4:48:34 PM12/4/23
to Steven Richman, crosvm-dev
Hi Steven,

Thanks for the reply on my crosvm post.

Looks like I had "some" success, but may not be complete:

I do see the "Hello World!" but also get an ERROR which may be coming from the baremetal code, but not sure.

---------------------------------------------------------------------
.\crosvm.exe run --hypervisor Haxm --disable-sandbox .\example\baremetal
[2023-12-04T21:43:07.870704500+00:00 INFO  base::sys::windows::platform_timer_resolution] Successfully set timer res to 0.5ms with NtSetTimerResolution. Measured 1506us.
[2023-12-04T21:43:07.871543600+00:00 INFO  crosvm::sys::windows::main] DLL loaded: "ntmarta.dll"
[2023-12-04T21:43:07.883077100+00:00 INFO  crosvm::sys::windows] Creating HAXM ghaxm=false
[2023-12-04T21:43:07.883838600+00:00 INFO  crosvm::sys::windows] Creating userspace irqchip
[2023-12-04T21:43:08.006966000+00:00 WARN  x86_64] Too many variable MTRR entries (2 required, 0 supported),
                please check pci_start addr, guest with pass through device may be very slow
[2023-12-04T21:43:08.009224900+00:00 INFO  crosvm::sys::windows] TSC offset standard deviation is: 0
   ERROR: Hello World! (baremetal, src\main.rs:31)
[2023-12-04T21:43:08.023363500+00:00 ERROR crosvm::sys::windows::run_vcpu] vcpu 0 run loop exited with error: exit code: -536870825 = 0xe0000057: vcpu shutdown
[2023-12-04T21:43:08.023882900+00:00 INFO  crosvm::sys::windows] vcpu requested shutdown
[2023-12-04T21:43:08.024138200+00:00 INFO  crosvm::sys::windows] run_control poll loop completed, forcing vCPUs to exit...
[2023-12-04T21:43:08.026666900+00:00 INFO  crosvm::sys::windows] vCPU threads have exited.
[2023-12-04T21:43:08.026977800+00:00 INFO  crosvm::sys::windows] IME thread has exited.
[2023-12-04T21:43:08.027224000+00:00 INFO  crosvm::sys::windows] blocking async pool has shut down.
[2023-12-04T21:43:08.027567700+00:00 INFO  crosvm::sys::windows::irq_wait] irq event loop got exit request
[2023-12-04T21:43:08.027988700+00:00 INFO  crosvm::sys::windows::irq_wait] irq child event loop got exit event
[2023-12-04T21:43:08.028503400+00:00 INFO  crosvm::sys::windows] IrqWaitWorker has shut down.
[2023-12-04T21:43:14.122534500+00:00 INFO  crosvm::sys::windows] guest_os dropped, run_control is done.
[2023-12-04T21:43:14.123617400+00:00 INFO  crosvm] exiting with success
---------------------------------------------------------------------

Is there a way for me to have crosvm.exe boot up a live CD/DVD to test it out that way as well since I do not have any other kernel/rootfs images at the moment which is why I tried the baremetal approach.

I think that if I can boot up a live CD?DVD then that will be a very good test as well.

Best
Lonnie

Steven Richman

unread,
Dec 4, 2023, 5:44:48 PM12/4/23
to Dr. Lonnie Cumberland, PhD, crosvm-dev
Hi Lonnie,

Sorry, I'm not familiar with booting a live CD. Maybe someone else on the list has experience.

If you want to try building a guest Linux kernel and rootfs, the crosvm docs have instructions: https://crosvm.dev/book/running_crosvm/custom_kernel_rootfs.html

Steven
Reply all
Reply to author
Forward
0 new messages