When I was testing Vagrant builds for Fedora I needed to run Vagrant in a virtual machine and then test vagrant libvirt integration there. So to say a needed to do virtualization on the virtual machine. Luckily for me it is possible with KVM and Rhys Oxenhams wrote about setting it up. This post is about setting it up and using it with virt-manager. First lets see whether we have nested KVM enabled:
$ cat /sys/module/kvm_intel/parameters/nested
N
If not run the following to enable KVM nested virtualization on Fedora:
$ echo “options kvm-intel nested=1″ | sudo tee /etc/modprobe.d/kvm-intel.conf
“options kvm-intel nested=1″
Check again to confirm:
$ cat /sys/module/kvm_intel/parameters/nested
Y
And finally copy the host CPU settings for the guest in virt-manager by checking ‘Copy host CPU configuration’ in the hardware details:
Now you should be ready to play with nested virtualization.
Check out my book
Deployment from Scratch is unique Linux book about web application deployment. Learn how deployment works from the first principles rather than YAML files of a specific tool.