VirtualBox 6.0 and Hyper-V

Discussions related to using VirtualBox on Windows hosts.

Re: VirtualBox 6.0 and Hyper-V

Postby WesleyRast » 15. Jul 2019, 02:08

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   Expand viewCollapse view
bcdedit /set hypervisorlaunchtype off

Then restart your machine. `vagrant up` will now work with no problem.
WesleyRast
 
Posts: 1
Joined: 15. Jul 2019, 02:07

Re: VirtualBox 6.0 and Hyper-V

Postby gera_k » 16. Jul 2019, 23:14

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"/>
gera_k
 
Posts: 2
Joined: 16. Jul 2019, 23:06

Re: VirtualBox 6.0 and Hyper-V

Postby gsparkes » 16. Jul 2019, 23:42

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.
gsparkes
 
Posts: 1
Joined: 2. Jun 2019, 14:39

Re: VirtualBox 6.0 and Hyper-V

Postby BillG » 17. Jul 2019, 04:39

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
BillG
Volunteer
 
Posts: 4165
Joined: 19. Sep 2009, 04:44
Location: Sydney, Australia
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows 7,8,Server

Re: VirtualBox 6.0 and Hyper-V

Postby socratis » 17. Jul 2019, 21:32

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/trunk/src/VBox/VMM/VMMR3/NEMR3.cpp?rev=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. */
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
socratis
Site Moderator
 
Posts: 25216
Joined: 22. Oct 2010, 11:03
Location: Greece
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5

Re: VirtualBox 6.0 and Hyper-V

Postby gera_k » 18. Jul 2019, 18:51

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.
gera_k
 
Posts: 2
Joined: 16. Jul 2019, 23:06

Re: VirtualBox 6.0 and Hyper-V

Postby Spark1292 » 19. Jul 2019, 20:18

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!
Spark1292
 
Posts: 2
Joined: 16. May 2018, 05:53

Re: VirtualBox 6.0 and Hyper-V

Postby Rikipm » 21. Jul 2019, 23:44

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: 2
Joined: 21. Jul 2019, 23:38

Re: VirtualBox 6.0 and Hyper-V

Postby Rikipm » 22. Jul 2019, 01:13

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}
Rikipm
 
Posts: 2
Joined: 21. Jul 2019, 23:38

Re: VirtualBox 6.0 and Hyper-V

Postby Callfjor » 22. Jul 2019, 13:44

It took a while to find out everything, but I got VB and Hyper-V working together just fine.
Callfjor
 
Posts: 2
Joined: 22. Jul 2019, 12:59
Primary OS: MS Windows 10
VBox Version: OSE self-compiled
Guest OSses: UNIX

Re: VirtualBox 6.0 and Hyper-V

Postby loyukfai » 28. Jul 2019, 10:05

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

Including Sandbox?

Cheers.
loyukfai
 
Posts: 10
Joined: 27. Jun 2019, 17:47

Re: VirtualBox 6.0 and Hyper-V

Postby Vasya Pupkin » 30. Jul 2019, 10:43

WesleyRast wrote:Open an admin Powershell and type the following to disable Hyper-V:
Code: Select all   Expand viewCollapse view
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.
Vasya Pupkin
 
Posts: 2
Joined: 15. Aug 2018, 15:39

Re: VirtualBox 6.0 and Hyper-V

Postby socratis » 30. Jul 2019, 11:08

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...
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
socratis
Site Moderator
 
Posts: 25216
Joined: 22. Oct 2010, 11:03
Location: Greece
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Win(*>98), Linux*, OSX>10.5

Re: VirtualBox 6.0 and Hyper-V

Postby jmar83_the2nd » 30. Jul 2019, 12:55

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
jmar83_the2nd
 
Posts: 118
Joined: 9. Mar 2012, 00:14

Re: VirtualBox 6.0 and Hyper-V

Postby RColbert » 2. Aug 2019, 06:17

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.
RColbert
 
Posts: 1
Joined: 2. Aug 2019, 06:13

PreviousNext

Return to VirtualBox on Windows Hosts

Who is online

Users browsing this forum: lpmay, mpack, Nolofinwe and 86 guests