Passing a Physical Disk Drive to a Proxmox VM

In the Proxmox VE host, display the local disks in the Disks section and note the device you’ll be passing to your VM (e.g. /dev/sdX).

Then, run the host console in the web UI or connect via ssh.

Take note of the VM ID that the physical hard disk will be connecting to.

list the local disks available (since we’ll be passing a physical disk, ignore partitions) :

ls -n /dev/disk/by-id/

sample output : 
lrwxrwxrwx 1 0 0  9 Feb 11 10:05 ata-CT1050MX30SSD1_1723175912B9 -> ../../sdb
…
lrwxrwxrwx 1 0 0  9 Feb 11 10:05 ata-CT525MX300SSD1_171816E67E70 -> ../../sdc
…
lrwxrwxrwx 1 0 0  9 Feb 11 10:05 ata-CT500MX500SSD1_21102D720097 -> ../../sda

Make sure the VM is stopped before changing its configuration.

Using the VM ID noted earlier, pass the disk to your VM either as a virtio or sata (recommended) device :

qm set VMID -sata1 /dev/disk/by-id/YYY

usage:
qm set %VMID% -%VIRTUALDEVICE% %DISKID

%VIRTUALDEVICE% can ben set as sataN where N is a digit between 0 and 5.

Then, check in the VM’s Hardware tab that the disk is listed.

Verify inside the guest OS that the physical disk is connected, then it can then be used normally as a physical disk (mount partitions, etc…)