Installing a VIB via PowerCLI

I’ve been rebuilding part of my home lab and trying to really not use Windows servers, so no update manager for me. Which means when it comes time to install a VIB, I can use lots of different mechanisms. I could turn on SSH and use ESXCLI, use the VMA or PowerCLI. Since I still have that installed on my Windows 7 VM, I figured that is the easiest for now. Unfortunately, there were no clear up examples out there of: I have a VIB on X Datastore -> Go install it! So I wrote out a little code and it works like a charm!

Essentially I connect to my home lab, get all of my hosts in ‘Cluster’ and then install my VIB from the VIBPath. It took all of 5 minutes vs. lots of manual typing. For those wondering, I was installing the Synology NFS VIB.

Connect-VIServer VC.home.lab
ForEach ($esxHost in (Get-Cluster “Cluster” | Get-VMHost))
$esxcli = Get-EsxCli -VMhost $esxHost


Gigabyte Brix + ESX 5.5 U2

Updating my lab this week I realized my bios was out of date on my Brix devices and decided to flash them prior to the 5.5 u2 install. Nothing to much out of the ordinary here, but the one thing to make sure you check is the CPU Settings after you upgrade. It seems to turn VT-x off by default, so make sure you turn it back on!

That said, being upgrade time again I always make a custom ISO for my BRIX because the ethernet card that is installed is non-standard. Not much has changed in terms of creating this, but the EsxImageProfile changed to Date driven vs. build number. So just make sure you watch out for that. Below is what I used. From there I simply added this to my Update Manager and pushed it out to my hosts.

# Add VMware Image Builder Snap-in
Add-PSSnapin VMware.ImageBuilder

# Add VMware Online depot

# Clone the ESXi 5.5 U2 profile into a custom profile
$CloneIP = Get-EsxImageProfile ESXi-5.5.0-20140902001-standard
$MyProfile = New-EsxImageProfile -CloneProfile $CloneIP -Vendor $CloneIP.Vendor -Name (($CloneIP.Name) + “-customized”) -Description $CloneIP.Description

# Add latest versions of missing driver packages to the custom profile
Add-EsxSoftwarePackage -SoftwarePackage net-r8168 -ImageProfile $MyProfile
Add-EsxSoftwarePackage -SoftwarePackage net-r8169 -ImageProfile $MyProfile
Add-EsxSoftwarePackage -SoftwarePackage net-sky2 -ImageProfile $MyProfile

# Export the custom profile into ISO file
Export-EsxImageProfile -ImageProfile $MyProfile -ExportToISO -FilePath c:\ESXi-5.5.0-20140902001-customized.iso