Attaching NVIDIA GPU devices by using the hcp CLI
You can attach one or more NVIDIA graphics processing unit (GPU) devices to node pools by using the hcp command-line interface (CLI) in a hosted cluster on OpenShift Virtualization.
|
|
Attaching NVIDIA GPU devices to node pools is a Technology Preview feature only. Technology Preview features are not supported with Red Hat production service level agreements (SLAs) and might not be functionally complete. Red Hat does not recommend using them in production. These features provide early access to upcoming product features, enabling customers to test functionality and provide feedback during the development process. For more information about the support scope of Red Hat Technology Preview features, see Technology Preview Features Support Scope. |
-
You have exposed the NVIDIA GPU device as a resource on the node where the GPU device resides. For more information, see NVIDIA GPU Operator with OpenShift Virtualization.
-
You have exposed the NVIDIA GPU device as an extended resource on the node to assign it to node pools.
-
You can attach the GPU device to node pools during cluster creation by running a command similar to the following example:
$ hcp create cluster kubevirt \ --name my-hosted-cluster \ --node-pool-replicas 3 \ --pull-secret /user/name/pullsecret \ --memory 16Gi \ --cores 2 \ --host-device-name="nvidia-a100,count:2"-
--namespecifies the name of your hosted cluster. -
--node-pool-replicasspecifies the worker count. -
--pull-secretspecifies the path to your pull secret. -
--memoryspecifies a value for memory. -
--coresspecifies a value for CPU. -
--host-device-namespecifies the GPU device name and the count. The--host-device-nameargument takes the name of the GPU device from the infrastructure node and an optional count that represents the number of GPU devices you want to attach to each virtual machine (VM) in node pools. The default count is1. For example, if you attach 2 GPU devices to 3 node pool replicas, all 3 VMs in the node pool are attached to the 2 GPU devices.You can use the
--host-device-nameargument multiple times to attach multiple devices of different types.
-