After you create and boot a VM in your vSphere with Tanzu environment, install the NVIDIA vGPU graphics driver in the VM to fully enable GPU operation.
Prerequisites
- Create a VM with NVIDIA vGPU device. The VM must reference the VM class that includes a vGPU definition. See Add PCI Devices to a VM Class in vSphere with Tanzu.
- Verify that you downloaded the vGPU software package from the NVIDIA download site, uncompressed the package, and have the guest drive component ready. For information, see appropriate NVIDIA Virtual GPU Software documentation.
Procedure
- Copy the NVIDIA vGPU software Linux driver package, for example NVIDIA-Linux-x86_64-version-grid.run, to the guest VM.
- Before attempting to run the driver installer, terminate all applications.
- Start the NVIDIA vGPU driver installer.
sudo ./NVIDIA-Linux-x86_64-version-grid.run
- Accept the NVIDIA software license agreement and select Yes to update the X configuration settings automatically.
- Verify that the driver has been installed.
For example,
~$ nvidia-smi
Wed May 19 22:15:04 2021
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 460.63 Driver Version: 460.63 CUDA Version: 11.2 |
|-------------------------------+----------------------+----------------------+
| GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|===============================+======================+======================|
| 0 GRID V100-4Q On | 00000000:02:00.0 Off | N/A|
| N/AN/AP0 N/A/ N/A| 304MiB / 4096MiB | 0% Default |
| | | N/A|
+-------------------------------+----------------------+----------------------+
+-----------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=============================================================================|
| No running processes found |
+-----------------------------------------------------------------------------+