az azurestackhci virtualmachine
Note
This reference is part of the azurestackhci extension for the Azure CLI (version 2.15.0 or higher). The extension will automatically install the first time you run an az azurestackhci virtualmachine command. Learn more about extensions.
Command group 'azurestackhci' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Manage virtualmachine with azurestackhci.
Commands
Name | Description | Type | Status |
---|---|---|---|
az azurestackhci virtualmachine create |
Create a VM. |
Extension | Experimental |
az azurestackhci virtualmachine delete |
Delete a VM. |
Extension | Experimental |
az azurestackhci virtualmachine extension |
Manage virtualmachine extension with azurestackhci. |
Extension | Experimental |
az azurestackhci virtualmachine extension create |
Create a virtualmachine extension. |
Extension | Experimental |
az azurestackhci virtualmachine extension delete |
Delete a virtualmachine extension. |
Extension | Experimental |
az azurestackhci virtualmachine extension list |
List all the extensions for a virtualmachine. |
Extension | Experimental |
az azurestackhci virtualmachine extension show |
Get the details of a virtualmachine extension. |
Extension | Experimental |
az azurestackhci virtualmachine extension update |
Update a virtualmachine extension. |
Extension | Experimental |
az azurestackhci virtualmachine extension wait |
Place the CLI in a waiting state until a condition of the virtualmachine extension is met. |
Extension | Experimental |
az azurestackhci virtualmachine list |
List all the VMs. |
Extension | Experimental |
az azurestackhci virtualmachine restart |
Restart a VM. |
Extension | Experimental |
az azurestackhci virtualmachine show |
Get the details of a VM. |
Extension | Experimental |
az azurestackhci virtualmachine start |
Start a stopped VM. |
Extension | Experimental |
az azurestackhci virtualmachine stop |
Power off (stop) a running VM. |
Extension | Experimental |
az azurestackhci virtualmachine update |
Update a VM. |
Extension | Experimental |
az azurestackhci virtualmachine vnic |
Manage vNIC of a virtual machine with azurestackhci. |
Extension | Experimental |
az azurestackhci virtualmachine vnic add |
Add existing vNICs to a VM. |
Extension | Experimental |
az azurestackhci virtualmachine vnic remove |
Remove vNICs from a VM. |
Extension | Experimental |
az azurestackhci virtualmachine create
Command group 'azurestackhci' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Create a VM.
az azurestackhci virtualmachine create --name
--resource-group
[--admin-password]
[--admin-username]
[--allow-password-auth {false, true}]
[--computer-name]
[--data-disk]
[--disable-vm-management {false, true}]
[--enable-tpm]
[--extended-location]
[--hardware-profile]
[--image-reference]
[--linux-configuration]
[--location]
[--network-profile]
[--nic-id]
[--os-disk]
[--os-profile]
[--security-profile]
[--ssh-public-keys]
[--storage-profile]
[--storagepath-id]
[--tags]
[--vm-size]
[--windows-configuration]
Examples
PutVirtualMachine
az azurestackhci virtualmachine create --resource-group "test-rg" --extended-location name="/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocatio n/customLocations/dogfood-location" type="CustomLocation" --location "West US2" --hardware-profile vm-size="Default" --nic-id "test-nic" --computer-name "test-machine" --admin-username xxx --admin-password xxx --ssh-public-keys /path/to/public_key.pub --image-reference "test-gallery-image" --storagepath-id "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/storagecontainers/test-storagepath" --name "test-vm" --allow-password-auth true --disable-vm-management true
Required Parameters
Name of the virtual machine.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
AdminPassword - Administrator Password.
AdminUsername - Administrator Username.
Enable password authentication for Linux VM.
Whether to enable password authentication for Linux virtual machines.
Note: This flag has no effect on Windows virtual machines.
Name of the Computer.
Names of the data disk VHD's being attached to the VM.
To enable/disable vm Management agent. The default behaviour enables the provisioning for VM ARC agent.
Enable tpm - Enable TPM in security settings for the VMs. If the flag is not provided, default value is False.
Usage: --enable-tpm=XX.
Usage: --extended-location type=XX name=XX
type: The extended location type. name: The extended location name.
HardwareProfile - Specifies the hardware settings for the virtual machine.
Usage: --hardware-profile vm-size=XX processors=XX memory-mb=XX maximum-memory-mb=XX minimum-memory-mb=XX target-memory-buffer=XX
processors: number of processors for the virtual machine memory-mb: RAM in mb for the virtual machine maximum-memory-mb: Maximum dynamic memory in mb minimum-memory-mb: Minimum dynamic memory in mb target-memory-buffer: Target memory buffer.
ImageReference - gallery image name the vm should use to provision.
LinuxConfiguration - Specifies the security settings for the virtual machine.
Location. Values from: az account list-locations
. You can configure the default location using az configure --defaults location=<location>
.
NetworkProfile - describes the network configuration the virtual machine.
NicID - Network Interface id to attach to the virtual machine.
Id of the VHD being used to provision the VM.
OsProfile - describes the configuration of the operating system and sets login data Expected value: json-string/@json-file.
SecurityProfile - Specifies the security settings for the virtual machine.
Usage: --security-profile secure-boot-enabled=XX.
Path to SSH public keys.
StorageProfile - contains information about the disks and storage information for the virtual machine Expected value: json-string/@json-file.
Azure ID of the Storage Path pointing to the location where the VM config files are stored.
Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.
VMSize - stock vm hardware configuration to use.
WindowsConfiguration - Windows Configuration for the virtual machine.
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 azurestackhci virtualmachine delete
Command group 'azurestackhci' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Delete a VM.
az azurestackhci virtualmachine delete [--ids]
[--name]
[--resource-group]
[--subscription]
[--yes]
Examples
DeleteVirtualMachine
az azurestackhci virtualmachine delete --resource-group "test-rg" --name "test-vm"
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 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
.
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 azurestackhci virtualmachine list
Command group 'azurestackhci' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus
List all the VMs.
az azurestackhci virtualmachine list [--resource-group]
Examples
ListVirtualMachineByResourceGroup
az azurestackhci virtualmachine list --resource-group "test-rg"
ListVirtualMachineBySubscription
az azurestackhci virtualmachine list
Optional Parameters
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 azurestackhci virtualmachine restart
Command group 'azurestackhci' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Restart a VM.
az azurestackhci virtualmachine restart [--ids]
[--name]
[--resource-group]
[--subscription]
Examples
RestartVirtualMachine
az azurestackhci virtualmachine restart --resource-group "test-rg" --name "test-vm"
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 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 azurestackhci virtualmachine show
Command group 'azurestackhci' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Get the details of a VM.
az azurestackhci virtualmachine show [--ids]
[--name]
[--resource-group]
[--subscription]
Examples
GetVirtualMachine
az azurestackhci virtualmachine show --resource-group "test-rg" --name "test-vm"
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 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 azurestackhci virtualmachine start
Command group 'azurestackhci' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Start a stopped VM.
az azurestackhci virtualmachine start [--ids]
[--name]
[--resource-group]
[--subscription]
Examples
StartVirtualMachine
az azurestackhci virtualmachine start --resource-group "test-rg" --name "test-vm"
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 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 azurestackhci virtualmachine stop
Command group 'azurestackhci' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Power off (stop) a running VM.
az azurestackhci virtualmachine stop [--ids]
[--name]
[--resource-group]
[--subscription]
Examples
StopVirtualMachine
az azurestackhci virtualmachine stop --resource-group "test-rg" --name "test-vm"
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 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 azurestackhci virtualmachine update
Command group 'azurestackhci' is experimental and under development. Reference and support levels: https://aka.ms/CLI_refstatus
Update a VM.
az azurestackhci virtualmachine update [--cpu-count]
[--ids]
[--memory-gb]
[--memory-mb]
[--name]
[--resource-group]
[--subscription]
[--tags]
[--vhd-names]
[--vnic-names]
Examples
UpdateVirtualMachine
az azurestackhci virtualmachine update --resource-group "test-rg" --tags additionalProperties="sample" --name "test-vm" --cpu-count XX --memory-mb XX --vhd-names vhd1 vhd2 --vnic-names vnic1 vnic2
Optional Parameters
Number of processors.
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.
Option '--memory-gb' has been deprecated and will be removed in a future release. Use '--memory-mb' instead.
Deprecated. Please use --memory-mb instead. Amount of RAM in gb.
Amount of RAM in mb.
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
.
Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.
List of vhd names.
List of vnic names.
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.