Custom OS Template for GPU Passthrough

To get your custom template ready for GPU support, just follow the steps below.

Keep in mind, there are two main scenarios for GPU passthrough:

While the Machine Learning case is simpler (since the display doesn't need to use the GPU), we'll walk through the full process to cover both situations.

Compatible GPUs

If you're running DaDesktop on your own hardware, or asking to buy specific cards for your private server, here are a few things to think about.

We mainly test the DaDesktop system with AMD Radeon RX 6000 series cards (especially the RX 6400) and Nvidia RTX cards. Generally, models released before 2018 won't be supported.

Also, integrated GPUs on Ryzen 7/9 and Intel iGPUs should work fine, but we don't run automated tests on those.

DD Node Side

The dadesktop_npnode_deploy/modules/build-os-template folder includes scripts that modify a Linux guest to use the GPU as the primary display, and to switch between GPU-accelerated machines and CPU-rendered screens.

Guest Settings

Make sure that "support_qemu" in /var/lib/kvm/templatename/sysinfo.json is set to false. This lets you connect via VNC inside the guest, because qemu VNC can't display the passthrough GPU screen.

Testing

Method 1: 
vblank_mode=0 glxgears

Method 2:

/apps/dd-guest/check-gpu

Windows Guest Settings When No Physical Monitor Is Connected (Most Cases)

We use IddSampleDriver to create a display adapter and virtual monitor in the Windows 10 template. Just install it if your GPU doesn't have a monitor plugged in.

Open "Device Manager" → "Display Adapters" → "IddSampleDriver Device": right-click it and enable the device. (You can disable the device when you're not using the virtual display.)

It'll run slowly, and you can select "Disconnect this display" if that choice is available.

(Pick Display x, then under the "Multiple displays" area, use the dropdown menu and select the Disconnect this display option.)

You can also hit "Disconnect this display" if the option shows up.