Passing a Physical Disk Drive to a Proxmox VM 🌱

  1. Log into ProxMox VE, either at the console or the web UI and launch the web shell
  2. Take note of the VM ID that the physical hard disk will be connecting to
  3. Run the following commands
    # list hard disk devices and ids
    lsblk |awk 'NR==1{print $0" DEVICE-ID(S)"}NR>1{dev=$1;printf $0" ";system("find /dev/disk/by-id -lname \"*"dev"\" -printf \" %p\"");print "";}'|grep -v -E 'part|lvm'
    # copy the /dev/disk/by-id.... for the device to passthrough
    # add the disk to the VM, update the VM ID as needed
    # usage:
    # qm set <%VM ID%> -<%VIRTUAL DEVICE%> <%DEV DISK ID%>
    qm set 100 -scsi1 /dev/disk/by-id/scsi-360026b902ad1ae00293167790419d3f2
  4. Stop the VM and Start it fresh for the new configuration change to take effect
  5. Verify inside the guest OS that the physical disk is connected

Source: https://pve.proxmox.com/wiki/Passthrough_Physical_Disk_to_Virtual_Machine_(VM)