Page 2 of 23

Re: VirtualBox 6.0 and Hyper-V

PostPosted: 24. Dec 2018, 09:32
by SquallATF
I have successfully run windows 7 64 bit with hyper-v enabled under windows 10 1803 with virtualbox 6.0. but linux guest can not boot up. And after upgrade to 1809 all guest can not run.
I have also tested run virtualbox inside vmware with windows 10 1803 hyper-v enabled, It works too with windows 7 guest.

Re: VirtualBox 6.0 and Hyper-V

PostPosted: 24. Dec 2018, 12:14
by Vorber
mpack wrote: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.

Where to look:
Control Panel\Programs\Programs and Features -> Turn Windows features on or off -> Hyper-V

I've enabled Hyper-V to run dev server from Cloud Foundry. Dev server has successfully started, so I'm pretty sure Hyper-V is enabled.
The problem here is that I've lost ability to run my VB guest Ubuntu x64 and it seems that VB can't find some DLL (see my previous post).

Looking at previous 2 posts the best guess I have so far is that I have too old Win 10 (1709)

Re: VirtualBox 6.0 and Hyper-V

PostPosted: 24. Dec 2018, 12:51
by socratis
Vorber wrote:
Code: Select all   Expand viewCollapse view
The native API dll was not found (C:\WINDOWS\system32\WinHvPlatform.dll) (VERR_NEM_NOT_AVAILABLE).

What is interesting is that I don't have this DLL and no guess how to force windows to get it.

You didn't say which Win10 version you're running. Win10 is a "family" for the last 2 years, and it's going to be like that for years to come. So, you got to always state which Win10 version you're talking about.

I think that you're on an older Win10 version, one that hadn't enabled calling/exposing via an API the programmatic use of Hyper-V for 3rd party applications, something that VirtualBox uses.

There is a HUGE amount of technical information in the source code (including benchmarks), in "NEMR3Native-win.cpp", starting at line 1965, revision 74795, the one that I linked to. Pages upon pages of info, I'm just going to quote a small passage:
* @section sub_nem_win_whv   The WinHvPlatform API
* Since Windows 10 build 17083 there is a documented API for managing Hyper-V
* VMs: header file WinHvPlatform.h and implementation in WinHvPlatform.dll.
* This interface is a wrapper around the undocumented Virtualization
* Infrastructure Driver (VID) API - VID.DLL and VID.SYS. The wrapper is
* written in C++, namespaced, early versions (at least) was using standard C++
* container templates in several places.

So, if you can't find the DLL and VirtualBox complains, there's a really valid reason; you're running an older version of Win10 that doesn't have that capability enabled. And mind you, that's the version (17083, pre-1803) that this was enabled. So you'll need Win10 1803 or 1809 to have it work properly. The newer the build, the better I expect it to be supported...

Re: VirtualBox 6.0 and Hyper-V

PostPosted: 24. Dec 2018, 13:43
by Vorber
socratis wrote:So you'll need Win10 1803 or 1809 to have it work properly. The newer the build, the better I expect it to be supported...

Thanks! You've just confirmed my assumption. It won't help me resolve the issue as my windows updates are managed by corporate policy, but at least I'll focus on alternatives :)

Re: VirtualBox 6.0 and Hyper-V

PostPosted: 25. Dec 2018, 05:39
by BillG
I had no success at all with Windows 10 version 1803. VirtualBox could not see vt-x at all while Hyper-V was enabled (it did not offer any 64-bit guests). That part works in version 1809 on the same hardware.

Re: VirtualBox 6.0 and Hyper-V

PostPosted: 25. Dec 2018, 10:36
by socratis
BillG wrote:That part works in version 1809 on the same hardware.

BillG, are you dual booting? Or you have two identical computers, one with 1803 and one with 1809? In any event, from what you're saying, it seems to suggest that 1809 is the minimum requirement for this feature to work. Good to know...

I'm making this a "sticky" post as such a big new feature deserves it, for the foreseeable future at least. Just like the nested virtualization one...

Re: VirtualBox 6.0 and Hyper-V

PostPosted: 26. Dec 2018, 01:17
by BillG
Yes, it was dual boot. I usually run Windows Server with Hyper-V as the second OS but I loaded Windows 10 version 1803 to see what it would do.

Re: VirtualBox 6.0 and Hyper-V

PostPosted: 26. Dec 2018, 03:54
by irak
running win 10 version 1809 build 18305
with sandbox (microsofts version)
running previously working vm's now i get
WHvCreatePartition failed with E_ACCESSDENIED (Last=0xc0000022/5) (VERR_NEM_VM_CREATE_FAILED).
VT-x is not available (VERR_VMX_NO_VMX).

Result Code: E_FAIL (0x80004005)
Component: ConsoleWrap
Interface: IConsole {872da645-4a9b-1727-bee2-5585105b9eed}

This is from vbox VirtualBox Graphical User Interface
Version 6.0.0 r127566 (Qt5.6.2)

please note that this version of windows when enabling sandbox enables hyper_v

Thank You

Re: VirtualBox 6.0 and Hyper-V

PostPosted: 27. Dec 2018, 03:03
by BillG
What system were the vms previously running on? Did it have Hyper-V installed?

It appears that Sandbox is simply a basic Hyper-V vm on which you can test a dodgy app without affecting the host OS (without having to actually set up Hyper-V and create a vm yourself, and it doesn't need its own license). Like Hyper-V, it won't run on Windows Home.

Looks like another name to add to the list of things which block hardware virtualization (and another reason to look forward to the new system working smoothly).

Re: VirtualBox 6.0 and Hyper-V

PostPosted: 28. Dec 2018, 05:22
by irak
I did not have hyper v on the previous system. Enabling sandbox turns on hyper-v

Re: VirtualBox 6.0 and Hyper-V

PostPosted: 30. Dec 2018, 02:30
by xasx
After some research and digging through the header files, I came across issues like ... 3648292508 indicating that newer versions of WinHVPlatform::WHVGetCapability now have the criticized missing output size parameter, see ... 74795#L560

Therefore, I guess, Hyper-V is not being detected properly on my machine running Windows 10 Pro Build 18305. According to the source code, something like
Code: Select all   Expand viewCollapse view
WHvCapabilityCodeHypervisorPresent is FALSE! Make sure you have enabled the 'Windows Hypervisor Platform' feature.

should have been logged. Nevertheless, I can rather see
Code: Select all   Expand viewCollapse view
00:00:05.260178 HM: HMR3Init: Attempting fall back to NEM: VT-x is not available
00:00:05.280158 NEM: WHvCapabilityCodeHypervisorPresent is TRUE, so this might work...
00:00:05.280172 NEM: WHvCapabilityCodeExtendedVmExits      = 0x0000000000000007
00:00:05.280181 NEM:                       fExtendedMsrExit: 1
00:00:05.280188 NEM:                     fExtendedCpuIdExit: 1
00:00:05.280194 NEM:                      fExtendedXcptExit: 1
00:00:05.280201 NEM: Warning! Unknown feature definitions: 0x1f
00:00:05.280226 NEM: Supported exception exit bitmap: 0x1
00:00:05.280252 NEM: WHvCapabilityCodeProcessorVendor      = 1 - Intel
00:00:05.280277 NEM: WHvCapabilityCodeProcessorFeatures    = 0x0080000000000000
00:00:05.280286 NEM:                            Sse3Support: 0
00:00:05.280293 NEM:                        LahfSahfSupport: 0
00:00:05.280300 NEM:                           Ssse3Support: 0
00:00:05.280306 NEM:                          Sse4_1Support: 0
00:00:05.280313 NEM:                          Sse4_2Support: 0
00:00:05.280319 NEM:                           Sse4aSupport: 0
00:00:05.280326 NEM:                             XopSupport: 0
00:00:05.280333 NEM:                          PopCntSupport: 0
00:00:05.280339 NEM:                      Cmpxchg16bSupport: 0
00:00:05.280346 NEM:                       Altmovcr8Support: 0
00:00:05.280352 NEM:                           LzcntSupport: 0
00:00:05.280359 NEM:                     MisAlignSseSupport: 0
00:00:05.280365 NEM:                          MmxExtSupport: 0
00:00:05.280372 NEM:                        Amd3DNowSupport: 0
00:00:05.280378 NEM:                ExtendedAmd3DNowSupport: 0
00:00:05.280385 NEM:                         Page1GbSupport: 0
00:00:05.280391 NEM:                             AesSupport: 0
00:00:05.280398 NEM:                       PclmulqdqSupport: 0
00:00:05.280404 NEM:                            PcidSupport: 0
00:00:05.280411 NEM:                            Fma4Support: 0
00:00:05.280417 NEM:                            F16CSupport: 0
00:00:05.280424 NEM:                          RdRandSupport: 0
00:00:05.280430 NEM:                        RdWrFsGsSupport: 0
00:00:05.280437 NEM:                            SmepSupport: 0
00:00:05.280444 NEM:              EnhancedFastStringSupport: 0
00:00:05.280450 NEM:                            Bmi1Support: 0
00:00:05.280456 NEM:                            Bmi2Support: 0
00:00:05.280463 NEM:                           MovbeSupport: 0
00:00:05.280469 NEM:                          Npiep1Support: 0
00:00:05.280479 NEM:                   DepX87FPUSaveSupport: 0
00:00:05.280486 NEM:                          RdSeedSupport: 0
00:00:05.280492 NEM:                             AdxSupport: 0
00:00:05.280499 NEM:                   IntelPrefetchSupport: 0
00:00:05.280505 NEM:                            SmapSupport: 0
00:00:05.280514 NEM:                             HleSupport: 0
00:00:05.280522 NEM:                             RtmSupport: 0
00:00:05.280529 NEM:                          RdtscpSupport: 0
00:00:05.280536 NEM:                      ClflushoptSupport: 0
00:00:05.280542 NEM:                            ClwbSupport: 0
00:00:05.280549 NEM:                             ShaSupport: 0
00:00:05.280555 NEM:                X87PointersSavedSupport: 0
00:00:05.280562 NEM: Warning! Unknown CPU features: 0x80000000000000
00:00:05.280586 NEM: WHvCapabilityCodeProcessorClFlushSize = 2^8
00:00:05.280943 NEM: Warning! Unknown capability 0x1003 returning: 00 00 00 00 00 00 00 00
00:00:05.281658 NEM: VidGetHvPartitionId            -> fun:0x2210a7 in:0x0 out:0x8
00:00:05.281681 NEM: VidStartVirtualProcessor       -> fun:0x221174 in:0x4 out:0x0
00:00:05.281698 NEM: VidStopVirtualProcessor        -> fun:0x221180 in:0x4 out:0x0
00:00:05.281708 NEM: VidMessageSlotHandleAndGetNext -> fun:0x2210df in:0x8 out:0x0
00:00:05.281820 VMSetError: F:\tinderbox\win-rel\src\VBox\VMM\VMMR3\NEMR3Native-win.cpp(1298) int __cdecl nemR3NativeInit(struct VM *,bool,bool); rc=VERR_NEM_MISSING_KERNEL_API
00:00:05.281898 VMSetError:
00:00:05.281929 NEM: NEMR3Init: Native init failed: VERR_NEM_MISSING_KERNEL_API.
00:00:05.281960 VMSetError: F:\tinderbox\win-rel\src\VBox\VMM\VMMR3\HM.cpp(818) int __cdecl HMR3Init(struct VM *); rc=VERR_VMX_NO_VMX
00:00:05.281967 VMSetError: VT-x is not available
00:00:05.412887 crUtil DLL unloaded.ERROR [COM]: aRC=E_FAIL (0x80004005) aIID={872da645-4a9b-1727-bee2-5585105b9eed} aComponent={ConsoleWrap} aText={ (VERR_NEM_MISSING_KERNEL_API).
00:00:05.416091 VT-x is not available (VERR_VMX_NO_VMX)}, preserve=false aResultDetail=-4009

Puzzled :?:

Re: VirtualBox 6.0 and Hyper-V

PostPosted: 4. Jan 2019, 16:47
by jhonsnicker
KrzysztofMW wrote:Does it mean that from now it is possible to run VirtualBox VMs with Paravirtualization interface explicitly set to 'Hyper-V'?

I think it's means that from now it is possible to run VIRTUALBOX VMs with Para virtualization interface explicitly set to Hyper-V.

Re: VirtualBox 6.0 and Hyper-V

PostPosted: 4. Jan 2019, 17:34
by mpack
The feature being discussed has nothing to do with the paravirtualization setting for VirtualBox VMs.

Re: VirtualBox 6.0 and Hyper-V

PostPosted: 6. Jan 2019, 05:03
by jmar83_the2nd
can i run both on one computer?

Re: VirtualBox 6.0 and Hyper-V

PostPosted: 6. Jan 2019, 05:09
by socratis
Please read the release notes, the user manual and this very thread from the beginning. There's no point in repeating the same thing over and over again, is there? ;)

(Hint: yes)