VirtualBox 6.0 and Hyper-V

Discussions related to using VirtualBox on Windows hosts.
Locked
loyukfai
Posts: 14
Joined: 27. Jun 2019, 17:47

Re: VirtualBox 6.0 and Hyper-V

Post by loyukfai »

loyukfai wrote:This customization:

Code: Select all

<ExtraDataItem name="VBoxInternal/NEM/UseRing0Runloop" value="0"/>
Good, perhaps VB team can consider making it a checkbox option on the GUI...

Cheers.
RWS
Posts: 2
Joined: 29. Aug 2019, 18:59

Re: VirtualBox 6.0 and Hyper-V

Post by RWS »

I am having some issues getting VirtualBox to run with Hyper-V enabled. I am using the latest version of VirtualBox 6.0, and have set all the required settings in Win10, but we are getting the "RAW-Mode is unavailable..." error message. In the log files, we are also seeing that VirtualBox is detecting the processor as a Gen 6 Intel i7-6700K, when in fact it is a Gen 8 i7-8850H processor. I've attached a log file. Unfortunately, using Hyper-V for this particular VM is not an option, and disabling Credential Guard is also not an option.

Any help would be appreciated.
Attachments
qnx-2019-08-29-13-20-05.log
Log File
(97.83 KiB) Downloaded 63 times
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 »

RWS's log wrote:00:00:01.763785 HM: HMR3Init: Attempting fall back to NEM: VT-x is not available
00:00:01.792383 NEM: WHvCapabilityCodeHypervisorPresent is TRUE, so this might work...
If you can't turn Hyper-V off completely you won't get good or any performance with Virtualbox. And if you can't turn Credential Guard off, then you can't turn Hyper-V off. Thanks to Microsoft for their high-handed use of VT-x. They never got taught as a child to share their toys, I guess...
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 »

RWS wrote:VirtualBox is detecting the processor as a Gen 6 Intel i7-6700K, when in fact it is a Gen 8 i7-8850H processor
That's not your problem, the use of a Hyper-V component is. From the looks of it, you must disable "Credential Guard", just like 'scottgus1" rightly said so.
RWS's log wrote:
00:00:01.731590 Guest OS type: 'QNX'
00:00:01.735594 File system of 'C:\Temp\QNX630SP3Runtime.iso' (DVD) is ntfs
Plus, we won't be able to easily replicate your setup, QNX is commercial software, not readily available for testing...


PS. For future reference you should ZIP your logs. It helps you, it helps us, it helps the server, it helps save a (virtual) tree or two... ;)
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.
FirstVoid
Posts: 7
Joined: 30. Aug 2019, 06:37

Re: VirtualBox 6.0 and Hyper-V

Post by FirstVoid »

Hello Socratis,

I appreciate one of the developers weighing in on this as I worked with user "RWS" to set this up as I have a working setup on a different model of hardware.

Just to confirm first of all it's not limited to QNX, any guest OS chosen shows this behavior, It's a standard P52 laptop from Lenovo.

The log shows that the hypervisor component is detected, however I suspect a possible miss-identification of the CPU due to the fact it can't detect one of the features required and then takes a guess. I will produce the same log from the working machine and attach so you can compare if required?

Like a lot of other people in the thread I have a working setup with Hyper-v, Virtualbox and in our case credential guard. We also tried QEMU on this machine and it worked fine, but as you can appreciate it is not as feature rich or manageable. Since they also use the API I am hoping this is something relatively minor.

Disabling Credential guard is just like turning hyper-v off, so I guess that's not the aim of this thread anymore?

Appreciate any further input you can offer or should we open a bug with the comparative logs and hardware types?
Last edited by socratis on 30. Aug 2019, 09:10, edited 2 times in total.
Reason: Removed unnecessary verbatim quote of the whole previous message.
FirstVoid
Posts: 7
Joined: 30. Aug 2019, 06:37

Re: VirtualBox 6.0 and Hyper-V

Post by FirstVoid »

Just by way of an updated I can replicate the issues with an Filter driver, however on the other machines I'm sure this is off. Due to timezones I won't find out if this is a confirmed fix until latter on today.
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 »

FirstVoid wrote:I appreciate one of the developers weighing in on this
I'm not a developer, just a forum moderator. ;)
FirstVoid wrote:Just to confirm first of all it's not limited to QNX, any guest OS chosen shows this behavior
Sure... the guest option doesn't change the state of the host. Hyper-V is going to be activated independently of your guest choice.
FirstVoid wrote:I suspect a possible miss-identification of the CPU due to the fact it can't detect one of the features required and then takes a guess
Again, the "family" identification doesn't have an effect on the capability of VirtualBox to identify what your host's CPU can or can't do. You isolated a single line which is pretty generic, while VirtualBox does a really thorough analysis of your CPU's capabilities later on. I'll give you an example, this is your complete CPU capabilities:

Code: Select all

00:00:02.177047 Features
00:00:02.177048   Mnemonic - Description                                  = guest (host)
00:00:02.177048   FPU - x87 FPU on Chip                                   = 1 (1)
00:00:02.177049   VME - Virtual 8086 Mode Enhancements                    = 1 (1)
00:00:02.177050   DE - Debugging extensions                               = 1 (1)
00:00:02.177051   PSE - Page Size Extension                               = 1 (1)
00:00:02.177051   TSC - Time Stamp Counter                                = 1 (1)
00:00:02.177052   MSR - Model Specific Registers                          = 1 (1)
00:00:02.177052   PAE - Physical Address Extension                        = 0 (1)
00:00:02.177053   MCE - Machine Check Exception                           = 1 (1)
00:00:02.177054   CX8 - CMPXCHG8B instruction                             = 1 (1)
00:00:02.177054   APIC - APIC On-Chip                                     = 1 (1)
00:00:02.177055   SEP - SYSENTER and SYSEXIT Present                      = 0 (1)
00:00:02.177055   MTRR - Memory Type Range Registers                      = 1 (1)
00:00:02.177056   PGE - PTE Global Bit                                    = 1 (1)
00:00:02.177057   MCA - Machine Check Architecture                        = 1 (1)
00:00:02.177057   CMOV - Conditional Move instructions                    = 1 (1)
00:00:02.177058   PAT - Page Attribute Table                              = 1 (1)
00:00:02.177060   PSE-36 - 36-bit Page Size Extension                     = 1 (1)
00:00:02.177060   PSN - Processor Serial Number                           = 0 (0)
00:00:02.177061   CLFSH - CLFLUSH instruction                             = 1 (1)
00:00:02.177061   DS - Debug Store                                        = 0 (1)
00:00:02.177062   ACPI - Thermal Mon. & Soft. Clock Ctrl.                 = 0 (1)
00:00:02.177062   MMX - Intel MMX Technology                              = 1 (1)
00:00:02.177063   FXSR - FXSAVE and FXRSTOR instructions                  = 1 (1)
00:00:02.177064   SSE - SSE support                                       = 1 (1)
00:00:02.177064   SSE2 - SSE2 support                                     = 1 (1)
00:00:02.177065   SS - Self Snoop                                         = 0 (1)
00:00:02.177065   HTT - Hyper-Threading Technology                        = 1 (1)
00:00:02.177066   TM - Therm. Monitor                                     = 0 (1)
00:00:02.177067   PBE - Pending Break Enabled                             = 0 (1)
00:00:02.177067   SSE3 - SSE3 support                                     = 1 (1)
00:00:02.177068   PCLMUL - PCLMULQDQ support (for AES-GCM)                = 0 (1)
00:00:02.177068   DTES64 - DS Area 64-bit Layout                          = 0 (1)
00:00:02.177069   MONITOR - MONITOR/MWAIT instructions                    = 0 (0)
00:00:02.177069   CPL-DS - CPL Qualified Debug Store                      = 0 (0)
00:00:02.177070   VMX - Virtual Machine Extensions                        = 0 (0)
00:00:02.177070   SMX - Safer Mode Extensions                             = 0 (0)
00:00:02.177071   EST - Enhanced SpeedStep Technology                     = 0 (1)
00:00:02.177072   TM2 - Terminal Monitor 2                                = 0 (1)
00:00:02.177072   SSSE3 - Supplemental Streaming SIMD Extensions 3        = 1 (1)
00:00:02.177073   CNTX-ID - L1 Context ID                                 = 0 (0)
00:00:02.177073   SDBG - Silicon Debug interface                          = 0 (0)
00:00:02.177074   FMA - Fused Multiply Add extensions                     = 0 (1)
00:00:02.177074   CX16 - CMPXCHG16B instruction                           = 0 (1)
00:00:02.177075   TPRUPDATE - xTPR Update Control                         = 0 (1)
00:00:02.177075   PDCM - Perf/Debug Capability MSR                        = 0 (1)
00:00:02.177076   PCID - Process Context Identifiers                      = 1 (1)
00:00:02.177077   DCA - Direct Cache Access                               = 0 (0)
00:00:02.177077   SSE4_1 - SSE4_1 support                                 = 1 (1)
00:00:02.177078   SSE4_2 - SSE4_2 support                                 = 1 (1)
00:00:02.177078   X2APIC - x2APIC support                                 = 0 (1)
00:00:02.177079   MOVBE - MOVBE instruction                               = 0 (1)
00:00:02.177079   POPCNT - POPCNT instruction                             = 0 (1)
00:00:02.177080   TSCDEADL - Time Stamp Counter Deadline                  = 0 (0)
00:00:02.177081   AES - AES instructions                                  = 0 (1)
00:00:02.177081   XSAVE - XSAVE instruction                               = 0 (1)
00:00:02.177082   OSXSAVE - OSXSAVE instruction                           = 0 (1)
00:00:02.177082   AVX - AVX support                                       = 0 (1)
00:00:02.177083   F16C - 16-bit floating point conversion instructions    = 0 (1)
00:00:02.177083   RDRAND - RDRAND instruction                             = 0 (1)
00:00:02.177084   HVP - Hypervisor Present (we're a guest)                = 0 (1)
00:00:02.177085 Structured Extended Feature Flags Enumeration (leaf 7):
00:00:02.177086   Mnemonic - Description                                  = guest (host)
00:00:02.177086   FSGSBASE - RDFSBASE/RDGSBASE/WRFSBASE/WRGSBASE instr.   = 1 (1)
00:00:02.177086   TSCADJUST - Supports MSR_IA32_TSC_ADJUST                = 0 (1)
00:00:02.177087   SGX - Supports Software Guard Extensions                = 0 (1)
00:00:02.177088   BMI1 - Advanced Bit Manipulation extension 1            = 0 (1)
00:00:02.177088   HLE - Hardware Lock Elision                             = 0 (1)
00:00:02.177089   AVX2 - Advanced Vector Extensions 2                     = 0 (1)
00:00:02.177089   FDP_EXCPTN_ONLY - FPU DP only updated on exceptions     = 0 (0)
00:00:02.177090   SMEP - Supervisor Mode Execution Prevention             = 0 (1)
00:00:02.177090   BMI2 - Advanced Bit Manipulation extension 2            = 0 (1)
00:00:02.177091   ERMS - Enhanced REP MOVSB/STOSB instructions            = 0 (1)
00:00:02.177091   INVPCID - INVPCID instruction                           = 1 (1)
00:00:02.177092   RTM - Restricted Transactional Memory                   = 0 (1)
00:00:02.177092   PQM - Platform Quality of Service Monitoring            = 0 (0)
00:00:02.177093   DEPFPU_CS_DS - Deprecates FPU CS, FPU DS values if set  = 1 (1)
00:00:02.177093   MPE - Intel Memory Protection Extensions                = 0 (1)
00:00:02.177094   PQE - Platform Quality of Service Enforcement           = 0 (0)
00:00:02.177094   AVX512F - AVX512 Foundation instructions                = 0 (0)
00:00:02.177095   RDSEED - RDSEED instruction                             = 0 (1)
00:00:02.177095   ADX - ADCX/ADOX instructions                            = 0 (1)
00:00:02.177096   SMAP - Supervisor Mode Access Prevention                = 0 (1)
00:00:02.177096   CLFLUSHOPT - CLFLUSHOPT (Cache Line Flush) instruction  = 0 (1)
00:00:02.177097   INTEL_PT - Intel Processor Trace                        = 0 (0)
00:00:02.177097   AVX512PF - AVX512 Prefetch instructions                 = 0 (0)
00:00:02.177098   AVX512ER - AVX512 Exponential & Reciprocal instructions = 0 (0)
00:00:02.177098   AVX512CD - AVX512 Conflict Detection instructions       = 0 (0)
00:00:02.177099   SHA - Secure Hash Algorithm extensions                  = 0 (0)
00:00:02.177099   PREFETCHWT1 - PREFETCHWT1 instruction                   = 0 (0)
00:00:02.177100   UMIP - User mode insturction prevention                 = 0 (0)
00:00:02.177100   PKU - Protection Key for Usermode pages                 = 0 (0)
00:00:02.177102   OSPKE - CR4.PKU mirror                                  = 0 (0)
00:00:02.177103   MAWAU - Value used by BNDLDX & BNDSTX                   = 0x0 (0x0)
00:00:02.177103   RDPID - Read processor ID support                       = 0 (0)
00:00:02.177104   SGX_LC - Supports SGX Launch Configuration              = 0 (1)
00:00:02.177105   MD_CLEAR - Supports MDS related buffer clearing         = 1 (1)
00:00:02.177105   IBRS_IBPB - IA32_SPEC_CTRL.IBRS and IA32_PRED_CMD.IBPB  = 0 (1)
00:00:02.177106   STIBP - Supports IA32_SPEC_CTRL.STIBP                   = 0 (1)
00:00:02.177106   FLUSH_CMD - Supports IA32_FLUSH_CMD                     = 1 (1)
00:00:02.177107   ARCHCAP - Supports IA32_ARCH_CAP                        = 1 (1)
00:00:02.177107   31 - Reserved                                           = 0 (1)
and here are some selective differences between your CPU and mine. Your is the first two columns, mine are the 3rd and 4th, with the last one being your problem:
Features
Mnemonic - Description                      = guest (host)
  PAE - Physical Address Extension          = 0 (1)          = 1 (1)
  SEP - SYSENTER and SYSEXIT Present        = 0 (1)          = 1 (1)
  PCLMUL - PCLMULQDQ support (for AES-GCM)  = 0 (1)          = 1 (1)
  MONITOR - MONITOR/MWAIT instructions      = 0 (0)          = 1 (1)
  CPL-DS - CPL Qualified Debug Store        = 0 (0)          = 0 (1)
  VMX - Virtual Machine Extensions          = 0 (0)          = 0 (1)
  SMX - Safer Mode Extensions               = 0 (0)          = 0 (1)
  SDBG - Silicon Debug interface            = 0 (0)          = 0 (1)
  CX16 - CMPXCHG16B instruction             = 0 (1)          = 1 (1)
  X2APIC - x2APIC support                   = 0 (1)          = 1 (1)
  MOVBE - MOVBE instruction                 = 0 (1)          = 1 (1)
  POPCNT - POPCNT instruction               = 0 (1)          = 1 (1)
  TSCDEADL - Time Stamp Counter Deadline    = 0 (0)          = 0 (1)
  AES - AES instructions                    = 0 (1)          = 1 (1)
  XSAVE - XSAVE instruction                 = 0 (1)          = 1 (1)
  AVX - AVX support                         = 0 (1)          = 1 (1)
  RDRAND - RDRAND instruction               = 0 (1)          = 1 (1)
  HVP - Hypervisor Present (we're a guest)  = 0 (1)          = 1 (0)
FirstVoid wrote: I will produce the same log from the working machine and attach so you can compare if required?
Absolutely! This coexistence of Hyper-V and VirtualBox is a really new feature, and we're not sure (actually we don't have a clue) what makes it work or not. A comparative analysis is most welcome!
FirstVoid wrote:Disabling Credential guard is just like turning hyper-v off, so I guess that's not the aim of this thread anymore?
Correct, you're right...
FirstVoid wrote:should we open a bug with the comparative logs and hardware types?
For what? For something that the developers already know? It's going to be a waste of resources developers and users alike IMHO. The developers already know the situation, they state it (emphasis on the "might"):
00:00:06.074744 HM: HMR3Init: Attempting fall back to NEM: VT-x is not available
00:00:06.138105 NEM: WHvCapabilityCodeHypervisorPresent is TRUE, so this might work...
Not the definitive answer someone might look for...
FirstVoid wrote:I can replicate the issues with an Filter driver
What's a Filter driver?
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.
FirstVoid
Posts: 7
Joined: 30. Aug 2019, 06:37

Re: VirtualBox 6.0 and Hyper-V

Post by FirstVoid »

Hi,

All fair comments, we will wait until I get an answer if it's 3rd party software causing the issue.

In regards to the developers I think logs of working and non working may show them the differences between the systems and identify some of the areas for improvement. I saw the detailed analysis and upon studying the working log I can see that this error occurs, but the CPU is correctly identified.

Thanks for showing the difference on the CPU, that is very helpful and leads more to the route of a filter driver. A filter driver being a low level driver usually installed by products such as Antivirus, VPN's etc. They alter one of the core system behaviors and could cause something like this. The only way to test properly on the hardware is a clean boot with just the Microsoft products enabled and then follow the relevant instructions to enable.

For reference the core steps we are using are:

Make sure build is 1809 higher of Windows10.
Step 1: Enable all Virtualisation extensions in the bios. e.g. Intel Virtulization technology and VT-d
Step 2: In Control Panel, Add and remove programs, turn on Windows Features enable Windows Hypervisor Platform and Hyper-V
Step 3: Install VirtualBox at least .10
Step 4: Create new machine e.g. "Testmachine"
Step 5: Load cmd prompt, (cmd)
Step 6: cd into your install folder for virtualbox, usually "cd C:\Program Files\Oracle\VirtualBox"
Step 7: setextradata "<VM Name>" "VBoxInternal/NEM/UseRing0Runloop" 0 , e.g. setextradata "Testmachine "VBoxInternal/NEM/UseRing0Runloop" 0
Please note Step 7 is case sensitive.
Step 8: Use as per normal, in this case our Hyper-V and VirtualBox ran together, we also used USB devices. The speed was very reasonable.
TomL12953
Posts: 38
Joined: 16. Mar 2012, 03:15
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: Commodore OS, Win 8

Re: VirtualBox 6.0 and Hyper-V

Post by TomL12953 »

I am getting a black screen when I try to install Ubuntu 19.04 64-bit in a VM on a Windows 10 machine. I get an initial Ubuntu screen with dots that change from white to red (as normal) but then the screen goes black and nothing else happens. I have the green turtle in the lower right.
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 »

I get a black screen with Ubuntu 19.04 too. However, on mine the desktop appears a few seconds later: it would be nice if Ubuntu showed some kind of progress indicator so I wouldn't think it was dead.

I don't have Hyper-v running. Obviously with NEM running that "few seconds" needs to be scaled up a lot.
FirstVoid
Posts: 7
Joined: 30. Aug 2019, 06:37

Re: VirtualBox 6.0 and Hyper-V

Post by FirstVoid »

Try step 7
Step 7: setextradata "<VM Name>" "VBoxInternal/NEM/UseRing0Runloop" 0 , e.g. setextradata "Testmachine "VBoxInternal/NEM/UseRing0Runloop" 0
Last edited by socratis on 1. Sep 2019, 11:08, edited 1 time in total.
Reason: Removed unnecessary verbatim quote of the whole previous message.
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 »

It's confusing that you quote me if your intention is to address TomL; which I assume must be the case since I'm not the one with a problem for "step 7" to solve.
loyukfai
Posts: 14
Joined: 27. Jun 2019, 17:47

Re: VirtualBox 6.0 and Hyper-V

Post by loyukfai »

loyukfai wrote:
loyukfai wrote:This customization:

Code: Select all

<ExtraDataItem name="VBoxInternal/NEM/UseRing0Runloop" value="0"/>
Good, perhaps VB team can consider making it a checkbox option on the GUI...

Cheers.
This works but the performance is not good, any thing I can tweak to make it run faster?

Cheers.
zgsuo
Posts: 3
Joined: 8. Jun 2016, 05:02

Re: VirtualBox 6.0 and Hyper-V

Post by zgsuo »

First of all, this is a general post regarding Windows Subsystem for Linux (WSL). There seems to be a conflict between WSL and VirtualBox. The conflict is that installing WSL automatically (or the first use of a Linux distro) enables Hiper-V Windows Feature, which renders all guests unbootable.
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 »

The conflict is with WSL2, and it's already in the FAQ.
Locked