Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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.

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