Dev/Test Lab custom images - az lab custom-image

Commands to manage custom images of a DevTest Lab.

Commands

az lab custom-image create Command to create custom image in a DevTest Lab.
az lab custom-image delete Delete custom image.
az lab custom-image list List custom images in a given lab.
az lab custom-image show Get custom image.

az lab custom-image create

Command to create custom image in a DevTest Lab.

az lab custom-image create --lab-name
--name
--os-state
--os-type
--resource-group
--source-vm-id
[--author]
[--description]

Examples

Create a custom image in the lab from a running Windows virtual machine without applying sysprep

az lab custom-image create --lab-name MyLab -g MyRG --name MyVM --source-vm-id "/subscriptions/mysubscription/resourcegroups/myresourcegroup/microsoft.devtestlab/labs/mylab/virtualmachines/myvirtualmachine" --os-type Windows --os-state NonSysprepped

Required Parameters

--lab-name

Name of the Lab.

--name -n

Name of the custom image.

--os-state

The current state of the virtual machine. For Windows virtual machines - NonSysprepped, SysprepRequested, SysprepApplied. For Linux virtual machines - NonDeprovisioned, DeprovisionRequested, DeprovisionApplied.

--os-type

Type of the OS on which the custom image is based. Allowed values are Windows, Linux.

--resource-group -g

Name of lab's resource group. You can configure the default group using 'az configure --defaults group='.

--source-vm-id

The resource ID of a lab virtual machine in the provided lab.

Optional Parameters

--author

The author of the custom image.

--description

A detailed description for the custom image.

az lab custom-image delete

This operation can take a while to complete.

az lab custom-image delete --lab-name
--name
--resource-group

Required Parameters

--lab-name

The name of the lab.

--name

The name of the custom image.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=.

az lab custom-image list

List custom images in a given lab.

az lab custom-image list --lab-name
--resource-group
[--expand]
[--filter]
[--orderby]
[--top]

Required Parameters

--lab-name

The name of the lab.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=.

Optional Parameters

--expand

Specify the $expand query. Example: 'properties($select=vm)'.

--filter

The filter to apply to the operation.

--orderby

The ordering expression for the results, using OData notation.

--top

The maximum number of resources to return from the operation.

az lab custom-image show

Get custom image.

az lab custom-image show --lab-name
--name
--resource-group
[--expand]

Required Parameters

--lab-name

The name of the lab.

--name

The name of the custom image.

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=.

Optional Parameters

--expand

Specify the $expand query. Example: 'properties($select=vm)'.