Setting up nVidia passthrough 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.
We are installing the driver for the guest OS. For this it is necessary:
Disable OS boot with GUI:
sudo init 3
Install driver:
sudo sh ./driver.run
Check if the video card is detected:
nvidia-smi
Reboot the OS.
The nvidia control panel is called by the nvidia-settings command.