Building a Nested ESXi Home Lab

SUMMARY
This document will summarize the process to build a “nested” ESXi lab environment.   
Anyone who knows me – knows I have to have a picture to understand this madness – and here it is:
 nested esxi lab

 
DOCUMENT LINKS
The is the best blog I found that provides a concise process for this build:
 
VMware Lab setup – A virtualized lab for testing HA and DRS
 
Nested Virtualization
 
Creating a Nested ESXi 5.x Environment
 

Whats in a VIB (vSphere Installation Bundle)?
http://blogs.vmware.com/vsphere/2011/09/whats-in-a-vib.html

Whats in a VIB (vSphere Installation Bundle)?
http://blogs.vmware.com/vsphere/2011/09/whats-in-a-vib.html

 
STEP 1 – CPU VHV Support
The first step is to ensure your CPU supports VHV ( Virtual Hardware Virtualization).  There are two different features that the CPU can possibly support and they are:
1. Intel VT-x or AMD-V 
2. Intel EPT or AMD RVI
Intel VT-x or AMD-V is required for running “Nested Virtualization” BUT only supports nested 32-bit VMs
Intel EPT or AMD RVI is required for running nested 64-bit VMs.
A quick way to verify whether your CPU supports both Intel-VT+EPT or AMD-V+RVI, you can paste the following into a browser: 
https://%5Byour-esxi-host-ip-address%5D/mob/?moid=ha-host&doPath=capability

You will need to login with your root credentials and then look for the “nestedHVSupported” property.  If it states false – but you have confirmed that your CPU at least supports Intel VT-x or AMD-V – then you will still be able to install nested ESXi BUT you will only be able to run only 32-bit VMs.

STEP 2 – Create Nested ESXi VM
Assuming you have already installed ESXi on your physical host, this step summarizes how to build your “nested” ESXi VM
1. Use the vSphere Client to connect to the physical ESXi host that you will use to run the nested host. Launch the “New VM” wizard and fill in the forms like this:

2. Choose Custom Configuration at the beginning, type a name for the machine (e.g. vESXi) and select a datastore for it.

3. Select Virtual Machine Version: 8

4. For the Guest Operating System choose Other, in the Version dropdown select Other (64-bit), then enter VMware ESXi 5.x in the input field:

5. For the CPUs select a configuration that results in at least 2 virtual cores (this can be either 1 socket and 2 cores per socket or 2 sockets and 1 core per socket).

7. Memory: ESXi 5.5 requires a minimum of 4 GB. With ESXi 5.0 and 5.1 the minimum was 2 GB.

8. Network: ESXi will work fine with just 1 NIC, but there are certain scenarios where you get warnings about missing redundancy. So, use 2 NICs.

9. Pick the default SCSI Controller LSI Logic Parallel.

10. Choose to create a new virtual disk with a size of at least 910 MB. This is the minimum size that ESXi requires. Choose any provisioning method.

After the VM has been created edit its General Options and change the Other (64-bit) to VMware ESXi 5.x in the Guest Operating System version dropdown. This is not possible in the New VM wizard, but now after the VM has been created (because running ESXi in ESXi is officially unsupported).

STEP 3 – Upgrading Virtual Hardware to Version 9 and Enabling VHV On All Nested vHosts
If your physical host runs ESXi 5.1 or 5.5 then you should upgrade the VM to version 9, because there were substantial improvements for running nested ESXi in this version.
You can just use the vSphere Client to upgrade the virtual hardware of the VM to version 9 (just select Upgrade Virtual Hardware from its context menu).

If your physical host runs ESXi 5.5 then upgrading the VM via the vSphere client will result in hardware version 10, and you will ONLY be able to use the Web client and no longer be able to use the vSphere client! 

Therefore, do not upgrade to the VM via the vSphere client.  Use the following method to upgrade to v 9.  
 
Open an ESXi shell on your physical host and run the following commands

vim-cmd vmsvc/getallvms

This will list all VMs that are registered on the host. Find the nested ESXi VM that you just created and note its vmid. Then run

vim-cmd vmsvc/upgrade vmid vmx-09

This will upgrade the VM with the id vmid to hardware version 9.

The second thing to do is enabling VHV (Virtual Hardware-Assisted Virtualization). Since ESXi 5.1 this must be done on a per-VM basis by adding a new configuration option to a VM’s vmx file (see this post by William Lam for details). You cannot do this through the vSphere Client, so stay at the command line and …

  • change to the directory of the VM with something like
    cd /vmfs/volumes/datastore/vESXi
    (Replace datastore with the name of the datastore that you created the VM on and vESXi with the name that you chose for the VM)
  • Append the line vhv.enable = “TRUE” to the VM’s vmx file by running
    echo vhv.enable =  “TRUE”>>  vESXi.vmx
    (Replace vESXi with the real name of the VM again. If you are comfortable with vi – the mother of all Unix editors – then you can of course also just edit the vmx-file with that 😉
  • Then reload the changed configuration. You need the vmid for this again (see above):
    vim-cmd vmsvc/reload vmid
STEP 4 – Install/Update ESXi on Nested vHosts
 You install ESXi on the nested host just like you would do this on a physical machine. Connect the installation ISO to the VM, power it on and walk through the installation screens. A video guide of an interactive installation is available in the VMware KB article Methods of installing ESXi.

If you have DHCP available on your network then I recommend keeping the host’s IP configuration at DHCP. Otherwise you need to configure valid static IP settings for the VMkernel interface.

Perform these additional steps:

  • Log in to a shell on your nested host (not on your physical one!)
  • Open its firewall for outgoing http-requests:
      esxcli network firewall ruleset set -e true -r httpClient


  • Find out what ESXi 5.5 image profiles (= patch levels) are available in the VMware Online Depot:
    esxcli software sources profile list -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml | grep ESXi-5.5

    (Please note: This is one command-line!)
    You can also grep for ESXi-5.0 or ESXi-5.1 if you do not want to install ESXi 5.5.

  • At the time of this post the most recent ones are shown here:
~ # esxcli software sources profile list -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml | grep ESXi-5.5.0-201410
ESXi-5.5.0-20141004001-no-tools   VMware, Inc.  PartnerSupported
ESXi-5.5.0-20141001001s-standard  VMware, Inc.  PartnerSupported
ESXi-5.5.0-20141004001-standard   VMware, Inc.  PartnerSupported
ESXi-5.5.0-20141001001s-no-tools  VMware, Inc.  PartnerSupported
So you can now update to ESXi-5.5.0-20141004001-standard by running
esxcli software profile install -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml -p ESXi-5.5.0-20141004001-standard
(Please note: Again this is one command line!)
  • Reboot again to complete the installation.
STEP 5 –  Configure the Nested ESXi Virtual Host


Now use the vSphere Client to configure your nested host to suit your needs. Here is a non-exclusive list of things to consider:

  • Hostname and DNS settings (you may skip this if you can use DHCP and DNS reverse lookups, especially if you want to clone this host later. See comment in 7.)
  • Virtual switch(es): If your nested host has two NICs then you will want to add the second one to the virtual switch that was automatically created during installation.
  • NTP servers: If you do not have any on your own network then use publicly available ones like these from pool.ntp.org.
  • Datastores: add local disks, NFS datastores, iSCSI targets via the iSCSI software adapter
  • Optional: Syslogging to a datastore path or syslog server and/or persistent scratch
STEP 6 –  Prepare For Cloning and Export OVA (OVF Tempate)


If you had vCenter available then you could easily convert or clone the VM to a template and use that template to provision as many nested ESXi hosts as you need. 

With a standalone host you have another option to achieve basically the same: Export the VM to an OVA file. You can then create new nested ESXi hosts by importing this OVA file again and again.

You should properly prepare the nested host before you clone it! It’s William Lam again who wrote an excellent article about how to do this

Here is a short summary:

  • Log in to a shell on your nested host
  • Run the following command:
      esxcli system settings advanced set -o /Net/FollowHardwareMac -i 1

    (Guess what? This is one command line again!)
    This will let ESXi change the VMkernel interface’s MAC address whenever its first NIC’s MAC address changes. If you do not do this then you will end up in all cloned hosts using the same MAC address (and that would be really bad!).

  • Now remove the line starting with /system/uuid from the configuration file /etc/vmware/esx.conf:
    sed -i "//system/uuid/d" /etc/vmware/esx.conf

    (You could of course also just use vi instead to edit the file and remove the line).

  • To make the last change persistent run
      /sbin/auto-backup.sh

Then shut down the nested host (on the command line you can just use poweroff for this).

From the vSphere Client (connected to your physical host) you can now export your nested ESXi host to an OVA file.

STEP 7 Provision New Nested Virtual Hosts From the OVA

By deploying the OVF template (importing the OVA file) you can now create as many new nested ESXi hosts as you want. They will all inherit the configuration of the template host, but you can of course reconfigure each to meet your specific testing needs. The only things that must be configured per host is the hostname and – if you are not using DHCP – the IP address configuration.

 
DOCUMENT LINKS
The is the best blog I found that provides a concise process for this build:
 
VMware Lab setup – A virtualized lab for testing HA and DRS
 
Nested Virtualization
 
Creating a Nested ESXi 5.x Environment
 

Whats in a VIB (vSphere Installation Bundle)?
http://blogs.vmware.com/vsphere/2011/09/whats-in-a-vib.html

Whats in a VIB (vSphere Installation Bundle)?
http://blogs.vmware.com/vsphere/2011/09/whats-in-a-vib.html

 
STEP 1 – CPU VHV Support
The first step is to ensure your CPU supports VHV ( Virtual Hardware Virtualization).  There are two different features that the CPU can possibly support and they are:
1. Intel VT-x or AMD-V 
2. Intel EPT or AMD RVI
Intel VT-x or AMD-V is required for running “Nested Virtualization” BUT only supports nested 32-bit VMs
Intel EPT or AMD RVI is required for running nested 64-bit VMs.
 
A quick way to verify whether your CPU supports both Intel-VT+EPT or AMD-V+RVI, you can paste the following into a browser: 
https://%5Byour-esxi-host-ip-address%5D/mob/?moid=ha-host&doPath=capability

You will need to login with your root credentials and then look for the “nestedHVSupported” property.  If it states false – but you have confirmed that your CPU at least supports Intel VT-x or AMD-V – then you will still be able to install nested ESXi BUT you will only be able to run only 32-bit VMs.

 
STEP 2 – Create Nested ESXi VM
Assuming you have already installed ESXi on your physical host, this step summarizes how to build your “nested” ESXi VM

1. Use the vSphere Client to connect to the physical ESXi host that you will use to run the nested host. Launch the “New VM” wizard and fill in the forms like this:

2. Choose Custom Configuration at the beginning, type a name for the machine (e.g. vESXi) and select a datastore for it.

3. Select Virtual Machine Version: 8

4. For the Guest Operating System choose Other, in the Version dropdown select Other (64-bit), then enter VMware ESXi 5.x in the input field:

5. For the CPUs select a configuration that results in at least 2 virtual cores (this can be either 1 socket and 2 cores per socket or 2 sockets and 1 core per socket).

7. Memory: ESXi 5.5 requires a minimum of 4 GB. With ESXi 5.0 and 5.1 the minimum was 2 GB.

8. Network: ESXi will work fine with just 1 NIC, but there are certain scenarios where you get warnings about missing redundancy. So, use 2 NICs.

9. Pick the default SCSI Controller LSI Logic Parallel.

10. Choose to create a new virtual disk with a size of at least 910 MB. This is the minimum size that ESXi requires. Choose any provisioning method.

After the VM has been created edit its General Options and change the Other (64-bit) to VMware ESXi 5.x in the Guest Operating System version dropdown. This is not possible in the New VM wizard, but now after the VM has been created (because running ESXi in ESXi is officially unsupported).

STEP 3 – Upgrading Virtual Hardware to Version 9 and Enabling VHV On All Nested vHosts
If your physical host runs ESXi 5.1 or 5.5 then you should upgrade the VM to version 9, because there were substantial improvements for running nested ESXi in this version.

You can just use the vSphere Client to upgrade the virtual hardware of the VM to version 9 (just select Upgrade Virtual Hardware from its context menu).If your physical host runs ESXi 5.5 then upgrading the VM via the vSphere client will result in hardware version 10, and you will ONLY be able to use the Web client and no longer be able to use the vSphere client!

Therefore, do not upgrade to the VM via the vSphere client.  Use the following method to upgrade to v 9.  
 
Open an ESXi shell on your physical host and run the following commands

vim-cmd vmsvc/getallvmsThis will list all VMs that are registered on the host. Find the nested ESXi VM that you just created and note its vmid. Then run

vim-cmd vmsvc/upgrade vmid vmx-09

This will upgrade the VM with the id vmid to hardware version 9.

The second thing to do is enabling VHV (Virtual Hardware-Assisted Virtualization). Since ESXi 5.1 this must be done on a per-VM basis by adding a new configuration option to a VM’s vmx file (see this post by William Lam for details). You cannot do this through the vSphere Client, so stay at the command line and …

  • change to the directory of the VM with something like

    cd /vmfs/volumes/datastore/vESXi

    (Replace datastore with the name of the datastore that you created the VM on and vESXi with the name that you chose for the VM)

  • Append the line vhv.enable = “TRUE” to the VM’s vmx file by running

    echo vhv.enable =  “TRUE”>>  vESXi.vmx

    (Replace vESXi with the real name of the VM again. If you are comfortable with vi – the mother of all Unix editors – then you can of course also just edit the vmx-file with that 😉

  • Then reload the changed configuration. You need the vmid for this again (see above):

    vim-cmd vmsvc/reload vmid

STEP 4 – Install/Update ESXi on Nested vHosts

 You install ESXi on the nested host just like you would do this on a physical machine. Connect the installation ISO to the VM, power it on and walk through the installation screens. A video guide of an interactive installation is available in the VMware KB article Methods of installing ESXi.

If you have DHCP available on your network then I recommend keeping the host’s IP configuration at DHCP. Otherwise you need to configure valid static IP settings for the VMkernel interface.

Perform these additional steps:

  • Log in to a shell on your nested host (not on your physical one!)
  • Open its firewall for outgoing http-requests:
      esxcli network firewall ruleset set -e true -r httpClient

     

  • Find out what ESXi 5.5 image profiles (= patch levels) are available in the VMware Online Depot:
    esxcli software sources profile list -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml | grep ESXi-5.5

    (Please note: This is one command-line!)

    You can also grep for ESXi-5.0 or ESXi-5.1 if you do not want to install ESXi 5.5.

  • At the time of this post the most recent ones are shown here:
~ # esxcli software sources profile list -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml | grep ESXi-5.5.0-201410
ESXi-5.5.0-20141004001-no-tools   VMware, Inc.  PartnerSupported
ESXi-5.5.0-20141001001s-standard  VMware, Inc.  PartnerSupported
ESXi-5.5.0-20141004001-standard   VMware, Inc.  PartnerSupported
ESXi-5.5.0-20141001001s-no-tools  VMware, Inc.  PartnerSupported
 
So you can now update to ESXi-5.5.0-20141004001-standard by running
esxcli software profile install -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml -p ESXi-5.5.0-20141004001-standard
(Please note: Again this is one command line!)
  • Reboot again to complete the installation.
STEP 5 –  Configure the Nested ESXi Virtual Host


Now use the vSphere Client to configure your nested host to suit your needs. Here is a non-exclusive list of things to consider:

  • Hostname and DNS settings (you may skip this if you can use DHCP and DNS reverse lookups, especially if you want to clone this host later. See comment in 7.)
  • Virtual switch(es): If your nested host has two NICs then you will want to add the second one to the virtual switch that was automatically created during installation.
  • NTP servers: If you do not have any on your own network then use publicly available ones like these from pool.ntp.org.
  • Datastores: add local disks, NFS datastores, iSCSI targets via the iSCSI software adapter
  • Optional: Syslogging to a datastore path or syslog server and/or persistent scratch
STEP 6 –  Prepare For Cloning and Export OVA (OVF Tempate)


If you had vCenter available then you could easily convert or clone the VM to a template and use that template to provision as many nested ESXi hosts as you need. 

With a standalone host you have another option to achieve basically the same: Export the VM to an OVA file. You can then create new nested ESXi hosts by importing this OVA file again and again.

You should properly prepare the nested host before you clone it! It’s William Lam again who wrote an excellent article about how to do this

Here is a short summary:

  • Log in to a shell on your nested host
  • Run the following command:
      esxcli system settings advanced set -o /Net/FollowHardwareMac -i 1

    (Guess what? This is one command line again!)

    This will let ESXi change the VMkernel interface’s MAC address whenever its first NIC’s MAC address changes. If you do not do this then you will end up in all cloned hosts using the same MAC address (and that would be really bad!).

  • Now remove the line starting with /system/uuid from the configuration file /etc/vmware/esx.conf:
    sed -i "//system/uuid/d" /etc/vmware/esx.conf

    (You could of course also just use vi instead to edit the file and remove the line).

  • To make the last change persistent run
      /sbin/auto-backup.sh

Then shut down the nested host (on the command line you can just use poweroff for this).

From the vSphere Client (connected to your physical host) you can now export your nested ESXi host to an OVA file.

STEP 7 Provision New Nested Virtual Hosts From the OVA

By deploying the OVF template (importing the OVA file) you can now create as many new nested ESXi hosts as you want. They will all inherit the configuration of the template host, but you can of course reconfigure each to meet your specific testing needs. The only things that must be configured per host is the hostname and – if you are not using DHCP – the IP address configuration.

SUMMARY

This document will summarize the process to build a “nested” ESXi lab environment.

Anyone who knows me – knows I have to have a picture to understand this madness – and here it is:

DOCUMENT LINKS

The is the best blog I found that provides a concise process for this build:

http://www.v-front.de/2014/01/how-to-provision-nested-esxi-hosts-on.html

VMware Lab setup – A virtualized lab for testing HA and DRS

https://www.simple-talk.com/sysadmin/virtualization/vmware-lab-setup—a-virtualized-lab-for-testing-ha-and-drs/

Nested Virtualization

http://www.virtuallyghetto.com/nested-virtualization

Creating a Nested ESXi 5.x Environment

http://tsmith.co/2011/creating-a-nested-esxi-5-environment/

Running Nested VMs

https://communities.vmware.com/docs/DOC-8970

VMware Toosls For Nested ESXi https://labs.vmware.com/flings/vmware-tools-for-nested-esxi

VMware Tools For Nested ESXi

http://vmwaremine.com/2014/04/17/vmware-tools-nested-esxi/#sthash.nd5lYY1X.dpbs

Whats in a VIB (vSphere Installation Bundle)?

http://blogs.vmware.com/vsphere/2011/09/whats-in-a-vib.html

Whats in a VIB (vSphere Installation Bundle)?

http://blogs.vmware.com/vsphere/2011/09/whats-in-a-vib.html

How to Download Individual VIBs From The VMware Online Depot

http://www.v-front.de/2014/06/how-to-download-individual-vibs-from.html?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed%3A+VmwareFrontExperience+%28VMware+Front+Experience%29

STEP 1 – CPU VHV Support

The first step is to ensure your CPU supports VHV ( Virtual Hardware Virtualization).  There are two different features that the CPU can possibly support and they are:

1. Intel VT-x or AMD-V

2. Intel EPT or AMD RVI

Intel VT-x or AMD-V is required for running “Nested Virtualization” BUT only supports nested 32-bit VMs

Intel EPT or AMD RVI is required for running nested 64-bit VMs.

A quick way to verify whether your CPU supports both Intel-VT+EPT or AMD-V+RVI, you can paste the following into a browser:

https://%5Byour-esxi-host-ip-address%5D/mob/?moid=ha-host&doPath=capability

You will need to login with your root credentials and then look for the ” nestedHVSupported ” property.  If it states false – but you have confirmed that your CPU at least supports Intel VT-x or AMD-V – then you will still be able to install nested ESXi BUT you will only be able to run only 32-bit VMs.

STEP 2 –  Create Nested ESXi VM

Assuming you have already installed ESXi on your physical host, this step summarizes how to build your “nested” ESXi VM

1. Use the vSphere Client to connect to the physical ESXi host that you will use to run the nested host. Launch the “New VM” wizard and fill in the forms like this:

2. Choose Custom Configuration at the beginning, type a name for the machine (e.g. vESXi) and select a datastore for it.

3. Select Virtual Machine Version: 8

4. For the Guest Operating System choose Other, in the Version dropdown select Other (64-bit), then enter VMware ESXi 5.x in the input field:

5. For the CPUs select a configuration that results in at least 2 virtual cores (this can be either 1 socket and 2 cores per socket or 2 sockets and 1 core per socket).

7. Memory: ESXi 5.5 requires a minimum of 4 GB. With ESXi 5.0 and 5.1 the minimum was 2 GB.

8. Network: ESXi will work fine with just 1 NIC, but there are certain scenarios where you get warnings about missing redundancy. So, use 2 NICs.

9. Pick the default SCSI Controller LSI Logic Parallel.

10. Choose to create a new virtual disk with a size of at least 910 MB. This is the minimum size that ESXi requires. Choose any provisioning method.

After the VM has been created edit its General Options and change the Other (64-bit) to VMware ESXi 5.x in the Guest Operating System version dropdown. This is not possible in the New VM wizard, but now after the VM has been created (because running ESXi in ESXi is officially unsupported).

STEP 3 –  Upgrading Virtual Hardware to Version 9 and Enabling VHV On All Nested vHosts

If your physical host runs ESXi 5.1 or 5.5 then you should upgrade the VM to version 9, because there were substantial improvements for running nested ESXi in this version.

You can just use the vSphere Client to upgrade the virtual hardware of the VM to version 9 (just select  Upgrade Virtual Hardware  from its context menu).

If your physical host runs ESXi 5.5 then upgrading the VM via the vSphere client will result in hardware version 10, and you will ONLY be able to use the Web client and no longer be able to use the vSphere client!

Therefore, do not upgrade to the VM via the vSphere client.  Use the following method to upgrade to v 9.

Open an ESXi shell on your physical host and run the following commands

vim-cmd vmsvc/getallvms

This will list all VMs that are registered on the host. Find the nested ESXi VM that you just created and note its  vmid . Then run

vim-cmd vmsvc/upgrade  vmid  vmx-09

This will upgrade the VM with the id  vmid  to hardware version 9.

The second thing to do is enabling VHV (Virtual Hardware-Assisted Virtualization). Since ESXi 5.1 this must be done on a per-VM basis by adding a new configuration option to a VM’s vmx file (see  this post by William Lam  for details). You cannot do this through the vSphere Client, so stay at the command line and …

change to the directory of the VM with something like

cd /vmfs/volumes/ datastore / vESXi

(Replace  datastore  with the name of the datastore that you created the VM on and  vESXi  with the name that you chose for the VM) Append the line  vhv.enable = “TRUE”  to the VM’s vmx file by running

echo vhv.enable =  “TRUE”>>   vESXi .vmx

(Replace  vESXi  with the real name of the VM again. If you are comfortable with  vi  – the mother of all Unix editors – then you can of course also just edit the vmx-file with that 😉 Then reload the changed configuration. You need the  vmid  for this again (see above):

vim-cmd vmsvc/reload  vmid

STEP 4 – Install/Update ESXi on Nested vHosts

You install ESXi on the nested host just like you would do this on a physical machine. Connect the installation ISO to the VM, power it on and walk through the installation screens. A video guide of an interactive installation is available in the VMware KB article  Methods of installing ESXi .

If you have DHCP available on your network then I recommend keeping the host’s IP configuration at DHCP. Otherwise you need to configure valid static IP settings for the VMkernel interface.

Perform these additional steps:

Log in to a shell on your nested host (not on your physical one!) Open its firewall for outgoing http-requests:

esxcli network firewall ruleset   set   -e   true   -r httpClient

Find out what ESXi 5.5 image profiles (= patch levels) are available in the VMware Online Depot: esxcli software sources profile list -d  https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml  |   grep   ESXi-5.5

(Please note: This is  one  command-line!)

You can also  grep  for  ESXi-5.0  or  ESXi-5.1  if you do not want to install ESXi 5.5. At the time of this post the most recent ones are shown here:

~ # esxcli software sources profile list -d https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml | grep ESXi-5.5.0-201410

ESXi-5.5.0-20141004001-no-tools   VMware, Inc.  PartnerSupported

ESXi-5.5.0-20141001001s-standard  VMware, Inc.  PartnerSupported

ESXi-5.5.0-20141004001-standard   VMware, Inc.  PartnerSupported

ESXi-5.5.0-20141001001s-no-tools  VMware, Inc.  PartnerSupported

So you can now update to  ESXi-5.5.0-20141004001-standard  by running

esxcli software profile   install   -d  https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xml  -p  ESXi-5.5.0-20141004001-standard

(Please note: Again this is   one   command line!) Reboot and log in again to the nested host. Now install the VMware Tools for Nested ESXi by running Install directly from VMware.com (requires internet access from ESXi host):

esxcli software vib install -v http://download3.vmware.com/software/vmw-tools/esxi_tools_for_guests/esx-tools-for-esxi-9.7.1-0.0.00000.i386.vib -f

To uninstall the VIB:

esxcli software vib remove -n esx-tools-for-esxi

Reboot again to complete the installation. STEP 5 –    Configure the Nested ESXi Virtual Host

Now use the vSphere Client to configure your nested host to suit your needs. Here is a non-exclusive list of things to consider:

Hostname and DNS settings (you may skip this if you can use DHCP and DNS reverse lookups, especially if you want to clone this host later. See comment in 7.) Virtual switch(es): If your nested host has two NICs then you will want to add the second one to the virtual switch that was automatically created during installation. NTP servers: If you do not have any on your own network then use publicly available ones like these from  pool.ntp.org . Datastores: add local disks, NFS datastores, iSCSI targets via the iSCSI software adapter Optional: Syslogging to a datastore path or syslog server and/or persistent scratch

STEP 6 –    Prepare For Cloning and Export OVA (OVF Tempate)

If you had vCenter available then you could easily convert or clone the VM to a template and use that template to provision as many nested ESXi hosts as you need.

With a standalone host you have another option to achieve basically the same: Export the VM to an OVA file. You can then create new nested ESXi hosts by importing this OVA file again and again.

You should properly prepare the nested host before you clone it! It’s William Lam again who wrote   an excellent article about how to do this .

Here is a short summary:

Log in to a shell on your nested host Run the following command:

esxcli system settings advanced   set   -o /Net/FollowHardwareMac -i 1

(Guess what? This is  one  command line again!)

This will let ESXi change the VMkernel interface’s MAC address whenever its first NIC’s MAC address changes. If you do not do this then you will end up in all cloned hosts using the same MAC address (and that would be really bad!). Now remove the line starting with  /system/uuid  from the configuration file  /etc/vmware/esx.conf :

sed   -i   “//system/uuid/d”   /etc/vmware/esx.conf

(You could of course also just use  vi  instead to edit the file and remove the line). To make the last change persistent run

/sbin/auto-backup.sh

Then shut down the nested host (on the command line you can just use  poweroff   for this).

From the vSphere Client (connected to your physical host) you can now export your nested ESXi host to an OVA file.

STEP   7   Provision New Nested Virtual Hosts From the OVA

By deploying the OVF template (importing the OVA file) you can now create as many new nested ESXi hosts as you want. They will all inherit the configuration of the template host, but you can of course reconfigure each to meet your specific testing needs. The only things that   must   be configured per host is the hostname and – if you are not using DHCP – the IP address configuration.

Advertisements

About Amir Safayan

I live with my family in beautiful Colorado. We have a basset / beagle named Cisco. We board / ski, ride dirtbikes, RV and enjoy living in the Western US. I've done R/S, security, wireless, IPT and am now focused on virtualization technologies on the High Touch Team for Shoregroup.com, a large Cisco reseller.
This entry was posted in Uncategorized and tagged , , . Bookmark the permalink.