LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Clone a Linux VM (https://www.linuxquestions.org/questions/linux-newbie-8/clone-a-linux-vm-947185/)

DrinkinHomeBrew 05-28-2012 02:55 AM

Clone a Linux VM
 
I want to make a template of a Linux build that I can use repeatedly without re-installing the OS.

Is it correct to say the only steps I generally need to do is to

1) Update the IP addresses & network configuration (if its static)
2) Change the host name

I installed LVM, and I noticed the drive name is now mapped as /dev/mapping/servername-partition, which doesn't change even after I change the host name. I'd think I can just rename these partitions, or am I better off not using LVM at all?

mukt-kalandar 05-28-2012 07:38 AM

Cloning process of linux VM will create image of existing setup. It will clone each and every thing from existing setup. So you need to take care in case of static IP address/hostname. Because this information is very important if you are running any SSL based appliactions on your setup.

You can rename partitions after created them using cloned image. It is not recommended to convert LVM based partitions to static partitions if it is deployed under root partition.

Satyaveer Arya 05-28-2012 01:22 PM

Checkout these links-
http://www.mernin.com/blog/2006/11/h...-using-vmware/
http://www.storix.com/how-to/204-how...irtual-machine

DrinkinHomeBrew 05-29-2012 01:11 PM

Quote:

Originally Posted by mukt-kalandar (Post 4689391)
Cloning process of linux VM will create image of existing setup. It will clone each and every thing from existing setup. So you need to take care in case of static IP address/hostname. Because this information is very important if you are running any SSL based appliactions on your setup.

You can rename partitions after created them using cloned image. It is not recommended to convert LVM based partitions to static partitions if it is deployed under root partition.

Thanks. This eases my mind a bit, and after looking further my problem was indeed that I built the template using whole disk with LVM, and I really am not seeing a need for LVM for Virtual Machines (this appears to be much more useful if I had multiple physical spindles - and not really useful if I have one virtual HDD and running everything in partition).

Unlike Windows where properly to make a template you'd need to sysprep the box before cloning to have it cover all the hidden crap that needs to be altered for cloning, I like being able to just clone the whole VM (VMWare automatically changes the MAC), and update the hostname & networking settings (don't even have to do the latter if I'm using DHCP.


All times are GMT -5. The time now is 06:00 AM.