Ok, so long story been following the many guides of how to use GPU paravirtualization may work under hyper-V VM with a debian Guest, so I’ve followed the most comprehensive guide i could find so far … basically in nutshell you are building dxgkrnl module putting on your debian guest, and copying gpu and cuda drivers and libraries from working WSL2 installation you would create on your host. Guide is here
All that aside when I run nvidia-smi binary on my debian guest VM , i get the following error "Failed to initilaize NVML: GPU access blocked by the operating system
So, investigating further
I ran ltrace on nvidia-smi , and followed the function calls
dlopen(“libnvidia-ml.so.1”,2) = 0x354139d0 — returned pointer to handle for the shared library 0x…
dlsym(0x354139d0, “nvmlInitWithFlags”) = 0x7ff983626920
-- read the nvidia cuda apis and this call would have be the gpu management initialization with a function nvmlInitWithFlags, I guess this call is throwign back the error because the very next line in the trace is
vsprintf(“Failed to initialize NVML: GPU a” …, 1024, “Failed to initialize NVML: %s\n”, 0x7ffc74cdd378) = 70
so for sure the nvmlInitWithFlags function call seemed to error out, now the question is why?
I notice that /usr;/lib/wsl/lib contains libnvidia-ml.so.1 and so does /usr/lib/wsl/drivers … and the nvidia-smi binary is located in /usr/lib/wsl/lib … so it’s so it may be opening /usr/lib/wsl/lib/libnvidia-ml.so.1, and my question is wouldn’t it need the gpu management driver /usr/lib/wsl/drivers … ??? What’s the difference between the two libnvidia-ml.so.1 shared libraries ??
Any ideas would be appreciated? As I don’t think it’s accessing the driver, or the driver is really being blocked by the hyper-v debian VM? Can’t access the kernel , or some reource s… who knows anyway to get a debug version of nvidia-smi?