2

My host laptop has an Intel i7 processor and virtualization is enabled in the BIOS. I know that since Virtual Box 6.0, Virtual Box allows nested virtualization, with passthrough of hardware virtualization functions to the guest VM.

The following checkboxes are enabled in my GuestOS (Ubuntu) settings in the VirtualBox:

Processor > Extended Features > Enable Nested VT-x/AMD-V
Acceleration > Paravirtualization Interface > KVM
Acceleration > Hardware Virtualization > Enable VT-x/AMD-V
Acceleration > Hardware Virtualization > Enable Nested Paging

I would assume that since VT-x is enabled, I would be able to run KVM on my Guest OS, but after running kvm-ok, I saw that my GuestOS does not support KVM extensions.

$ kvm-ok
INFO: Your CPU does not support KVM extensions
INFO: For more detailed results, you should run this as root
HINT:   sudo /usr/sbin/kvm-ok

$ egrep -c '(vmx|svm)' /proc/cpuinfo
0

Do anyone know how to run nested virtualization (ie. KVM Android Emulator) on Virtual Box Linux GuestOS?

4
  • Is KVM Android Emulator so good you would tolerate running it nested?
    – John
    May 17, 2020 at 20:37
  • 1
    Well, I need to run an Andorid Emulator on my guest OS. Any other recommendations are welcome!
    – blackbeard
    May 17, 2020 at 20:44
  • Android development is typically resource intensive, I presume the emulator is for test purposes and not development. Android used to use QEMU which was more simulation than emulation, dreadfully slow, but not dependent on hardware virtualization.
    – John
    May 17, 2020 at 20:46
  • First you need to upgrade to VirtualBox 6.1 and you may also need to 'sudo chown <username> /dev/kvm'. I had the same setup as yours, but I met another issue, here is my question stackoverflow.com/questions/69234646/…
    – Alan
    Sep 18, 2021 at 18:52

2 Answers 2

2

You can't because Virtualbox did not support nested virtualization for Intel processor in version 6.0. However, it only supported AMD processors in v6.0.

Consider updating your Virtual box to v6.1 or greater. As on that version, Virtualbox started to support nested visualization on Intel processors.

-1

Pay attention: it is disabled by default, you have to enable it manually.

enter image description here

P.

1
  • 3
    That uses VT-x to run the guest, it doesn't allow the guest to then run its own VM.
    – OrangeDog
    Jan 14, 2021 at 14:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.