Setting up nVidia vGPU for instance on Astra-Linux 1.7¶
- Configuring the vGPU operating mode on the host OS.
- We start the instance with vGPU forwarding on the corresponding host.
Further, all actions are performed on instance:
Add kernel options to enable
iommu
support and disablenouveau
driver loading.Add to
/etc/default/grub
:GRUB_CMDLINE_LINUX_DEFAULT="quiet splash intel_iommu=on vfio_iommu_type1.allow_unsafe_interrupts=1 iommu=pt modprobe.blacklist=nouveau"
Update
grub
:update-grub2
Add to blacklist the
nouveau
driver:blacklist nouveau options nouveau modeset=0
Create a configuration file
/etc/modprobe.d/blacklist-nouveau.conf
.Add to file:
blacklist nouveau blacklist nvidiafb options nouveau modeset=0
Add to the file
/etc/modules
loading kernel modules:pci_stub vfio vfio_iommu_type1 vfio-pci vfio_pci kvm kvm_intel
Collecting:
sudo update-initramfs -u
Reboot the system.
Installing the dkms package:
apt-get install dkms
We install the driver for the guest OS.
Disable OS boot with graphical shell:
sudo init 3
Installing the driver:
dpkg --install driver.deb
Note
The driver version is selected according to the driver version installed on the Host OS. More information can be found https://docs.nvidia.com/grid/. There you can also find a description of installing the driver in the
.run
format.Reboot the OS.
We check that the driver is installed and sees the vGPU profile of the video card:
nvidia-smi
We configure the receipt of licenses.
In the file
/etc/nvidia/grid.conf
specify the values:FeatureType=1 ServerAddress=IP license server ServerPort= server port (default 7070)
Restarting services:
systemctl restart nvidia-gridd.service
Checking that the instance has received a license:
nvidia-smi -q
The nvidia control panel is invoked with the
nvidia-settings
command.