ESXi Kickstart while completely ignoring remote disks

Ever worried that your kickstart install might accidentally overwrite your SAN luns?  There are a couple of options around this, but I prefer the option  where you don’t have to involve your SAN team. Now, this won’t work if you are booting from SAN as you will need your HBA driver. I will be testing how to and ignore any non boot luns on a boot from SAN scenario hopefully in the near future.

This article assumes you already are familiar with the kickstart process.

Option 1: For all hosts you want to run a kickstart installation on, ask your SAN team to unmask the luns to this host and then remask when the host is finished upgrading. Or have cables unplugged and plugged back in.

Option 2: Remove your HBA driver from your image using PowerCli ImageBuilder and then reinstall driver using your %firstboot script and a web server.

In order to do Option 2, you will need to have the following components downloaded:
1. Powercli (preferably the latest version)
2. Offline Bundle for the ESXi installation from Vmware’s downloads page. (will be in .zip format). This is where you will get the vib to reinstall either during kickstart or after install.

Let’s get started!

Part I – Create ISO with no FC driver using PowerCLI Image Builder

1. You can determine what your HBA driver is by SSH’ing into one of your current hosts and running this command: esxcli storage core adapter list.

2. Now, we will be creating the new ISO that has the FC driver removed.
3. Login to an existing host and determine what the driver is for your HBA. In our case it is the lpfc driver.
4. Open Powercli and cd to the working directory.
5. Add the online software depot from Vmware which will contain the ESXi Images: Add-EsxSoftwareDepot
6. Get a list of Images from the depot: Get-ESxImageProfile |Select Name,CreationTime|Sort CreationTime.

7. Create a new profile to work on: New-EsxImageProfile –CloneProfile ESXi-5.1.0-20130504001-standard –Name “Test”.

8. You can search for all the drivers in the image by doing Get-ESXSoftwarePackage. Search for the driver your HBA uses. Normally, this will be the scsi-lpfc driver.
9. You can then remove the driver: Remove-EsxSoftwarePackage –imageprofile Test –SoftwarePackage scsi-lpfc820.remove_fc
10. Now, export your new ISO without the FC driver: Export-ESXImageProfile –ImageProfile “test” –ExporttoIso .\No_HBA.iso


Part II – Make VIB available

1. Copy your ESXi offline bundle into the directory you want to work in. This includes the ESXi installation and the driver for your HBA.
2. Extract the fibre channel lpfc .vib from the offline bundle. It should be under the vib sub directory.
3. Place this .vib in an accessible web server either in IIS or apache so that your kickstart post install can reinstall the driver.

Part III – Reinstall FC driver during Kickstart

1. In your kickstart file, add this line to your %firstboot file to install the FC vib from your web server:
#Install FC driver
esxcli software vib install -v http://webserver/VMware_bootbank_scsi-lpfc820_8.2.3.1-127vmw.510.0.0.799733.vib
2. Boot to your new ISO with the HBA removed.
3. Run your normal kickstart install and you now no longer have to worry about accidentally overwriting a lun!


Leave a Reply

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

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

Google photo

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

Twitter picture

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

Facebook photo

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

Connecting to %s

%d bloggers like this: