VirtualBox

Opened 4 years ago

Closed 3 years ago

#19245 closed defect (invalid)

Nested virtualization greyed out with 6.1 (macOS, Broadwell)

Reported by: bcandler Owned by:
Component: GUI Version: VirtualBox 6.1.2
Keywords: nested vt-x Cc:
Guest type: Linux Host type: Mac OS X

Description

I upgraded to Virtualbox 6.1.2 in order to try the new Nested Virtualization support.

However, under Settings > System > Processor, the "Enabled Nested VT-x/AMD-V" button is greyed out.

The machine is a retina MacBook Pro 13", Early 2015 (MacBookPro12,1). It has a Broadwell CPU, i7-5557U. I can confirm that the VMX flag is present:

$ sysctl -a | grep machdep.cpu.features
machdep.cpu.features: FPU VME DE PSE TSC MSR PAE MCE CX8 APIC SEP MTRR PGE MCA CMOV PAT PSE36 CLFSH DS ACPI MMX FXSR SSE SSE2 SS HTT TM PBE SSE3 PCLMULQDQ DTES64 MON DSCPL VMX EST TM2 SSSE3 FMA CX16 TPR PDCM SSE4.1 SSE4.2 x2APIC MOVBE POPCNT AES PCID XSAVE OSXSAVE SEGLIM64 TSCTMR AVX1.0 RDRAND F16C

Looking in the manual: https://www.virtualbox.org/manual/ch09.html#nested-virt the following command was accepted without complaint:

$ VBoxManage modifyvm "ubuntu 18.04" --nested-hw-virt on

and after this, the checkbox was both checked and not greyed. But after uncheck and save, it became greyed out again.

Using the same command to enable nested-hw-virt again, I started the guest VM and /dev/kvm was present - meaning that nested virt is being presented to the guest - and I was able to run kvm successfully:

$ kvm -m 512M -display vnc=0.0.0.0:0 -serial mon:stdio -cdrom TinyCore-current.iso
qemu-system-x86_64: warning: host doesn't support requested feature: CPUID.80000001H:ECX.svm [bit 2]
... I was able to VNC connect to x.x.x.x:5900 to see the display ...

It seems that the problem is only with the greying out of the box, and not with being unable to run nested virt on this platform.

Attachments (2)

VBox.log (84.4 KB ) - added by bcandler 4 years ago.
VBox.log for a sample VM
VBoxSVC.log (2.1 KB ) - added by bcandler 4 years ago.
VBoxSVC.log from VBoxBugReport tarfile

Download all attachments as: .zip

Change History (12)

comment:1 by patlachance, 4 years ago

Same issue with Virtualbox 6.1.6 on macOS Catalina 10.15.4

comment:2 by khb, 4 years ago

Seems to continue to be the same issue in 6.1.8.

comment:3 by sbates, 4 years ago

Hi

I just tested this in 6.1.8 and it now works for me. As long as the VM is stopped I can click the "Enabled Nested VT-x/AMD-V" button on my "MacBook Pro (13-inch, 2016, Four Thunderbolt 3 Ports)" MacBook Pro running MacOS X Catalina 10.15.4.

Superb feature! I look forward to running a bunch of test VMs on my Ubuntu VM on my MacBook Pro!

Stephen

comment:4 by bcandler, 4 years ago

Still greyed out for me on 6.1.12, even if the VM is stopped.

comment:5 by aeichner, 4 years ago

Please upload a VBox.log from any VM run (to get more information about your system) and VBoxSVC.log.

by bcandler, 4 years ago

Attachment: VBox.log added

VBox.log for a sample VM

by bcandler, 4 years ago

Attachment: VBoxSVC.log added

VBoxSVC.log from VBoxBugReport tarfile

comment:6 by bcandler, 4 years ago

Requested attachments uploaded

comment:7 by aeichner, 4 years ago

This behavior is actually a known issue for your kind of CPU. These models lack a certain feature called VMCS shadowing which improves nested HW virt performance tremendously, it will be terrible otherwise. That is the reason it is not available from the GUI. VBoxManage however is meant as a tool to even make VM config changes which can break the VM and it is assumed the user knows what he or she is doing. Thatswhy it is possible to enable it from VBoxManage but performance is expected to be abysmal.

comment:8 by bcandler, 3 years ago

That's interesting, thank you. It seems hard to determine whether a particular CPU has VMCS Shadowing, except from what VirtualBox tells me:

$ grep -i 'vmcs.*shadow' VBox.log
00:00:02.189606 HM:   VMCS_SHADOWING (must be cleared)
00:00:02.190145   VmcsShadowing - VMCS shadowing                          = 0 (0)

Wikipedia says it was introduced in Haswell: https://en.wikipedia.org/wiki/X86_virtualization#Intel_virtualization_(VT-x)

I found a post which says VMCS Shadowing is in CPUs that Intel describes as "vPro": https://communities.vmware.com/t5/VMware-Fusion-Discussions/Attempting-to-do-nested-virtualization/m-p/2809442/highlight/true#M169998

And my CPU doesn't have vPro :-( https://ark.intel.com/content/www/us/en/ark/products/84993/intel-core-i7-5557u-processor-4m-cache-up-to-3-40-ghz.html

comment:9 by bcandler, 3 years ago

If the button is greyed out because the VBox GUI is detecting the lack of VMCS Shadowing, then I'm happy for this ticket to be closed as-is.

comment:10 by paulson, 3 years ago

Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use