Home > Scripting, Systems, Virtualization > VMware vSphere 5–Using Image Builder For Custom Installation

VMware vSphere 5–Using Image Builder For Custom Installation

Hard to believe the vSphere 5 release is coming down the pipe. In anticipation of the official availability of the bits for use and VMworld 2011, I thought it would be a great idea for everyone to get their house in order and prep for deploying vSphere 5.

One of the cool new features with the vSphere 5 release was the inclusion of new PowerCLI functions called Image Builder.

Image Builder allows VMware Admins to customize their installation media by adding and removing components. These components, called VMware Infrastructure Bundles (VIBs), comprise the base image, drivers, CIM providers, and other necessary components to make the vSphere go-‘round. Plus, 3rd party vendors can release VIBs in the future for new devices, providers, or whatever (can someone make a Minesweeper VIB?). This results in:

  1. VMware not needing to keep updating just to add code for new devices.
  2. VMware Admins no longer need to kludge through cramming the driver support for 3rd party products using Linux-based utilities and concepts (although, good job for knowing how to do it)
  3. VMware Admins can create a single custom installation with the appropriate drivers without having to install ESXi on a host and immediately patch to add the components.

As mentioned above, Image Builder is included with the latest and greatest version of the PowerCLI utilities… well… the latest and greatest vSphere 5 PowerCLI utilities. So, don’t rush out and download right now.

Note: When installing the new PowerCLI for vSphere 5 over an existing PowerCLI installation, you may find that the Image Builder cmdlets do not appear to be available. If this is the case, be sure to uninstall ALL PowerCLI installations on your workstation prior to installing the new PowerCLI. I ran into this problem during the installation of the pre-release bits and it drove me crazy. Heck, why not just uninstall first to be on the safe side?!

Image Builder introduces two new terms to our VMware verbiage

  1. VIB – (as mentioned above) bundles of files that can comprise any base image, driver, CIM provider, or another component. VIBs are certified by VMware and fit a very specific format.
  2. Depot – A location where Image Builder can find installation components (aka – an offline bundle). An offline bundle is just a .zip file containing the installation files for a specific version of ESXi. These can be downloaded from the vSphere download page (typically, you are provided with the option of a .iso or .zip download of the media – the .zip is the offline bundle/depot). However, a depot can also be a URL to an offline bundle!!! During Image Builder sessions, multiple depots can be added to a session.
  3. Profile – A profile is the entity that comprises the image you are working with. Offline Bundles contain multiple profiles that can be used as a basis to copy. The profile, essentially, tells Image Builder which components to pack into a custom installation.
    Finally, Image Builder understands that creating a custom image does not just involve adding and removing VIBs. Rather, you also need some way to get the custom image out in a usable format. Image Builder allows for the export of the custom image to an offline bundle (.zip) or a usable CD/DVD image (.iso). The offline bundle

So, now that we know what Image Builder does and some new terminology, let’s get down and dirty with creating a new Image Builder custom installation!

Procedure

  • Start up PowerCLI

image

  • Connect to a depot
    • This example will use a locally saved .zip file.
    • Command: Add-EsxSoftwareDepot –DepotUrl C:\Downloads\VMware\Depot\vmware-ESXi-5.0.0-381646-depot.zip

image

  • The offline bundle contains a number of profiles. These profiles are read-only and cannot be edited. However, that does not mean that it cannot be copied to a new profile and customize the copied profile!
  • Get a list of the available depot profiles:
    • Command: Get-EsxImageProfile

    image

    • As you can see, we have two profiles: ESXi5.0.0-381646-no-tools and standard.
  • Create a copy of a profile
    • Command: New-EsxImageProfile –CloneProfile ESXi-5.0.0-381646-standard –Name “Custom_vSphere5_Installation”

image

  • Now that the profile has been copied, it is time to wreckcreate a new custom installation. First, let’s check on which components are included in the Depot added earlier.
    • Command: Get-ESXSoftwarePackage

    image

    • Note: This will load all software packages for all depots loaded in the session.
    • Each of the packages listed are VIBs! (NEAT!!!)
  • At this point, the question becomes: What is it about the default installation that you do not like? Are you missing some drivers/VIBs? In most instances, you are going to be missing some VIBs. However, there may be a need to remove a VIB for some reason. In the next step, we will be removing a VIB from the custom profile.
    • Note: You are the master of your universe. This example only shows you how to do something. I do not suggest you removing the VIB from the custom profile unless you know you need to. If you remove the VIB and screw up your environment, you only have yourself to blame because you are the master (right?!).
    • Note:The availability of 3rd party VIBs prior to vSphere 5 release is provided by the 3rd parties themselves. I do not have a connection to a 3rd party that could provide a VIB (wamp wamp wamp). So, I will include the command to add one. Once a VIB is available to me, I will update the post.
    • Command (Add a VIB): Add-EsxSoftwarePackage –ImageProfile Custom_vSphere5_Installation
    • Command (Remove a VIB):  Remove-EsxSoftwarePackage -ImageProfile
      Custom_vSphere5_Installation -SoftwarePackage sata-sata-promise

image

  • Alright, we have a depot, copied an existing ImageProfile, and messed with the clone so it looks like we want it to. Now, we need to get the profile in some form that we can do something with. How about exporting it?! Fantastic idea. Let’s do it!
  • The customized profiles need to be exported in a format that can be used for installation. Otherwise, you just wasted precious time and bandwidth on something that just dead-ended. Recall that we have 2 options for exporting:
    • ISO – Traditional disk image. These are burned onto CD/DVD media and ESXi can be installed.
    • ZIP – These can be stored on network locations and used for PXE installations, VUM upgrades, and a basis for future Image Builder customizations.
  • Exporting as a .ZIP or .ISO is as simple as changing a value and extension in the PowerCLI command:
    • Command (ISO): Export-EsxImageProfile –ImageProfile Custom_vSphere5_Installation –FilePath C:\downloads\vmware\depot\Custom_vSphere5_Installation.isoExportToIso
    • Command (ZIP): Export-EsxImageProfile –ImageProfile Custom_vSphere5_Installation –FilePath C:\downloads\vmware\depot\Custom_vSphere5_Installation.zipExportToBundle

image

  • Recall that earlier, we wanted to remove the ‘sata-sata-promise’ VIB from our customized installation media? (I would suggest going back a little bit in the post to refresh your memory). This is a great time to make sure it was removed.
    • Browse to the .zip location in Windows Explorer and open the .zip file.image
    • Browse to the ‘vib20’ directory.

image

    • Look around for ‘sata-sata-promise’ VIB. Can you find it?

image

    • Nope! It’s not there! Talk about customization!

At this point, you have viable installation media to streamline your installations and save you time and headaches.

Thanks VMware for the awesome utility. Happy customizations

About these ads
  1. August 22, 2011 at 3:26 pm

    Nice write-up; these new functions will definitely be useful.

  2. John Champion
    August 25, 2011 at 3:06 pm

    Grabbed v5 today and went through adding the Intel 82580 VIB to the image – worked great once I figured I needed to unzip the drivers file to get to the offline_bundle folder/files index.xml. Works great!

    1. Add-EsxSoftwareDepot -DepotUrl C:\Depot\VMware-ESXi-5.0.0-469512-depot.zip

    2. New-EsxImageProfile -CloneProfile “ESXi-5.0.0-469512-standard” -Name “ESXi5_Custom”

    3. Add-EsxSoftwareDepot -DepotUrl C:\Depot\igb-3.1.17-offline_bundle-455019\index.xml

    4. Add-EsxSoftwarePackage -ImageProfile “ESXi5_Custom” -SoftwarePackage net-igb

    5. Export-EsxImageProfile -ImageProfile “ESXi5_Custom” -FilePath c:\ESXi5.0.0-INTELIGB-469512.iso -ExportToIso -Force

    I had to do a “Get-EsxSoftwarePackage” command after adding the drivers to the depot to get the actual Software Package Name (Vendor: INTEL)

    – JC

  3. Auke Bruinsma
    September 29, 2011 at 5:45 am

    When you cannot find the offline bundle zip, don’t worry just use the online one to create an offline one:

    Add-EsxSoftwareDepot https://hostupdate.vmware.com/software/VUM/PRODUCTION/main/vmw-depo
    t-index.xml

    Get-EsxImageProfile (to list the profiles)

    Export-EsxImageProfile -ImageProfile “profilename from the command above” -ExportToBundle -FilePath “c:\myofflinebundle.zip”

    I’ve got this from: http://communities.vmware.com/message/1829014

    • Vmware user
      January 3, 2012 at 1:35 pm

      You are awesome dude, thanks a lot for sharing this with everybody

  4. November 11, 2011 at 1:25 am

    It’s really a great and helpful piece of information. I’m glad that you simply shared this helpful information with us. Please keep us up to date like this. Thank you for sharing.

  5. Lucretius
    January 4, 2012 at 9:35 am

    Excellent guide. I added an HP Offline Bundle to the standard ESXi 5.0 bundle so I could load ESXi 5 on a ProLiant ML110 G7. It’s officially unsupported, but works! Prior ESXi couldn’t “understand” the RAID 1 I had on the server, after the HP bundle was applied it worked like a charm.

  6. Lionel
    January 9, 2012 at 11:15 pm

    @Lucretius: How did you manage to install ESXi 5 on the ML110 G7? I keep getting the purple screen of death when I try to install?

  7. Loshie-IT
    January 11, 2012 at 1:59 pm

    Lucretius, How did you get ESXi 5 to load on your ML110 G7?
    I’ve been trying for 2 days with no progress. :(

    I’ve tried with and without a HD in place and with HPs own ESXi 5 disk.
    All I get is the PSOD.

  8. Travis Backs
    February 2, 2012 at 7:51 am

    Thank goodness for this blog. We just bought new Brocade HBAs and this proved invaluable when slipstreaming the scsci-bfa VIB to the boot .iso. God bless you guys.

  1. August 26, 2011 at 4:33 pm
  2. September 27, 2011 at 8:32 am
  3. November 22, 2011 at 4:24 pm
  4. May 30, 2012 at 7:22 am

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: