proxmox

Proxmox is a great piece of software to manage your VM's and Linux Containers

installation images can be put in

/var/lib/vz/template/iso

check vm configuration

cat /etc/pve/qemu-server/103.conf

create zfs volume

zfs create -V 100G [zfspl]/[dataset]

add zfs volume to vm

qm set 103 -virtio1 zfspool:vm-103-disk-1

add zfs volume as virtio scsi device to vm

qm set 105 --scsihw virtio-scsi-pci --scsi9 vmdata:vm-105-disk-8

remove volume from vm

qm unlink 103 --idlist virtio1

Sync a vm via zfs snapshot to another physical machine

pve-zsync sync --source [vmid] --dest [receiving physical host]:zpool/[dataset] --name somevm --maxsnap 1 --method ssh --source-user root --dest-user root

Import zfs snapshot as zfs volume for pve usage

zfs send [zfs pool name]/[dataset]/vm-101-disk-2@rep_some_vm_2022-05-03_17:18:37 |zfs receive [zfs pool name]/vm-101-disk-2

Copy the pve vmconfig to the right dir

cp /var/lib/pve-zsync/[dataset name]/101.conf.qemu.rep_rep_some_vm_2022-05-03_17:18:37  /etc/pve/nodes/[pve node name]/qemu-server/101.conf

Edit the vmconfig to update the disk path

vim /etc/pve/nodes/[pve node name]/qemu-server/101.conf