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.
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 upload |
Upload a virtual hard disk using azure managed disk SAS url. |
Extension | GA |
Attach disk to a VM.
az stack-hci-vm disk attach [--disks]
[--ids]
[--name]
[--resource-group]
[--subscription]
[--vm-name]
[--yes]
AttachDisk
az stack-hci-vm disk attach --resource-group "test-rg" --vm-name "test-vm" --disks "disk1" "disk2"
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.
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]
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"
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>
.
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.
Delete a virtual hard disk.
az stack-hci-vm disk delete [--ids]
[--name]
[--polling-interval]
[--resource-group]
[--subscription]
[--yes]
DeleteVirtualHardDisk
az stack-hci-vm disk delete --resource-group "test-rg" --name "test-vhd"
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.
Detach disk from a VM.
az stack-hci-vm disk detach --resource-group
--vm-name
[--name]
[--yes]
DetachDisk
az stack-hci-vm disk detach --resource-group "test-rg" --vm-name "test-vm" --name "test-disk"
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".
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.
List all virtual hard disks.
az stack-hci-vm disk list [--resource-group]
ListVirtualHardDiskByResourceGroup
az stack-hci-vm disk list --resource-group "test-rg"
ListVirtualHardDiskByResourceGroup
az stack-hci-vm disk list
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.
Get the details of a virtual hard disk.
az stack-hci-vm disk show [--ids]
[--name]
[--resource-group]
[--subscription]
GetVirtualHardDisk
az stack-hci-vm disk show --resource-group "test-rg" --name "test-vhd"
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.
Update a virtual hard disk.
az stack-hci-vm disk update [--add]
[--force-string]
[--ids]
[--name]
[--remove]
[--resource-group]
[--set]
[--size-gb]
[--subscription]
[--tags]
UpdateVirtualHardDisk
az stack-hci-vm disk update --resource-group "test-rg" --tags additionalProperties="sample" --name "test-vhd"
Add an object to a list of objects by specifying a path and key value pairs. Example: --add property.listProperty <key=value, string or JSON string>
.
When using 'set' or 'add', preserve string literals instead of attempting to convert to JSON.
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.
Remove a property or an element from a list. Example: --remove property.list <indexToRemove>
OR --remove propertyToRemove
.
Name of resource group. You can configure the default group using az configure --defaults group=<name>
.
Update an object by specifying a property path and value to set. Example: --set property1.property2=<value>
.
Size of the disk in GB.
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.
Upload a virtual hard disk using azure managed disk SAS url.
az stack-hci-vm disk upload [--ids]
[--name]
[--resource-group]
[--subscription]
[--target-url]
PostVirtualHardDisk
az stack-hci-vm disk upload --resource-group "test-rg" --target-url "<sas url insert>"
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
.
SAS Url of azure managed disk.
Usage: --target-url "sas-url".
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.