1

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.

  1. Is what I'm trying to do actually possible / sensible?
  2. 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

  • Have you considered [Image Builder](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html-single/composing_a_customized_rhel_system_image/index)? This is the RHEL doc, but it works nearly identically on CentOS 8. You end up with a virtual machine image ready to go. – Michael Hampton Sep 21 '21 at 07:16

1 Answers1

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.

Blake
  • 11
  • 1
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Dec 02 '21 at 12:05