VFIO / Passthrough - Reading guest Nvidia GPU temperature values from host

I’m a bit of a data nerd. Combine that with custom PCs, Linux, Windows VMs, GPU passthrough, and it makes for some interesting data problems. One such problem is that since my system is water-cooled and I might want to make fan/pump speed decisions based on the GPU that’s passed through to my Windows VM, the temperature data for the guest GPU isn’t directly accessible from the host OS.

So I did a little digging and wrote a script for that: Reading an Nvidia GPU temperature value from a libvirt Windows guest · GitHub

This quick-and-dirty script requires the Qemu Guest Agent to be installed on the Windows guest, as well as the appropriate agent channel to be configured in the libvirt guest XML definition.

Now that I’ve got an easy way to read the temperature value, I need to find a tool that can periodically read this value and make decisions. The issue here is that almost all of the Linux-oriented control applications for fans/pumps depend solely on hwmon drivers for their temperature values. Any thoughts as to how I might integrate with these tools?

2 Likes