Announcement

Collapse
No announcement yet.

How to Enable Nested Virtualization on Proxmox VE 8 Virtual Machines (VMs)

Collapse
X
Collapse
  •  

  • How to Enable Nested Virtualization on Proxmox VE 8 Virtual Machines (VMs)


    Nested Virtualization is a CPU feature of AMD and Intel processors that allows virtual machines to run their own hypervisor program (i.e. VirtualBox, VMware Workstation Pro/Player, VMware vSphere/ESXi, KVM/QEMU, Proxmox VE) and virtual machines.

    Simply put, nested virtualization allows a virtual machine to run more virtual machines in it (using the same or a different hypervisor program than the host).

    In this article, I will show you how to enable nested virtualization on a Proxmox VE virtual machine so that you can test different features of Proxmox VE in a virtual machine or test/run other hypervisor programs in a Proxmox VE virtual machine.



    Table of Contents

    1. Checking if Nested Virtualization is Enabled on Your Proxmox VE Server
    2. Enabling Nested Virtualization on Proxmox VE Server
    3. Enabling Nested Virtualization on a Proxmox VE Virtual Machine (VM)
    4. Checking if Nested Virtualization is Enabled on the Proxmox VE Virtual Machine (VM)
    5. Conclusion
    6. References



    Checking if Nested Virtualization is Enabled on Your Proxmox VE Server

    To check if nested virtualization is enabled on your Proxmox VE server, run one of the commands below depending on the processor you have installed on your server.



    For Intel processor:

    $ cat /sys/module/kvm_intel/parameters/nested




    For AMD processor:

    $ cat /sys/module/kvm_amd/parameters/nested




    If nested virtualization is enabled on your Proxmox VE server, you will see the output Y if you have an Intel processor and the output 1 if you have an AMD processor.





    Enabling Nested Virtualization on Proxmox VE Server

    On Proxmox VE 8, nested virtualization is enabled by default. In this section, I will show you how to enable nested virtualization on your Proxmox VE server in case it’s not enabled.



    To enable nested virtualization on a Proxmox VE server with an Intel processor installed, run the command below:

    $ echo "options kvm-intel nested=Y" > /etc/modprobe.d/kvm-intel.conf




    To enable nested virtualization on a Proxmox VE server with an AMD processor installed, run the command below:

    $ echo "options kvm-amd nested=1" > /etc/modprobe.d/kvm-amd.conf




    For the changes to take effect, reboot your Proxmox VE server with the following command:

    $ reboot




    Once your Proxmox VE server boots, check if nested virtualization is enabled on your Proxmox VE server.



    Enabling Nested Virtualization on a Proxmox VE Virtual Machine (VM)

    Once nested virtualization is enabled on your Proxmox VE server, you need to configure nested virtualization on the virtual machines (VMs) where you want to use it.



    You can enable nested virtualization on a Proxmox VE virtual machine with the ID 100 (let’s say) from the Proxmox VE shell with the following command:

    $ qm set 100 --cpu host




    Nested virtualization should be enabled for the Proxmox VE virtual machine ID 100.





    You can also enable nested virtualization on a Proxmox VE virtual machine from the Hardware section of the virtual machine.

    From the Hardware section of the Proxmox VE virtual machine, select Processors and click on Edit.





    From the Type dropdown menu, select host[1] and click on OK[2].





    Nested virtualization should be enabled for the selected Proxmox VE virtual machine.





    Checking if Nested Virtualization is Enabled on the Proxmox VE Virtual Machine (VM)

    To check if nested virtualization is enabled on a Linux Proxmox VE virtual machine, read this article.

    To check if nested virtualization is enabled on a Windows Proxmox VE virtual machine, read this article.



    Conclusion

    In this article, I have shown you how to check if nested virtualization is enabled on Intel and AMD-based Proxmox VE servers. I have also shown you how to enable nested virtualization on a Proxmox VE server with Intel and AMD processors installed. I have shown you how to enable nested virtualization on a Proxmox VE virtual machine (VM) from the Proxmox VE shell and from the Hardware section of the Proxmox VE virtual machine (VM).



    References






    More...
      Posting comments is disabled.

    Categories

    Collapse

    Article Tags

    Collapse

    There are no tags yet.

    Latest Articles

    Collapse

    • What is Shebang: Bash Script Header on First Line?
      by Kasimba
      As Linux enthusiasts, we all come across bash scripting as an essential part of the Linux system. However, many Linux users don’t know why the first line of the bash script contains #!. So this combination of # and ! is called shebang or shebang.
      Although shebang looks like a bash script header, it initially instructs the system about interpreters to execute the script. This concept feels a bit complicated, but that’s not true, as this guide is all about the shebang: bash script header....
      Yesterday, 07:59 PM
    • Bash Script Loops Examples
      by Kasimba
      A loop in programming is a control structure that allows a specific code to be executed repeatedly until a condition is met. This process is repeated until no further action is required. Loop allows you to repeat the desired set of instructions numerous times to attain the desired outcome. These recursions can be useful for all tasks that require repetitive operations or when working with data collections.
      In this article, we will explore the meaning, types, and examples of loops, further...
      Yesterday, 07:59 PM
    • How to Install NVIDIA GPU Driver on Fedora 40+ KDE 6 Spin on Wayland
      by Kasimba
      Installing the NVIDIA GPU driver is the first thing you will want to do after installing Fedora 40 on your computer. Fedora 40 comes with different spins (desktop environments) and the latest software. Wayland display server (which will replace the X11/Xorg display server completely one day) is the default on some of the Fedora 40 spins. One of the most awaited Fedora 40 spin is the KDE spin. Fedora 40 KDE spin comes with the KDE Plasma 6 desktop environment which supports only the Wayland display...
      Yesterday, 07:59 PM
    • How to SSH Into Docker Container
      by Kasimba
      Administrators commonly use SSH to access and operate remote servers and devices, including a Docker container. When you connect to any device using SSH, you can run commands, access its files, and perform multiple other tasks. You can also use the Docker container as a hypervisor image that can run applications. For example, a software developer can create a Docker container image to package the software.

      Hence, a Docker container image package software with all the dependencies and...
      Yesterday, 01:12 PM
    • How to SSH Into EC2 Instance
      by Kasimba
      EC2 is a service provided by Amazon Web Services (AWS) that lets you rent virtual servers (known as instances). In these instances, you can leverage virtual machines to develop, test, deploy, and manage computer applications.

      SSH is an incredible utility for accessing and managing Amazon Elastic Compute Cloud (EC2) instances. With SSH, you can operate a remote device, access data, execute commands, troubleshoot issues, and more. Although you can easily SSH into an EC2 instance, many...
      Yesterday, 01:12 PM
    • How to Tunnel Web Traffic Through SSH for Secure Browsing
      by Kasimba
      Nowadays, an uncountable number of cyber attacks, scams, and data theft occur every single day. This makes it necessary for users to look for ways to secure their data. After all, it is better to take precautions than to experience a guilt trip. Fortunately, SSH offers tunneling, which channels internet traffic to your local system via a remote system.

      Meanwhile, this transmission encrypts incoming and outgoing network traffic on your local Linux device, ensuring the system’s security....
      Yesterday, 05:01 AM
    Working...
    X