Tag : vsphere-cli

VMware How To: Create A Custom ESXi Bootable ISO With Third Party Drivers

PowerCLIIf you have wondered how you can go about creating your own ESXi image complete with any drivers, such as storage controller drivers or network card drivers then you can use PowerCLI imagebuilder to achieve this.
This is helpful if the standard ESXi image is causing a purple screen of death (PSOD) when trying to boot up ESXi.


To do this you will need a copy of PowerCLI, you can download the v5.5 from the VMware website.
Once installed, set the execution policy to remote signed.

Set-ExecutionPolicy RemoteSigned

Now you are ready to start building your custom image following the steps below.

Import the VMWare software and vendor depot
Add-EsxSoftwareDepot C:\Name_of_ESXi_Offline_Bundle.zip
Add-EsxSoftwareDepot C:\Driver_Name_of_VIB.zip

Find the name of the driver we added
Get-EsxSoftwarePackage -Vendor Vendor_Name

Find the name of the image profile we want to copy. This will list all the image profiles available within the offline bundle.
Get-EsxImageProfile | Select Name

Copy the image profile that we need and give it a name
New-EsxImageProfile -cloneprofile ESXi-5.5.x.x-standard -name New_Name

Add the VIB to the image, <name> is the name of the driver (E.g. qlogic-nic)
Add-EsxSoftwarePackage -imageprofile name -softwarepackage <name>

Export to a new .ISO
Export-EsxImageProfile -imageprofile name -exporttoiso -filepath “c:\custom.imagebuilder.iso”

Boot from the ISO and you have your own custom ESXi image.

ESXi update guide

This guide is written with ESXi 4.1 update 1 in mind, however it will work with any update version from 3.5 onwards.

First off you will require vSphere CLI, this is a free download available to everyone with a valid VMware login.  If you don’t have one you can easily register for a new one. Download from the VMware website

Download the update package from the VMware website

Power off all VM’s or vMotion them to another host and place the host in maintenance mode.  (Right click on the host and select Enter Maintenance Mode)

The upgrade package contains two update bulletin parts.  The esxupdate bulletin and the upgrade bulletin.  These both need to be installed by running these commands on the computer with the vSphere CLI installed on it.

Ensure these commands are run from this directory C:Program FilesVMwareVMware vSphere CLIbin>

vihostupdate.pl –server Hostname or IP address -i -b patch location and zip file name -B ESXi410-GA-esxupdate

when prompted enter the root username and password

vihostupdate.pl –server Hostname or IP address -i -b patch location and zip file name ESXi410-GA

If following the vSphere upgrade guide you may notice that this last command fails with this error message

No matching bulletin or VIB was found in the metadata.No Bulletin or VIB found with ID ‘ESXi410-GA’.

This is because it has an extra -B in it.  If you run the command listed above it will work.

Finally type the following to confirm successful installation.

vihostupdate.pl –server hostname or IP address –query

Reboot the host to complete the installation. Don’t forget to take it out of maintenance mode!!



Upgrade an ESXi 4.0 Host to 4.1 with the vihostupdate Utility

1. Check for a scratch partition in the Software Advanced Settings in the Configuration tab of the vSphere Client. If one doesn’t exist configure one and reboot the host before proceeding with the upgrade. (See here for more info)

2. Download and install the VMware vSphere command line interface. (vSphere CLI)

3. Download the upgrade-from-ESXi4.0-to-4.1.0-0.0.build#-release.zip by clicking the VMware ESXi 4.1 Installable option. Save it on the machine with the vSphere CLI installed on it.

4. Power off running machines and place host in maintenance mode.

5. Install the bulletin by running the following from the vSphere CLI. CD “C:Program FilesVMwareVMware vSphere CLIbin” Vihostupdate.pl –server_ host_name_of_ IP_address -i -b location_of_the_ESXi_upgrade_ZIP bundle – B ESXi410-GA-esxupdate Enter username and password when prompted for it by the ESXi host

6. Install the upgrade bulletin by running the following from the vSphere CLI Vihostupdate.pl –server host name or IP address -i -b location of the ESXi upgrade ZIP bundle -B ESXi410-GA Enter username and password when prompted for it by the ESXi host

7. Verify that the bulletins are installed on the ESXi host by running the following. vihostupdate.pl –server host name or IP address –query

8. Reboot the host