First attempt at nested virtualization

Author: | Posted in other No comments

Standard virtualization uses the physical machine Nested VMs as the host hypervisor which allows one to install virtual machines called guests. In nested virtualization the hypervisor is also a guest running inside a virtual environment and it can host its own virtual machines. Basically nested virtualization allows one to install a VM inside a VM.

Some people have reported some success with KVM, but I couldn’t find anything on VirtualBox (besides the usual “it’s not supported”), so I decided to give it a try.

In short it didn’t work, so this is not a success story, but I got further than I expected. I was able to install a VM inside a VM and it even booted up to a point where it stopped responding. Here’s my setup:

  • physical machine:
Red Hat Enterprise Linux Server release 6.4 (Santiago)
8GB of RAM
2.6.32-358.2.1.el6.x86_64
VirtualBox-4.2-4.2.10_84104_el6-1.x86_64
  • virtual machine #1 (VM1):
Fedora release 18 (Spherical Cow)
4GB of RAM
3.8.3-201.fc18.x86_64
VirtualBox-4.2-4.2.10_84104_fedora18-1.x86_64
  • virtual machine #2 (nested VM i.e. VM2):
Red Hat Linux 6.2 (not RHEL, but the old RH distro which was the only 32-bit ISO I had available, the default setup only allowed me to install a 32-bit OS)
1GB of RAM
2.2.14-5.0.i686

The nested VM installed fine and it booted properly up to a point where the VirtualBox kernel modules become tainted on VM1. Fortunately VM1 didn’t freeze so I was able to force a poweroff of VM2:

VBoxManage controlvm "Red Hat 6.2" poweroff

 

Below some screenshots with the installation and booting process.

No Responses

Add Your Comment