Those who have created virtual lab so far, are familiar with running a virtual hypervisor on top of physical one. The most complaining might arose when you want to make a 64-bit VM inside a nested ESXi. The error looks like this:
I think you are already know what does Nested ESXi means, but to make it clear it can be explained in this way: an ESXi which is installed as a VM inside another physical ESXi host. The thing is to run a 64-bit virtual machine it needs access to some CPU feature (called Virtualization Technology – VT) that in “nested virtualization” case cannot.
Here I’m going to show you a workaround to solve it in your lab. The solution depends on you ESXi version. Let’s start with VMware vSphere 5.0.
There is a rather straight forward method to bypass. It’s called vhv (Virtual Hardware-Assisted Virtualization) and just need to make it be allowed by applying a command (via vCLI or SSH) on the underlying physical host:
echo ‘vhv.allow = “TRUE”‘ >> /etc/vmware/config
Apparently, many of us have upgraded our hosts from vSphere 5.0 to at least 5.1 or 5.5. Since this is not applicable in recent version, there is another trick. First of all, vhv.allow parameter has been changed to vhv.enable. Second of all, you need to put this line inside .vmx file not in physical host vmware config. It means it have to get done on per VM basis. It looks like this:
echo ‘vhv.enable = “TRUE”‘
There are two ways to do this change in VM_Name.vmx file. One method might be switching the Nested ESXi VM off, browse the datastore and then download .vmx, make proper changes and upload it there. This definitely works but if you are going to change this for numerous Nested VMs it takes a long time. So, to skip download and upload parts, you can append vhv.enable by CLI in a very easy way.
Power off the virtual ESXi, connect to the underlying host, go to the datastore which your Nested ESXi resides and then echo it to .vmx file. Take a look at the following sample.
echo ‘vhv.enable = “TRUE”‘ >> ESXi.vmx
Now it’s time to know is it working or not. Go to the virtual ESXi and make a 64-bit VM. If it goes on without any error it seems you have done completely.