1.3.5 Hardware Passthrough This chapter will discuss on how to pass through different devices to your virtual machines. That is you will give your VM direct access to the hardware instead of via a virtualization layer. This is extremely hand for passing through HDD for a TrueNas VM for instance and a GPU for a media or machine learning VM. Now, hardware passthrough really means that only one VM can use the piece of hardware you are passing through. Yes, there are occasions where this is not the case but these are most of the time expensive pieces of technology such as GPU's that can virtually split up its VRAM to multiple containers. A solution however is to use LXC containers instead of VM's or have all your applications running inside the same VM. We will discuss both in this chapter 1. HDD/SSD VM Pass through Pass-through disks in virtual machines (VMs) cannot be shared between VMs or used by the host system at the same time because they require exclusive access. This means if a disk is pass-through to one VM, it cannot be pass-through to another VM simultaneously. For security reasons this is great ! since, you will know if your host provider The first passthrough option is the SATA passthrough option, where the sata ports are boldered straight on the motherboard. For instance the Supermicro X10SRL-F has 10 sata ports which would mean 10 HDD/SSD's could be passthrough. Now, to do this we need to open a fresh Shell inside our Proxmox server. This can either be done via SSH or via the GUI. Once, there we will Display all drives with their corresponding serial numbers lsblk -o +MODEL,SERIAL Identify the VM ID's you want to connect the drives to e.g sda, sdb,..., etcetera Next we will move to the by-id folder to list the full names of the drives you identified. For this we use ls /dev/disk/by-id/ Once you identified the full names of the drives e.g "ata-KINGSTON_SA400S37120G_50026B7782550FFA" you can then connect them to the VM's you created by using the following commands for each drive: qm set VM-ID -scsi1 /dev/disk/by-id/serialnumberofdrive_1 : qm set VM-ID -scsin /dev/disk/by-id/serialnumberofdrive_n As example: qm set 1001 -scsi1 /dev/disk/by-id/ata-KINGSTON_SA400S37120G_50026B7782550FFA Which should put out the message update VM 1001: -scsi1 /dev/disk/by-id/ata-KINGSTON_SA400S37120G_50026B7782550FFA Then go to the hardware section of your Truenas Proxmox VM and you will see that your drives are added to your VM as harddrives. Below an 8TB HDD has been passthrough to VM 1001. 02. PCIe NVME Passthrough Source: https://www.youtube.com/watch?v=-qm-m4q8hIU init=/bin/bash mount -n -o remount,rw / mount -o remount,rw / grub-mkpasswd-pbkdf2 Enter password: reenter password: nano /etc/grub.d/00_header grub PBKDF2 hash of your password is grub.pbkdf2.sha512.10000.CB31EA9617F1C79171F60A120BE732F47F754E9F36C679B05371EE4CBCD9BEED9706A8DA0704B1E8A7C67F39E3AD3E05D6E80E20C9A4627F38A5C99A99134AF6.0721F4428CCF0354A53C6112DB38901C50395A7E87B8BA4509FBB560895065A30FAD19C8DC0AC29C1534D010EAA75D938D1D14F329BED8C9C1B5F09937C01F03 nano /etc/grub.d/40_custom Passthrough video https://www.youtube.com/watch?v=McdVvFOhHP0 03. PCIE SATA HDD/SSD Passthrough Source: https://www.youtube.com/watch?v=-qm-m4q8hIU If you happen to have a PCIE SATA CARD then again like with the NVME drives you need to passthrough the PCIe cards to your VM. grub.pbkdf2.sha512.10000.D0F8975DB0B74F6710290A9BF144086B4704D513AE2529F1E00DA05EA375BC52B3ACFC8D6641B3C6FCA74B927CC6FD97892B50827F34A761317DEC7BCAB127E7.1182DB95B13F915CFB9A82EAAA9598C3ADBB6D009EA0761D457428E057829F5790585B40073D8FC02B5903EF4855A51B8AFAC755E32B5EBCFB1D74FF90365321 GRUB Password Protection nano /etc/grub.d/00_header 192.168.1.51 grub.pbkdf2.sha512.10000.2227CCCA08A1C17494648C345FDACE61849D693E4B6F83B1A8A6600FA69287F131999FDB075A5B57390C9836E55166E749F4B3BC4E5518DBC2586F3DCD1882D0.7812FEBC4890B483BF8D12332CC92396E3EAB9D324CA2E7CBD50FB15759209336BA061E4F2ABC81347A4818487CFAC92CA46017C311D0EDF4996FF9D88BD4EB3 set superusers="student" passwd_pbkdf2 update-grub Now, if you do not password protect your GRUB grub.pbkdf2.sha512.10000.0C40B0FFA2985B390DE69CE90601232DECE18DABB897FD3FD860D6073B4ADABB2EB71BBEEF7E3D5946F32DC8D6A571DEEFEA6DF323C7B2DC88F89AA43057290F.4329D094ED9B2E160390FD12FCA34D6DF2F03999638CF603DCD829687537BDD4FC452E8485138E2AEC4BB9DF9EAB75C9F677E2D4A884EEFE70725ADD5C5FE8F6 grub-mkpasswd-pbkdf2 Enter password: reenter password: cat <