Page 9 of 23

Re: VirtualBox 6.0 and Hyper-V

Posted: 15. Jul 2019, 02:08
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.

Re: VirtualBox 6.0 and Hyper-V

Posted: 16. Jul 2019, 23:14
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"/>

Re: VirtualBox 6.0 and Hyper-V

Posted: 16. Jul 2019, 23:42
by gsparkes
This worked great! Thanks a lot - wonder why this isn't some sort of autodetect/default option for when WHv is detected

Re: VirtualBox 6.0 and Hyper-V

Posted: 17. Jul 2019, 04:39
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).

Re: VirtualBox 6.0 and Hyper-V

Posted: 17. Jul 2019, 21:32
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. */

Re: VirtualBox 6.0 and Hyper-V

Posted: 18. Jul 2019, 18:51
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.

Re: VirtualBox 6.0 and Hyper-V

Posted: 19. Jul 2019, 20:18
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!

Re: VirtualBox 6.0 and Hyper-V

Posted: 21. Jul 2019, 23:44
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

Re: VirtualBox 6.0 and Hyper-V

Posted: 22. Jul 2019, 01:13
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}

Re: VirtualBox 6.0 and Hyper-V

Posted: 22. Jul 2019, 13:44
by Callfjor
It took a while to find out everything, but I got VB and Hyper-V working together just fine.

Re: VirtualBox 6.0 and Hyper-V

Posted: 28. Jul 2019, 10:05
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.

Re: VirtualBox 6.0 and Hyper-V

Posted: 30. Jul 2019, 10:43
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.

Re: VirtualBox 6.0 and Hyper-V

Posted: 30. Jul 2019, 11:08
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...

Re: VirtualBox 6.0 and Hyper-V

Posted: 30. Jul 2019, 12:55
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?

Re: VirtualBox 6.0 and Hyper-V

Posted: 2. Aug 2019, 06:17
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.