Creating A Sanitized / Syspreped Linux Image

Hello Everyone!

This is my first post here, I’ve been a long time viewer of the LTS YouTube channel and am currently catching up on the Homelabshow.

I have a question that is probably fairly obvious but coming from the Windows world its not so obvious to me.

How would one go about “syspreping” or “sanitizing” Linux so that it can be re-deployed, or used as a template for VM’s?

Does the process vary by distro? Such as is sanitizing Debian different than sanitizing RHEL, or is it largely the same minus maybe a few extra steps?

Also, is sanitizing even the correct word to be using for what I am asking?

Thanks in advance for anyone that read this far.

I too came from a windows sysprep background, so I know what you are seeking.

If you look on https://www.youtube.com/c/LearnLinuxtv Jay has a series of videos on how to setup Proxmox, within one of those videos he outlines how to use the “Cloud-Init” feature which regenerates either a machine GUID or something similar. When setup with a template, each new vm cloned will be unique on the network. As I use Proxmox, it gave me basically the same thing as sysprep, it might help you.

I too struggled to find a Linux version of sysprep, but I think I don’t know the exact term in Linux.

1 Like

In the linux world you do not really “Sysprep” a system with an image and even in the more modern Windows world this is going away in favor of scripted deployments. If you are cloning a VM Cloud Initi is one method

Another way to to do a minimal load of the OS and have a tool such as Ansibe build out the system

1 Like