Moving from TrueNas CORE to ProxMox + TrueNas CORE VM without losing data and configurations

Casvt

Dabbler
Joined
Aug 15, 2021
Messages
15
Hey there,

I currently have TrueNas CORE installed on my system with a ubuntu server vm running on it:
Truenas CORE (8 cores, 32GB)
\> (4 cores, 12GB) Ubuntu server VM with Plex and Tdarr
I'm soon going to buy a GTX 1050ti which I will be using for hardware transcoding. As TrueNas CORE doesn't have support for gpu passthrough, I'm going to move to ProxMox:
Proxmox (or other type-1 hypervisor) (8 cores, 32GB RAM)
|> (5 cores 12GB) Ubuntu server VM with Plex and Tdarr with GPU passed through for hw transcoding
\> (2 core 16GB) Truenas CORE VM with all hdd's passedthrough
Is it possible to do this transition (Truenas being host to being a vm) without loosing the data on my datasets (1 5TB stripe and 1 2TB mirror) and preferebly without loosing configurations? Ideally I would create some sort of backup, import it and everythings back. Is there some guide for completely 'cloning/moving' a TrueNas installation? Are there any moments where I have to be carefull not to loose the data on the drives (like accidentaly formatting the disks when booting or passing them through to the vm)?

Thanks in advance
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
See:
and
 

Casvt

Dabbler
Joined
Aug 15, 2021
Messages
15
So to summarize:
  1. General -> Save Config
  2. Pools -> Export/Disconnect for every pool
  3. Reboot system and boot from usb to install proxmox formatting/deleting the truenas install in the process
  4. Create TrueNas VM with all the hard drives passed through
  5. When installation is done, upload the config that was made at step 1
  6. Pools -> Add -> Import an existing pool; for every pool that I had
Is this correct? How do the pools show up in step 6? Do I just get a list of the pools (sourced from the config) and I choose one of them every time?
 

Heracles

Wizard
Joined
Feb 2, 2018
Messages
1,401
Is this correct?

Not really...

install proxmox

Nope : It is mentioned that the only hypervisor with some experience is VMWare and not Proxmox.

VM with all the hard drives passed through

Nope : It is the controller that must be passed through. The controller itself may very well interfere with the activity and for that reason, it must be in IT mode and under TrueNAS' sole and complete control.

I'm soon going to buy a GTX 1050ti which I will be using for hardware transcoding.

What you can do is keep your TrueNAS untouched and install that new system by itself. Once installed, use a software like handbrake and transcode your data once and for all. Once your content is transcoded, it will direct play so the media server will not have any hard work to do, so will not need GPU passthrough at all.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Is this correct?
As Heracles says, no, and it really isn't even very close. You can pass the controller through to a VM using Proxmox, though that's pretty recent functionality there. ESXi is the only platform our resident grinch, @jgreco, recommends, partially for that reason. Now, will it work? Quite possibly. If you pass the controller through to the VM, and you install the guest agent in the VM, it could run quite well for a long time. But support here will be poor, as there isn't much history with Proxmox vs. ESXi.

And ignoring all that, step 6 of your list is unneeded; uploading the config will result in the system importing (if possible) any pools it had at the time you saved the config.
 

pycvalade

Cadet
Joined
Oct 27, 2021
Messages
9
I did the switch from baremetal to proxmox.

In order to do so, you'll need:
  • create a full backup file with password seeds of your TrueNAS install
  • have a raid controller HBA controller in IT mode that will need to be passed through to the future VM by enabling IOMMU
  • disk(s) to install proxmox and the VMs disks. I used 2 ssds pluggued into the mobo's sata ports in zfs mirror. If you're doing that, limit zfs memory on the mirror or you're going to get the proxmox VMs killed by the OOM killer and drive you nuts.

Steps that worked for me (in order):
  1. make a backup of all data on your truenas shares to somewhere safe just in case
  2. download full truenas backup file with password seeds
  3. shutdown truenas machine
  4. physically remove disks from raid controller HBA controller in IT mode
  5. install proxmox on whatever drive you want to use for that
  6. configure IOMMU and limit zfs memory usage if you used zfs
  7. create VM in proxmox with q35, pcie passthrough, uefi, balloon=0
  8. install TrueNAS on the VM using the iso
  9. shutdown the vm
  10. plug in back the disks on the raid controller
  11. boot the vm back up
  12. import the config file with password seeds and reboot

If all went as it did for me, you'll have TrueNAS installed in your proxmox VM with everything configured as it was before on bare metal. If not, you have a backup ;)

I might do a blog about it later when I get some time.

Cheers!
 
Last edited:

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776

Casvt

Dabbler
Joined
Aug 15, 2021
Messages
15
I did the switch from baremetal to proxmox.

In order to do so, you'll need:
  • create a full backup file with password seeds of your TrueNAS install
  • have a raid controller HBA controller in IT mode that will need to be passed through to the future VM by enabling IOMMU
  • disk(s) to install proxmox and the VMs disks. I used 2 ssds pluggued into the mobo's sata ports in zfs mirror. If you're doing that, limit zfs memory on the mirror or you're going to get the proxmox VMs killed by the OOM killer and drive you nuts.

Steps that worked for me (in order):
  1. make a backup of all data on your truenas shares to somewhere safe just in case
  2. download full truenas backup file with password seeds
  3. shutdown truenas machine
  4. physically remove disks from raid controller HBA controller in IT mode
  5. install proxmox on whatever drive you want to use for that
  6. configure IOMMU and limit zfs memory usage if you used zfs
  7. create VM in proxmox with q35, pcie passthrough, uefi, balloon=0
  8. install TrueNAS on the VM using the iso
  9. shutdown the vm
  10. plug in back the disks on the raid controller
  11. boot the vm back up
  12. import the config file with password seeds and reboot

If all went as it did for me, you'll have TrueNAS installed in your proxmox VM with everything configured as it was before on bare metal. If not, you have a backup ;)

I might do a blog about it later when I get some time.

Cheers!
Thanks for the guide. I currently have the four HDDs in the mobo SATA ports and the boot drive in the m.2. Do I need to buy a hba controller (found a 1x pcie to 8x SATA for €50) or can I do this with the SATA controller of the mobo? I know it's probably smarter to just spend the €50 right? Do I need to look for something when buying a hba controller to know it has "IT mode"?

I have to do step 6 anyway because I'm going to passthrough the GPU to the Ubuntu server VM. And step 7 is the same but instead of doing it for the GPU I do it for the hba controller. Am I correct?

However, I found this YouTube video where, at 9 minutes, he shows how to individually passthrough drives. This eliminates the need for a separate hba controller. Why wouldn't this work? Why shouldn't I do this instead?
 

pycvalade

Cadet
Joined
Oct 27, 2021
Messages
9
Thanks for the guide. I currently have the four HDDs in the mobo SATA ports and the boot drive in the m.2. Do I need to buy a hba controller (found a 1x pcie to 8x SATA for €50) or can I do this with the SATA controller of the mobo? I know it's probably smarter to just spend the €50 right? Do I need to look for something when buying a hba controller to know it has "IT mode"?

I have to do step 6 anyway because I'm going to passthrough the GPU to the Ubuntu server VM. And step 7 is the same but instead of doing it for the GPU I do it for the hba controller. Am I correct?

However, I found this YouTube video where, at 9 minutes, he shows how to individually passthrough drives. This eliminates the need for a separate hba controller. Why wouldn't this work? Why shouldn't I do this instead?

Both should work I guess but I didn't try passing drives directly to a VM before. I know passing through a full HBA card will work for sure if your motherboard supports IOMMU.

Another way this could maybe work would be to just make the ZFS pool in Proxmox and pass that whole "single disk" to the VM. You'll loose ZFS management from TrueNAS but still get the ZFS features.

For the GPU, yes it should be the same as passing another PCI card using IOMMU.
 
Top