Gpu passtrough contianers and vms

Hi all,

I have a question regarding gpu passtrough. Is it possible to do a gpu passtrought to multiple vm and or containers if you only have on graphics card?

No. Containers can share the host GPU, VMs cannot.

Some consumer GPUs (Intel) have some amount of support for GPU virtualization which can handle some limited cases, but on the AMD/NVIDIA side of things, you need datacenter grade GPUs and expensive licenses for that.

Thanks for your reply,

So short answer. containers can and vm can not with normal gpus

QEMU is an emulator and virtualization platform. In the case of Incus, QEMU is used for the emulator part, while KVM is used for the virtualization (in hardware, not software virtualization).

QEMU, as an emulator, emulates devices for the VMs. The emulated GPU device that is provided by QEMU is not that bad. Read some background here.

hi,

thank you for the info.

One more question. is it possible to install older versions of windows as a vm inside incus.
Windows xp or windows 95? from iso.

distrobuilder helps you repack the Windows ISO so that it is easier to use within Incus. Currently it can perform this with recent versions of Windows. @FoxtrotCZ figured out the steps to install a Windows ISO into Incus without repacking it. You may follow those instructions to boot older versions of Windows in an Incus VM.

Let me just add some more useful info.

Distrobuilder currently supports these Windows versions: "w11", "w10", "w8", "w7", "2k19", "2k12", "2k16", "2k22", "2k3", "2k8", "xp", "2k12r2", "2k8r2", "w8.1"
Source.

This is because virtio drivers are available for those versions and distrobuilder adds them inside the installer ISO.
The most important driver is vioscsi because Incus uses virtio-scsi device for main drive and disks. But I dont see vioscsi for XP in Virtio drivers ISO. So maybe it’s possible to also use version for newer Windows? I dont know, that would need to be tested.

There is also viostor driver. This one is available for XP in Virtio ISO. If I am not wrong viostor is driver for virtio-blk device. So maybe using this device instead of virtio-scsi would allow using viostor driver. See Incus docs.

I dont see any virtio drivers available for Windows 95. So if newer ones dont work, that would mean you have to use non-virtio devices to be able to run it. And I dont know how to do it other than directly configuring QEMU.

1 Like