Get Virtualizor

GPU Passthrough

What is GPU passthrough?

GPU passthrough is a technique that allows a virtual machine to have exclusive access to a physical GPU (Graphics Processing Unit) installed on the host machine.

In traditional virtualization, the host machine shares its resources with the guest virtual machines, which can lead to performance degradation, especially when running GPU-intensive applications such as gaming, video editing, or machine learning. With GPU passthrough, the virtual machine can access the physical GPU directly, bypassing the host's software stack and driver overheads, resulting in near-native GPU performance within the virtual machine.

At a time single GPU Passthrough is supported.

Supported Virtualization for Gpu Passthrough
At the moment gpu passthrough is supported for following virtualization
 - KVM
GPU Passthrough is currently in beta.
Currently GPU Passthrough is tested on windows vps (uefi enabled both on vps and node) on host node of Almalinux (Intel) with GPU Nvidia GT 730.
Only one VPS can use GPU at a time.

Add GPU device In Panel

Before adding gpu device in virtualizor admin panel
You to need configure things on node, virtualizor will not be responsible for 
configuring the gpu device on node.
Run the following script it will guide you how to configure things on node.
/usr/local/emps/bin/php /usr/local/virtualizor/scripts/passthrough_config.php


List Passthrough devices

All passthrough devices added in admin panel will displayed here
Passthrough devices can be activated/deactivated/deleted


Edit passthrough

In Edit Passthrough Device
Custom name can be changed
Description can be changed
You can enable gpu and choose vga bios rom
The vga bios rom wiil be listed here if stored in /usr/share
The folder can be changed by setting $globals['vgabios_path'] = 'Path to directory' in globals.php
Not all vga devices require vga bios 
Some of vga device require vga bios to work properly 
For that you need to dump the vga bois the steps to dump the bois are in the above script
mentioned here.


Assign Passthrough device to vps

Passthrough device can be attached to vps from Addvs/Managevps page
Passthrough option is in advanced options
By default you need to choose all the devices under that particular iommu group
But some time you do not need some of devices like there pci bridge is also under
Iommu group so you can ignore it no need to assign it otherwise vps will fail to start
(In case of GPU Passthrough).

    Was this page helpful?
    Newsletter Subscription
    Subscribing you to the mailing list