Hey everyone, I've found myself in a traditional RHEL System Administrator role after the retirement of our staff, and while I have some background in DevOps and Software Engineering, I've never dealt with imaging systems. The last time I did anything like this was back in the early 2000s with tools like Sysprep and Norton Ghost. I'm looking to create hardened RHEL images for both on-premises VMware templates and cloud platforms like AWS and Azure (GCP is on the horizon). I've noticed that Red Hat offers BluePrint/Image Builder, and there's also Hashicorp's Packer that seems popular. I'm inclined to use Red Hat's tools, but I want to see if anyone has experience with these or if you can recommend something better. I'm also trying to figure out the best partition layout—should I go with LVM and XFS to keep it adaptable? I want to ensure operations can easily manage disk expansions and modifications according to various vendor needs. Thanks in advance for your insights!
4 Answers
Check out Red Hat's tutorial for creating VHDs for Azure. It’s pretty helpful! Don't forget to run virt-sysprep before you finalize your VM as a template. If you're feeling adventurous, using Kickstart in combination with cloud-init could give you even more flexibility.
I definitely recommend using Packer for this. It makes the whole image-building process way easier and more consistent. Plus, you can automate quite a bit, which saves time and reduces errors.
Which RHEL version are you working with? I'm on RHEL 9 right now. My approach involves first doing a manual install, capturing the Kickstart file, and hosting it on a server. Then, I create the VM using an Ansible playbook, customizing it along the way.
Yeah, RHEL 9 has some good features, including the ability to enforce security policies during the Kickstart process. If your focus is on hardening right from the get-go, it’s definitely worth leveraging that!
Thanks for the tip! I’ll definitely look into the virt-sysprep part before setting up the template.