mbilker / vgpu_unlock-rs

Unlock vGPU functionality for consumer grade GPUs
MIT License
456 stars 53 forks source link

Add [vm.<id>] section as syntactic sugar for proxmox users #27

Closed polloloco closed 1 year ago

polloloco commented 1 year ago

This pull request improves the user experience for proxmox users by allowing to specify per-VM overrides using a new [vm.<id>] section. The usual way to do per-VM overrides was by creating a section like this (in the example for the VM with id 100):

[mdev.00000000-0000-0000-0000-000000000100]
frl_enabled = 0

Many users had problems with the long uuid string, and now they can do this instead (again, for a VM with the id 100):

[vm.100]
frl_enabled = 0

Now, proxmox users don't have to bother with any uuids anymore :)

abraha2d commented 1 year ago

When using this, I'm getting errors like

Jan 15 17:05:19 pve nvidia-vgpu-mgr[477123]: Failed to decode config: invalid type: string "202", expected u64 for key `vm` at line 11 column 1
Jan 15 17:05:19 pve nvidia-vgpu-mgr[477123]: Failed to apply profile override

My profile_override.toml, for reference:

[profile.nvidia-259]
num_displays = 1
display_width = 1920
display_height = 1200
max_pixels = 2304000
cuda_enabled = 1
#frl_enabled = 1
#framebuffer = 0x74000000
#framebuffer_reservation = 0xC000000

[vm.202]
#frl_enabled = 0
pci_device_id = 0x1E30
pci_id = 0x1E3012BA

Not sure why it's trying to parse 202 as a string instead of a number... unless table keys are always assumed to be strings?

polloloco commented 1 year ago

@abraha2d I just fixed it in https://github.com/mbilker/vgpu_unlock-rs/pull/28