Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.

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.
Nach oben
Red Hat logoGithubredditYoutubeTwitter

Lernen

Testen, kaufen und verkaufen

Communitys

Über Red Hat Dokumentation

Wir helfen Red Hat Benutzern, mit unseren Produkten und Diensten innovativ zu sein und ihre Ziele zu erreichen – mit Inhalten, denen sie vertrauen können. Entdecken Sie unsere neuesten Updates.

Mehr Inklusion in Open Source

Red Hat hat sich verpflichtet, problematische Sprache in unserem Code, unserer Dokumentation und unseren Web-Eigenschaften zu ersetzen. Weitere Einzelheiten finden Sie in Red Hat Blog.

Über Red Hat

Wir liefern gehärtete Lösungen, die es Unternehmen leichter machen, plattform- und umgebungsübergreifend zu arbeiten, vom zentralen Rechenzentrum bis zum Netzwerkrand.

Theme

© 2025 Red Hat