Showing posts with label intel. Show all posts
Showing posts with label intel. Show all posts

Tuesday, May 20, 2014

How do I enable nested virtualization on KVM?

Nested virtualization allows you to run virtual machines inside a virtual machine. Though this is not good for any kind of production use case because of the performance issues involved, this is usually good for testing purposes. Eg, students can be given virtual machines to test virtualization without allocating physical systems per head count.

I am only covering intel cpus in this blog post. The steps are very simple.

  • Verify that nested virtualization is not enabled already.
cat  /sys/module/kvm_intel/parameters/nested
N
  •  Add below line to /etc/modprobe.d/kvm-intel.conf
options kvm-intel nested=1
  • Reboot the host or do
modprobe -r kvm-intel
modprobe kvm-intel
  • Verify that nested virtualization is enabled.
cat  /sys/module/kvm_intel/parameters/nested
Y