In this tutorial, we will look at how to Passthrough a disk in Proxmox.
There are a few situations where you might want to pass through a disk and to be clear, you can technically pass through a physical disk or create a virtual disk and pass that through as well. We will look at both options below, but there are a few different ways to do this, so always make sure that you’re aware of your options before selecting one. For that reason, we will look at a few different options below.
Some links below are Amazon affiliate links which means that I earn a percentage of each sale at no cost to you. Thank you for your support.
How to Passthrough a Disk in Proxmox
We will look at a few different options for how to passthrough a disk in Proxmox below.
Passing through a Physical Disk in Proxmox
If you have a physical disk that you’d like to pass through (whether it’s an HDD or SSD), you can follow the process below to find the ID, then pass it through to the VM.
While you technically can pass through a disk by its path (/dev/[device]), it’s not recommended to do this as it’s not fixed. Therefore, if you add a new hard disk in the future or make any changes, there’s a chance that the name specified will no longer be valid and the VM will not have the disk attached.
We will follow the process below by using the recommended Proxmox approach.
1. Run the command below to list the hard disks, as well as their Model Names and Serial Numbers.
lsblk -o +MODEL,SERIAL,WWN
2. After running the command above, find the disk that you’d like to pass through and note down the Model and Serial.
3. Run the command below to find the disk by ID. We will use this ID to add it to a VM as this ID will not change.
ls -l /dev/disk/by-id
4. Copy the full path (excluding any parts that may exist). We will add this to a command in the next step to add the disk to a VM.
5. Run the command below substituting the path that you have with the VM ID and the device type. This will add the disk to the VM.
NOTE: If you are using a SCSI disk already, make sure you increment the number.
qm set [VM_ID] -scsi1 /dev/disk/by-id/[FULL_ID_OF_DISK]
6. After opening the Hardware section of the VM, you’ll see the newly added disk!
Passing Through a Virtual Disk in Proxmox
1. If you’d like to pass through a virtual disk in Proxmox, you can do that by opening the VM, selecting Hardware, then selecting Add and Hard Disk.
2. Select the Disk Size, then modify any additional settings. One important option is SSD Emulation. If it’s important for the VM to think the disk size is what is specified (rather than the full disk of the storage selected), enable SSD Emulation! You can also disable backups in this section (if you’re backing up your VMs to a NAS or other server).
Passing Through Multiple Disks in Proxmox
If you’re setting up any type of NAS (check out our TrueNAS vs. Unraid article for two great options) or VM that requires multiple disks (especially if it will be utilizing RAID), it’s generally recommended to purchase a SAS controller and pass through the entire device to the VM. Something like this SAS/SATA HBA RAID Controller Card will work for most people, but please confirm compatibility before purchasing!
Conclusion: How to Passthrough a Disk in Proxmox
This tutorial looked at how to passthrough a disk in Proxmox! This article showed three different options and while the process is slightly different for each, one specific scenario will most likely be best depending on your requirements. The only thing that’s extremely important to remember is that if you’re passing through multiple disks, it might be best to pass through an entire PCI device.
Thanks for checking out the tutorial on how to passthrough a disk in Proxmox. If you have any questions on how to passthrough a disk in Proxmox, please leave them in the comments!