VirtualBox 6.0 and Hyper-V

Discussions related to using VirtualBox on Windows hosts.

Re: VBox 6.1 / WMware / Hyper-V - some experiences

Postby Arny1 » 26. Jun 2020, 17:42

As already others experienced, also for me Virtualbox 6.1 machines do not run reliable with the Hyper-V hypervisor.
At least in my Win10 installation #1.

I have two Windows 10 installations on my harddisk, which do not see each other (partitions differently encrypted).
In my Win10 installation #2, VBox 6.1 runs well, but I am not sure if Hyper-V hypervisor is or is not running (details below).

My test setups: virtual machines with two cores, around 2400 MB Ram. No harddisk, but one virtual DVD drive containing KNOPPIX_V8.6.1-2019-10-14-DE.iso
The test:
  1. boot from the Knoppix ISO (which is a live Linux OS)
  2. and then within the virtual machine, from a command prompt, I have the MD5 hash be computed for the complete Knoppix DVD
  3. and then I have the MD5 computation repeated in order to find an MD5 discrepancy which would mean that something is wrong
The test command to measure MD5 computation time and show the MD5 result is: time md5sum /dev/sr0.

Test results in Win10 installation #1:
Code: Select all   Expand viewCollapse view
VBox 6.1.10                    22 sec, but MD5 checksums different on every test run (Alas!)
VMWare Player 15.5.6     71 sec, MD5 checksum always the same
Hyper-V Manager            47/33 sec first/second test run, MD5 checksum always the same


Installation #1 is somehow controlled by my organization. They have Defender ATP installed, and probably other stuff too (e.g. Credential Guard?, Device Guard?), which I don't know much about. When I set "hypervisorlaunchtype Off" in the BCD store, this seems not to have any effect on VBox 6.1. BTW, HWiNFO64.exe always claims that some hypervisor is running. I upgraded from Windows 1803 to 1909 to 2004. This did not help; the MD5 discrepancy in my VBox test persists.

Installation #2 has been installed by me, with no extra protection software. I have Hyper-V stuff and Windows-Hyper-V-Platform installed just for testing how Virtualbox cooperates with it, and I have no problem at all. For some strange reason, HWiNFO64.exe also claims there is a Hypervisor running, even when the Hyper-V is not installed (but I need to check this again; sorry, I prematurely pressed Submit so this post got submitted too early). Update: HWINFO64.exe is correct; Hyper-V is enforced on installation #2 because installation #1 set some EFI variables which enforce Hyper-V usage even for installation #2.

Update 2020-07-03 - More internet researching, and testing by me shows:

If a Win 10 host is running on top of Hyper-V, this always makes VirtualBox become unreliable. Then do not use VirtualBox!!!

For detecting if the Win 10 host is running on top of Hyper-V, the preinstalled console program %windir%\system32\systeminfo.exe can be used. External program HWiNFO64.exe is not needed. At the end of its output, systeminfo either tells that Hyper-V is active, or the requirements which need to be met in order to activate Hyper-V.

When booting, there are several factors where every single one enforces Hyper-V usage:
  1. The well known "hypervisorlaunchtype Auto" setting in the BCD store
  2. Some so called "EFI variable" settings in the firmware. These seem to be: Kernel_Lsa_Cfg_Flags, VbsPolicy of the variable group GUID {77FA9ABD-0359-4D32-BD60-28F4E78F784B}
  3. (claimed somewhere else, not verified by me) Always when Secure Boot is turned on in the firmware setup
Only the Lsa_Cgf_Flags variable is visible within a running operating system; the Vbs variables have an attribute assigned which makes them accessible during booting only (e.g. by bootmgfw or Grub). Note that "Vbs" means "Virtualization Based Security".

It seems that under certain conditions (e.g. Credential Guard installed and configured appropriately) Windows 10 sets the EFI variable Kernel_Lsa_Cfg_Flags. This causes some EFI program running during the boot process (bootmgfw.efi, bootmgr.efi, WinLoad.efi, ...?) to create and set the EFI variable VbsPolicy, which determines that Hyper-V should be used for running Win 10. Note that possibly this whole EFI variable setting and Hyper-V enforcing becomes effective only after a 2nd or 3rd boot.
Last edited by Arny1 on 3. Jul 2020, 13:57, edited 12 times in total.
Arny1
 
Posts: 1
Joined: 26. Jun 2020, 16:42

Re: VirtualBox 6.0 and Hyper-V

Postby bendem » 2. Jul 2020, 16:29

I have been trying to get this to work as well to test ansible playbooks using molecule-vagrant and I have two problems:

* about half the time, the VM hangs during boot, I just reset it and it works again, this I mostly ignore
* about 85% of the time, stuff I download from the network inside the guest system is corrupted. That, I can't work with.

I opened the bug 19695 about that (can't post links yet).
bendem
 
Posts: 1
Joined: 2. Jul 2020, 16:24

Re: VirtualBox 6.0 and Hyper-V

Postby Sam.huai » 3. Jul 2020, 04:25

hello~~ everyone
i like play world of warcraft classic game.
Sam.huai
 
Posts: 1
Joined: 3. Jul 2020, 04:21
Primary OS: Fedora 16
VBox Version: OSE Fedora
Guest OSses: UNIX

Previous

Return to VirtualBox on Windows Hosts

Who is online

Users browsing this forum: qiping and 49 guests