az sig image-definition
Manage shared gallery image with VM.
Commands
az sig image-definition create |
Create a gallery image definition. |
az sig image-definition delete |
Delete a gallery image. |
az sig image-definition list |
List gallery image definitions in a gallery. |
az sig image-definition list-community |
List VM Image definitions in a gallery community. |
az sig image-definition list-shared |
List VM Image definitions in a gallery shared directly to your subscription or tenant. |
az sig image-definition show |
Retrieves information about a gallery image definition. |
az sig image-definition show-community |
Get a community gallery image. |
az sig image-definition show-shared |
Get a shared gallery image. |
az sig image-definition update |
Update a VM Image definition. |
az sig image-definition create
Create a gallery image definition.
az sig image-definition create --gallery-image-definition
--gallery-name
--offer
--os-type {Linux, Windows}
--publisher
--resource-group
--sku
[--architecture {Arm64, x64}]
[--description]
[--disallowed-disk-types]
[--end-of-life-date]
[--eula]
[--features]
[--hyper-v-generation {V1, V2}]
[--location]
[--maximum-cpu-core]
[--maximum-memory]
[--minimum-cpu-core]
[--minimum-memory]
[--os-state {Generalized, Specialized}]
[--plan-name]
[--plan-product]
[--plan-publisher]
[--privacy-statement-uri]
[--release-note-uri]
[--tags]
Examples
Create an image definition for specialized linux images
az sig image-definition create --resource-group MyResourceGroup \
--gallery-name MyGallery --gallery-image-definition MyImage \
--publisher GreatPublisher --offer GreatOffer --sku GreatSku \
--os-type linux --os-state Specialized
Create an image definition for generalized linux images
az sig image-definition create --resource-group MyResourceGroup \
--gallery-name MyGallery --gallery-image-definition MyImage \
--publisher GreatPublisher --offer GreatOffer --sku GreatSku \
--os-type linux --os-state Generalized
Create an image definition for specialized windows images
az sig image-definition create --resource-group MyResourceGroup \
--gallery-name MyGallery --gallery-image-definition MyImage \
--publisher GreatPublisher --offer GreatOffer --sku GreatSku \
--os-type windows --os-state Specialized
Create an image definition for generalized windows images
az sig image-definition create --resource-group MyResourceGroup \
--gallery-name MyGallery --gallery-image-definition MyImage \
--publisher GreatPublisher --offer GreatOffer --sku GreatSku \
--os-type windows --os-state Generalized
Create an image definition with plan information
az sig image-definition create --resource-group MyResourceGroup \
--gallery-name MyGallery --gallery-image-definition MyImage \
--publisher GreatPublisher --offer GreatOffer --sku GreatSku \
--os-type linux --os-state Specialized --plan-name PlanName \
--plan-product PlanProduct --plan-publisher PlanPublisher
Create an image definition for images that support hibernate feature
az sig image-definition create --resource-group MyResourceGroup \
--gallery-name MyGallery --gallery-image-definition MyImage \
--publisher GreatPublisher --offer GreatOffer --sku GreatSku \
--os-type linux --os-state Specialized \
--features IsHibernateSupported=true
Create an image definition for images that support accelerated networking
az sig image-definition create --resource-group MyResourceGroup \
--gallery-name MyGallery --gallery-image-definition MyImage \
--publisher GreatPublisher --offer GreatOffer --sku GreatSku \
--os-type linux --os-state Specialized \
--features IsAcceleratedNetworkSupported=true
Create an image definition for images that can only be used to create Trusted VMs. Only Trusted VMs can be created from this image.
az sig image-definition create --resource-group MyResourceGroup \
--gallery-name MyGallery --gallery-image-definition MyImage \
--publisher GreatPublisher --offer GreatOffer --sku GreatSku \
--os-type linux --os-state Specialized \
--features SecurityType=TrustedLaunch
Create an image definition for images that can be used to create Confidential VMs.
az sig image-definition create --resource-group MyResourceGroup \
--gallery-name MyGallery --gallery-image-definition MyImage \
--publisher GreatPublisher --offer GreatOffer --sku GreatSku \
--os-type linux --os-state Specialized \
--features SecurityType=ConfidentialVmSupported
Create an image definition for images that can only be used to create Confidential VMs. Only Confidential VMs can be created from this image.
az sig image-definition create --resource-group MyResourceGroup \
--gallery-name MyGallery --gallery-image-definition MyImage \
--publisher GreatPublisher --offer GreatOffer --sku GreatSku \
--os-type linux --os-state Specialized \
--features SecurityType=ConfidentialVM
Create an image definition and indicate end of life date
az sig image-definition create --resource-group MyResourceGroup \
--gallery-name MyGallery --gallery-image-definition MyImage \
--publisher GreatPublisher --offer GreatOffer --sku GreatSku \
--os-type linux --os-state Specialized \
--end-of-life-date YYYY-MM-DDTHH:MM:SS+00:00
Create an image definition and recommend minimum and maximum CPU and memory (GB)
az sig image-definition create --resource-group MyResourceGroup \
--gallery-name MyGallery --gallery-image-definition MyImage \
--publisher GreatPublisher --offer GreatOffer --sku GreatSku \
--os-type linux --os-state Specialized \
--minimum-cpu-core myMinCPU --maximum-cpu-core myMaxCPU \
--minimum-memory myMinMemory --maximum-memory myMaxMemory
Create an image definition and indicate which OS disk types are not recommended for the image
az sig image-definition create --resource-group MyResourceGroup \
--gallery-name MyGallery --gallery-image-definition MyImage \
--publisher GreatPublisher --offer GreatOffer --sku GreatSku \
--os-type linux --os-state Specialized \
--disallowed-disk-types Standard_LRS
Create an image definition and provide the EULA, privacy statement URI, and release notes URI
az sig image-definition create --resource-group MyResourceGroup \
--gallery-name MyGallery --gallery-image-definition MyImage \
--publisher GreatPublisher --offer GreatOffer --sku GreatSku \
--os-type linux --os-state Specialized \
--eula path_to_eula --privacy-statement-uri path_to_statement \
--release-note-uri path_to_release_notes
Required Parameters
Gallery image definition.
Gallery name.
Image offer.
The type of the OS that is included in the disk if creating a VM from user-image or a specialized VHD.
Image publisher.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Image sku.
Optional Parameters
CPU architecture.
The description of the gallery image definition.
Disk types which would not work with the image, e.g., Standard_LRS.
The end of life date, e.g. '2020-12-31'.
The Eula agreement for the gallery image.
A list of gallery image features. E.g. "IsSecureBootSupported=true IsMeasuredBootSupported=false".
The hypervisor generation of the Virtual Machine. Applicable to OS disks only.
Location. Values from: az account list-locations
. You can configure the default location using az configure --defaults location=<location>
.
Maximum cpu cores.
Maximum memory in MB.
Minimum cpu cores.
Minimum memory in MB.
This property allows the user to specify whether the virtual machines created under this image are 'Generalized' or 'Specialized'.
Plan name.
Plan product.
Plan publisher.
The privacy statement uri.
The release note uri.
Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az sig image-definition delete
Delete a gallery image.
az sig image-definition delete [--gallery-image-definition]
[--gallery-name]
[--ids]
[--resource-group]
[--subscription]
Optional Parameters
Gallery image definition.
Gallery name.
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az sig image-definition list
List gallery image definitions in a gallery.
az sig image-definition list --gallery-name
--resource-group
Required Parameters
Gallery name.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az sig image-definition list-community
List VM Image definitions in a gallery community.
List VM Image definitions in a gallery community.
az sig image-definition list-community [--ids]
[--location]
[--marker]
[--public-gallery-name]
[--show-next-marker]
[--subscription]
Examples
List an image definition in a gallery community.
az sig image-definition list-community --public-gallery-name publicGalleryName \
--location myLocation
Optional Parameters
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
Location. Values from: az account list-locations
. You can configure the default location using az configure --defaults location=<location>
.
A string value that identifies the portion of the list of containers to be returned with the next listing operation. The operation returns the NextMarker value within the response body if the listing operation did not return all containers remaining to be listed with the current page. If specified, this generator will begin returning results from the point where the previous generator stopped.
The public name of community gallery.
Show nextMarker in result when specified.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az sig image-definition list-shared
List VM Image definitions in a gallery shared directly to your subscription or tenant.
List VM Image definitions in a gallery shared directly to your subscription or tenant.
az sig image-definition list-shared [--gallery-unique-name]
[--ids]
[--location]
[--marker]
[--shared-to {tenant}]
[--show-next-marker]
[--subscription]
Examples
List an image definition in a gallery shared directly to your subscription in the given location.
az sig image-definition list-shared --gallery-unique-name galleryUniqueName \
--location myLocation
List an image definition in a gallery shared directly to your tenant in the given location.
az sig image-definition list-shared --gallery-unique-name galleryUniqueName \
--location myLocation --shared-to tenant
Optional Parameters
The unique name of the Shared Gallery.
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
Location. Values from: az account list-locations
. You can configure the default location using az configure --defaults location=<location>
.
A string value that identifies the portion of the list of containers to be returned with the next listing operation. The operation returns the NextMarker value within the response body if the listing operation did not return all containers remaining to be listed with the current page. If specified, this generator will begin returning results from the point where the previous generator stopped.
The query parameter to decide what shared galleries to fetch when doing listing operations. If not specified, list by subscription id.
Show nextMarker in result when specified.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az sig image-definition show
Retrieves information about a gallery image definition.
az sig image-definition show [--gallery-image-definition]
[--gallery-name]
[--ids]
[--resource-group]
[--subscription]
Optional Parameters
Gallery image definition.
Gallery name.
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az sig image-definition show-community
Get a community gallery image.
az sig image-definition show-community [--gallery-image-definition]
[--ids]
[--location]
[--public-gallery-name]
[--subscription]
Optional Parameters
The name of the community gallery image definition from which the image versions are to be listed.
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
Location. Values from: az account list-locations
. You can configure the default location using az configure --defaults location=<location>
.
The public name of community gallery.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az sig image-definition show-shared
Get a shared gallery image.
Get a shared gallery image that has been shared directly to your subscription or tenant.
az sig image-definition show-shared [--gallery-image-definition]
[--gallery-unique-name]
[--ids]
[--location]
[--subscription]
Examples
Get an image definition in a gallery shared directly to your subscription or tenant in the given location.
az sig image-definition show-shared --gallery-unique-name galleryUniqueName \
--gallery-image-definition myGalleryImageName --location myLocation
Optional Parameters
The name of the Shared Gallery Image Definition from which the Image Versions are to be listed.
The unique name of the Shared Gallery.
One or more resource IDs (space-delimited). It should be a complete resource ID containing all information of 'Resource Id' arguments. You should provide either --ids or other 'Resource Id' arguments.
Location. Values from: az account list-locations
. You can configure the default location using az configure --defaults location=<location>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
az sig image-definition update
Update a VM Image definition.
az sig image-definition update --gallery-image-definition
--gallery-name
--resource-group
[--add]
[--force-string]
[--remove]
[--set]
Examples
Change the shared image definition's recommended configuration
az sig image-definition update --resource-group MyResourceGroup \
--gallery-name MyGallery --gallery-image-definition MyImage \
--resource-group MyResourceGroup --set recommended.vCpUs.min=myNewvCpUsMin \
recommended.vCpUs.max=myNewvCpUsMax recommended.memory.min=myNewMemoryMin \
recommended.memory.max=myNewMemoryMax description="newDescription"
Remove a shared image definition's configuration property
az sig image-definition update --resource-group MyResourceGroup \
--gallery-name MyGallery --gallery-image-definition MyImage \
--resource-group MyResourceGroup --remove recommended.vCpUs.min
Required Parameters
Gallery image definition.
Gallery name.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
Add an object to a list of objects by specifying a path and key value pairs. Example: --add property.listProperty <key=value, string or JSON string>.
When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.
Remove a property or an element from a list. Example: --remove property.list OR --remove propertyToRemove.
Update an object by specifying a property path and value to set. Example: --set property1.property2=.
Increase logging verbosity to show all debug logs.
Show this help message and exit.
Only show errors, suppressing warnings.
Output format.
JMESPath query string. See http://jmespath.org/ for more information and examples.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Increase logging verbosity. Use --debug for full debug logs.
Feedback
Submit and view feedback for