However, I get the Unable to load the ‘nvidia-drm’ kernel module error. I tried to see if Secure Boot was enabled, but the command sudo mokutil --sb-state returned EFI variables are not supported on this system.
You might be running the VM on a vgpu setup so you need the grid driver instead of the normal graphics driver.
[ 316.204123] NVRM: The NVIDIA GPU 0000:00:05.0 (PCI ID: 10de:1db6)
NVRM: installed in this system is not supported by the
NVRM: NVIDIA 510.54 driver release.
NVRM: Please see 'Appendix A - Supported NVIDIA GPU Products'
NVRM: in this release's README, available on the operating system
NVRM: specific graphics driver download page at www.nvidia.com.
[ 10.858310] NVRM: GPU 0000:00:05.0: RmInitAdapter failed! (0x22:0x6a:667)
[ 10.859211] NVRM: GPU 0000:00:05.0: rm_init_adapter failed, device minor number 0
I don’t know if the grid drivers are the correct choice but there seems to be a problem with the underlying host. Without knowing anything about it, it’s impossible to debug.