Share via


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

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--vm-name

The name of the virtual machine.

Usage: --vm-name "test-vm".

Optional Parameters

--gpu-dda-count

Number of GPU Discrete Device Assignment devices to be attached. i.e --gpu-dda-count 1.

Usage: --gpu-dda-count 2.

--gpu-p-count

Number of GPU Partition devices to be attached. i.e --gpu-p-count 1.

Usage: --gpu-p-count 1.

--gpus

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.

--yes -y

Do not prompt for confirmation.

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

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

--resource-group -g

Name of resource group. You can configure the default group using az configure --defaults group=<name>.

--vm-name

The name of the virtual machine.

Usage: --vm-name "test-vm".

Optional Parameters

--gpu

Space-separated list of zero or one specification of gpu to be deattached. i.e --gpu GpuDDA,0.

Usage: --gpu GpuDDA,0.

--yes -y

Do not prompt for confirmation.

Default value: False
Global Parameters
--debug

Increase logging verbosity to show all debug logs.

--help -h

Show this help message and exit.

--only-show-errors

Only show errors, suppressing warnings.

--output -o

Output format.

Accepted values: json, jsonc, none, table, tsv, yaml, yamlc
Default value: json
--query

JMESPath query string. See http://jmespath.org/ for more information and examples.

--subscription

Name or ID of subscription. You can configure the default subscription using az account set -s NAME_OR_ID.

--verbose

Increase logging verbosity. Use --debug for full debug logs.