'Enabling the VT-x inside a virtual machine

I work in Ubuntu from Oracle Virtual Machine which is installed on top of Windows.

I have activated the VT-x feature in the host BIOS. After this I created a new virtual machine with VT-x and EPT enabled.

Now I run

$ egrep '(vmx|svm)' /proc/cpuinfo

from the guest to check if the vmx feature is enabled and the answer is 0, i.e. not enabled.

How can I enable this feature on the guest VM?



Solution 1:[1]

@asked There are three most common reasons for this error:

  • Your CPU doesn’t support VT-x or AMD-V virtualization
  • VT-x or AMD-V is not enabled in BIOS (UEFI)
  • You have Hyper-V virtualization enabled in Windows

Solution 2:[2]

You can't enable VT-x inside Virtualbox. There's a ticket for it that hasn't been fixed yet

[Edit by klaus 2018-05-06:]

This feature is being worked on for a while. Once the implementation is complete and tested it will be available to all users.

[feature-request] Nested Virtualization: VT-in-VT

It's possible to run nested VMs with Hyper-V and VMWare ESX or ESXi though

However it does need EPT to run. Make sure your host CPU has EPT support. Without EPT you can only run 32-bit VMs using binary translation

  • Intel VT-x or AMD-V is required for running “Nested Virtualization” which supports nested 32-bit VMs
  • Intel EPT or AMD RVI is required for running nested 64-bit VMs.

https://www.virtuallyghetto.com/2012/08/how-to-enable-nested-esxi-other.html

Some hypervisors do refuse to run if it found out that it's running inside a virtual machine or in a virtual machine some levels deep. That said, it's possible to run arbitrarily deep nested virtual machines using binary translation or an emulator like Bochs or qemu

Solution 3:[3]

Both on Windows and Linux you can manage the VMs from the command line using VBoxManage tool as long as the Vt-d is enabled in the BIOS. I'm not clear on why the nested-VTX function in the VirtualBox VM parameter appears "uncheckable" or unavailable anyhow. I've found this command very handy for the case:

VBoxManage modifyvm [name_of_vm] --nested-hw-virt on

After that you can verify at parameters>system>processor how VT-x is indeed activated.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1
Solution 2
Solution 3 Deivit Long