How-to configure and licence a provisioned vGPU

How-to configure and licence a provisioned vGPU

Overview

This guide covers configuring and licensing an NVIDIA vGPU on a virtual machine in the ITS Private Cloud, after the vGPU profile has already been attached. By the end, your VM will have the NVIDIA guest driver installed, a valid license acquired from the on-premise license server, and a working GPU verified with nvidia-smi.

The guide covers both Windows and Linux guests. Use the section that matches your VM's operating system. After completing this guide, the VM is ready for GPU workloads.


Prerequisites

This guide assumes:

  • The VM already has a vGPU profile attached. If it doesn't, see:

  • Administrator access to the guest OS (Administrator on Windows, sudo or root on Linux).

  • Internet access from the VM to download the NVIDIA driver from eis.utoronto.ca.

  • The VM can reach the on-premise license server at vss-nvidia-ls.eis.utoronto.ca.


Windows

Step 1 — Download the NVIDIA Guest Driver

Open cmd prompt as administrator and download the NVIDIA AI Enterprise guest driver

curl -O https://eis.utoronto.ca/ut-vss-lib/nvidia/nvidia-ai-enterprise-8.0-580.105.06-580.105.08-581.80/Guest_Drivers/581.80_grid_win10_win11_server2022_dch_64bit_international.exe

Step 2 — Install the driver

Run the driver .exe

581.80_grid_win10_win11_server2022_dch_64bit_international.exe

Follow the prompts. For a silent install, add -s -clean.

Verify

nvidia-smi

Step 3 — Retrieve and install the license token

powershell -Command "$t = cmd /c '\"C:\Program Files\VMware\VMware Tools\vmtoolsd.exe\" --cmd \"info-get guestinfo.ut.vss.nvidia_token\"'; [IO.File]::WriteAllText('C:\Program Files\NVIDIA Corporation\vGPU Licensing\ClientConfigToken\client_configuration_token.tok', $t, [Text.Encoding]::ASCII)"

⚠️ Use PowerShell, not a cmd > redirect. cmd appends a CRLF, which corrupts the JWT signature and causes the daemon to reject the token (Invalid client configuration token - signature validation failed).

verify

dir "C:\Program Files\NVIDIA Corporation\vGPU Licensing\ClientConfigToken\"

Step 4 — Restart services

Stop the NVDisplay service

net stop "NVDisplay.ContainerLocalSystem"

Start the NVDisplay service

net start "NVDisplay.ContainerLocalSystem"

The virtual machine will check-in with our on-premise license server and activate any requested feature.

⚠️ Wait at least 10 seconds before verifying. The daemon needs time to contact the license server.

Step 5 — Verify the license

nvidia-smi -q | findstr /i license

Step 6 (Optional) — Release the NVIDIA license and decommission the VM

Delete the token

del "C:\Program Files\NVIDIA Corporation\vGPU Licensing\ClientConfigToken\*.tok"

Stop the NVDisplay service

net stop "NVDisplay.ContainerLocalSystem"

Start the NVDisplay service

net start "NVDisplay.ContainerLocalSystem"

Verify

nvidia-smi -q | findstr /i license

Power off the vm

vss-cli --wait compute vm set {vm-id-or-name} state off

Decommission the vm by deleting it

vss-cli compute vm rm {vm-id-or-name}

⚠️ vm rm permanently deletes the VM and its disks.

 

 


 

Linux

Step 1 — Download the NVIDIA Guest Driver

Download the NVIDIA AI Enterprise guest driver

Debian

curl -O https://eis.utoronto.ca/ut-vss-lib/nvidia/nvidia-ai-enterprise-8.0-580.105.06-580.105.08-581.80/Guest_Drivers/nvidia-linux-grid-580_580.105.08_amd64.deb

Fedora

curl -O https://eis.utoronto.ca/ut-vss-lib/nvidia/nvidia-ai-enterprise-8.0-580.105.06-580.105.08-581.80/Guest_Drivers/nvidia-linux-grid-580-580.105.08-1.x86_64.rpm

 

Step 2 — Install the NVIDIA Guest Driver

Install DKMS (Dynamic Kernel Module Support)

Debian

sudo apt install -y dkms

Fedora

sudo dnf install epel-release sudo dnf install kernel-devel dkms

Install the NVIDIA driver package

Debian

sudo dpkg -i nvidia-linux-grid-580_580.105.08_amd64.deb

Fedora

sudo dnf install -y ./nvidia-linux-grid-580-580.105.08-1.x86_64.rpm

Step 3 — Configure vGPU Licensing

Edit the NVIDIA gridd configuration file:

sudo nano /etc/nvidia/gridd.conf

Select the FeatureType value based on your workload (I chose 4 as I plan to use the vm for an ML workload):

Value

Feature

Description

Value

Feature

Description

0

Unlicensed

Unlicensed state

1

NVIDIA vGPU

Optional, autodetected as per vGPU type

2

RTX Virtual Workstation

NVIDIA RTX Virtual Workstation (default)

4

Virtual Compute Server

Recommended for AI/ML workloads

Add or update the following line in gridd.conf:

FeatureType=4

Step 4 — Install the License Token

⚠️Note: Run Step 4 as root

sudo -i

Retrieve the license token from VMware guest info and write it to the token directory

echo -n -e $(vmware-rpctool "info-get guestinfo.ut.vss.nvidia_token") \ > /etc/nvidia/ClientConfigToken/client_configuration_token_12-05-2023-11-26-05.tok

Set correct permissions

chmod 744 /etc/nvidia/ClientConfigToken/client_configuration_token_12-05-2023-11-26-05.tok

Exit root

exit

ℹ️ Note: The token is retrieved automatically from VMware guestinfo properties injected at provisioning time.


Step 5 — Verify the License

Restart nvidia-gridd

systemctl restart nvidia-gridd

Verify GPU is visible

nvidia-smi

Check license status

nvidia-smi -q | grep -i license

If needed you can monitor gridd logs

journalctl -u nvidia-gridd -f

Step 6 (Optional) - Release the NVIDIA license and decommission the VM

Stop the nvidia-gridd service

systemctl stop nvidia-gridd

Confirm the license has been released

nvidia-smi -q | grep -i licensed

From your vss-cli terminal window, power off the VM

vss-cli --wait compute vm set {vm-id-or-name} state off

Decommission the vm by deleting it

vss-cli compute vm rm {vm-id-or-name}

⚠️ vm rm permanently deletes the VM and its disks.

 

References

University of Toronto - Since 1827