az image
Note
This reference is part of the image-copy-extension extension for the Azure CLI (version 2.68.0 or higher). The extension will automatically install the first time you run an az image command. Learn more about extensions.
Manage custom virtual machine images.
Name | Description | Type | Status |
---|---|---|---|
az image copy |
Copy a managed image (or vm) to other regions. It requires the source disk to be available. |
Extension | GA |
Copy a managed image (or vm) to other regions. It requires the source disk to be available.
az image copy --source-object-name
--source-resource-group
--target-location
--target-resource-group
[--cleanup]
[--export-as-snapshot]
[--parallel-degree]
[--source-type {image, vm}]
[--tags]
[--target-name]
[--target-subscription]
[--temporary-resource-group-name]
[--timeout]
Copy an image to several regions and cleanup at the end.
az image copy --source-resource-group mySources-rg --source-object-name myImage \
--target-location uksouth northeurope --target-resource-group "images-repo-rg" --cleanup
Use an already generalized vm to create images in other regions.
az image copy --source-resource-group mySources-rg --source-object-name myVm \
--source-type vm --target-location uksouth northeurope --target-resource-group "images-repo-rg"
The name of the image or vm resource.
Name of the resource group of the source resource.
Space separated location list to create the image in (e.g. westeurope etc.).
Name of the resource group to create images in.
Include this switch to delete temporary resources upon completion.
Include this switch to export the copies as snapshots instead of images.
Number of parallel copy operations.
Image or vm.
Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.
Name of the final image that will be created.
Name or ID of the subscription where the final image should be created.
Resource Group name where temporary storage account will be created.
Time in seconds for the copy operation to finish. Increase this time if you are going to copy large images (disks) like 512GB or more.
Global Parameters
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.
Azure CLI feedback
Azure CLI is an open source project. Select a link to provide feedback: