Highlighted
Hot Shot
Hot Shot

Cloning Linux VMs

Jump to solution

When cloning a linux VM or using a Linux VM as a template is there anything to watch out for? Do I need some linux equivalent of Sysprep on windows?

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Immortal
Immortal

There isn't such an equivalent.

After cloning non-Windows VMs you have to adjust the settings (IP, hostname, ...) yourself.

View solution in original post

0 Kudos
8 Replies
Highlighted
Immortal
Immortal

There isn't such an equivalent.

After cloning non-Windows VMs you have to adjust the settings (IP, hostname, ...) yourself.

View solution in original post

0 Kudos
Highlighted

You can use the sys-unconfig command to remove host name, IP address, etc. I use it for my template servers in Solaris and the documentation in the man pages indicates that is should also work in Linux.

0 Kudos
Highlighted
Expert
Expert

I believe that, in some circumstances, you actually can customize a Linux guest:

Linux Requirements for Guest Customization

http://www.vmware.com/support/vc/doc/c1requirements.html#1041685

Guest customization of a Linux guest operating system can occur if:

The clone or template has one of the following Linux versions installed:

Red Hat Enterprise Linux AS 3.0

Red Hat Advanced Server 2.1

SUSE LINUX Enterprise Server 8

The clone or template has a root volume formatted with ext2 or ext3 file system.

Note: A default installation of SUSE LINUX Enterprise Server 8.0 formats the disk using the ReiserFS file system, which is not supported. If you would like to customize your SUSE virtual machines, be sure to format the disk using an ext2 or ext3 file system during the installation of the guest operating system.

The VMware Open Source Components installed on the VirtualCenter management server.

Refer to Installing the VMware Open Source Components for additional information.

http://www.vmware.com/download/vi/open_source.html

Note, I haven't used these, so I'm really not sure if it allows you to change the hostname/IP address. If Oliver says that it is not possible, I am inclined to believe him.

For what it is worth, I have found that, with Linux guests, it is easy-enough to just rely on kickstart installation script (with the desired options, IP address, hostname, etc.) instead of cloning and then monkeying-around with the customization. Just my $0.02 worth.

###############

If you found this information useful, please consider awarding points for "Correct" or "Helpful". Thanks!!!

############### Under no circumstances are you to award me any points. Thanks!!!
Highlighted
Enthusiast
Enthusiast

Cloning Linux VMs works fine. Once they are cloned you may still need to configure them.

It's simplest to set up the base template to get it's configuration from the network. I.E. DHCP for network configuration, LDAP/NIS/NIS+ for accounts, automounter/nfs for shared directories (if needed), then if the host needs a static address and hostname that can be configured on the DHCP server. The rest can be configured from the network itself.

RHCE, VCP

RHCE, VCP Blog: http://computing.dwighthubbard.info
0 Kudos
Highlighted
Immortal
Immortal

To be honest I never tried the Linux guest customization since manually changing a hostname and an IP address isn't that "complicated".

With newer Linux distros you usually have to modify the network scripts anyway (due to the infamous MAC address hard coding).

0 Kudos
Highlighted
Enthusiast
Enthusiast

Yeah, the Mac address issue in the network configuration files is a pain.

I've taken to removing the Mac address from the network configuration and setting it to DHCP before creating the template. I've found if I don't do that and someone else manually configures the VM I cloned for them they will set up their network configuration and forget to change the Mac address and call me wondering why their networking configuration doesn't seem to be working.

RHCE, VCP

RHCE, VCP Blog: http://computing.dwighthubbard.info
Highlighted
Expert
Expert

Yep, cloning Linux VMs works fine; I don't think there was ever a question about whether or not it is possible to clone Linux VMs.

I think the question was whether or not it is easier to clone, then configure, including changing/configuring IP, hostname, MAC tweaking, etc. etc. None of the previous configuration steps are very difficult; as I said before, I personally have found it easier/quicker to simply alter the appropriate lines in the ks.cfg (kickstart configuration file), and walk away while the installation proceeds.




###############

If you found this information useful, please consider awarding points for "Correct" or "Helpful". Thanks!!!

############### Under no circumstances are you to award me any points. Thanks!!!
0 Kudos
Highlighted
Hot Shot
Hot Shot

Thanks everyone, all very helpful comments.

0 Kudos