az networkcloud virtualmachine
Note
This reference is part of the networkcloud extension for the Azure CLI (version 2.66.0 or higher). The extension will automatically install the first time you run an az networkcloud virtualmachine command. Learn more about extensions.
Command group 'az networkcloud' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Manage virtual machine.
Commands
Name | Description | Type | Status |
---|---|---|---|
az networkcloud virtualmachine console |
Manage virtual machine's console. |
Extension | Preview |
az networkcloud virtualmachine console create |
Create a new virtual machine console or update the properties of the existing virtual machine console. |
Extension | Preview |
az networkcloud virtualmachine console delete |
Delete the provided virtual machine console. |
Extension | Preview |
az networkcloud virtualmachine console list |
List consoles of the virtual machine. |
Extension | Preview |
az networkcloud virtualmachine console show |
Get properties of the provided virtual machine console. |
Extension | Preview |
az networkcloud virtualmachine console update |
Update the properties of the provided virtual machine console, or update the tags associated with the virtual machine console. Properties and tag updates can be done independently. |
Extension | Preview |
az networkcloud virtualmachine console wait |
Place the CLI in a waiting state until a condition is met. |
Extension | Preview |
az networkcloud virtualmachine create |
Create a new virtual machine or update the properties of the existing virtual machine. |
Extension | Preview |
az networkcloud virtualmachine delete |
Delete the provided virtual machine. |
Extension | Preview |
az networkcloud virtualmachine list |
List virtual machines in the provided resource group or subscription. |
Extension | Preview |
az networkcloud virtualmachine power-off |
Power off the provided virtual machine. |
Extension | Preview |
az networkcloud virtualmachine reimage |
Reimage the provided virtual machine. |
Extension | Preview |
az networkcloud virtualmachine restart |
Restart the provided virtual machine. |
Extension | Preview |
az networkcloud virtualmachine show |
Get properties of the provided virtual machine. |
Extension | Preview |
az networkcloud virtualmachine start |
Start the provided virtual machine. |
Extension | Preview |
az networkcloud virtualmachine update |
Update the properties of the provided virtual machine, or update the tags associated with the virtual machine. Properties and tag updates can be done independently. |
Extension | Preview |
az networkcloud virtualmachine wait |
Place the CLI in a waiting state until a condition is met. |
Extension | Preview |
az networkcloud virtualmachine create
Command group 'az networkcloud' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Create a new virtual machine or update the properties of the existing virtual machine.
az networkcloud virtualmachine create --admin-username
--cloud-services-network-attachment
--cpu-cores
--extended-location
--memory-size
--name
--resource-group
--storage-profile
--vm-image
[--boot-method {BIOS, UEFI}]
[--generate-ssh-keys {0, 1, f, false, n, no, t, true, y, yes}]
[--location]
[--na]
[--nd]
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
[--ph]
[--ssh-dest-key-path]
[--ssh-key-values]
[--tags]
[--ud]
[--vm-device-model {T1, T2}]
[--vm-image-repository-credentials]
Examples
Create virtual machine
az networkcloud virtualmachine create --resource-group "resourceGroupName" --name "virtualMachineName" --extended-location name="/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.ExtendedLocation/customLocations/clusterExtendedLocationName" type="CustomLocation" --location "location" --admin-username "admin" --boot-method "UEFI" --cloud-services-network-attachment attached-network-id="/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/CloudServicesNetworks/cloudServicesNetworkName" --cpu-cores 2 --memory-size 8 --network-attachments "[{attachedNetworkId:'/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/l3Networks/l3NetworkName',defaultGateway:'True',ipAllocationMethod:'Dynamic',ipv4Address:'198.51.100.1',ipv6Address:'2001:0db8:0000:0000:0000:0000:0000:0000',networkAttachmentName:'networkAttachmentName'}]" --network-data "bmV0d29ya0RhdGVTYW1wbGU=" --placement-hints "[{hintType:'Affinity',resourceId:'/subscriptions/subscriptionId/resourceGroups/resourceGroupName/providers/Microsoft.NetworkCloud/racks/rackName',schedulingExecution:'Hard,scope:''}]" --ssh-key-values "ssh-rsa AAtsE3njSONzDYRIZv/WLjVuMfrUSByHp+jfaaOLHTIIB4fJvo6dQUZxE20w2iDHV3tEkmnTo84eba97VMueQD6OzJPEyWZMRpz8UYWOd0IXeRqiFu1lawNblZhwNT= admin@vm" --storage-profile disk-size=120 create-option="Ephemeral" delete-option="Delete" --tags key1="myvalues1" --tags key2="myvalues2" --user-data "dXNlckRhdGVTYW1wbGU=" --vm-device-model "T2" --vm-image "myacr.azurecr.io/ubuntu-pw:20.04" --vm-image-repository-credentials password="password" registry-url="myacr.azurecr.io" username="username"
Required Parameters
The name of the administrator to which the ssh public keys will be added into the authorized keys.
The cloud service network that provides platform-level services for the virtual machine. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
The number of CPU cores in the virtual machine.
The extended location of the cluster associated with the resource. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
The memory size of the virtual machine in gibibytes.
The name of the virtual machine.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
The storage profile that specifies size and other parameters about the disks related to the virtual machine. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
The virtual machine image that is currently provisioned to the OS disk, using the full url and tag notation used to pull the image.
Optional Parameters
Selects the boot method for the virtual machine.
Generate SSH public and private key files if missing. The keys will be stored under '~/.ssh'.
The geo-location where the resource lives When not specified, the location of the resource group will be used.
The list of network attachments to the virtual machine. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
The Base64 encoded cloud-init network data.
Do not wait for the long-running operation to finish.
The scheduling hints for the virtual machine. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
The list of space-separated paths to ssh public keys. A file path can be provided or a directory. If a directory is provided will attempt to load all the public keys (.pub) found. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
The list of space-separated SSH public keys. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
Resource tags. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
The Base64 encoded cloud-init user data.
The type of the device model to use.
The credentials used to login to the image repository that has access to the specified image. Support shorthand-syntax, json-file and yaml-file. Try "??" to show 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.
az networkcloud virtualmachine delete
Command group 'az networkcloud' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Delete the provided virtual machine.
az networkcloud virtualmachine delete [--ids]
[--name]
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
[--resource-group]
[--subscription]
[--yes]
Examples
Delete virtual machine
az networkcloud virtualmachine delete --resource-group "resourceGroupName" --name "virtualMachineName"
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.
The name of the virtual machine.
Do not wait for the long-running operation to finish.
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
.
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 networkcloud virtualmachine list
Command group 'az networkcloud' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
List virtual machines in the provided resource group or subscription.
az networkcloud virtualmachine list [--max-items]
[--next-token]
[--resource-group]
Examples
List virtual machines for resource group
az networkcloud virtualmachine list --resource-group "resourceGroupName"
List virtual machines for subscription
az networkcloud virtualmachine list
Optional Parameters
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.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
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 networkcloud virtualmachine power-off
Command group 'az networkcloud' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Power off the provided virtual machine.
az networkcloud virtualmachine power-off [--ids]
[--name]
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
[--resource-group]
[--skip-shutdown {False, True}]
[--subscription]
Examples
Power off virtual machine
az networkcloud virtualmachine power-off --resource-group "resourceGroupName" --name "virtualMachineName" --skip-shutdown "True"
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.
The name of the virtual machine.
Do not wait for the long-running operation to finish.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
The indicator of whether to skip the graceful OS shutdown and power off the virtual machine immediately.
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 networkcloud virtualmachine reimage
Command group 'az networkcloud' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Reimage the provided virtual machine.
az networkcloud virtualmachine reimage [--ids]
[--name]
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
[--resource-group]
[--subscription]
Examples
Reimage virtual machine
az networkcloud virtualmachine reimage --resource-group "resourceGroupName" --name "virtualMachineName"
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.
The name of the virtual machine.
Do not wait for the long-running operation to finish.
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 networkcloud virtualmachine restart
Command group 'az networkcloud' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Restart the provided virtual machine.
az networkcloud virtualmachine restart [--ids]
[--name]
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
[--resource-group]
[--subscription]
Examples
Restart virtual machine
az networkcloud virtualmachine restart --resource-group "resourceGroupName" --name "virtualMachineName"
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.
The name of the virtual machine.
Do not wait for the long-running operation to finish.
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 networkcloud virtualmachine show
Command group 'az networkcloud' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Get properties of the provided virtual machine.
az networkcloud virtualmachine show [--ids]
[--name]
[--resource-group]
[--subscription]
Examples
Get virtual machine
az networkcloud virtualmachine show --resource-group "resourceGroupName" --name "virtualMachineName"
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.
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
.
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 networkcloud virtualmachine start
Command group 'az networkcloud' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Start the provided virtual machine.
az networkcloud virtualmachine start [--ids]
[--name]
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
[--resource-group]
[--subscription]
Examples
Start virtual machine
az networkcloud virtualmachine start --resource-group "resourceGroupName" --name "virtualMachineName"
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.
The name of the virtual machine.
Do not wait for the long-running operation to finish.
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 networkcloud virtualmachine update
Command group 'az networkcloud' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Update the properties of the provided virtual machine, or update the tags associated with the virtual machine. Properties and tag updates can be done independently.
az networkcloud virtualmachine update [--ids]
[--name]
[--no-wait {0, 1, f, false, n, no, t, true, y, yes}]
[--resource-group]
[--subscription]
[--tags]
[--vm-image-repository-credentials]
Examples
Patch virtual machine
az networkcloud virtualmachine update --resource-group "resourceGroupName" --name "virtualMachineName" --vm-image-repository-credentials password="password" registry-url="myacr.azurecr.io" username="myuser" --tags key1="myvalue1" key2="myvalue2"
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.
The name of the virtual machine.
Do not wait for the long-running operation to finish.
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
.
The Azure resource tags that will replace the existing ones. Support shorthand-syntax, json-file and yaml-file. Try "??" to show more.
The credentials used to login to the image repository that has access to the specified image. Support shorthand-syntax, json-file and yaml-file. Try "??" to show 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.
az networkcloud virtualmachine wait
Command group 'az networkcloud' 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 networkcloud virtualmachine wait [--created]
[--custom]
[--deleted]
[--exists]
[--ids]
[--interval]
[--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.
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 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.