It’s possible to get Proxmox to passthrough a Serial number for the HDD but it’s a right Pain in the rear to do.
see http://bos-info.com/freebsd/hhd-serial-number-proxmox.html
-
Add the drives to the VM as usual
-
run qm showcmd XXX (Where XXX is the vm id)
Copy the command to notepad.etc, find the lines that deal with the drives e.g
-drive file=/dev/disk/by-id/scsi-SATA-MYDRIVE-SN,if=none,id=drive-virtio1,cache=writethrough,aio=threads,detect-zeroes=on -device virtio-blk-pci,drive=drive-virtio1,id=virtio1,bus=pci.0,addr=0xb
(Yours will be a file if you’ve not passed through a drive)
Copy them.
Edit the config file for the container and comment out the lines relating to your virtual HDD with a #
add the line
args: -drive file=/dev/disk/by-id/scsi-SATA-MYDRIVE-SN,if=none,id=drive-virtio1,cache=writethrough,aio=threads,detect-zeroes=on,serial=MYSERIAL -device virtio-blk-pci,drive=drive-virtio1,id=virtio1,bus=pci.0,addr=0xb