az stack-hci-vm disk
Note
This reference is part of the stack-hci-vm extension for the Azure CLI (version 2.15.0 or higher). The extension will automatically install the first time you run an az stack-hci-vm disk command. Learn more about extensions.
Manage virtualharddisk with stack-hci-vm.
Commands
Name | Description | Type | Status |
---|---|---|---|
az stack-hci-vm disk attach |
Attach disk to a VM. |
Extension | GA |
az stack-hci-vm disk create |
Create a virtual hard disk. |
Extension | GA |
az stack-hci-vm disk delete |
Delete a virtual hard disk. |
Extension | GA |
az stack-hci-vm disk detach |
Detach disk from a VM. |
Extension | GA |
az stack-hci-vm disk list |
List all virtual hard disks. |
Extension | GA |
az stack-hci-vm disk show |
Get the details of a virtual hard disk. |
Extension | GA |
az stack-hci-vm disk update |
Update a virtual hard disk. |
Extension | GA |
az stack-hci-vm disk attach
Attach disk to a VM.
az stack-hci-vm disk attach [--disks]
[--ids]
[--name]
[--resource-group]
[--subscription]
[--vm-name]
[--yes]
Examples
AttachDisk
az stack-hci-vm disk attach --resource-group "test-rg" --vm-name "test-vm" --disks "disk1" "disk2"
Optional Parameters
One or more names or IDs of the managed disk (space-delimited).
Usage: --disks "disk1" "disk2".
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 or ID of the managed disk.
Usage: --name "test-disk".
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 name of the virtual machine.
Usage: --vm-name "test-vm".
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 stack-hci-vm disk create
Create a virtual hard disk.
az stack-hci-vm disk create --custom-location
--name
--resource-group
[--block-size-bytes]
[--disk-file-format]
[--download-url]
[--dynamic {false, true}]
[--location]
[--logical-sector-bytes]
[--physical-sector-bytes]
[--polling-interval]
[--size-gb]
[--storage-path-id]
[--tags]
Examples
PutVirtualHardDisk
az stack-hci-vm disk create --resource-group "test-rg" --custom-location "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.ExtendedLocation/customLocations/dogfood-location" --location "West US2" --size-gb 2 --name "test-vhd" --storage-path-id "/subscriptions/a95612cb-f1fa-4daa-a4fd-272844fa512c/resourceGroups/dogfoodarc/providers/Microsoft.AzureStackHCI/storagecontainers/test-storagepath"
Required Parameters
The ID of the extended location.
Name of the virtual hard disk.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Optional Parameters
Block size.
Disk file format of the virtual hard disk - vhd or vhdx.
Usage: --disk-file-format "vhd".
Download Url.
Boolean for enabling dynamic sizing on the virtual hard disk.
If location is not specified, the location of the resource group is used.
Logical Sector.
Physical Sector.
ARM polling interval for long running operations.
Size of the disk in GB.
Azure ID of the Storage Path which is used to store the VHD.
Space-separated tags: key[=value] [key[=value] ...]. Use "" to clear existing tags.
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 stack-hci-vm disk delete
Delete a virtual hard disk.
az stack-hci-vm disk delete [--ids]
[--name]
[--polling-interval]
[--resource-group]
[--subscription]
[--yes]
Examples
DeleteVirtualHardDisk
az stack-hci-vm disk delete --resource-group "test-rg" --name "test-vhd"
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 hard disk.
ARM polling interval for long running operations.
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 stack-hci-vm disk detach
Detach disk from a VM.
az stack-hci-vm disk detach --resource-group
--vm-name
[--name]
[--yes]
Examples
DetachDisk
az stack-hci-vm disk detach --resource-group "test-rg" --vm-name "test-vm" --name "test-disk"
Required Parameters
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
The name of the virtual machine.
Usage: --vm-name "test-vm".
Optional Parameters
The name or ID of the managed disk.
Usage: --name "test-disk".
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 stack-hci-vm disk list
List all virtual hard disks.
az stack-hci-vm disk list [--resource-group]
Examples
ListVirtualHardDiskByResourceGroup
az stack-hci-vm disk list --resource-group "test-rg"
ListVirtualHardDiskByResourceGroup
az stack-hci-vm disk 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 stack-hci-vm disk show
Get the details of a virtual hard disk.
az stack-hci-vm disk show [--ids]
[--name]
[--resource-group]
[--subscription]
Examples
GetVirtualHardDisk
az stack-hci-vm disk show --resource-group "test-rg" --name "test-vhd"
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 hard disk.
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 stack-hci-vm disk update
Update a virtual hard disk.
az stack-hci-vm disk update [--ids]
[--name]
[--resource-group]
[--subscription]
[--tags]
Examples
UpdateVirtualHardDisk
az stack-hci-vm disk update --resource-group "test-rg" --tags additionalProperties="sample" --name "test-vhd"
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 hard disk.
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.
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.
Azure CLI