Technical

Failed to query local AF_VSOCK CID: Fix Proxmox VE vsock for TrueNAS

Failed to query local AF_VSOCK CID: Fix Proxmox VE vsock for TrueNAS

Failed to query local AF_VSOCK CID means the vsock module isn’t loaded or the device node is missing. Load vhost_vsock, set the CID, and it works.

Detailed view of a liquid cooling system inside a desktop computer.

What is AF_VSOCK and why does Proxmox need it?

AF_VSOCK is the socket family for VM↔host communication without a network. Proxmox uses it for guest agent features, and TrueNAS VMs sometimes rely on it for virtio-vsock. If the module isn’t loaded, QEMU can’t get the local CID and throws that error.

Vibrant close-up of a USB cable against a purple gradient background.

The fix

First check if the module is loaded:

lsmod | grep vsock

If nothing shows up, load it:

modprobe vhost_vsock

Then make it persistent:

echo vhost_vsock >> /etc/modules

Now check the device node exists:

ls -l /dev/vhost-vsock

If it’s missing, create it:

mknod /dev/vhost-vsock c 10 241

Then set the CID in the VM config. For a TrueNAS VM, add this line to /etc/pve/qemu-server/<vmid>.conf:

args: -device vhost-vsock-pci,guest-cid=3

Replace 3 with a unique CID. Restart the VM and the error should be gone.

My take

This is a dumb default. Proxmox should load vhost_vsock automatically if a VM has a vsock device configured. Instead you get a cryptic error and a forum thread with no answer. I’d rather have it just work.

If you’re messing with TrueNAS on Proxmox, check out IPv6 on ISCSI and Proxmox 8: Setup iSCSI over IPv6 with TrueNAS for another TrueNAS gotcha.

Leave a comment

Comments are reviewed before they appear. Your email is never published.