Cleanup image for template

cmonty14

Renowned Member
Mar 4, 2014
344
5
83
Hi,

can you please provide instructions how to cleanup an image to be used as template?
This wiki article documents some manual steps to be executed on the VM before converting to a template.

Question:
Is it sufficient to execute all steps documented here?
This instruction is referenced in the wiki.

What about usage of tools called "virt-sysprep".
This should be included in package libguestfs-tools, however there are many dependencies and therefore I would hesitate to install it if it's not needed.

Please advise.

THX
 
can you please provide instructions how to cleanup an image to be used as template?
This wiki article documents some manual steps to be executed on the VM before converting to a template.

You can create a template based on any VM without any preparation. The mentioned actions (as remove ssh-keys etc.) are recommendations in order to not mix up running VMs based an the same templates. What is relevant in your particular case depends on the usage of your clones. "Customization" of each clone can be done at any time and does not necessary need a prepared template.

Question:
Is it sufficient to execute all steps documented here?

If it's sufficient or not depends on your particular needs (as mentioned above) and cannot be said in general. Even you do not perform anything of these steps a clone from such a template will work, but all clones are identically configured.


What about usage of tools called "virt-sysprep".
This should be included in package libguestfs-tools, however there are many dependencies and therefore I would hesitate to install it if it's not needed.

virt-sysprep eases "customization", but it's not a must to use it. In any case (whether you use virt-sysprep or not) it's recommended to be aware what "customization" means in your particular case.