Wednesday, December 12, 2012

Using vSphere ESXi Image Builder

You need to use vSPhere ESXi Image Builder if you want to upgrade you ESX 4 hosts to ESXi5.1. Minimally you will need to build a custom ISO that contains your updated server drivers. If you use 10GB, you will need to add that as well.

One important task is you must add all your offline bundles into a depot and then list the software packages to verify they are there. After that, it is a simple matter to add the software packages into your image. You will need to do this to upgrade your ESXi 4 hosts to ESXi5.1.

The first step is to download your ESXi 5.x depot zip file. If you are creating an image for esxi5.1, it is called: VMware-ESXi-5.1.0-799733-depot.zip. This can be download from VMware's download page. Make sure you download the zip file and not the ISO.

Once your ESXi zip is downloaed, download all the drivers you will need for your ESXi server. If you are using HP servers, you will need the latest drivers (zip) from HP's site. I also needed the Intel 10GB driver.

Download all your drivers and copy them and the ESXi zip file to a folder on your C drive where you are running vSphere PowerCLI.

Once your files are in a folder, look at the properties of each file and make sure it is unblocked.

Assuming you have Power Shell and VMware vSphere PowerCLI5.1 installed , you are ready to go.

Step 1: Open vSphere PowerCLI and run: Add-ESXSoftwareDepot -DepotUrl c:\folder\zipfile
       This will add your offline bundle or ESXi zip file to a depot

Step 2: Repeat Step 1 for all the drivers you downloaded. These must be in the form of a bundle or offline_bundle and have a zip extension. (vib files do not work here). If you do not do this for your downloaded drivers, you will not be able to add them to your image later.

Step 3: Run: Get-ESXImageProfile to list your current profiles. You will have to clone one of these.

Step 4: Now you need to create a new profile by cloning an existing one you just listed. Run the following:
  New-ESXImageProfile -CloneProfile "current profile" -Name "give it a name" -Vendor "Tom"
   -AcceptanceLevel  "CommunitySupported"  ;  Name yourself as the vendor. Use CommunitySupported to avoid not being able to add a software package to your profile. If you run Get-ESXImageProfile again, you should see your newly created cloned profile listed.

Step5: List the software packages and look for the ones from your vendors (ie...HP , Intel, etc....)
  Run: Get-ESXSoftwarePackage  ; Look for the vendor packages and document them

Step 6: Now that you have done all the above, here comes the easy part. Run the following to add your software packages you documented in step 5 to the profile you created in step 4
  Add-SoftwarePackage -ImageProfile "your profile"  -SoftwarePackage "partner-package"

Step 7: You will need to repeat step 6 for every softwre package

Step 8: Export your Image Profile to an ISO. You can use this to install ESXi or upload the ISO into Update Manager to upgrade your existing hosts. I recommend using the name of the ISO -custom.iso For example VMware-VMvisor-Installer-5.1.0-799733.x86_64-custom.iso
Run: Export-ESXImageProfile -ImageProfile "clone created in step 4" -ExportToISO -FilePath "c:\folder\ISO name".



No comments:

Post a Comment