Instructions for installing proxmox in hetzner with zfs.
Enter Rescue Mode:
1.2. Select your server, go to the "Rescue" tab, select "Linux" as the operating system and click "Activate rescue system". You will receive an email with the rescue system's credentials.
SSH into Rescue System:
Setup the Partition Scheme for NVMe and Hard drives:
It's recommended to use the NVMe drives for the ZFS rpool (OS and VM images) and the hard drives for a secondary pool for data storage.
Follow these steps for the NVMe drives:
3.1. Use fdisk to create a GPT partition table and a single Linux partition on each NVMe drive. For example, for the first NVMe drive:
use lsblk if you don't know your drives.
fdisk /dev/nvme0n1Follow the prompts to create a new GPT table (g command) and a new partition (n command). Repeat the process for the second NVMe drive.
zpool create -f -o ashift=12 -O atime=off -O canmount=off -O compression=lz4 -O normalization=formD -O mountpoint=/ -R /mnt rpool mirror /dev/nvme0n1p1 /dev/nvme1n1p1Do similar steps for the hard drives but the pool should be created without the -R /mnt and -O mountpoint=/ options. I like to do this to avoid boot errors
zpool create -f -o ashift=12 -O atime=off -O canmount=off -O compression=lz4 -O normalization=formD data-pool mirror /dev/sda /dev/sdbDownload and install Proxmox onto the ZFS rpool:
apt-get update
apt-get install -y debootstrap gdisk zfs-initramfs
debootstrap --arch amd64 buster /mntMount the system folders into the chroot environment:
mount --rbind /dev /mnt/dev
mount --rbind /proc /mnt/proc
mount --rbind /sys /mnt/sysChroot into the environment:
chroot /mnt /bin/bash --loginSet up your /etc/apt/sources.list:
apt-get install -y wget
echo "deb [arch=amd64] http://download.proxmox.com/debian/pve bookworm pve-no-subscription" > /etc/apt/sources.list.d/pve-install-repo.list
wget https://enterprise.proxmox.com/debian/proxmox-release-bookworm.gpg -O /etc/apt/trusted.gpg.d/proxmox-release-bookworm.gpg
echo "deb http://deb.debian.org/debian bookworm main" >> /etc/apt/sources.list
echo "deb-src http://deb.debian.org/debian bookworm main" >> /etc/apt/sources.list
echo "deb http://deb.debian.org/debian-security/ bookworm-security main" >> /etc/apt/sources.list
echo "deb-src http://deb.debian.org/debian-security/ bookworm-security main" >> /etc/apt/sources.list
echo "deb http://deb.debian.org/debian bookworm-updates main" >> /etc/apt/sources.list
echo "deb-src http://deb.debian.org/debian bookworm-updates main" >> /etc/apt/sources.listUpdate repo and system
apt update && apt full-upgrade
apt install pve-kernel-6.2Install proxmox
apt update
apt dist-upgrade
apt install proxmox-ve postfix open-iscsiGrub stuff
grub-probe /boot/grub
grub-install /dev/nvme0n1
grub-install /dev/nvme1n1
update-grubExit & Reboot
exit && reboot