Nested Virtualization

3

What I do: I want to write a kernel module that does stuff to the KVM data structures. But I don't want to run it on the real machine, so I run one guest, inside it I run another two guests, and want to test my module.

The problem: VirtualBox (which now runs the outer guest), doesn't support nested virtualization, and when I cat /proc/cpuinfo | grep vmx I get no output.

What can I use that has nested virtualization?

You may look at my other question to get an idea of what I want to do.

Ramzi Kahil

Posted 2014-04-09T08:57:23.750

Reputation: 667

Answers

2

To the best of my knowledge, VirtualBox is the only hypervisor not offering nested virtualization: KVM, VMWare ESXi and Xen use Intel's VT extension to implement nested virtualization. (In AMD, the equivalent feature is called SVM).

This is especially useful to study the behaviour of hypervisors (yours, your competitors') in a safe and controlled environment.

Xen has the feature since version 4.4 (the only one for which I have direct experience). You can find here an introduction to the topic. The ever useful Arch Linux Wiki provides a discussion of the feature for KVM. For VMWare ESXi, you can find the relevant information on their Web page, here.

MariusMatutiae

Posted 2014-04-09T08:57:23.750

Reputation: 41 321

0

VirtualBox does not offer hardware virtualization for nested VM's. However, you can still run VM's with software virtualization. For instance, with Opennebula, set the "VM MAD" flag on your virtual host to "qemu". Add the setting to oned.conf (essentially, copy kvm setting, and change name to "qemu").

David Welch

Posted 2014-04-09T08:57:23.750

Reputation: 1