Is it possible to deploy fully configured CentOS 8 installations over PXE? Non-interactive
I have ~30 machines scattered around a ship that management wants to use to show our web app.
I have a central virtualisation cluster with a mirror and PXE server on it.
I've been able to PXE boot into a fresh CentOS 8 ISO from the remote machines, and am looking into configuring it post deployment with %post or ansible.
However, what I'd really like to do is that a pre-configured VM, clone the filesystem, and deploy it to the remote. I kind of vibe that this could be done with liveimg in kickstart, but damned if I can make it work.
I've used these lines
xfsdump -l 0 - / | gzip -2 | ssh user@server dd of=/home/marine/image/server-full-backup-`date '+%d-%B-%Y'`.dump.gz
correlates to kickstart -
authconfig --enableshadow --passalgo=sha512
liveimg --url="ftp://server/pub/server-full-backup-20-September-2021.dump.gz"
or
tar -zcpf full-backup-`date '+%d-%B-%Y'`.tar.gz --directory / --exclude=mnt --exclude=proc --exclude=tmp --exclude home/marine/image .
authconfig --enableshadow --passalgo=sha512
liveimg --url="ftp://server/pub/full-backup-20-September-2021.tar.gz"
With both styles I end up at a dracut-initqueue emergency shell after it looks at downloading the archives.
- Is what I'm trying to do actually possible / sensible?
- How would one actually use kickstart to copy a whole filesystem? The docs just say
liveimg - Install from a disk image instead of packages. The image can be the squashfs.img file from a live ISO image, a compressed tar file (.tar, .tbz, .tgz, .txz, .tar.bz2, .tar.gz, or .tar.xz.), or any file system that the installation media can mount. Supported file systems are ext2, ext3, ext4, vfat, and xfs.
I've looked into mkisofs
and clonezilla
, I'm just at an awful crossroads of nothing suggesting it's particularly possible or impossible, and I'm doing a lot of chasing my own tail.
Thanks in advance
Solution 1:
Late answer but I've used squashfs to create image files when deploying Fedora workstations during a kickstart.
See: https://elinux.org/Squash_FS_Howto for creating images, I can post my full solution if needed later as I don't have access to it right now.