Creating an image profile from scratch
When creating an image profile from scratch, you will have to identify the software packages you need to be part of the image. This means that, unlike customizing an existing image, you will create a new one with only what you need, so that you don't have to go through the process of removing software packages from an image profile.
Getting ready
Read the recipes Downloading an ESXi offline bundle, Creating an image profile by cloning a predefined image profile, and Adding a VIB (software package) to an image profile as a preparation before you start learning how create an image from scratch.
How to do it...
The following procedure will guide you through the steps required to create an image profile from scratch:
- Use the
Add-EsxSoftwareDepot
cmdlet to add all the needed offline bundles to the vSphere PowerCLI session.Add-EsxSoftwareDepot C:\AutoDeploy-VIBS\ESXi500-201111001.zip
- Issue the
Get-EsxSoftwareDepot
cmdlet to verify that the offline bundles have been added successfully. - Assign the output of the
Get-EsxSoftwareDepot
command to a user-defined variable:$softdepot = Get-EsxSoftwareDepot
- Use the
Get-EsxSoftwarePackage
cmdlet to list the needed software packages from the correct depot. Filter the results as needed and assign them to a variable. In this example, let's list all the packages released after 1/5/2013 (mm/dd/yyyy) by issuing the following command:Get-EsxSoftwarePackage -SoftwareDepot $softdepot[0] -CreatedAfter 1/5/2013
- Assign this output to a user-defined variable:
$afterMay2013 = Get-EsxSoftwarePackage -CreatedAfter 1/5/2013 -SoftwareDepot $softdepot[0]
- Use the
New-EsxImageProfile
cmdlet to create a new image profile by supplyingName
,Vendor
, andAcceptanceLevel
:New-EsxImageProfile -NewProfile -Name "PostMay2013" -Vendor "vDescribed" -SoftwarePackage $afterMay2013 -AcceptanceLevel CommunitySupported
- Export the image profile to an ISO or offline bundle:
Export-EsxImageProfile -ImageProfile "PortMay2013" –ExportToBundle -FilePath C:\Offline-Bundles\PostMay2013.zip.
How it works...
It creates an ESXi image from scratch and helps to reduce the amount of data in terms of unnecessary drivers and software packages.
See also
- For information regarding the structure of an image profile, read the section Structure of ImageProfile, SoftwarePackage, and ImageProfileDiff Objects in the vSphere Installation and Setup Guide for vSphere 5.5 at page 228; this document can be found at http://bit.ly/vSphere55_install_guide