Wednesday Tidbit: Create custom ESXi ISO with ESX-tools-for-ESXi

20150713 - PowerCLIMy test cluster in the lab recently needed to be rebuilt.  As this cluster is nested and I wanted the latest version of ESXi to be deployed, I thought it would be good to use Image Builder to combine the two.

After downloading the VMware Tools for Nexted ESXi tools fling, I followed Andreas Peetz’ article on how to use them to build an offline bundle.

Once done, I used the following PowerCLI script with Image Builder to create my new ISO complete with VMware Tools for Nested ESXi:

# Add VMware depot
Add-EsxSoftwareDepot C:\Depot\ESXi550-201505002.zip

# Clone the ESXi 5.5 GA profile into a custom profile
$CloneProfile = Get-EsxImageProfile ESXi-5.5.0-20150504001-standard
$MyProfile = New-EsxImageProfile -CloneProfile $CloneProfile -Vendor $CloneProfile.Vendor -Name (($CloneProfile.Name) + "-virtualhobbit") -Description $CloneProfile.Description

# Add the Nested ESXi VMTools Offline bundle
Add-EsxSoftwareDepot C:\Depot\esx-tools-for-esxi-9.7.1-0.0.00000-offline_bundle.zip

# Add the esx-tools-for-esxi package to the custom profile
Add-EsxSoftwarePackage -SoftwarePackage esx-tools-for-esxi -ImageProfile $MyProfile

# Disable signature check
$DeployNoSignatureCheck=$true

# Export the custom profile into an ISO file
Export-EsxImageProfile -ImageProfile $MyProfile -ExportToISO -NoSignatureCheck -FilePath C:\Depot\ESXi550-201505002-virtualhobbit.iso

I also chose to export the image profile to a .zip file, so I could use it to remediate an existing cluster using VUM.

Export-EsxImageProfile -ImageProfile $MyProfile -ExportToBundle -NoSignatureCheck -FilePath C:\Depot\ESXi550-201505002-virtualhobbit.zip

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.