你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
az stack-hci-vm gpu
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 gpu command. Learn more about extensions.
Manage gpus with stack-hci-vm.
Commands
Name | Description | Type | Status |
---|---|---|---|
az stack-hci-vm gpu attach |
Attach gpu to a VM (preview feature). |
Extension | GA |
az stack-hci-vm gpu detach |
Detach gpu from a VM (preview feature). |
Extension | GA |
az stack-hci-vm gpu attach
Attach gpu to a VM (preview feature).
az stack-hci-vm gpu attach --resource-group
--vm-name
[--gpu-dda-count]
[--gpu-p-count]
[--gpus]
[--yes]
Examples
AttachGPU
az stack-hci-vm gpu attach --resource-group "test-rg" --vm-name "test-vm" --gpus GpuDDA,0 GpuDDA,0
AttachGPUDDAByCount
az stack-hci-vm gpu attach --resource-group "test-rg" --vm-name "test-vm" --gpu-dda-count 2
AttachGPUPByCount
az stack-hci-vm gpu attach --resource-group "test-rg" --vm-name "test-vm" --gpu-p-count 1
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
Number of GPU Discrete Device Assignment devices to be attached. i.e --gpu-dda-count 1.
Usage: --gpu-dda-count 2.
Number of GPU Partition devices to be attached. i.e --gpu-p-count 1.
Usage: --gpu-p-count 1.
Space-separated list of one or more specifications of gpu to be attached. i.e --gpus GpuDDA,0 GpuDDA,0 or --gpus GpuP,4096 GpuP,4096.
Usage: --gpus GpuDDA,0 GpuDDA,0.
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 gpu detach
Detach gpu from a VM (preview feature).
az stack-hci-vm gpu detach --resource-group
--vm-name
[--gpu]
[--yes]
Examples
DetachGPU
az stack-hci-vm gpu detach --resource-group "test-rg" --vm-name "test-vm" --gpu "GpuDDA,0"
DetachGPUWithoutSpecifyingGPU
az stack-hci-vm gpu detach --resource-group "test-rg" --vm-name "test-vm"
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
Space-separated list of zero or one specification of gpu to be deattached. i.e --gpu GpuDDA,0.
Usage: --gpu GpuDDA,0.
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.