You can use vSphere ESXi Image Builder cmdlets to check which depots are available, to add a depot, to view image profile information, and to create a new image profile by cloning one of the available image profiles.
About this task
Published profiles are usually read-only and cannot be modified. Even if a published profile is not read-only, cloning instead of modifying the profile is a best practice, because modifying the original profile erases the original. You cannot revert to the original, unmodified profile except by reconnecting to a depot.
A profile cloning workflow might include checking the current state of the system, adding a software depot, and cloning the profile.
Verify that vSphere PowerCLI and prerequisite software is installed. See Install vSphere ESXi Image Builder and Prerequisite Software.
- In a PowerShell window, check whether any software depots are defined for the current session.
PowerShell returns the currently defined depots, or nothing if you just started PowerShell.
- If the depot containing the profile that you want to clone does not appear in the results, add it to the current session.
Add-EsxSoftwareDepot -DepotUrl depot_url.
Download the ZIP file to a local file path.
PowerShell adds the specified depot to your current session and lists all current depots.
- (Optional) Check the
$DefaultSoftwareDepotsvariable, which now returns the newly added depot.
- View all available image profiles.
- To clone an image profile, enter its name, a new name for the new profile, and a name of the vendor.
$ip = New-EsxImageProfile -CloneProfile base-tbd-v1 -Name "Test Profile 42" -Vendor "Vendor20"
- (Optional) View the newly created image profile,
PowerShell returns the information about the image profile in tabular format.
Name Vendor Last Modified Acceptance Level ---- ------ ------------- ---------------- Test Profile 42 Vendor20 9/15/2010 5:45:43... PartnerSupported
Creating Image Profile by Cloning Using Variables
This workflow example repeats the steps of this workflow by passing in parameters as objects accessed by position in a variable, instead of passing in parameters by name. You can run the following cmdlets in sequence from the vSphere PowerCLI prompt.
$DefaultSoftwareDepots Add-EsxSoftwareDepot -DepotUrl depot_url $DefaultSoftwareDepots $profs = Get-EsxImageProfile $profs $ip = New-EsxImageProfile -CloneProfile $profs -Name "new_profile_name" -Vendor "my_vendor" $ip