Easy Passthrough Disk Configuration in Proxmox VE

How to Pass Through Physical Disks to Proxmox VMs for Optimal Performance

If you’re running a home lab with Proxmox and TrueNAS, or other high-performance applications, you may want to consider passing through physical disks to your Proxmox virtual machines (VMs). This configuration allows your VMs to directly access the underlying storage, bypassing the virtual disk layer, for improved performance. In this article, we’ll explore how to configure Proxmox passthrough disk and troubleshoot common issues that may arise.

Why Use Passthrough Disks in Proxmox?

—————————————-

There are several reasons why you might want to use passthrough disks in Proxmox:

1. **TrueNAS and other high-performance applications**: If you’re running TrueNAS or other resource-intensive applications, you may need direct access to the underlying storage for optimal performance. Passthrough disks allow your VMs to read and write directly to the physical storage, bypassing the virtual disk layer.

2. **Software-defined storage**: Proxmox supports software-defined storage with Ceph, which allows you to use commodity hardware for your storage needs. By passing through physical disks, you can take advantage of this capability and achieve better performance.

3. **Windows and other operating systems**: While Proxmox is primarily used for Linux and other open-source operating systems, it also supports Windows and other proprietary OSes. With passthrough disks, you can run these operating systems on your Proxmox VMs with direct access to the physical storage.

4. **Legacy hardware**: If you have legacy hardware that is not supported by modern virtualization platforms, you may be able to pass it through to a Proxmox VM for continued use.

Configuring Passthrough Disks in Proxmox

—————————————–

To configure passthrough disks in Proxmox, follow these steps:

1. **Identify the disk ID**: Ensure the disk is not used by another process and identify its unique identifier. You can use the command `lsblk` or check the `dev disk by id` directory to find the correct ID.

2. **Prepare the disk**: Make sure the disk is not mounted on the host system, and unmount it if necessary. This step is crucial to prevent data corruption due to simultaneous access to the disk from both the host and the VM.

3. **Attach the disk to the VM**: Use the `qm set` command followed by the VM ID and disk details to attach the passthrough disk to the desired VM. For example, if you want to attach a Samsung 980 Pro NVMe drive as /dev/disk/by-id/scsi-357d6714-4c25-47e6-a3c5-b51011111111 to a VM with ID `myvm`, you would run the command:

“`bash

qm set myvm /dev/disk/by-id/scsi-357d6714-4c25-47e6-a3c5-b5101111111

“`

Troubleshooting Common Issues with Passthrough Disks in Proxmox

———————————————————

If you encounter issues during the configuration or after the passthrough disk is attached to the VM, here are some common solutions to troubleshoot:

1. **Missing disk**: If the disk does not appear within the VM’s operating system, try restarting the Proxmox server and the VM. Sometimes, the disk may not be recognized until a reboot.

2. **Poor performance**: If the disk is recognized but exhibits poor performance, check the following:

a. **Disk configuration**: Ensure that the disk is configured correctly within the VM. You may need to adjust the disk’s settings, such as the block size or I/O thread count.

b. **VM network configuration**: Verify that the VM’s network configuration allows for adequate bandwidth and low latency.

c. **Storage controller**: Ensure that the storage controller is properly configured within the VM. You may need to adjust the controller’s settings, such as the queue depth or read/write buffers.

3. **Errors during passthrough command execution**: If you encounter errors while running the `qm set` command, try the following:

a. **Check the disk ID**: Double-check that you have specified the correct disk ID within the command.

b. **Verify the disk status**: Ensure that the disk is not in use by another process or VM. You may need to unmount the disk from the host system before running the `qm set` command again.

c. **Restart the Proxmox server**: Occasionally, restarting the Proxmox server can resolve issues with the passthrough disk configuration.

Conclusion

———-

Passthrough disks in Proxmox offer a powerful feature that allows your VMs to directly access physical storage devices, reducing latency and increasing performance for resource-intensive applications like TrueNAS. By understanding how to configure and troubleshoot passthrough disks, you can ensure optimal performance within your home lab environment. Have you used passthrough disks in Proxmox? Share your experiences and tips within the comments section below!

Note: This article was written for informational purposes only and should not be considered as professional advice. The author and Publisher shall not be held responsible for any loss or damage caused by using the information presented here. Always test new configurations in a non-production environment before applying them to your production infrastructure.