Monday, 4 July 2016

How to 'generlize' a linux system

I came across this situation the other day while creating a vTemplate with vSphere on CentOS 7 Core.

I wanted a way of automatically ensuring that all unique attributes of the system would not remain after deployment of the vTemplate (for example disk GUID's, machine ID's and so on.)

Fortunately there is a tool called 'virt-sysprep' that comes within the 'libguestfs-tools-c' package:

yum install libguestfs-tools-c

And then I tend to run the following to 'generalize' the system:

virt-sysprep --enable crash-data firewall-rules hostname logfiles lvm-uuids machine-id net-hostname random-seed ssh-hostkeys tmp-files yum-uuid

* Although there are a lot of further options to play around with - so take a look at the man page.

0 comments:

Post a comment