VirtualBox 6.0 and Hyper-V

Discussions related to using VirtualBox on Windows hosts.
Locked
KrzysztofMW
Posts: 2
Joined: 19. Dec 2018, 23:23

VirtualBox 6.0 and Hyper-V

Post by KrzysztofMW »


ModEdit: For this feature to work, you need to make sure you're on Windows 10 1809 (or later), and that you have the Windows Hypervisor Platform optional feature enabled.
  1. Image : Some Hyper-V component is active, VirtualBox tries to use the Native Execution Manager (NEM) mode.
  2. Image : VirtualBox is using native hardware virtualization.

I know this topic has already been discussed in the following thread:
VirtualBox and Hyper-V
but not in the context of VirtualBox 6.0.

One of the highlights of VirtualBox 6.0 is Hyper-V support:
"Added support for using Hyper-V as the fallback execution core on Windows host, to avoid inability to run VMs at the price of reduced performance"

Does it mean that from now it is possible to run VirtualBox VMs with Paravirtualization interface explicitly set to 'Hyper-V'?

It would be really useful to be able to run VMs alongside Docker Native for Windows (requires Hyper-V).

Unfortunately, as of now if trying to start a VM with Hyper-V paravirtualization I receive known error message:
VERR_SUPDRV_NO_RAW_MODE_HYPER_V_ROOT
Josh 123
Posts: 1
Joined: 20. Dec 2018, 00:20

Re: VirtualBox 6.0 and Hyper-V

Post by Josh 123 »

I'm also seeing the same behaviour. I was really keen to test this and see how the performance was, but I can't find anyway to actually boot the VM under the Hyper-V VM as advertised. The Docs say:
Oracle VM VirtualBox can be used on a Windows host where Hyper-V is running. This is an experimental feature. 
No configuration is required. Oracle VM VirtualBox detects Hyper-V automatically and uses Hyper-V as the virtualization engine for the host.
But I'm unable to create 64-bit Vms when Hyper-V is running, the option isn't listed. I'm also unable to boot Existing VMs, as I get the VERR_SUPDRV_NO_RAW_MODE_HYPER_V_ROOT error too.

In the guest settings I can go to system -> acceleration and have a paravirtualization dropdown box, and it's set to default. I can't set it to Hyper-V because the settings panel says invalid settings detected and the OK button is greyed out. The invalid setting is " The hardware virtualization is enabled in the acceleration section of the system page although it is not supported by the host system. It should be disabled in order to start the virtual system"

This is effectively the same issue as all the previous virtualbox versions where hyper-V is locking the hypervisor. If I try disable hardware acceleration I gut the same old message about 64 bit guests require hardware acceleration to boot.

Despite the docs claiming it's config free, I can't seem to get anything to boot at all.
BillG
Volunteer
Posts: 5100
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 »

Could you give me a link to "The Docs" which this refers to? I suspect that you have misinterpreted what it is saying. I think it is talking about paravirtualization settings, not running VirtualBox vms on Windows machines which are running Windows Hyper-V.
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 »

@BillG
See Ch. 9.34 in the PDF, or 10.34 online (not linking on purpose because of this discrepancy): Using Hyper-V with Oracle VM VirtualBox. I'll quote the whole chapter actually:
Oracle VM VirtualBox can be used on a Windows host where Hyper-V is running. This is an experimental feature.

No configuration is required. Oracle VM VirtualBox detects Hyper-V automatically and uses Hyper-V as the virtualization engine for the host. The CPU icon[1] in the VM window status bar indicates that Hyper-V is being used.
  • Note: When using this feature, you might experience significant Oracle VM VirtualBox performance degradation on some host systems.
[1] sic: vm_execution_engine_native_api_16px.png -> Image
There's no misinterpretation in the part of "Josh 123". This feature is enabled with 6.0.0, and I have a feeling it might expand to other platforms/hypervisors that have the tendency to grab and lock VT-x (based on the icon name). At this moment, besides Hyper-V, KVM started doing the same thing. Selfish fools...
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.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: VirtualBox 6.0 and Hyper-V

Post by mpack »

KrzysztofMW wrote: Does it mean that from now it is possible to run VirtualBox VMs with Paravirtualization interface explicitly set to 'Hyper-V'?
The "paravirtualization API" selected in the VM settings is a pre-existing feature which selects an API which is presented to guests, it has nothing to do with how VirtualBox runs the VM.

The API is how a "virtual aware" guest OS communicates with the "standard hypervisor". In the case of recent Windows OS's, they look for a Hyper-v API. Linux guests look for a KVM API.
BillG
Volunteer
Posts: 5100
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 »

I too was surprised to see that the OP had a problem with the hyper-v paravirtualization setting. That works fine for me.

Like Josh 123 I had no success trying to run VirtualBox on my Hyper-V enabled Windows 10 v1809 machine. I was able to install VBox and create an x64 Windows 10 vm but any attempt to install an OS in the vm failed. The vm simply hung at a command prompt and the application timed out, giving a "not responding" message on the screen and in task manager.

I copied a vm from the other host and it registered fine. It will start but gets nowhere. I have now seen the turtle icon!
Bill
BillG
Volunteer
Posts: 5100
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 »

After a bit of fiddling and trial & error I have VirtualBox and Hyper-V running together.
Success2.PNG
Bill
BillG
Volunteer
Posts: 5100
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 »

It is far from reliable but at least it is on the way.
Bill
KrzysztofMW
Posts: 2
Joined: 19. Dec 2018, 23:23

Re: VirtualBox 6.0 and Hyper-V

Post by KrzysztofMW »

BillG wrote:After a bit of fiddling and trial & error I have VirtualBox and Hyper-V running together.
What have you configured exactly?

What exact MS Windows 10 version are you running?


I think that the fact I am running version 1607 (business laptop) might block me. Hopefully as soon as version 1807 becomes available for me, the likeliness of success in this configuration will increase.
BillG
Volunteer
Posts: 5100
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, I am running version 1809. I disabled the Windows hypervisor to make it simpler while I copied the VirtualBox vm folders from my VirtualBox host to the Hyper-V enabled host and registered them. I still have not managed to get 64-bit guests to run with the Windows hypervisor active. I think it will be a while yet before this all works smoothly.
Bill
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: VirtualBox 6.0 and Hyper-V

Post by mpack »

BillG wrote:I still have not managed to get 64-bit guests to run with the Windows hypervisor active.
What is the symptom?

Also, is it possible to create new 64bit VMs? I'm just asking if the templates are offered, I'm not suggesting that you follow through.
Vorber
Posts: 3
Joined: 21. Dec 2018, 15:05

Re: VirtualBox 6.0 and Hyper-V

Post by Vorber »

I'm having the same issue with 64 bit guest Ubuntu. My history was:
- Running Virtualbox 5.X with x64 Ubuntu on x64 Win 10
- Upgrade Virtualbox to 6.0.0 (I need Hyper-V for some crappy software)
- Check guest x64 Ubuntu with Virtualbox 6.0.0 - all looks good
- Enable Hyper-V
- Check again and got this:

Code: Select all

The native API dll was not found (C:\WINDOWS\system32\WinHvPlatform.dll) (VERR_NEM_NOT_AVAILABLE).
VT-x is not available (VERR_VMX_NO_VMX).

Result Code: E_FAIL (0x80004005)
Component: ConsoleWrap
Interface: IConsole {872da645-4a9b-1727-bee2-5585105b9eed}
- Reinstalled Virtualbox 6 in repair mode (an act of despair)
- Still no luck

What is interesting is that I don't have this DLL and no guess how to force windows to get it. All attempts to google this question leads to multiple complains on Stackoverflow and similar platforms with only suggestion "disable Hyper-V", which is obviously not what we are trying to reach in this topic.

And for the last question:
Only 32-bit OSes are now available in "version" dropdown of "Create VM" dialog window.
Last edited by socratis on 22. Dec 2018, 14:26, edited 1 time in total.
Reason: Removed unnecessary verbatim quote of the whole previous message.
xasx
Posts: 49
Joined: 17. Jul 2007, 17:11
Primary OS: MS Windows other
VBox Version: PUEL
Guest OSses: Windows XP/Server 2008R2/7/8/2012, Gentoo, Ubuntu, OpenSUSE, Oracle Linux, Fedora, Arch
Location: Karlsruhe
Contact:

Re: VirtualBox 6.0 and Hyper-V

Post by xasx »

For me the error upon starting a VT-x enabled VM (x64 guest) is

Code: Select all

Für die virtuelle Maschine Arch konnte keine neue Sitzung eröffnet werden.

 (VERR_NEM_MISSING_KERNEL_API).

VT-x is not available (VERR_VMX_NO_VMX).

Fehlercode:E_FAIL (0x80004005)
Komponente:ConsoleWrap
Interface:IConsole {872da645-4a9b-1727-bee2-5585105b9eed}
So I guess on my machine, even the presence of Hyper-V is not detected properly.
Is there anything I can debug to track this down?
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: VirtualBox 6.0 and Hyper-V

Post by mpack »

Could the last two posters please provide evidence that Hyper-v is installed, enabled and working on your host PCs. I don't use Hyper-v myself, perhaps others can suggest where to look.
BillG
Volunteer
Posts: 5100
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 »

Here is a summary on my experiences so far. The machine I am using is running Windows 10 version 1809 (build 17763.195) which has Hyper-V installed and runs Hyper-V guests with no problems.

When VirtualBox version 6.0.0 is installed as well I do not have any problem creating new 64-bit guests, or increasing the number of CPUs, so VirtualBox is aware that hardware virtualization is available. I have also had VirtualBox guests run satisfactorily on this system (with the green V turtle) but this does not always happen. Sometimes it will simply hang, whether it is an existing working vm or a new install. After a while it will show a Not responding message in the VirtualBox window and alongside the VirtualBox Process in Task Manager.

If you are having the problems usually associated with no hardware virtualization (no 64-bit option, cannot allocate more than one CPU) something is seriously wrong and you will not get any further. If these work, your system can see it and you should see the green turtle to show that the vm is running through Hyper-V.
Window.PNG
Bill
Locked