2

I have an imaged (clonezilla) system image of a Ubuntu setup with a bunch of settings. Now I am wondering, what needs to be changed if I use the clonezilla image to create always new systems from this image.

The things, which I can immediately name are: - host ssh key need to changed - hostname

what commands should I use (preferable also working on centOS) to modify the upper points?

What other things do I have forgot to fix/change?

Under windows I know the sysprep tool..

cilap
  • 277
  • 5
  • 14

2 Answers2

2

Look at http://manpages.ubuntu.com/manpages/precise/man1/virt-sysprep.1.html . It`s a bash script to reset/unconfigure a vm so clones can be made.

TurpakpbIc
  • 31
  • 1
  • Welcome to ServerFault. Please try to include a few more information on the actual tool (here virt-sysprep), because the links may not always available after a few years / decades later. – Pothi Kalimuthu Apr 01 '18 at 03:27
1

If you intend to deploy the image in the same network you should check if you have a static ip address on /etc/network/interfaces and change, if necessary, the configuration for a another ip address in the new system cloned to avoid conflicts whith the other hosts.

(Copy and paste an example): sudo vi /etc/network/interfaces

To configure a dynamic IP address

auto eth0 iface eth0 inet dhcp

Or configure a static IP

auto eth0 iface eth0 inet static address 192.168.1.14 gateway 192.168.1.1 netmask 255.255.255.0 network 192.168.1.0 broadcast 192.168.1.255

For these settings to take effect you need to restart your networking services.

sudo /etc/init.d/networking restart

enter link description here

If you intend to change the name of the User for a NewUser you should take in consideration this link: change username

Cheers.