Skip to content

Instantly share code, notes, and snippets.

@bgulla
Last active April 22, 2024 02:45
Show Gist options
  • Star 20 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save bgulla/2421b589de4b4b75e83ac79b17f0fc85 to your computer and use it in GitHub Desktop.
Save bgulla/2421b589de4b4b75e83ac79b17f0fc85 to your computer and use it in GitHub Desktop.
Proxmox Nested Virtualization Tutorial- Harvester/ESXI

Proxmox Nested Virtualization Tutorial- Harvester/ESXI

Virtualization Inception

This short guide will walk you through installing another hypervisor (Harvester or ESXI) inside of an already configured Proxmox host. My usecase for this was to be able to demonstrate the ability to provision VMs directly from within Rancher without dedicating an entire server to Harvester/ESXI.

Prereqs

  • A Proxmox node capable of Hardware Assisted Virtualization. (Intel: VT-x ; AMD: AMD-V) (Note: Harvester is only working on Intel-based cpus as of this writing)
  • 4GB ram
  • Understanding of how to use proxmox

Steps

Step 1: Enable Nested Virtualization Kernel Modules

Before we go creating virtual machine inception, we need to enable V-in-V support within our ProxMox host kernel. SSH into the Proxmox host and run the following commands:

## PROXMOX HOST CONSOLE

echo 'options kvm ignore_msrs=y' >> /etc/modprobe.d/kvm-intel.conf       # Intel-only
echo 'options kvm-intel nested=Y ept=Y' >> /etc/modprobe.d/kvm-intel.conf # Intel-only

#echo 'options kvm-amd nested=Y ept=Y' >> /etc/modprobe.d/kvm-amd.conf # AMD/Ryzen-only. Note: Harvester is only supported on Intel-based CPUs as of this writing.

reboot

Step 2: Create the virtual machine

Next we will create our virtual machine just like we always would, but you need to set a few specific parameters.

Option Required Value
OS Type Other OS Types
CPU Type Host
Network Type (Harvester) e1000
Network Type (ESXI) VMWare vmxnet3

Step 3: One last step

Before you start up your newly defined VM, you will need to go back to the console and tack on an additional configuration line. Run the following to enable nested-virtualization in the corresponding VM. Replace VM_ID with the numerical ID displayed in the proxmox UI.

## PROXMOX HOST CONSOLE

echo 'args: -machine vmport=off' >> /etc/pve/qemu-server/<VM_ID>.conf
qm start <VM_ID>

Profit!

That's it. You can now install Harvester or ESXI within Proxmox and create VM's in some weird Hypervirtualization Inception.

@zparihar
Copy link

Is this even needed anymore? I'm running Proxmox 7.3.3 and I actually forgot this step, but it still worked.

@Regis-Loyaute
Copy link

Is this even needed anymore? I'm running Proxmox 7.3.3 and I actually forgot this step, but it still worked.

Yean i can confirm i didn't needed to do all of that in order for ESXi to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment