Kyle Gleed, Sr. Technical Marketing Architect, VMware
I’ve had several requests for a brief tutorial on using the vSphere ESXi Image Builder CLI. I hope this post will help people better understand the power of the Image Builder CLI and how easy it is create and maintain custom ESXi installation images.
Before I get into using the Image Builder CLI lets review some basic terminology:
- vSphere Installation Bundle (VIB): VIBs are the building blocks of the ESXi image. A VIB is akin to a tarball or ZIP archive in that it is a collection of files packaged into a single archive. A detailed description of a VIB can be found here.
- Software Depot: Software depots are used to package and distribute VIBs. A Software Depot (sometimes referred to as a Software Bundle) is a collection VIBs specially packaged for distribution. There are two types of depots – online and offline. An online software depot is accessed remotely using HTTP. An offline software depot is downloaded and accessed locally.
- Image Profile: An Image Profile is the logical collection of VMware and third-party VIBs needed to install an ESXi host. Image profiles created with the Image Builder CLI can be saved as ZIP archives or ISO files.
A quick note about working with individual VIBs vs. Software Depots. You can download individual VIBs, and you can use the vSphere Update Manager or ESXCLI command to install them on your ESXi hosts. However, there is no way to import a standalone VIB into an Image Builder CLI session without first packaging the VIB into a Software Depot. So remember, when working with the Image Builder CLI you need to download the software depot (.zip) and not the individual VIBs (.vib).
Along with the terminology it also helps to understand that the ESXi Image Builder CLI is part of PowerCLI. To install Image Builder you simply need to install PowerCLI. PowerCLI 5.0 includes all the Image Builder cmdlets necessary to import software depots, create image profiles and add and remove VIBs in order to create custom ESXi installation images.
There are five basic steps to creating a custom ESXi installation image:
Step 1: Download the software depots.
Typically, you will start by downloading the VMware software depot from http://www.vmware.com/downloads. This depot contains the ESXi VIBs provided by VMware.
In addition you will need to download the pertinent software depots from your other vendors. These depots have the vendor specific VIBs that you will need to combine with the VMware VIBs in order to create your custom installation image. Here’s an example showing how to download an offline software depot from HP:
———————————————————————————————————-
Note: If you are using an online software depot you don’t need to download the ZIP file. You just need the URL for the depot. An example showing how to use HP’s online Software Depot is available here.
———————————————————————————————————-
Step 2: Import the software depots
Next, start your PowerCLI session and import the software depots using the “Add-EsxSoftwareDepot” cmdlet. Import all the software depots you have downloaded.
Step 3: Create an Image Profile
After the software depots have been imported the next step is to create an image profile using the “New-EsxImageProfile” cmdlet. There are two ways to create a new image profile, you can create an empty image profile and manually specify the VIBs you want to add, or you can clone an existing image profile and use that as your starting point:
Creating a New Image Profile
Cloning an Existing Image Profile
Step 4: Add/Remove VIBs
Next, you use the “Add-EsxSoftwarePackage” and “Remove-EsxSoftwarePackage” cmdlets to add and remove VIBs to/from your image profile. In the example below I first list all the VIBs that were provided by HP and then add them to the custom profile I created by cloning the “VMware ESXi-5.0.0-20120302001-no-tools” image profile provided by VMware:
This is a quick example to show how to remove a package from an Image Profile:
———————————————————————————————————-
Note that each VIB contains an XML descriptor file that has information about the VIB to include any dependencies or conflicts it may have with other VIBs. When adding and removing VIBs you will need to ensure that conflicts are avoided and dependencies are met. You can use the “Get-EsxSoftwarePackage” cmdlet to identify VIB compatibility or dependency requirements.
———————————————————————————————————-
Step 5: Save the Image Profile
After adding the VIBs you need the next step is to export the image profile. You can export the Image Profile as a software depot (.zip) or as an ISO file (.iso).
You now have a custom Image Profile. You can use the ISO file to boot your new hosts and install ESXi. You can use the ZIP file with Update Manager or Auto Deploy. When new hosts are installed using the custom image profile all the VIBs you added will be installed on the host as part of the install.
For reference I’ve included a brief summary showing some of the more common Image Builder commands below:
Image Builder CLI cmdlet Examples:
Add-EsxSoftwareDepot
PowerCLI C:> Add-EsxSoftwareDepot C:ESXi-Depotupdate-from-esxi5.0-5.0_update01.zip
Remove-EsxSoftwareDepot
PowerCLI C:> Remove-EsxSoftwareDepot zip:C:ESXi-Depotupdate-from-esxi5.0-5.0_update01.zip?index.xml
Get-EsxSoftwarePackage
PowerCLI C:> Get-EsxSoftwarePackage
PowerCLI C:> Get-EsxSoftwarePackage | where {$_.Vendor -eq "VMware"}
PowerCLI C:> Get-EsxSoftwarePackage net-e1000 | Select -ExpandProperty Depends
PowerCLI C:> Get-EsxSoftwarePackage net-e1000 | Select -ExpandProperty Conflicts
Add-EsxSoftwarePackage
PowerCLI C:> Add-EsxSoftwarePackage -ImageProfile CustomProfile -SoftwarePackage tools-light
Remove-EsxSoftwarePackage
PowerCLI C:> Remove-EsxSoftwarePackage -ImageProfile CustomProfile -SoftwarePackage tools-light
New-EsxImageProfile
PowerCLI C:> New-EsxImageProfile -CloneProfile ESXi-5.0.0-20120302001-standard -Name CustomProfile -AcceptanceLevel PartnerSupported
PowerCLI C:> New-EsxImageProfile -NewProfile -Name MinInstall -Vendor Custom -SoftwarePackage esx-base,esx-tboot,misc-drivers
Get-EsxImageProfile
PowerCLI C:> Get-EsxImageProfile
Compare-EsxImageProfile
PowerCLI C:> Compare-EsxImageProfile ESXi-5.0.0-20120302001-standard ESXi-5.0.0-20120302001-no-tools
Export-EsxImageProfile
PowerCLI C:> Export-EsxImageProfile -ImageProfile CustomProfile -ExportToIso -FilePath C:ESXi-DepotCustomProfile.iso
PowerCLI C:> Export-EsxImageProfile -ImageProfile CustomProfile –ExportToBundle -FilePath C:ESXi-DepotCustomProfile.zip
To get updates on future posts follow me on Twitter @VMwareESXI
Andreas Peetz
Good writeup, Kyle!
One question that you might be able to answer: When adding an Online depot through a URL (like http://vibsdepot.hp.com), is there any way to make this work through a proxy server? I thought that Powershell would automatically use the Internet Explorer proxy settings, but I couldn’t get it to work. Any idea?
Thanks
Andreas
Kyle Gleed
Hi Andreas, unfortunately, it doesn’t look like the current version of the Image Builder CLI recognizes proxy servers. If a proxy server isn’t allowing you to access the online software depot you will need to download the offline depot (.zip). I’ve submitted a ticket to get proxy server support added.
Keith Liew
May I know if I can do the same to add 3rd party network driver to ESXi 5.1 ISO image?
Can I use Intel e1000 driver for my Intel 82579LM NIC?
Ondrej
Gents,
is there some way how to add the already created custom ISO to the image builder when I am missing the *.zip file of that profile?
Thank you.
Rhian Cohen
Thanks, this was really useful and pointed me in the right direction
Shawn Dorsey
Kyle…one would think this would be easy! But I keep running into the same problem adding a vib
Add-EsxSoftwarePackage : Cannot add VIB ‘ibm_sw_hyper_provbundv1.0_vmwaresx51_32-64.zip’ which is not in the depot
Yet the add was succesful as noted:
Get-EsxSoftwarePackage | where {$_.Vendor -eq “IBM”}
Name Version
—- ——-
fwupdate 500-2ACE14DUS
hwckvm 500-ESXI01ACN
concretejob 500-2ACE14DUS
pciinfo 500-PRIVATE
soibms 500-ESXI01ACN
fupb 5-7.250
filetrans 500-2ACE14DUS
immpassthru 500-2ACE15AUS
Any ideas why I continue to get this error? BTW excellent write…just a shame I cannot make it work 🙁
Shawn Dorsey
Never mind…figured it out! I was trying to add the zip versus the files in the zip! DOH!
So this worked perfectly:
Add-EsxSoftwarePackage -ImageProfile R02CTX07012013_I -SoftwarePackage fwupdate,hwckvm,concretejob,pciinfo,soibms,fupb,filetrans,immpassthru
I know, I know pay attention to the details!
Lorenza
It’s perfect time to make some plans for the future and it’s time
to be happy. I have read this post and if I could I desire to suggst you
some interesting things or suggestions. Maybe you could
write next articles referring tto thijs article. I desire to read even more
things about it!
free psn code generator
Often the Play – Station network makes it easy greater facility and access that attaches someone to multiple players previously and as well as
online, therefore allowing you a large selection range of access
within reach. You should certainly even acquire
great deal more games, movies, and a lot additional information items you would want
to like to have in effect and purchase on-line. Generally Pitchford’s SHi – FT Codes expire within a day or so, but that may or may not be the case this time around so don’t count on it either way.
Ronald
According to the latest Xpatulator website address below cost of living survey of 228 global locations
are more expensive than news articles for kids Johannesburg.
Chelsea
Keeping your body physically fit is really important and can help prevent the occurrence of various illnesses
later on in life. Being able to work with a wide range of clamps
at your fingertips is not hard to do because they are low-priced and easily available.
It’s utilized for everything from sheds, residences and decks to
more modest occupations, for example cutting the structure wood for a solid walk or the parts for parking space racks.
Atlanta Mortgage Company
Many of these structured finance deals receive AAA ratings-the highest ratings available meaning that in theory, these instruments were least
likely to default. Plus, buyer number two had a pool loan added to the contract
along with doing a walk through at final construction
asking that a wall be knocked out to suit his taste for the house.
If cost is not important and people believe they can choose
the right mortgages without independent advice, they may wish to use the services of information only mortgage brokers.
Patti
I hardly drop comments, however i did a few searching and
wound up here Using the vSphere ESXi Image Builder CLI | VMware vSphere Blog – VMware Blogs.
And I do have a few questions for you if it’s allright.
Could it be just me or does it seem like some of the responses look as if they
are left by brain dead individuals? 😛 And, if you are writing on
other online social sites, I’d like to follow anything fresh you have to post.
Would you make a list of the complete urls of your community sites like your linkedin profile, Facebook page or twitter feed?
Also visit my website :: news (Patti)
kitchen remodel atlanta
If you are not familiar with hiring home renovation contractors,
the following guide will help you remove uncertainty from your mind and take an informed decision
on the best professional to carry out your home decoration project.
In evaluating the contractors in your area, keep in mind the following tips:
. How to Plan for life as a Government Contractor in A War Zone –
Damaged Tank, photo by Charles Buchanan – Things
you’ll need to have prior to deploying:· Passport and several photo
copies of the identification page.
computers bobby shmurda vimeo
The very first thing to do is use your favorite search engine to search out
corporations that promote laptops.
Corporate video productions Sydney
The marriage ceremony is a colourful one the place there are a number
of candy memories that can deliver a smile when you concentrate
on it in later days.
rowing machine workouts nyc
It has speedy launch frame lock mechanism which helps in dividing the
machine into two components.
zabudowa targowa
You need to be a part of a contest for one of the best websites on the
web. I’m going to highly recommend this site!
fresco bisuteria hecha a mano
Thanks for finally talking about > Using the vSphere ESXi Image Builder CLI | VMware
vSphere Blog – VMware Blogs < Loved it!
compro oro barcelona paseo de gracia
Gastos extra, un mes complicado sencillamente tienes joyas de
las que quieres deshacerte…, cambia tu oro por dinero en efectivo en Euromontepio.
vidente de calidad
What’s up, this weekend is good designed for me, for the
reason that this moment i am rearing thios great informative piece of
writing here at my residence.
escape game bandung
As a parent, I believe this indicates an unbalanced life-style and while my youngster remains to be a minor,
I do think it’s my accountability to curtail excessive game playing.
I think I’d worth it greater than taking part in a online
game (particularly those my son likes playing) as a result of he can be creating careful planning and strategic thought.
solar led spotlight outdoor
The extra Lumens means a brighter gentle; fewer Lumens means a dimmer
gentle. LEDs use a fraction of the power
of a traditional bulb however give off as a lot light.
Use the graph below to decide on which LED is true
for by seeing how many Lumens your present lights produce.
violin cover songs sheet music
The listeners have been placed at two different variations away from the speaker
(level on the EXPERIMENTAL SETTING sheet).
iphone it prints money
On this book review, you will discover that it would not take as a
lot money as you suppose!
viral news stories 2014
On Twitter , Tumblr , Google+ , through RSS , on Instagram , and/or Fb for the most recent Nickelodeon and Make It Pop Information and Highlights!
electrician jobs in pretoria
He worked on my associates home and did an excellent job.
Twink
Holy shit are those comments amazing. IT ACTUALLY PRINTS MONEY