Home Server, Linux, Proxmox

Proxmox how to pass trough hard drives to a virtual machine

When working in a virtual environment, you probably want to pass trough your hard drives to a virtual machine such as Unraid or TrueNas.

First, list your harddisks in proxmox.
ls -l /dev/disk/by-id/

The screenshot above lists the physical hard drives and their partitions (eq. – part1).

next, in Proxmox, for each disk you want to pass trough to a virtual machine, use following command:

qm set 101 -scsi1 /dev/disk/by-id/ata

qm set 101 (ID of virtual machine) -scsi# /dev/disk/by-id/ata-serial number

Once done for each drive you wanted to pass trough, edit the config file of your virtual machine.

nano /etc/pve/qemu-server/101.conf

Behind each line, add “,serial=$serialnumber$”
This will make it possible for your virtual machine to identify each disk by serial number.

Press ctrl – X, Y and hit enter.

Now in Proxmox, go to disks, you will find all your disks with corresponding serial number.

You can now use your disks in your virtual machine such as TrueNAS or Unraid.

Tagged , , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *