"Sysprep" for Linux after cloning VMs?
Solution 1:
That's exactly what virt-sysprep
is for.
From the man page:
Virt-sysprep can reset or unconfigure a virtual machine so that clones can be made from it. Steps in this process include removing SSH host keys, removing persistent network MAC configuration, and removing user accounts. Virt-sysprep can also customize a virtual machine, for instance by adding SSH keys, users or logos. Each step can be enabled or disabled as required.
You can use virt-sysprep
on any disk image format that your version of qemu understands. This usually includes raw disk images, qcow2, VMware VMDK, Windows VHD, VirtualBox VDI, and many others.