Install nested ESXi on top of ESXi in a VM

From Notes_Wiki

Home > VMWare platform > VMWare vSphere or ESXi > Install nested ESXi on top of ESXi in a VM

It is possible to install ESXi on top of a VM (nested setup). This can be useful in case we want to do some experiments eg setup test ESXi (in VMs) and connect them to a test vCenter (separate VM then production vCenter). This way all the experiments do not affect underlying production ESXi setup.

To install ESXi for such nested lab setups use:

  1. Upload ESXi installer iso to datastore and try to create a VM using this ISO file (Connected via CD/DVD during boot) as we do for any other OS (Windows / Linux) installation in a VM.
  2. Create VM where ESXi would be installed. For VM hardware note the following:
    1. In CPU Enable exposing of hardware assisted virtualization to guest
    2. Enable "I/O MMU"
    3. ESXi comes with VMWare tools installed, so we can get memory ballooning advantages. Hence we can create VM with enough memory (eg 32GB RAM) and the unused memory can be used by other guest VMs without any reservation.
    4. Add 2 to 4 NICs to the VM for virtual ESXi uplink connectivity. Network card can be vmxnet3 as ESXi host comes with VMWare tools (Guest drivers) installed.
    5. Ideally create a trunk port-group as explained at Create standard port-group for trunking all VLANs to VM and configure the NICs to have access to all VLANs
    6. If local storage is required then add appropriate disks (Perhaps thin) to the VM
    7. Remember to select ESXi installation ISO and connecting the CD/DVD
    8. ESXi will not support UEFI based BIOS / installation. Hence in boot options or BIOS settings ensure tht BIOS is Normal / Legacy and not UEFI.
  3. Proceed with ESXi installation as normally done
  4. If required we can create a template of freshly installed ESXi and use this template for creating multiple nested ESXi installations. Note if you do this see Solving connectivity issues below

Refer:


Solve connectivity issue of cloned ESXi nested VMs

Preferably look at Create template of nested ESXi for cloning and repeat use for complete information on how to create template of ESXi host for cloning.

If we create a nested ESXi template and then use it to create multiple VMs, then ESXi to ESXi communication may not work as by default vmkernel port might cache the mac address. Hence the different ESXi hosts vmk0 port can have same MAC ID, making it impossible for them to talk on same L2 VLAN. To solve this use:

  1. Enable SSH to ESXi host
  2. SSH to ESXI host and run below to make vmkernel port use MAC ID of physical NIC instead of some customer generated MAC
    esxcfg-advcfg -s 1 /Net/FollowHardwareMac
  3. Restart ESXi host


Refer:



Home > VMWare platform > VMWare vSphere or ESXi > Install nested ESXi on top of ESXi in a VM