i want to boot intoo a zfs-pool via pxe.
So far i created a container that uses a zfs pool for the iso and one as diskstorage.
i installed rocky linux into the diskstorage-directory via vm.
- i created a nfs that serves that folder.
but in order to boot from the vm image i would need qemu right? - maybe its just easier to install the os directly intoo the zfs share without container, but its so cool that you can boot phsyical server while you working in the shared vm.
anyway, this is the provisioning template that phind came up with:
kind: PXELinux
name: Custom PXELinux for NFS-ZFSBoot
model: ProvisioningTemplate
oses:
- AlmaLinux
- CentOS
- CentOS_Stream
- Fedora
- RedHat
- Rocky
description: |
Custom PXELinux configuration for booting from NFS over ZFS.
test_on:
- host4dhcp
- host6dhcp
- host4and6dhcp
- host4static
- host6static
- hostZFSBoot # Add hosts that should boot ZFS
-%>
# This file was deployed via '<%= template_name %>' template
<%
rhel_compatible = @host.operatingsystem.family == 'Redhat' && @host.operatingsystem.name!= 'Fedora'
os_major = @host.operatingsystem.major.to_i
os_minor = @host.operatingsystem.minor.to_i
timeout = host_param('loader_timeout').to_i * 10
timeout = 100 if timeout.nil? || timeout <= 0
-%>
DEFAULT menu
MENU TITLE Booting into OS installer (ESC to stop)
TIMEOUT <%= timeout %>
ONTIMEOUT installer
LABEL installer
MENU LABEL <%= template_name %>
KERNEL <%= @kernel %> zfs=force # Enable ZFS boot
APPEND initrd=<%= @initrd %> root=nfs:<%= @nfs_server %>:<%= @nfs_path %>:/mnt/zfsroot rw # Set NFS mount path as ZFS root
IPAPPEND 2
<%= snippet_if_exists(template_name + " custom menu") %>
using zfs without qemu
so in theory i just need the default pxe template, add the nfs and zfs stuff in there, use the os that i choose in foreman and install directly to the zfs pool?
im still a little bit worried about the nfs, but the underlying fs is a block-fs, so with the right setting it should work.
but why no just provision a vm using foreman and boot the server intoo the pool using qemu?
- this way i could pass some parameters that define nfs mountpoint, so i just need one provisioning template, besides that i can debug, fix and test the vms in proxmox and then deploy them by using a simple snapshot…
idk …
will that work? is it even feasabile?