VirtualBox 6.0 and Hyper-V

Discussions related to using VirtualBox on Windows hosts.

Re: VirtualBox 6.0 and Hyper-V

Postby floogy » 23. Sep 2020, 13:15

I'm wondering if Oracle still is working on a solution without rebooting (Using the Hyper-V) that not slow down the paravirtualized VT-x/AMD-v Access in virtualbox. Also, when I see the Turtle, but using Hyper-V paravirtualizing is that machine slow as coming with no acceleration or only with a bit decreased performance because of the still buggy implementation of the use of Hyper-V in virtualbox?

I would appreciate a solution, which toggle without reboot. Though I'm not sure if that is technically possible at all.

I used Hyper-V last Weekend the first time and run virtualbox already for a very long time. Yesterday I installed 6.1.14 and today I realized the issue.

Edit: Okay, didn't noticed that this thread is that long before posting this message. How are the test builds like 6.1.15 behave in this regard?

I found these interesting links:
https://windowsserver.uservoice.com/for ... nested-vir
https://github.com/microsoft/WSL/issues ... -638409782
https://unclassified.software/de/apps/hypervswitch
https://github.com/ygoe/HyperVSwitch
floogy
 
Posts: 12
Joined: 16. Nov 2019, 13:06

Re: VirtualBox 6.0 and Hyper-V

Postby scottgus1 » 23. Sep 2020, 17:39

floogy wrote:toggle without reboot. Though I'm not sure if that is technically possible at all.

No, it is not, due to the type of hypervisor Hyper-V is, Type 1, which runs before the host OS starts. Virtualbox is Type 2, which runs after the host OS starts. So toggling Hyper-V requires rebooting the host OS.

Microsoft is working on and changing Hyper-V, so Microsoft's target is moving. As anyone who has done target practice, hitting a stationary target is hard enough. Hitting a moving one?

See viewtopic.php?f=6&t=90853&start=285#p483829
scottgus1
Site Moderator
 
Posts: 9421
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: VirtualBox 6.0 and Hyper-V

Postby floogy » 23. Sep 2020, 22:43

I thought they are trying to use Hyper-V, which is accessing the CPU VT-x/AMD-v Extension, and pass it eventually through to virtual box via API. Maybe that link which votes for nesting extensions to Hyper-V is such an approach. I don't know exactly, though, had to look deeper into this.
floogy
 
Posts: 12
Joined: 16. Nov 2019, 13:06

Re: VirtualBox 6.0 and Hyper-V

Postby scottgus1 » 24. Sep 2020, 00:44

The devs are working on trying to get Virtualbox to run while Hyper-V is enabled. It's getting better, but it's just not there yet.
scottgus1
Site Moderator
 
Posts: 9421
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: VirtualBox 6.0 and Hyper-V

Postby Guyver » 24. Sep 2020, 04:37

I have it working with Solaris 11.4 as the guest under V-Box (test build 6.1.97r) under Win10 2004 Hyper-V.
Guyver
 
Posts: 104
Joined: 11. Feb 2012, 06:19
Location: Central United States
Primary OS: Solaris
VBox Version: PUEL
Guest OSses: Windows 7

Re: VirtualBox 6.0 and Hyper-V

Postby thegioidotapgym » 5. Oct 2020, 07:21

Why can't VirtualBox or VMware run with Hyper-V enabled on Windows 10?
thegioidotapgym
 
Posts: 2
Joined: 5. Oct 2020, 07:17

Re: VirtualBox 6.0 and Hyper-V

Postby scottgus1 » 5. Oct 2020, 16:21

Hyper-V is a type-1 hypervisor, meaning it touches the bare metal PC first, then the control OS and other OS's ride on top.

Virtualbox and some VMware offerings are type-2 hypervisors, meaning they ride on an OS that has already started the bare metal PC. SO they can only use what the OS allows them to use.

If Hyper-V is running it takes "virtualization technology" capabilities of the PC (VT-X,AMD-V/SVM) so other programs, like Virtualbox, can't use them. Virtualbox is attempting to use the Hyper-V engine on Hyper-V-enabled Windows PC's, but it's still a work in progress, and for now it is easier to tell folks who have trouble running Virtualbox to turn off Hyper-V to get running Virtualbox.

The Virtualbox test builds have the latest attempts to get working Virtualbox on enabled Hyper-V.
scottgus1
Site Moderator
 
Posts: 9421
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: VirtualBox 6.0 and Hyper-V

Postby Arny1 » 19. Oct 2020, 19:41

hnyman wrote:Looks like the recent commits have really fixed something.
...
I used 6.1.15 r140351 to run Ubuntu 20.04 in Windows 10 to compile OpenWrt. It finally worked (unlike a few weeks ago).

Incited by your post, I now tried again with Virtualbox test version 6.1.15 r 140899.

I can confirm that VirtualBox seems to work now with Hyper-V:
My Knoppix ISO-ms5sum checksum test consistently returns the correct checksum now.

Checksum processing time:
83 / 56 secs on first/second test run with Hyper-V
42 / 25 secs on first/second test run without Hyper-V

So a 50% performance hit in this test.
Anyway, this is still better than getting a corrupt system.
Arny1
 
Posts: 2
Joined: 26. Jun 2020, 16:42

Re: VirtualBox 6.0 and Hyper-V

Postby chli » 21. Oct 2020, 14:18

Cross-posting from : github . com/MicrosoftDocs/WSL/issues/798
Opened a ticket at : virtualbox . org/ticket/19987

Hyper-V and VirtualBox 6.1.16 Windows Home x64 2004 still causing issues here.

I can start my debian "sid" VM (Linux Kernel 5.9.0.1-amd64) when I type in a Windows admin console:

bcdedit /set hypervisorlaunchtype off

and then reboot.

But if I enable it (needed for WSL2) with:

bcdedit /set hypervisorlaunchtype auto

and then reboot, my VM doesn't boot anymore but there are still things happening in the Linux Kernel before it hangs. (I left it overnight last time and nothing happened after that last message).

Attached are the Kernel logs, the one that didn't boot has extra "console=ttyS0 console=tty0 ignore_loglevel" as parameters so I can capture the Kernel log in a virtual serial port through VirtualBox.

Hyper-V off:
kernel-boot-hyperv-off.txt
Kernel Boots with Hyper-V OFF
(40.41 KiB) Downloaded 4 times

Hyper-V on:
kernel-hang-hyperv-on.txt
Kernel Hangs with Hyper-V ON
(9.33 KiB) Downloaded 7 times
chli
 
Posts: 1
Joined: 21. Oct 2020, 14:12

Re: VirtualBox 6.0 and Hyper-V

Postby fth0 » 21. Oct 2020, 16:20

In the HyperV-off case, VirtualBox intercepts the Linux kernel setting the LOCK bit in the IA32_FEATURE_CONTROL MSR. In the HyperV-on case, the log messages stop right before that.
fth0
Volunteer
 
Posts: 1090
Joined: 14. Feb 2019, 03:06
Location: Germany
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, macOS, ...

Previous

Return to VirtualBox on Windows Hosts

Who is online

Users browsing this forum: No registered users and 30 guests