Identify Disk
find /dev/disk/by-id/ -type l|xargs -I{} ls -l {}|grep -v -E '[0-9]$' |sort -k11|cut -d' ' -f9,10,11,12
might output something like this
/dev/disk/by-id/ata-ST1800XXXXXXX-XXXXXX_XXXXXXXX -> ../../sda
/dev/disk/by-id/wwn-0x1234567891234567 -> ../../sda
/dev/disk/by-id/ata-ST1800XXXXXXX-XXXXXX_XXXXXXXY -> ../../sdb
/dev/disk/by-id/wwn-0x1234567891234568 -> ../../sdb
you want to use the /dev/disk/by-id/*
to mount the drive to the VM as /dev/sdb
could change
Use lshw -class disk -class storage
to get more info’s about the drives
Mount the drives
qm set 592 -scsi2 /dev/disk/by-id/ata-ST1800XXXXXXX-XXXXXX_XXXXXXXX
Replace 592
with your actual VM ID
Also make sure to use a different scsi
number each time eg. -scsi3
, -scsi4
, …
you can check your config at /etc/pve/qemu-server/<vm id>.conf
Unmount
qm unlink 592 --idlist scsi2
Source: https://pve.proxmox.com/wiki/Passthrough_Physical_Disk_to_Virtual_Machine_(VM)