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 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
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.
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.
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
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 the lab.
Name of the virtual machine to claim.
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
.
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.
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
Password for the VM admin.
Username for the VM admin.
Flag indicating if the VM should be created as claimable.
Path to the JSON encoded array of artifacts to be applied. JSON encoded list of parameters.
Type of authentication allowed for the VM.
Storage type to use for virtual machine.
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.
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.
Type of IP configuration to use for the VM.
Do not wait for the long-running operation to finish.
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.
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.
Name of the subnet to add the VM to.
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.
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.
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
Do not wait for the long-running operation to finish.
Do not prompt for confirmation.
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.
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
List all virtual machines in the lab. Cannot be used with --filters
.
List only claimable virtual machines in the lab. Cannot be used with --filters
.
Name or ID of the environment to list virtual machines in. Cannot be used with --filters
.
Specify the $expand query. Example: 'properties($expand=artifacts,computeVm,networkInterface,applicableSchedule)'.
The filter to apply to the operation. Example: '$filter=contains(name,'myName').
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.
Token to specify where to start paginating. This is the token value from a previously truncated response.
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.
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 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
Specify the $expand query. Example: 'properties($expand=artifacts,computeVm,networkInterface,applicableSchedule)'.
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.
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
Do not wait for the long-running operation to finish.
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.
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
Do not wait for the long-running operation to finish.
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.
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
Wait until created with 'provisioningState' at 'Succeeded'.
Wait until the condition satisfies a custom JMESPath query. E.g. provisioningState!='InProgress', instanceView.statuses[?code=='PowerState/running'].
Wait until deleted.
Wait until the resource exists.
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.
Polling interval in seconds.
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>
.
Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID
.
Maximum wait in seconds.
Wait until updated with provisioningState at 'Succeeded'.
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.