Questo contenuto non è disponibile nella lingua selezionata.

12.2. Setup


Follow these steps to enable, configure, and start using nested virtualization:
  1. Enable: The feature is disabled by default. To enable it, use the following procedure on the L0 host physical machine.
    For Intel:
    1. Check whether nested virtualization is available on your host system.
      $ cat /sys/module/kvm_intel/parameters/nested
      Copy to Clipboard Toggle word wrap
      If this command returns Y or 1, the feature is enabled.
      If the command returns 0 or N, use steps ii and iii.
    2. Unload the kvm_intel module:
      # modprobe -r kvm_intel
      Copy to Clipboard Toggle word wrap
    3. Activate the nesting feature:
      # modprobe kvm_intel nested=1
      Copy to Clipboard Toggle word wrap
    4. The nesting feature is now enabled only until the next reboot of the L0 host. To enable it permanently, add the following line to the /etc/modprobe.d/kvm.conf file:
      options kvm_intel nested=1
      Copy to Clipboard Toggle word wrap
    For AMD:
    1. Check whether nested virtualization is available on your system:
      $ cat /sys/module/kvm_amd/parameters/nested
      Copy to Clipboard Toggle word wrap
      If this command returns Y or 1, the feature is enabled.
      If the command returns 0 or N, use steps ii and iii.
    2. Unload the kvm_amd module
      # modprobe -r kvm_amd
      Copy to Clipboard Toggle word wrap
    3. Activate the nesting feature
      # modprobe kvm_amd nested=1
      Copy to Clipboard Toggle word wrap
    4. The nesting feature is now enabled only until the next reboot of the L0 host. To enable it permanently, add the following line to the /etc/modprobe.d/kvm.conf file:
      options kvm_amd nested=1
      Copy to Clipboard Toggle word wrap
  2. Configure your L1 virtual machine for nested virtualization using one of the following methods:
    virt-manager
    1. Open the GUI of the intended guest and click the Show Virtual Hardware Details icon.
    2. Select the Processor menu, and in the Configuration section, type host-passthrough in the Model field (do not use the drop-down selection), and click Apply.
    Domain XML
    Add the following line to the domain XML file of the guest:
    <cpu mode='host-passthrough'/>
    Copy to Clipboard Toggle word wrap
    If the guest's XML configuration file already contains a <cpu> element, rewrite it.
  3. To start using nested virtualization, install an L2 guest within the L1 guest. To do this, follow the same procedure as when installing the L1 guest - see Chapter 3, Creating a Virtual Machine for more information.
Torna in cima
Red Hat logoGithubredditYoutubeTwitter

Formazione

Prova, acquista e vendi

Community

Informazioni sulla documentazione di Red Hat

Aiutiamo gli utenti Red Hat a innovarsi e raggiungere i propri obiettivi con i nostri prodotti e servizi grazie a contenuti di cui possono fidarsi. Esplora i nostri ultimi aggiornamenti.

Rendiamo l’open source più inclusivo

Red Hat si impegna a sostituire il linguaggio problematico nel codice, nella documentazione e nelle proprietà web. Per maggiori dettagli, visita il Blog di Red Hat.

Informazioni su Red Hat

Forniamo soluzioni consolidate che rendono più semplice per le aziende lavorare su piattaforme e ambienti diversi, dal datacenter centrale all'edge della rete.

Theme

© 2025 Red Hat