Virtual Box 6.1 with Hyper-V on 19041

Discussions related to using VirtualBox on Windows hosts.
Post Reply
wesw
Posts: 15
Joined: 28. Feb 2018, 06:08

Virtual Box 6.1 with Hyper-V on 19041

Post by wesw »

I'm running the Windows 2004 release (build 19041) and the latest Virtual Box 6.1 release.

I would like to get paravirtualization with Hyper-V working. I enabled paravirtualization for Hyper-V on one of my VMs and tried to boot the VM. No joy. The guest is Windows 10 and when I tried to boot it the Windows OS blue screened.

It seems that the paravirtualization with Hyper-V does not work?? Is there something else that I need to configure to make this work? I really would like to get this working so I can use WSL 2.0
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: Virtual Box 6.1 with Hyper-V on 19041

Post by scottgus1 »

All of my Windows guests have Hyper-V paravirtualization. Paravirtualization is just how VM-aware OS's communicate with the hypervisor, not the actual hypervisor type.

If you are attempting to run a Virtualbox guest while Microsoft Hyper-V hypervisor is enabled, then you might be having issues outside of the paravirtualization setting. Leave that setting at Default, then start the guest from full power off, not save-state. Run until you see the problem happen, then shut down the guest from within the guest OS if possible. If not possible, close the Virtualbox window for the guest with the Power Off option set.

Please zip and post a guest vbox.log, using the forum's Upload Attachment tab.

FWIW running Virtualbox and Hyper-V together is a work in progress, and for now it's more not-work than progress. The devs are pushing ahead...
wesw
Posts: 15
Joined: 28. Feb 2018, 06:08

Re: Virtual Box 6.1 with Hyper-V on 19041

Post by wesw »

Thanks a lot.

I found that I had misconfigured Windows. Now I have enabled “Virtual Machine Platform” and “Windows Hypervisor Platform” in Windows. After doing this and booting one of my VMs I find that the performance is basically unusable. The guest is so slow that you really can’t use it. I also saw some crashes (sihost) inside the VM that never happen without Hyper-V. Is this supposed to work and be usable in terms of performance or should I wait for a newer release?
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: Virtual Box 6.1 with Hyper-V on 19041

Post by scottgus1 »

wesw wrote:wait for a newer release?
This. Keep trying every so often, and maybe one day, if Microsoft can ever stop changing things, the devs can get Virtualbox and Hyper-V to co-exist.

That the devs are working on it means the paying customers want it, so there's incentive for the devs to keep trying. But since your guest does actually boot though runs like molasses in January in Antarctica, you can see a bit of the pawky humor the devs have about the problem in the guest window's Status bar.

Is there a green turtle there? Image Based on the performance of the guest running under Hyper-V, you might think the devs' choice of animal is appropriate.

Your guest vbox.log may also have these lines in it, indicating the same issue:
{timestamp} HM: HMR3Init: Attempting fall back to NEM: VT-x is not available
{timestamp} NEM: WHvCapabilityCodeHypervisorPresent is TRUE, so this might work...

I like the 'might'...

A fully-operational guest will have this virtualization icon in the status bar Image instead of the turtle.
BillG
Volunteer
Posts: 5106
Joined: 19. Sep 2009, 04:44
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows 10,7 and earlier
Location: Sydney, Australia

Re: Virtual Box 6.1 with Hyper-V on 19041

Post by BillG »

There is no significant difference between Windows version 1909 and 2004 in this respect. There is a difference between Virtualbox version 6.1.4 and 6.1.6 . You might want to look at the recent posts in the topic at the top of this forum called VirtualBox 6.0 and Hyper-V. It includes a few posts from the devs.

There is progress. 32-bit guests run quite well in "turtle" mode, but 64-bit bit guests don't. My Windows 10 x64 guest will boot to the lock screen, but everything goes haywire after that.
Bill
facboy
Posts: 28
Joined: 19. Jan 2016, 09:35

Re: Virtual Box 6.1 with Hyper-V on 19041

Post by facboy »

wesw wrote:I'm running the Windows 2004 release (build 19041) and the latest Virtual Box 6.1 release.

I would like to get paravirtualization with Hyper-V working. I enabled paravirtualization for Hyper-V on one of my VMs and tried to boot the VM. No joy. The guest is Windows 10 and when I tried to boot it the Windows OS blue screened.

It seems that the paravirtualization with Hyper-V does not work?? Is there something else that I need to configure to make this work? I really would like to get this working so I can use WSL 2.0
not exactly your question, but I tried this exact thing last week and I would say it's not worth the hassle. I even went as far as converting one of my VMs to Hyper-V (and UEFI and all that guff) to try it.
  1. WSL2 is just a crippled Hyper-V VM. You can't configure it as flexibly as a 'real' Hyper-V VM (or VirtualBox). On the plus-side it has seemingly 'direct' access to the Windows file system (from a user's point of view), which a 'real' VM wouldn't have without jumping through some hoops. That said, so does WSL1. And using the Windows file system is slow, so anything I/O heavy you have to use the VM file system.
  2. I was using a Linux guest (which you aren't), but Hyper-V is rubbish for desktop compared to VirtualBox. The desktop is so slow as to be largely unusable, they are now running XRDP over VSock as the 'performant' alternative...but you can run XRDP with any VM (though not over VSock). For Linux, NoMachine is superior anyway (imo).
  3. Dealbreaker for me - WSL2 cannot easily be configured to connect to the other Hyper-V vms, it's on it's own special Virtual Switch which changes IP on every restart of WSL2.
The whole experience is just worse than WSL1 + VirtualBox. The only use-case where WSL2 outshines WSL1 at the moment is I/O...to which I'd say, if you want to compile code (or anything else I/O heavy), use an actual VM. Which is what WSL2 is anyway. Probably once they work the kinks out it will get there, but at the moment it's not worth it.
vachigaggl
Posts: 3
Joined: 16. Jun 2020, 10:24

Re: Virtual Box 6.1 with Hyper-V on 19041

Post by vachigaggl »

Others (including me) have had problems with memory corruption on Vbox 6.1 while Hyper-V is active:
zrav wrote:On Windows 10 2004 (19041), with Hyper-V, Containers and Virtual Machine Platform enabled, I can run an Ubuntu 20.04 guest in Virtual Box 6.1.8 using PV set to Hyper-V (slow turtle mode). However, the guest is not stable. I experience segfaults, hangs and the computation of hashes like SHA256 fails, preventing me from successfully running apt-get update/install, for instance. It seems the feature is not yet ready for prime time.
I can't set hypervisorlaunchtype off as I need Docker on WSL2. I wish I could use VBox for my VMs instead of Hyper-V as the later has a few crucial shortcomings. With time we'll get there I guess.
I can second this.

DO NOT (!!) use VirtualBox 6.1.8 with Hyper-V
Post Reply