Instant Cloned ESXi for My VMware Homelab

Nested Virtualisation has come a long way over the past 15 years. I remember hacking away at VMware Workstation to run ESX 3.5 and then run a guest VM nested on top of that just because I could. Although VMware does not officially support Nested Virtualisation for production use, the capability is native these days.

Fun fact, there are some VMware solutions that require the use of virtualised ESXi hosts, such as a vSAN witness Appliance and VMware HCX Appliances.

You’ll find numerous articles online on Nested Virtualisation. Credit to William Lam, you will undoubtedly find him the author of many of these articles. His content around this topic has been extremely valuable to the home lab community over the years.

I’ve utilised Nested Virtualisation in my home lab for years but, back in 2018, William posted this great article on using instant clone for nested ESXi hosts. Ever since, if I’ve been addicted and whenever I needed to test something quickly that was disposable I would leverage instant clones to deploy ESXi hosts or vSAN clusters usually in under 5 mins!

The full detailed instructions to leverage Instant clones can be found on William’s blog post Leveraging Instant Clone in vSphere 6.7 for extremely fast Nested ESXi provisioning. Because I use this often in my lab I decided to write a Powershell script Freeze-VirtualESXi.ps1 which uploads and runs the customize.sh bash script remotely. Note this does not replace the other steps for creating instant clones, Please follow William’s post for full instructions.

Freeze Virtual ESXi Powershell Script

For me personally this has streamlined Step 2 slightly and I have also incorporated is as part of a more advance script which also creates the instant clones, adds them to vCenter. If anyone is interested in using my more advanced version, please drop me a comment.

Thanks for reading, and, I hope you found this useful, feel free to comment below.

Leave a Reply