VMware ESXi Image builder allows you to create custom ESXi Images along with the custom drivers. You can add and remove drivers from your ESXi Image and you can create a custom ISO image for your deployments.
If you are using vSphere Auto Deploy in your VMware environment you need to have this Image Builder and Host Profile for the Auto Deploy configuration.
First of all you need to download the VMware offline bundle for this configuration and I’m using vSphere 5.5 offline bundle to create my Custom ESXi Build.
Let’s get started …..
As a Summery these are the Steps that we are going to follow here:
- Add offline bundle to the software depot
- Add the driver to the software depot
- Clone Existing Image Profile Assign a Name
- Add/Remove Software Package to the Cloned Profile
- Check the software Packages
- Export to an iso
VMware vSphere Power CLI is use as the Primary tool for these configuration and you need to set the execution policy to the Remote Signed other wise you can see an error message like this.
Type “Set-ExecutionPolicy RemoteSigned” to set the Policy and Enter “Y” to accept the policy Change.
I’m going to create a Custom ESXi Image from “ESXi550-201601001” Offline bundle with the “NetAppNasPlugin” which I used to enable VAAI capabilities in my NAS storage. I have downloaded this and saved in my “Image Builder” folder
- Open your PowerCLI command prompt and connect to your vCenter using “Connect-VIServer <IP address or the FQDN of your vCenter server>” You might see some certificate warnings and this will successfully connect to the vCenter.
- Add the offline bundle to the Software Depot, Type ” Add-EsxSoftwareDepot <your offline bundle path>
- You can view the available software packages in the bundle, Type “Get-EsxSoftwarePackage”
- Type “Get-EsxImageProfile” to view the available image profiles
- Type “Get-EsxImageProfile | select name” to view the complete name of the Image Profile this command helps in several steps to get the full name of the image profile, You need to type this as it is and do not need to keep the profile names in your mind.
- Type “New-EsxImageProfile -CloneProfile <full name of the reference profile> -Name <Your Profile name (any)> , it will prompt you to enter the Vendor name and Provide any vendor name as you like
- Check and confirm the New ESXi Image profile is added as you defined
- Now add your driver or plugin to the Software Depot , Type “Add-EsxiSoftwareDepot <driver or plugin .zip file (not the VIB)>
- Check the added driver or plugin is added to the Software Package list
- Add the added software package to your created Image Profile , type “Add-EsxSoftwarePackage -ImageProfile <your profile name> -SoftwarePackage <Software Package Name>”
- Check and confirm whether new Software package is added to the Image profile , Type ” Get-ImageProfile <ProfileName> | select -ExpandProperty VIBLIST”
- Now You can export this Image Profile to a Zip or ISO file , Type “Export-EsxImageProfile -ImageProfile <Image Profile name> -ExportToIso <ISO Filename.iso>
- Check your Location and you can see the Exported ISO file, It will take couple of minutes to complete the command.
Remove a Software package from the Depot
- Type “Remove-EsxSoftwarePackage -ImageProfile <Image Profile Name> -SoftwarePackage <Software Package Name>