Virtual machine 3d acceleration

Hello everyone, I am in a while without using LXD, I would like to know if it is already possible to use Virgl for 3D acceleration in VMs, Ex:
“-Vga Virtio -Display SDL, GL = ON”
Another question is, was any way to edit the virtual machine configurations?
Thank you in advance, and I am waiting for the response.

How to override QEMU configuration - LXD documentation covers some of the ways to modify the QEMU configuration.

For 3D acceleration / virgl. It’s currently not supported. That’s primarily because LXD is designed to always run over the network even for local use. Last I checked virgl effectively made the assumption that the VM is running on the same system it’s being accessed from, therefore allowing the guest to use the GPU to directly render to an area of the screen.

This isn’t something that’s true with LXD. The extent of 3D acceleration we should be able to do is have the guest access the rendering engine of the host GPU but with the output still being fully handled within QEMU through SPICE.

I’ve not had much luck setting up something like that in the past but maybe things got better by now.

One of the other issues we’ll be running into is that LXD normally runs under confinement. LXD doesn’t have access to the libraries of its host system and so would need to include its own copy of mesa and related nvidia/amd/intel graphics libraries. This can become even trickier if the version of those doesn’t match those on the host.

Thanks for the reply, it really seems that at the moment having 3d acceleration on vms will bring more problems than benefits.
In my case, as I use Lxd on my desktop, I ended up configuring a container with qemu to virtualize some systems that I need 3d acceleration, and everything is working perfectly.