VirtualBox 6.0 and Hyper-V

Discussions related to using VirtualBox on Windows hosts.
Locked
WesleyRast
Posts: 1
Joined: 15. Jul 2019, 02:07

Re: VirtualBox 6.0 and Hyper-V

Post by WesleyRast »

This is what fixed it for me. Hyper-V is just cancer for running anything else related to virtual machines.

Open an admin Powershell and type the following to disable Hyper-V:

Code: Select all

bcdedit /set hypervisorlaunchtype off
Then restart your machine. `vagrant up` will now work with no problem.
gera_k
Posts: 2
Joined: 16. Jul 2019, 23:06

Re: VirtualBox 6.0 and Hyper-V

Post by gera_k »

I managed to make Vbox ver 6.0.10 work on Win1903 build 18362.239 with hyper-v enabled.

In your .vbox file locate <ExtraData> section and add the following line:

<ExtraDataItem name="VBoxInternal/NEM/UseRing0Runloop" value="0"/>
gsparkes
Posts: 1
Joined: 2. Jun 2019, 14:39

Re: VirtualBox 6.0 and Hyper-V

Post by gsparkes »

This worked great! Thanks a lot - wonder why this isn't some sort of autodetect/default option for when WHv is detected
Last edited by socratis on 17. Jul 2019, 21:18, edited 1 time in total.
Reason: Removed unnecessary verbatim quote of the whole previous message.
BillG
Volunteer
Posts: 5102
Joined: 19. Sep 2009, 04:44
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows 10,7 and earlier
Location: Sydney, Australia

Re: VirtualBox 6.0 and Hyper-V

Post by BillG »

Yes, it works. But it is not a solution. It kills Hyper-V guests.

The aim is to have both systems operable on the same machine. It is no more a solution to the problem than disabling the hypervisor (as described in the previous post).
Bill
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: VirtualBox 6.0 and Hyper-V

Post by socratis »

gera_k wrote:In your .vbox file locate <ExtraData> section and add the following line:
Did you miss the following in the .vbox file? ;)
<!--
** DO NOT EDIT THIS FILE.
** If you make changes to this file while any VirtualBox related application
** is running, your changes will be overwritten later, without taking effect.
** Use VBoxManage or the VirtualBox Manager GUI to make changes.
-->
So, do as it says, this is a lot safer:
  • VBoxManage setextradata "<VM Name>" "VBoxInternal/NEM/UseRing0Runloop" 0
I have a couple of questions:
  1. Where did you get that from? It's your first post in the forums and I'm kinda curious of how you got into this advanced level advice...
  2. You have to really go out of your way to disable a standard way of execution, in this case the ring-0 execution. See the source code reference below...
  3. Disabling ring-0 execution means that you have to translate the calls to ring-3. Have you measured the performance impact of this action?
Searching for "UseRing0Runloop", the best explanation that I found was in: https://www.virtualbox.org/browser/vbox ... 76553#L107
/** @cfgm{/NEM/UseRing0Runloop, bool, true}
 * Whether to use the ring-0 runloop (if enabled in the build) or the ring-3 one.
 * The latter is generally slower.  This option serves as a way out in case
 * something breaks in the ring-0 loop. */
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
gera_k
Posts: 2
Joined: 16. Jul 2019, 23:06

Re: VirtualBox 6.0 and Hyper-V

Post by gera_k »

socratis wrote:I have a couple of questions:
An extended couple might contain three or even more items :wink:
socratis wrote:
  1. Where did you get that from? It's your first post in the forums and I'm kinda curious of how you got into this advanced level advice...
  2. You have to really go out of your way to disable a standard way of execution, in this case the ring-0 execution. See the source code reference below...
  3. Disabling ring-0 execution means that you have to translate the calls to ring-3. Have you measured the performance impact of this action?
  1. From studying the sources. If you have looked there you could see that when this option enabled they use calls to vid.dll which imho are not documented. I suspected that Windows have changed something in vid interface which caused the problem. With this option disabled they do documented call to winhwplatform.dll. Also, the error message the VBox emits is wrong, it comes from failed call to g_pfnVidMessageSlotMap, not to WHvSetupPartition, as the message suggests. Fortunately there was a config parameter which allowed to tune this behavior without recompiling the vbox. I tried it and it worked.
  2. Not sure what you mean, please elaborate. The config parameter name itself clearly says that it disables ring0.
  3. I got impression that GUI is somewhat slower. I also did some cpu benchmarking in both hyper-v and vbox ubuntu guests, the performance was similar. Btw, yes, i had both hyper-v and vbox guests running in parallel. FWIW, I also tried to start Windows sandbox at the same time, it worked too..
Despite the initial luck with this option, I found that VBox under hyper-v is unstable - as it was mentioned several times in this thread. So i ended up disabling the hyper-v and returning to my favorite VM - vmware.
Spark1292
Posts: 2
Joined: 16. May 2018, 05:53

Re: VirtualBox 6.0 and Hyper-V

Post by Spark1292 »

gera_k wrote:I managed to make Vbox ver 6.0.10 work on Win1903 build 18362.239 with hyper-v enabled.

In your .vbox file locate <ExtraData> section and add the following line:

<ExtraDataItem name="VBoxInternal/NEM/UseRing0Runloop" value="0"/>
This did eliminate the hard-crash on starting a VM for me, but I'm not effectively able to create a new VM. I've tried Ubuntu. The installation CD does boot and I do see the initial Ubuntu screen, then the VM just goes black/dark and goes no further. Nonetheless, this is significant progress. Thanks for the info!
Rikipm
Posts: 3
Joined: 21. Jul 2019, 23:38

Re: VirtualBox 6.0 and Hyper-V

Post by Rikipm »

I have error that already was provided in this thread when I try to run VM:
(VERR_NEM_MISSING_KERNEL_API).
VT-x is not available (VERR_VMX_NO_VMX).

Код ошибки: (Error code) E_FAIL (0x80004005)
Компонент: (Component) ConsoleWrap
Интерфейс: (Interface)IConsole {872da645-4a9b-1727-bee2-5585105b9eed}
Hyper-V is enabled and VM on Hyper-V works nice. VT-x in BIOS enabled
Rikipm
Posts: 3
Joined: 21. Jul 2019, 23:38

Re: VirtualBox 6.0 and Hyper-V

Post by Rikipm »

Also, If i choose x32 system I see another error
Raw-mode is unavailable courtesy of Hyper-V. (VERR_SUPDRV_NO_RAW_MODE_HYPER_V_ROOT).

Код ошибки: E_FAIL (0x80004005)
Компонент: ConsoleWrap
Интерфейс: IConsole {872da645-4a9b-1727-bee2-5585105b9eed}
Callfjor
Posts: 2
Joined: 22. Jul 2019, 12:59
Primary OS: MS Windows 10
VBox Version: OSE self-compiled
Guest OSses: UNIX
Contact:

Re: VirtualBox 6.0 and Hyper-V

Post by Callfjor »

It took a while to find out everything, but I got VB and Hyper-V working together just fine.
loyukfai
Posts: 14
Joined: 27. Jun 2019, 17:47

Re: VirtualBox 6.0 and Hyper-V

Post by loyukfai »

Callfjor wrote:It took a while to find out everything, but I got VB and Hyper-V working together just fine.
Including Sandbox?

Cheers.
Vasya Pupkin
Posts: 2
Joined: 15. Aug 2018, 15:39

Re: VirtualBox 6.0 and Hyper-V

Post by Vasya Pupkin »

WesleyRast wrote:Open an admin Powershell and type the following to disable Hyper-V:

Code: Select all

bcdedit /set hypervisorlaunchtype off
Then restart your machine. `vagrant up` will now work with no problem.
This helped, thank you very much. Not sure why VirtualBox fails to detect such a common issue and report it properly.
socratis
Site Moderator
Posts: 27330
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: VirtualBox 6.0 and Hyper-V

Post by socratis »

Vasya Pupkin wrote:Not sure why VirtualBox fails to detect such a common issue and report it properly.
Isn't the error dialog good enough for you? What did you want, the instructions on how to do this on the error dialog? Of course you can't have that, because the conditions are ever so changing. The list of Hyper-V enabled software is a live document that I have to update almost every week. Can't do that with an error dialog box from VirtualBox...
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
jmar83_the2nd
Posts: 341
Joined: 9. Mar 2012, 00:14

Re: VirtualBox 6.0 and Hyper-V

Post by jmar83_the2nd »

Virtualbox 6.0.x can use the Hyper-V-Engine from Windows 10, do i understand it right?

Or do you mean a co-existence between both Hyper-V and VirtualBox on one Host OS?
regards, jan
RColbert
Posts: 1
Joined: 2. Aug 2019, 06:13

Re: VirtualBox 6.0 and Hyper-V

Post by RColbert »

To make this work for me on the current 20H1 Insider release of Windows 10, I added the line mentioned in a previous post to the ExtraData section of the %userprofile%\.VirtualBox\VirtualBox.xml config file.

<ExtraDataItem name="VBoxInternal/NEM/UseRing0Runloop" value="0"/>

64bit Windows and Linux VMs are able to run.
Locked