.. _Enabling Nested Virtualization in Virtual Machines:

Enabling Nested Virtualization in Virtual Machines
--------------------------------------------------

.. warning:: This feature is experimental and tested only on Linux guests. The operation of nested virtual machines may be unstable.

Virtuozzo supports nested Intel VT-x virtualization in virtual machines. 

To enable nested virtualization, do the following:

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

#. Unload the ``kvm-intel`` module from the kernel:

   ::

       # rmmod kvm_intel

#. Add the line ``options kvm-intel nested=y`` to the ``dist.conf`` file:

   ::

       # echo 'options kvm-intel nested=y' >> /etc/modprobe.d/dist.conf

#. Load the ``kvm-intel`` module:

   ::

       # modprobe kvm_intel

#. Enable nested virtualization in the desired virtual machine:

   ::

       # prlctl set MyVM --nested-virt on

.. note:: 

   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.
