Manage Base Images and Add-Ons with
ESXCLI
You can use ESXCLI to retrieve information about base images and add-ons in a depot.
You can also apply a complete image by using a JSON software specification that specifies
the base image, add-on, and components to install on the
ESXi
host.The following example illustrates how to list all base images and add-ons in a depot,
retrieve details about a specific base image or add-on, and apply a complete image
to a host. You can also verify the signatures of installed components after applying
the complete image. Specify one of the connection options listed in Connection Options for ESXCLI Host Management Commands
in place of
<conn_options>
.- List all base images in the depot by specifying the full remote URL to theindex.xmlfile of the online depot or the local absolute datastore path to an offline bundle.zipfile.esxcli <conn_options> software sources baseimage list -d <depot_url_or_offline_bundle_path>The list contains information about the release ID, version, vendor, release date, and acceptance level of each base image.
- Retrieve detailed information about a specific base image in the depot by specifying the base image version.esxcli <conn_options> software sources baseimage get -b <base_image_version> -d <depot_url_or_offline_bundle_path>
- List all add-ons in the depot by specifying the full remote URL to theindex.xmlfile of the online depot or the local absolute datastore path to an offline bundle.zipfile.esxcli <conn_options> software sources addon list -d <depot_url_or_offline_bundle_path>The list contains information about the release ID, version, vendor, release date, and acceptance level of each add-on.
- Retrieve detailed information about a specific add-on in the depot by specifying the add-on name.The add-on name can be either in the<oradd-on_name><format. If there are multiple add-ons with the same name, you must specify the version. Add-on names are case-sensitive.add-on_name>:<version>esxcli <conn_options> software sources addon get -a <add-on_name> -d <depot_url_or_offline_bundle_path>
- Prepare a JSON software specification.
- Obtain a JSON software specification exported from avSphere Lifecycle Managermanaged cluster.
- Create a custom JSON software specification.You can use the following JSON software specification syntax to apply a base image only.{ "add_on": null, "base_image": { "version": "<base_image_version>" }, "components": {} }You can use the following JSON software specification syntax to apply a base image, an add-on, and one or more components.{ "base_image": { "version": "<base_image_version>" }, "add_on": { "name": "<add-on_name>", "version": "<add-on_version>" }, "components": { "<component_name>": "<component_version>" } }
- Apply a complete image to theESXihost by specifying the location of the JSON software specification and the location of the depot.The location of the JSON software specification can be either a remote URL or a local file path. You can use a software specification exported from avSphere Lifecycle Managermanaged cluster. You can specify multiple depots.esxcli <conn_options> software apply -s <location_of_software_spec>.json -d <depot_url_or_offline_bundle_path>
- Verify the signatures of components installed on the host.If you have not rebooted theESXihost after applying the complete image, you can verify the newly applied image by using the--rebooting-imageoption.esxcli <conn_options> software component signature verifyA list of all installed components appears. The list contains the name, version, vendor, acceptance level, and signature verification result of each component.