From Fedora Project Wiki
Description
Configure an existing VM to allow nested virtualization: running performant VMs inside another VM, with access to the host's virtualization extensions.
Setup
Virt capable host, latest Fedora VM and latest Fedora host.
How to test
- Check whether your host system supports nested virtualization. For Intel processors, look into
/sys/module/kvm_intel/parameters/nested
, for AMD processors into/sys/module/kvm_amd/parameters/nested
. You should receive1
orY
, if nested virt is supported,0
orN
otherwise. AMD processors should have it enabled by default, (certain) Intel processors might not. Example:$ cat /sys/module/kvm_intel/parameters/nested Y
- If your host system does not have nested virt enabled (most probably just Intel case), try to enable it by booting with
kvm-intel.nested=1
argument on the kernel command line and check it again. Now you should be enabled. - Make sure your VM is shut down
- Open virt-manager, go to the VM details page for that VM.
- Click on the CPU page.
- In the CPU model field, type 'host-passthrough', click Apply
- Start the VM
- Inside the VM, do
sudo yum groupinstall virtualization
- Verify that the guest has virt correctly setup with:
sudo virt-host-validate
Expected Results
- No obvious errors occur.
sudo virt-host-validate
should returnPASS
for all checks.