az lab vm
Command group 'lab' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Manage VMs in an azure devtest lab.
Commands
Name | Description | Type | Status |
---|---|---|---|
az lab vm apply-artifacts |
Apply artifacts to virtual machine. This operation can take a while to complete. |
Core | Preview |
az lab vm claim |
Command to claim a VM in the Azure DevTest Lab. |
Core | Preview |
az lab vm create |
Create a VM in a lab. |
Core | Preview |
az lab vm delete |
Delete virtual machine. This operation can take a while to complete. |
Core | Preview |
az lab vm hibernate |
Hibernate a virtual machine This operation can take a while to complete. |
Core | Preview |
az lab vm list |
List virtual machines in a given lab. |
Core | Preview |
az lab vm show |
Show virtual machine. |
Core | Preview |
az lab vm start |
Start a virtual machine. This operation can take a while to complete. |
Core | Preview |
az lab vm stop |
Stop a virtual machine This operation can take a while to complete. |
Core | Preview |
az lab vm wait |
Place the CLI in a waiting state until a condition is met. |
Core | Preview |
az lab vm apply-artifacts
Command group 'lab' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Apply artifacts to virtual machine. This operation can take a while to complete.
az lab vm apply-artifacts --lab-name
--name
--resource-group
[--artifacts]
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
Examples
Apply artifacts to a virtual machine in Azure DevTest Lab.
az lab vm apply-artifacts --artifacts artifacts.json --lab-name MyLab --name MyVirtualMachine --resource-group MyResourceGroup
Required Parameters
The name of the lab.
The name of the virtual machine.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Path to the JSON encoded array of artifacts to be applied. JSON encoded list of parameters.
Do not wait for the long-running operation to finish.
Property | Value |
---|---|
Accepted values: | 0, 1, f, false, n, no, t, true, y, yes |
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
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.
Property | Value |
---|---|
Default value: | False |
az lab vm claim
Command group 'lab' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Command to claim a VM in the Azure DevTest Lab.
az lab vm claim [--ids]
[--lab-name]
[--name]
[--resource-group]
[--subscription]
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
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.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Name of the lab.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Name of the virtual machine to claim.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
Property | Value |
---|---|
Default value: | False |
az lab vm create
Command group 'lab' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Create a VM in a lab.
az lab vm create --lab-name
--name
--resource-group
[--admin-password]
[--admin-username]
[--allow-claim {0, 1, f, false, n, no, t, true, y, yes}]
[--artifacts]
[--authentication-type {password, ssh}]
[--disk-type {Premium, Standard, StandardSSD}]
[--expiration-date]
[--formula]
[--generate-ssh-keys {0, 1, f, false, n, no, t, true, y, yes}]
[--image]
[--image-type {custom, gallery}]
[--ip-configuration {private, public, shared}]
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
[--notes]
[--saved-secret]
[--size]
[--ssh-key]
[--subnet]
[--tags]
[--vnet-name]
Required Parameters
The name of the lab.
The name of the virtual machine or environment.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Password for the VM admin.
Property | Value |
---|---|
Parameter group: | Authentication Arguments |
Username for the VM admin.
Property | Value |
---|---|
Parameter group: | Authentication Arguments |
Default value: | your_system_user_login_name |
Flag indicating if the VM should be created as claimable.
Property | Value |
---|---|
Default value: | False |
Accepted values: | 0, 1, f, false, n, no, t, true, y, yes |
Path to the JSON encoded array of artifacts to be applied. JSON encoded list of parameters.
Type of authentication allowed for the VM.
Property | Value |
---|---|
Parameter group: | Authentication Arguments |
Default value: | password |
Accepted values: | password, ssh |
Storage type to use for virtual machine.
Property | Value |
---|---|
Accepted values: | Premium, Standard, StandardSSD |
The expiration date for VM.
Name of the formula. Use az lab formula list
for available formulas. Use az lab formula
with the --export-artifacts
flag to export and update artifacts, then pass the results via the --artifacts
argument.
Generate SSH public and private key files if missing.
Property | Value |
---|---|
Accepted values: | 0, 1, f, false, n, no, t, true, y, yes |
The name of the operating system image (gallery image name or custom image name/ID). Use az lab gallery-image list
for available gallery images or az lab custom-image list
for available custom images.
Type of the image.
Property | Value |
---|---|
Accepted values: | custom, gallery |
Type of IP configuration to use for the VM.
Property | Value |
---|---|
Parameter group: | Network Arguments |
Accepted values: | private, public, shared |
Do not wait for the long-running operation to finish.
Property | Value |
---|---|
Accepted values: | 0, 1, f, false, n, no, t, true, y, yes |
The notes of the virtual machine.
Name of the saved secret to be used for authentication. When this value is provided, it is used in the place of other authentication methods.
Property | Value |
---|---|
Parameter group: | Authentication Arguments |
The size of the VM to be created. See https://azure.microsoft.com/pricing/details/virtual-machines/ for size info.
The SSH public key or public key file path. Use --generate-ssh-keys
to generate SSH keys.
Property | Value |
---|---|
Parameter group: | Authentication Arguments |
Name of the subnet to add the VM to.
Property | Value |
---|---|
Parameter group: | Network Arguments |
The tags of the resource. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
Name of the virtual network to add the VM to.
Property | Value |
---|---|
Parameter group: | Network Arguments |
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
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.
Property | Value |
---|---|
Default value: | False |
az lab vm delete
Command group 'lab' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Delete virtual machine. This operation can take a while to complete.
az lab vm delete --lab-name
--name
--resource-group
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
[--yes]
Required Parameters
The name of the lab.
The name of the virtual machine.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Do not wait for the long-running operation to finish.
Property | Value |
---|---|
Accepted values: | 0, 1, f, false, n, no, t, true, y, yes |
Do not prompt for confirmation.
Property | Value |
---|---|
Default value: | False |
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
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.
Property | Value |
---|---|
Default value: | False |
az lab vm hibernate
Command group 'lab' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Hibernate a virtual machine This operation can take a while to complete.
az lab vm hibernate --lab-name
--name
--resource-group
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
Examples
Hibernate a virtual machine.
az lab vm hibernate --resource-group MyResourceGroup --lab-name MyLab --name MyVM
Required Parameters
The name of the lab.
The name of the virtual machine.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Do not wait for the long-running operation to finish.
Property | Value |
---|---|
Accepted values: | 0, 1, f, false, n, no, t, true, y, yes |
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
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.
Property | Value |
---|---|
Default value: | False |
az lab vm list
Command group 'lab' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
List virtual machines in a given lab.
az lab vm list --lab-name
--resource-group
[--all {0, 1, f, false, n, no, t, true, y, yes}]
[--claimable {0, 1, f, false, n, no, t, true, y, yes}]
[--environment]
[--expand]
[--filters]
[--max-items]
[--next-token]
[--object-id]
[--order-by]
[--top]
Examples
List the VMs in an Azure DevTest Lab.
az lab vm list --lab-name MyLab --resource-group MyResourceGroup
Required Parameters
The name of the lab.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
List all virtual machines in the lab. Cannot be used with --filters
.
Property | Value |
---|---|
Accepted values: | 0, 1, f, false, n, no, t, true, y, yes |
List only claimable virtual machines in the lab. Cannot be used with --filters
.
Property | Value |
---|---|
Accepted values: | 0, 1, f, false, n, no, t, true, y, yes |
Name or ID of the environment to list virtual machines in. Cannot be used with --filters
.
Property | Value |
---|---|
Parameter group: | Filter Arguments |
Specify the $expand query. Example: 'properties($expand=artifacts,computeVm,networkInterface,applicableSchedule)'.
The filter to apply to the operation. Example: '$filter=contains(name,'myName').
Property | Value |
---|---|
Parameter group: | Filter Arguments |
Total number of items to return in the command's output. If the total number of items available is more than the value specified, a token is provided in the command's output. To resume pagination, provide the token value in --next-token
argument of a subsequent command.
Property | Value |
---|---|
Parameter group: | Pagination Arguments |
Token to specify where to start paginating. This is the token value from a previously truncated response.
Property | Value |
---|---|
Parameter group: | Pagination Arguments |
Object ID of the owner to list VMs for.
The ordering expression for the results, using OData notation. Example: '$orderby=name desc'.
The maximum number of resources to return from the operation. Example: '$top=10'.
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
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.
Property | Value |
---|---|
Default value: | False |
az lab vm show
Command group 'lab' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Show virtual machine.
az lab vm show --lab-name
--name
--resource-group
[--expand]
Required Parameters
The name of the lab.
The name of the virtual machine.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Specify the $expand query. Example: 'properties($expand=artifacts,computeVm,networkInterface,applicableSchedule)'.
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
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.
Property | Value |
---|---|
Default value: | False |
az lab vm start
Command group 'lab' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Start a virtual machine. This operation can take a while to complete.
az lab vm start --lab-name
--name
--resource-group
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
Required Parameters
The name of the lab.
The name of the virtual machine.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Do not wait for the long-running operation to finish.
Property | Value |
---|---|
Accepted values: | 0, 1, f, false, n, no, t, true, y, yes |
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
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.
Property | Value |
---|---|
Default value: | False |
az lab vm stop
Command group 'lab' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Stop a virtual machine This operation can take a while to complete.
az lab vm stop --lab-name
--name
--resource-group
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
Required Parameters
The name of the lab.
The name of the virtual machine.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Do not wait for the long-running operation to finish.
Property | Value |
---|---|
Accepted values: | 0, 1, f, false, n, no, t, true, y, yes |
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
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.
Property | Value |
---|---|
Default value: | False |
az lab vm wait
Command group 'lab' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Place the CLI in a waiting state until a condition is met.
az lab vm wait [--created]
[--custom]
[--deleted]
[--exists]
[--expand]
[--ids]
[--interval]
[--lab-name]
[--name]
[--resource-group]
[--subscription]
[--timeout]
[--updated]
Optional Parameters
The following parameters are optional, but depending on the context, one or more might become required for the command to execute successfully.
Wait until created with 'provisioningState' at 'Succeeded'.
Property | Value |
---|---|
Parameter group: | Wait Condition Arguments |
Default value: | False |
Wait until the condition satisfies a custom JMESPath query. E.g. provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running'].
Property | Value |
---|---|
Parameter group: | Wait Condition Arguments |
Wait until deleted.
Property | Value |
---|---|
Parameter group: | Wait Condition Arguments |
Default value: | False |
Wait until the resource exists.
Property | Value |
---|---|
Parameter group: | Wait Condition Arguments |
Default value: | False |
Specify the $expand query. Example: 'properties($expand=artifacts,computeVm,networkInterface,applicableSchedule)'.
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.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Polling interval in seconds.
Property | Value |
---|---|
Parameter group: | Wait Condition Arguments |
Default value: | 30 |
The name of the lab.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
The name of the virtual machine.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Property | Value |
---|---|
Parameter group: | Resource Id Arguments |
Maximum wait in seconds.
Property | Value |
---|---|
Parameter group: | Wait Condition Arguments |
Default value: | 3600 |
Wait until updated with provisioningState at 'Succeeded'.
Property | Value |
---|---|
Parameter group: | Wait Condition Arguments |
Default value: | False |
Global Parameters
Increase logging verbosity to show all debug logs.
Property | Value |
---|---|
Default value: | False |
Show this help message and exit.
Only show errors, suppressing warnings.
Property | Value |
---|---|
Default value: | False |
Output format.
Property | Value |
---|---|
Default value: | json |
Accepted values: | json, jsonc, none, table, tsv, yaml, yamlc |
JMESPath query string. See http://jmespath.org/ for more information and examples.
Increase logging verbosity. Use --debug for full debug logs.
Property | Value |
---|---|
Default value: | False |