Create a nested virtual machine on Intel
To create an L2 nested virtual machine (VM) on an Intel host, you must enable and configure nested virtualization capabilities on both the L0 host and the L1 VM.
Before you begin
- An L0 RHEL 10 host running an L1 VM.
- The hypervisor CPU must support nested virtualization. To verify, use the
cat /proc/cpuinfocommand on the L0 hypervisor. If the output of the command includes thevmxandeptflags, creating L2 VMs is possible. This is generally the case on Intel Xeon v3 cores and later. - Ensure that nested virtualization is enabled on the L0 host:
# cat /sys/module/kvm_intel/parameters/nested- If the command returns 1 or Y, the feature is enabled. Skip the remaining prerequisite steps, and continue with the Procedure section.
- If the command returns 0 or N but your system supports nested virtualization, use the following steps to enable the feature.
- Unload the
kvm_intelmodule:# modprobe -r kvm_intel - Activate the nesting feature:
# modprobe kvm_intel nested=1 - The nesting feature is now enabled, but only until the next reboot of the L0 host. To enable it permanently, add the following line to the
/etc/modprobe.d/kvm.conffile:options kvm_intel nested=1
- Unload the
About this task
In most environments, nested virtualization is only available as a Technology Preview in RHEL 10.
For detailed descriptions of the supported and unsupported environments, see Support limitations for nested virtualization.
Procedure
-
Configure your L1 VM for nested virtualization.
- Create an L2 VM within the L1 VM. To do this, follow the same procedure as when creating the L1 VM.