Issues with NixOS VM in Proxmox, qemu guest agent hangs on backups and drives are not detected as NVME

I’m have some issues running NixOS (24.11) inside Proxmox, is anyone else seeing the same behaviour?

  1. qemu-guest-agent enabled snapshot backups fail. The guest agent issues fs-freeze to NixOS, but then crashes, the backup never actually starts or completes, and to unhang the VM I have to reboot the node.
    Therefore I have to use suspend backup which takes longer.
  2. NixOS refuses to see the virtio-scsi-single drives as as TRIM-capable NVME. This balloons the size of the disk on the store to its maximum size eventually and backups have to read the entire thing to detect which parts are sparse, making backups take even longer.

The end result of which is that a VM backup that should take around 10 seconds takes several minutes as proxmox reads the whole disk, during which all services on the VM are unavailable as the VM is suspended.

I have no idea what could be causing either of these issues.

I have never seen the like in any other distribution I have tried as a guest, so I wouldn’t even know where to start.

Everything else I’ve tried on this node - Debian-based, Fedora-based, etc - doesn’t have the guest agent crash and doesn’t stubbornly keep seeing the Virtio drives as spinning rust despite the sdd emulation and discard flags being enabled on the proxmox side.

I’ve searched but nobody else has reported this?