12 hours ago12 hr Hi everyone,I’m releasing the first public version of Unraid VSOCK Sensors, a plugin that exports disk and HBA temperatures from an Unraid VM to its Proxmox host using AF_VSOCK.GitHub:GitHubGitHub - milouz1985/unraid-vsock-sensorsContribute to milouz1985/unraid-vsock-sensors development by creating an account on GitHub.What does it do?The plugin runs a small server inside the Unraid VM. A companion service installed on the Proxmox host retrieves the sensor data through VSOCK and exposes it as standard Linux hwmon devices.The temperatures can then be used by tools such as:lm-sensorsCoolerControlfancontrolfan2gocustom monitoring scriptsOn the Proxmox host, the sensors appear as:unraid_storage: individual disk temperatures and maximum temperatures by categoryunraid_hba: HBA controller temperatures, when HBA monitoring is enabledThe storage device includes one channel per internal disk. It can also expose maximum temperature channels for HDDs, SATA SSDs and NVMe SSDs.Why VSOCK?My previous solution used the Unraid web API. It worked, but I wanted something more direct and better suited to communication between a VM and its host.AF_VSOCK provides a dedicated communication channel between the Unraid guest and the Proxmox host:no IP address or virtual network configuration is required;it does not depend on the Unraid web interface or its authentication API;the sensor service is not exposed on the LAN;communication still works independently of the VM’s network configuration;the protocol is small and dedicated to this specific use case.VSOCK also makes the architecture clearer: Unraid remains responsible for collecting its hardware information, while Proxmox only consumes the resulting sensor data.Disk spin-down supportThe plugin reads disk temperatures directly from Unraid’s existing /var/local/emhttp/disks.ini temperature cache. It does not run smartctl to collect disk temperatures.Therefore, querying the plugin does not wake up sleeping disks.A spun-down disk remains in the inventory, but its temperature is reported according to Unraid’s cached state. The Proxmox hwmon integration also includes failsafe handling when readings are unavailable or communication is interrupted.HBA monitoringTwo HBA backends are currently available:native /dev/mpt3ctl access for controllers using the mpt3sas driver;StorCLI, when installed separately.The native mpt3ctl backend communicates directly with the Linux mpt3sas driver.Its implementation is based on the upstream Linux kernel ABI, structures andreference code, including the mpt3sas control interface and its hwmon support.The long-term goal is for HBA monitoring to rely exclusively on interfaces andcode provided by the Linux kernel, without requiring any proprietaryuser-space utility.RequirementsUnraid running as a QEMU/KVM VM on Proxmox;a vhost-vsock-pci device added to the VM;the Unraid plugin installed inside the VM;the companion Debian package installed on the Proxmox host;Proxmox kernel headers for the virt-temp DKMS module.Basic installationAdd a VSOCK device to the Unraid VM configuration:args: -device vhost-vsock-pci,guest-cid=3If the VM already has an args line, append the device to the existing line.The VM must be fully stopped and started after this change.add plg url in unraid: https://raw.githubusercontent.com/milouz1985/unraid-vsock-sensors/refs/heads/main/unraid-plugin/unraid-vsock-sensors.plgInstall the companion .deb package on the Proxmox host.The complete installation and configuration instructions are available in the GitHub README.Current statusThe project is functional on my own setup, but this is its first public release. I hope this will be useful to others running Unraid as a VM and wanting to control host-side cooling using the actual storage temperatures.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.