Proxmox HDD Passthrough to a VM

by RamWise
Published: Last Updated on 10.3K views

Sometimes, you might want to use an HDD or SSD directly inside your VM in Proxmox VE. It might give performance benefits and/or allow certain tools in your guest OS to access the controller directly.
Proxmox HDD passthrough to a VM can be done using a few commands quickly. 

Warning: Having a physical disk available in VM limits live migration & snapshot features in Proxmox.

If you need to start from installing Proxmox VE first go to my post Install Proxmox VE

Steps for Proxmox HDD Passthrough

1. First, find the Hard Drive you want to passthrough using the below lsblk command.

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' 

It might show more than one device identifier for your disks. You can use any one from them for the next command.

2. Add the HDD to your VM using the device ID picked above, using qm command.

qm set  201  -scsi3 /dev/disk/by-id/scsi-35000cca25106ee14 

Now your HDD will show up in the Hardware section of your VM.

Restart your VM to see the new disk in your guest Operating System.

1 comment

Aaron March 31, 2022 - 9:48 pm

This is an excellent, succinct guide. I want to try this with TrueNAS Scale when I’m ready to replace my TrueNAS Core


Leave a Comment

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More