Installing the Linux vGPU driver and configuring the licensing token
After completing this instruction, the vGPU driver will be installed and the licensing token will be configured.
The vGPU driver does not support updates. To change its version, first remove it, and then install it again by repeating the steps in this instruction.
-
Check your VM's configuration type:
- Go to your VK Cloud personal account.
- Go to Cloud Computing → Virtual Machines.
- In the list, find the VM for which you need to install the vGPU driver. Make sure the Type column shows a vGPU configuration flavor.
-
Connect the VM to an external network if you haven't done so already.
-
Connect to the VM with vGPU.
-
Check whether the vGPU driver is installed:
nvidia-smi --query-gpu=driver_version,virtualization.mode,virtualization.virtualized,name --format=csv,noheaderThe following results are possible:
- A
No such file or directoryerror means the driver is not installed. - The command output shows a driver version, and the virtualization type is shown as vGPU. This means the driver is already installed and the NVIDIA stack was initialized successfully. No further action is required.
nvidia-smiruns, but the output shows a... couldn't communicate with the NVIDIA drivererror. This means the driver is damaged or an incorrect version is used (for example, for dedicated GPUs). You need to reinstall the driver: first remove it, then install it again by repeating the steps in this instruction.
- A
-
Prepare the OS:
Ubuntu/DebianRed Hat Enterprise Linux-
(Optional) Update the system components and reboot the VM to avoid compatibility issues.
Run the commands:
sudo apt update &&sudo apt upgrade -y &&sudo reboot -
Install the additional packages required to install the driver:
sudo apt install -y build-essential dkms perl pkg-config libelf-dev linux-headers-$(uname -r)
-
-
Download the NVIDIA® GRID driver using one of the following methods:
wgetcurlwget https://hub.mcs.mail.ru/repository/gpu-drivers-raw/bin/nvidia/guest-drivers/latest/vgpu_driver_linux.run -
Grant execute permission to the downloaded file:
chmod +x vgpu_driver_linux.run -
Run the file and follow the installer's instructions:
sudo ./vgpu_driver_linux.run -
Reboot the VM.
-
Download the licensing script using one of the following methods:
wgetcurlwget https://hub.mcs.mail.ru/repository/gpu-drivers-raw/bin/nvidia/nvidia-token-fetcher/latest/nvidia_token_fetcher -
Grant execute permission to the script:
chmod +x nvidia_token_fetcher -
Run the script:
sudo ./nvidia_token_fetcher -
Check the licensing configuration:
-
Make sure the licensing token file exists:
sudo ls /etc/nvidia/ClientConfigToken/ -
Check the license status:
nvidia-smi -q | grep -i licenseOutput for a correctly configured license:
vGPU Software Licensed ProductLicense Status: Licensed
-
-
(Optional) Configure automatic licensing token verification at system startup.
If the VM was created from a prepared OpenStack image, automation can be configured using cloud-init. You can also use systemd.
cloud-init integrationCreating a systemd unit fileCopy the script file to a dedicated directory:
sudo cp nvidia_token_fetcher /var/lib/cloud/scripts/per-boot/