FreeNAS on virtualization hypervisor which is using ZFS

decibel83

Dabbler
Joined
Aug 31, 2017
Messages
16
Hi,
I need to install a new FreeNAS system and I have to virtualise it.
I'm using Proxmox as hypervisor and I have both some network storages (which are using qcow2 images) and some local storages which are using ZFS (and virtual machines are using some ZFS drives.

I read the information at https://www.ixsystems.com/blog/yes-you-can-virtualize-freenas/, but now the question is: could I use ZFS on ZFS, or could I pass FreeNAS a ZFS dataset directly from the hypervisor?

Thanks!
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
I need to install a new FreeNAS system and I have to virtualise it.
If you must, here is some light reading although it is mainly geared to using ESXi, you might be able to get some useful information there.

"Absolutely must virtualize FreeNAS!" ... a guide to not completely losing your data.
https://www.ixsystems.com/community...ide-to-not-completely-losing-your-data.12714/

Virtually FreeNAS ... an alternative for those seeking virtualization
https://www.ixsystems.com/community...ative-for-those-seeking-virtualization.26095/

FreeNAS 9.10 on VMware ESXi 6.0 Guide
https://b3n.org/freenas-9-3-on-vmware-esxi-6-0-guide/
 

decibel83

Dabbler
Joined
Aug 31, 2017
Messages
16
Thanks for the useful links!
What I want to ask is that if I have already ZFS on the hypervisor (Proxmox) and I can create a ZFS volume for the FreeNAS virtual machine, is there a way to tell FreeNAS to use Proxmox's ZFS and not its one?
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
To summarize, and I think this is documented in at least one of the sources I pointed out, the best practice is to pass a controller into the VM so FreeNAS has full, direct access, to the drives. I would not suggest using any form of disk virtualization through the hypervisor.
 

decibel83

Dabbler
Joined
Aug 31, 2017
Messages
16
Thanks!
But what I was saying is not to use disk virtualization through the hypervisor, but pass the ZFS volume to FreeNAS from the hypervisor.
 
Joined
Sep 23, 2013
Messages
24
Proxox uses ZFS on Linux which introduces linux specific ZFS features to the pool on creation. This means that FreeNAS will be unable to import the Zpool. Creating the Zpool on Freenas first would allow proxmox to mount the pool and as long as you don't update the pool version. But you can only mount the pool on one instance at a time. I pass through all my storage disks to the FreeNAS VM and manage the pool there.

To be clear, I am passing through 8 sata devices directly to the FreeNas VM. These disks cannot be used by Proxmox or any other VM.
Here are some helpful links.
 
Last edited:

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
Thanks!
But what I was saying is not to use disk virtualization through the hypervisor, but pass the ZFS volume to FreeNAS from the hypervisor.

ZFS is a filesystem. If your hypervisor supports passing portions of the filesystem through to a guest, you can do that directly.

FreeNAS does not have the ability to import a hypervisor-provided filesystem. It expects disks.

At best you could create a virtual disk on your Proxmox and pass that to FreeNAS, but this is basically dumb. FreeNAS is a very heavyweight bit of software, so unless there are other specific things you need (AD support, etc) out of FreeNAS, it's not recommended. See links @Chris Moore provided, especially the middle one.
 

Chris Moore

Hall of Famer
Joined
May 2, 2015
Messages
10,080
This means that FreeNAS will be unable to import the Zpool.
That is not entirely correct, unless this has changed recently. I have imported ZFS pools that were created in Linux.
 
Top