ZFS Storage on XCP-ng

Install ZFS

yum install zfs

Load Kernel Modules

depmod -a
modprobe zfs

Create zpool

zpool create -o ashift=12 blue mirror /dev/sda /dev/sdb

Create Dataset

zfs create blue/zlocal

List Host uuid

xe host-list

Or set the variable

HOST_UUID=$(xe host-list | grep uuid | awk '{print $5}')

Create SR

xe sr-create \
host-uuid=$HOST_UUID \
name-label="Local ZFS" \
type=zfs \
device-config:location=/blue/zlocal

Docs

docs.doubleu.codes

XCP-ng documentation