Proxmox Serial Number passthrough

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

  1. Add the drives to the VM as usual

  2. 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

1 Like