az image

Manage custom virtual machine images.

Commands

az image copy Copy a managed image (or vm) to other regions.

az image copy

Copy a managed image (or vm) to other regions.

az image copy --source-object-name
--source-resource-group
--target-location
--target-resource-group
[--cleanup]
[--parallel-degree]
[--source-type {image, vm}]
[--tags]
[--target-name]
[--target-subscription]
[--timeout]

Examples

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"

Required Parameters

--source-object-name

The name of the image or vm resource.

--source-resource-group

Name of the resource group of the source resource.

--target-location

Space separated location list to create the image in (e.g. westeurope etc.).

--target-resource-group

Name of the resource group to create images in.

Optional Parameters

--cleanup

Include this switch to delete temporary resources upon completion.

--parallel-degree

Number of parallel copy operations.

default value: -1
--source-type

Image or vm.

accepted values: image, vm
default value: image
--tags
--target-name

Name of the final image that will be created.

--target-subscription

Name or ID of the subscription where the final image should be created.

--timeout

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.

default value: 3600