10.17. Enabling Nested Virtualization in Virtual Machines

Warning

This feature is experimental and tested only on Linux guests. Operation of nested virtual machines may be unstable.

Virtuozzo Hybrid Server supports nested Intel VT-x and AMD-V virtualization in virtual machines.

To permanently enable nested virtualization on the host, do the following:

  1. Stop all running or paused virtual machines on the node.

  2. Unload the required module from the kernel:

    # rmmod kvm_intel
    

    Or

    # rmmod kvm_amd
    
  3. Uncomment the line options <module> nested=1 in /etc/modprobe.d/kvm.conf corresponding to the module.

  4. Load the module again:

    # modprobe kvm_intel
    

    Or

    # modprobe kvm_amd
    
  5. Restart the libvirt daemon:

    # systemctl restart libvirtd
    
  6. Enable nested virtualization in the virtual machine:

    # prlctl set MyVM --nested-virt on
    

Take note of the following:

  1. A guest operating system in a nested virtual machine will not be able to obtain an IP address via DHCP if ipfilter, macfilter, and preventpromisc parameters of the host VM’s bridged network adapter are set to no.

  2. You cannot change CPU features mask for nested virtual machines using the prlsrvctl set --cpu-features-mask command.