Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Are nVidia virtual gpus supported under Ubuntu 24.04? #2119

Closed
gmiranda opened this issue Nov 20, 2024 · 2 comments
Closed

Are nVidia virtual gpus supported under Ubuntu 24.04? #2119

gmiranda opened this issue Nov 20, 2024 · 2 comments
Assignees

Comments

@gmiranda
Copy link
Contributor

Under Ubuntu Server 24.04, with a Lovelace GPU (L4) and driver package NVIDIA-AI-Enterprise-Ubuntu-KVM-550.127.06-550.127.05-553.24.zip, the virtual gpus are no longer mediated devices, but full blown PCIe devices that must be unmanaged, according to the documentation:

A vGPU is supported only in unmanaged libvirt mode. Therefore, ensure that in the hostdev element, the managed attribute is set to no.
(source: note at the end of chapter 2.10.4.1, GRID vGPU User Guide)

I've added a virtual GPU as a host device in Ravada, a PCI one, but when assign it to a virtual machine, it is added with the managed attribute set to yes instead of no.

I don't see any way to override this, as the device gets added to the virtual machine XML on the domain's creation and thus I can't edit whilst running.

Is there any way around this?

@frankiejol frankiejol self-assigned this Nov 20, 2024
@frankiejol
Copy link
Member

In future releases we may add a way to tweak the settings of the host devices.
Currently you can change the managed attribute changing the template in the database.

First check what is the host device id you want to change:
mysql> select id,name FROM host_devices;

+----+---------------+
| id | name          |
+----+---------------+
|  3 | PCI 1         |

Then list the templates this host device is using. In your case there should be two:
mysql> select id,template from host_device_templates where id_host_device=3;

One of the templates should contain the managed attribute ( I only show part of the text). The important part of this output is the "id" in the first column:

+----+---------------+
| id | template
+----+---------------+
|  5 | <hostdev mode='subsystem' type='pci' managed='yes'>
                <driver name='vfio'/>
...

Now we want to turn this to managed='no' , do it like this, knowing this was id=5:

mysql> update host_device_templates set template=REPLACE(template,"managed='yes'","managed='no'") WHERE id=5

@gmiranda
Copy link
Contributor Author

Looks like it's working, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants