the home site for me: also iteration 3 or 4 of my site
1+++ 2title = "Install TrueNAS Core on Proxmox" 3date = 2023-07-10 4slug = "install-truenas-core-proxmox" 5description = "How to install TrueNas Core on proxmox with drive passthrough" 6 7[taxonomies] 8tags = ["tutorial", "archival"] 9 10[extra] 11has_toc = true 12+++ 13 14I have been using Proxmox for a while now but I've also wanted to make use of some large HDDs that have been lying around. I really didn't want to get another machine just for TrueNAS so I decided to install it on Proxmox. This is how I did it. 15 16<!-- more --> 17 18{{ img(id="https://cloud-f19fn8u8j-hack-club-bot.vercel.app/0image.png" alt="screenshot of the vault vm in proxmox" caption="my active vault storing 1.8TB of old projects") }} 19 20## Introduction 21 22> Note: I have since found out that running TrueNAS in a VM passing through the drives may not be a very good solution as it essentially just creates a large virtual disk that is the size of the drive you are passing through. Because of this I will not be using this setup in my homelab and will instead create a large ZFS pool on Proxmox. However if you are fine with those downsides, then have fun and enjoy the tutorial. 23 24To install [TrueNAS Core](https://www.truenas.com/download-truenas-core/#) on [Proxmox](https://www.proxmox.com/en/proxmox-ve) you need three things: 25 261. A copy of [Proxmox](https://www.proxmox.com/en/proxmox-ve) — A complete, open-source server management platform for enterprise virtualization. 272. A [TrueNAS CORE](https://www.truenas.com/download-truenas-core/#) ISO — World’s #1 NAS Operating System 283. HDDs — You can use whatever you want, but I will be using three Barracuda ES 750GB drives 29 30## Install TrueNAS Core 31 32Sign-in to Proxmox and upload your ISO to the local storage or, download the file directly from the link using the built-in ISO fetcher. 33 34{{ img(id="https://assets.vrite.io/64974cb888e8beebeb2c925b/Ww212rUDQ_Ms9P2WhJMwz.png" alt="download iso tool in proxmox") }} 35 36Next to create the VM, the only thing that needs to be changed from the defaults is the memory, which I set to `8192 MB` (8 GB). 37 38{{ img(id="https://assets.vrite.io/64974cb888e8beebeb2c925b/bDT9VdIMMG1LWvv1RwNKl.png" alt="create a vm modal in proxmox") }} 39 40Now finish creating the VM and click on the VM after it is created. Go to options and enable start at boot. 41 42{{ img(id="https://assets.vrite.io/64974cb888e8beebeb2c925b/ImxOHWJNuRL3yiF12cQfe.png" alt="start at boot checkbox") }} 43 44Next, we need to pass through the physical drives to the VM. Open a terminal on the Proxmox server (use the built-in terminal or ssh in) and run the following command. Only run the part after the #. 45 46> root@thespia:~# lsblk -o +MODEL,SERIAL 47```bash 48NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT MODEL SERIAL 49sda 8:0 0 698.6G 0 disk ST3750330NS 9QK2GT8R 50sdb 8:16 0 698.6G 0 disk ST3750640NS 3QD0AYE0 51sdc 8:32 0 698.6G 0 disk ST3750640NS 3QD0BQ5G 52sdd 8:48 1 111.8G 0 disk Hitachi_HTS543212L9SA02 090130FBEB00LGGJ35RF 53├─sdd1 8:49 1 1007K 0 part 54├─sdd2 8:50 1 512M 0 part /boot/efi 55└─sdd3 8:51 1 111.3G 0 part 56 ├─pve-swap 253:0 0 8G 0 lvm [SWAP] 57 ├─pve-root 253:1 0 37.8G 0 lvm / 58 ├─pve-data_tmeta 253:2 0 1G 0 lvm 59 │ └─pve-data-tpool 253:4 0 49.6G 0 lvm 60 │ ├─pve-data 253:5 0 49.6G 1 lvm 61 │ ├─pve-vm--100--cloudinit 253:6 0 4M 0 lvm 62 │ └─pve-vm--101--cloudinit 253:7 0 4M 0 lvm 63 └─pve-data_tdata 253:3 0 49.6G 0 lvm 64 └─pve-data-tpool 253:4 0 49.6G 0 lvm 65 ├─pve-data 253:5 0 49.6G 1 lvm 66 ├─pve-vm--100--cloudinit 253:6 0 4M 0 lvm 67 └─pve-vm--101--cloudinit 253:7 0 4M 0 lvm 68sde 8:64 0 465.8G 0 disk WDC_WD5000AAKS-65YGA0 WD-WCAS83511331 69├─sde1 8:65 0 465.8G 0 part 70└─sde9 8:73 0 8M 0 part 71zd0 230:0 0 32G 0 disk 72├─zd0p1 230:1 0 100M 0 part 73├─zd0p2 230:2 0 16M 0 part 74├─zd0p3 230:3 0 31.4G 0 part 75└─zd0p4 230:4 0 522M 0 part 76zd16 230:16 0 80G 0 disk 77├─zd16p1 230:17 0 1M 0 part 78└─zd16p2 230:18 0 80G 0 part 79zd32 230:32 0 4M 0 disk 80zd48 230:48 0 80G 0 disk 81├─zd48p1 230:49 0 1M 0 part 82└─zd48p2 230:50 0 80G 0 part 83zd64 230:64 0 1M 0 disk 84zd80 230:80 0 32G 0 disk 85``` 86 87In my server `sda, sdb, and sdc` are my drives. I can tell because they have no partitions and are `698.6G`. Next, based on the serial numbers of the disks, find the `dev/disk/by-id` of the drive. 88 89> root@thespia:~# ls /dev/disk/by-id/ 90```bash 91ata-Hitachi_HTS543212L9SA02_090130FBEB00LGGJ35RF 92ata-Hitachi_HTS543212L9SA02_090130FBEB00LGGJ35RF-part1 93ata-Hitachi_HTS543212L9SA02_090130FBEB00LGGJ35RF-part2 94ata-Hitachi_HTS543212L9SA02_090130FBEB00LGGJ35RF-part3 95ata-ST3750330NS_9QK2GT8R 96ata-ST3750640NS_3QD0AYE0 97ata-ST3750640NS_3QD0BQ5G 98ata-WDC_WD5000AAKS-65YGA0_WD-WCAS83511331 99ata-WDC_WD5000AAKS-65YGA0_WD-WCAS83511331-part1 100ata-WDC_WD5000AAKS-65YGA0_WD-WCAS83511331-part9 101dm-name-pve-root 102dm-name-pve-swap 103dm-name-pve-vm--100--cloudinit 104dm-name-pve-vm--101--cloudinit 105dm-uuid-LVM-i2jw2DEc8aJxdhf3mg7sAcAbc57lfeNL967xBhsO2KsTDqSJ5KB9pGqef5HjQJHk 106dm-uuid-LVM-i2jw2DEc8aJxdhf3mg7sAcAbc57lfeNLQ6hkWGll1H38yFz0ty3RmmJPSRSbj1sa 107dm-uuid-LVM-i2jw2DEc8aJxdhf3mg7sAcAbc57lfeNLrSofGgZtL41un6baoCpRHunOrbJeMTeO 108dm-uuid-LVM-i2jw2DEc8aJxdhf3mg7sAcAbc57lfeNLWPjyk8d4ik2D6KIcp2zaugdFsHB4TNOM 109lvm-pv-uuid-pRECVX-zqKA-evrD-PNof-sTYg-zNrD-WUelFe 110usb-Generic-_Multi-Card_20120926571200000-0:0 111wwn-0x5000c50015a53388 112wwn-0x5000cca562c751e4 113wwn-0x5000cca562c751e4-part1 114wwn-0x5000cca562c751e4-part2 115wwn-0x5000cca562c751e4-part3 116wwn-0x50014ee2ab77b23f 117wwn-0x50014ee2ab77b23f-part1 118wwn-0x50014ee2ab77b23f-part9 119``` 120 121In my case, the ID of the drives I want are `ata-ST3750330NS_9QK2GT8`, `ata-ST3750640NS_3QD0AYE0`, and `ata-ST3750640NS_3QD0BQ5G`. 122 123Now find your VM_ID, mine is 102. 124 125{{ img(id="https://assets.vrite.io/64974cb888e8beebeb2c925b/gwjgFbI5IrnJSTLTB0PeX.png" alt="vm list in proxmox") }} 126 127Run the following command, replacing the VM_ID and DISK_ID with yours. 128 129> root@thespia:~# qm set VM_ID -scsi1 /dev/disk/by-id/DISK_ID 130```bash 131root@thespia:~# qm set 102 -scsi1 /dev/disk/by-id/ata-ST3750330NS_9QK2GT8R 132update VM 102: -scsi1 /dev/disk/by-id/ata-ST3750330NS_9QK2GT8R 133root@thespia:~# qm set 102 -scsi2 /dev/disk/by-id/ata-ST3750640NS_3QD0AYE0 134update VM 102: -scsi2 /dev/disk/by-id/ata-ST3750640NS_3QD0AYE0 135root@thespia:~# qm set 102 -scsi3 /dev/disk/by-id/ata-ST3750640NS_3QD0BQ5G 136update VM 102: -scsi3 /dev/disk/by-id/ata-ST3750640NS_3QD0BQ5G 137``` 138 139Here is how it appears in Proxmox: 140 141{{ img(id="https://assets.vrite.io/64974cb888e8beebeb2c925b/QBpmqflEHmPiUHbd8JVk2.png" alt="hardware page of the vm in proxmox") }} 142 143If everything went well, then you can start your VM now. After it finishes booting up, you will get the screen below. Make sure Install/Upgrade is selected and hit enter. 144 145{{ img(id="https://assets.vrite.io/64974cb888e8beebeb2c925b/UFqhrRdD3GkP1_No5lWaj.png" alt="truenas startup screen") }} 146 147You will then get this screen, use space to select the first drive and hit enter. 148 149{{ img(id="https://assets.vrite.io/64974cb888e8beebeb2c925b/xD5QxmFtHxw10p624FgwM.png" alt="destination media screen") }} 150 151Hit enter one last time and enter your password. 152 153{{ img(id="https://assets.vrite.io/64974cb888e8beebeb2c925b/MZy3mN1cXBaicgVolVYs5.png" alt="confirm erase page") }} 154{{ img(id="https://assets.vrite.io/64974cb888e8beebeb2c925b/KWq2P7Iok9LThOF5Xoj6l.png" alt="repeat password page") }} 155 156Select BIOS, as this is the default mode for Proxmox VMs. 157 158{{ img(id="https://assets.vrite.io/64974cb888e8beebeb2c925b/RfXwEGx6oug1vVF3UZuCj.png" alt="boot via bios or via uefi screen") }} 159 160After about five to ten minutes, the installation process will finish and the VM will ask you to remove installation media and reboot. 161 162{{ img(id="https://assets.vrite.io/64974cb888e8beebeb2c925b/mFEH-FHY10H7NUAvYi0aE.png" alt="installation succeded message") }} 163{{ img(id="https://assets.vrite.io/64974cb888e8beebeb2c925b/JPXkEQJgBmeATEE40HHpr.png" alt="hardware screen in proxmox") }} 164 165Select the installation media and remove it with the top button, go back to the console and hit enter, which will take you back to the main menu. On the main menu, select reboot with the arrow keys and hit enter. 166 167{{ img(id="https://assets.vrite.io/64974cb888e8beebeb2c925b/IfvdMuF6AVU_f0-_rngqq.png" alt="power options screen in truenas") }} 168 169Once the machine restarts, it will display an IP address in the console. 170 171{{ img(id="https://cloud-pur64l07h-hack-club-bot.vercel.app/0image.png" alt="ip address displayed in proxmox console") }} 172 173Upon connecting to the IP address, you will get this screen. Use the root username and the password, previously configured, to login. 174 175{{ img(id="https://assets.vrite.io/64974cb888e8beebeb2c925b/ghvCsvwAJMudUCUGvcnCu.png" alt="truenas web ui signin page") }} 176 177Once logged in, I updated the system using the button on the home screen. 178 179{{ img(id="https://assets.vrite.io/64974cb888e8beebeb2c925b/nrBop3a9ilvuc7h-0WPEG.png" alt="check for updates button in the truenas web ui") }} 180 181I chose not to save the configuration file when prompted, proceeded to install the updates, and rebooted. 182 183I hope you enjoyed the tutorial! My inspiration to make this came from watching [“How to run TrueNAS on Proxmox?”](https://www.youtube.com/watch?v=M3pKprTdNqQ) by [Christian Lempa](https://www.youtube.com/@christianlempa). I encourage you to watch his video if you want a video guide to installing TrueNAS on Proxmox. 184 185* Written on `2023-07-10` and republished to this blog (with minor edits) on `2024-10-31`