Locating the Disk and preparing for Passthrough
Type the following command
find /dev/disk/by-id/ -type l|xargs -I{} ls -l {}|grep -v -E '[0-9]$' |sort -k11|cut -d' ' -f9,10,11,12
It will then show you the complete path of the disk you want.
Copy the path like this and keep it;
/dev/disk/by-id/{disk-serial}
qm set {vmid} -{disk-type}{number} /dev/disk/by-id/{disk-serial}
If done correctly, it’ll post a similar output as shown. If not, double check the previous steps.
For Windows and Linux, you’d want; scsi or sata.
For macOS, you’d want; virtio.
Configuring Disk inside Windows
Once you’ve set your desired size, size and drive letter, hit Finish.
Congratulations on your successful Disk Passthrough!
Unlinking a Disk from a VM
Should you want to remove a Disk from a VM after adding it, type the following in the Shell;
qm unlink {vmid} --idlist {disk-type}{number}
Leave a Reply