I am consolidating here a couple of instructions (here and here, and here for the ESXi shell activation part) I found to activate nested virtualization on a VM in an ESXi server without access to the server vmware part. You need to:
- Check that the ESXi will support it (BIOS, hypervisor…). Look for nestedHVSupported in the output of https://[your-esxi-host-ip-address]/mob/?moid=ha-host&doPath=capability after authenticating.
- Enable the ESXi shell (you need this so that you can edit the VM definition later):
- Use the vSphere Client to enable local and remote access to the ESXi Shell:
- Log in to a vCenter Server system using the vSphere Client.
- Select the host in the Inventory panel.
- Click the Configuration tab and click Security Profile.
- In the Services section, click Properties.
- Select ESXi Shell from this list:
- Click Options and select Start and stop manually. Note: When you select Start and stop manually, the service does not start when you reboot the host. If you want the service to start when you reboot the host, select Start and stop with host.
- Click Start to enable the service.
- Click OK.
- Log in to the shell with credentials and Alt-F1
- Add the vhv.enable = “TRUE” at the end of the .vmx file corresponding to the VM that you want to activate the nested virtualization on…
- Identify the hypervisor vm ID and reload it’s configuration with the vim-cmd esxi command:
Code:~ # vim-cmd vmsvc/getallvms | grep -i ubun 44 VM6-Ubuntu-KVM [datastore1] VM6-Ubuntu-KVM/VM6-Ubuntu-KVM.vmx ubuntu64Guest vmx-08
~ # vim-cmd vmsvc/reload 44
- Check within the VM as root that it sees the “hardware virtualization” with:
egrep -c ‘(vmx|svm)’ /proc/cpuinfo