PowerCli 5.5 Released

The addition of Add-VDSwitchPhysicalNetworkAdapter which will now allow for migrating VMkernel interfaces like VMotion and Management will make migrating to VDS easier.  It looks like you can also now do it back in the other direction with this cmdlet: Add-VirtualSwitchPhysicalNetworkAdapter

Here are a couple of reference links:

http://www.vmware.com/support/developer/PowerCLI/PowerCLI55/powercli55r1-releasenotes.html

http://blogs.vmware.com/vipowershell/2013/09/powercli-5-5-whats-newoverview.html

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.

FC_driver
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 https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depot-index.xmladd-depot
6. Get a list of Images from the depot: Get-ESxImageProfile |Select Name,CreationTime|Sort CreationTime.

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

new_profile
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

export_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!