VirtualBox 6.0 and Hyper-V

Discussions related to using VirtualBox on Windows hosts.
floogy
Posts: 15
Joined: 16. Nov 2019, 13:06

Re: VirtualBox 6.0 and Hyper-V

Post by floogy »

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
scottgus1
Site Moderator
Posts: 20965
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

Post by scottgus1 »

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
floogy
Posts: 15
Joined: 16. Nov 2019, 13:06

Re: VirtualBox 6.0 and Hyper-V

Post by floogy »

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.
scottgus1
Site Moderator
Posts: 20965
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

Post by scottgus1 »

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.
Guyver
Posts: 104
Joined: 11. Feb 2012, 06:19
Primary OS: Solaris
VBox Version: PUEL
Guest OSses: Windows 7
Location: Central United States

Re: VirtualBox 6.0 and Hyper-V

Post by Guyver »

I have it working with Solaris 11.4 as the guest under V-Box (test build 6.1.97r) under Win10 2004 Hyper-V.
thegioidotapgym
Posts: 2
Joined: 5. Oct 2020, 07:17

Re: VirtualBox 6.0 and Hyper-V

Post by thegioidotapgym »

Why can't VirtualBox or VMware run with Hyper-V enabled on Windows 10?
scottgus1
Site Moderator
Posts: 20965
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

Post by scottgus1 »

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.
Arny1
Posts: 2
Joined: 26. Jun 2020, 16:42

Re: VirtualBox 6.0 and Hyper-V

Post by Arny1 »

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.
chli
Posts: 1
Joined: 21. Oct 2020, 14:12

Re: VirtualBox 6.0 and Hyper-V

Post by chli »

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 133 times
Hyper-V on:
kernel-hang-hyperv-on.txt
Kernel Hangs with Hyper-V ON
(9.33 KiB) Downloaded 122 times
fth0
Volunteer
Posts: 5661
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: VirtualBox 6.0 and Hyper-V

Post by fth0 »

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.
Epicwinner101
Posts: 3
Joined: 26. Oct 2020, 07:44

Re: VirtualBox 6.0 and Hyper-V

Post by Epicwinner101 »

So I did the "UseRing0Runloop" value="0" and now my virtualbox just hangs at a black screen, what was the default value so I can put it back?
fth0
Volunteer
Posts: 5661
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: VirtualBox 6.0 and Hyper-V

Post by fth0 »

Simply use the VBoxManage setextradata command without the value.
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 have just done a bit of testing with the latest versions (Windows 20H2 build 19062.630 and VirtualBox 6.1.16) and things are improving again, after a major setback earlier in the year. My 32-bit Windows guests (W98SE to XP) now run quite normally in turtle mode, as they did back in April. x64 Windows guests are still so slow they are not usable.

I am not really into Linux, but my Mint vm runs in turtle mode. It seems a bit slower, but is usable (unlike the Windows x64 guests). It needed a GA update, which ran successfully, if a bit slower that usual.
Bill
fth0
Volunteer
Posts: 5661
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: VirtualBox 6.0 and Hyper-V

Post by fth0 »

I have also just done a bit of testing: Host is Windows 10 20H2 with VirtualBox 6.1.16, guests are Windows 10 20H2 and Linux Mint 20 (all 64-bit). From a user's perspective, my results are similar to those of BillG: Linux is usable, Windows is not.

From a technical perspective, both OSs need about twice the time as when not using Hyper-V to reach the final screen resolution switch (which is earlier than full desktop usability). There is no big time difference between Linux and Windows in their first stages, but then it starts to diverge ...
daviessd
Posts: 4
Joined: 22. Nov 2020, 20:12

Re: VirtualBox 6.0 and Hyper-V

Post by daviessd »

Hi.

Posted an issue (Locks up Installing ANY Linux Live ISO) that looks like it is related to this thread.

I am a new member so i cannot post a link, actually been a member for years but I no longer own the email address used by the company I worked for!

Edition Windows 10 Home
Version 20H2
Installed on ‎19/‎07/‎2020
OS build 19042.630

VirtualBox-6.1.16-140961-Win.

I really need to keep WSL but would also like to run Linux Mint in a VM. Is this possible. I was not sure if this issue is resolved.

I get to the boot menu for both ISO's. Selecting install on either then gives me a Black Screen with flashing cursor (top left). I get no further progress.

Is there any progress or is this not related?

Regards

Stuart
Locked