Thursday, August 6, 2009

Cloning a snapshot attached Virtual Machine

I am returning back after a long vacation. Thanks to my new family member.

If you want to clone a snapshot machine you have to be very careful because snapshots are lost on cloned machine. This was usual method which we were using for migrating from one location to other location in order to save WAN bandwidth.

The method which we adopted was to clone the VM's to a cheap filer (FAS2020) and ship the filer . This way WAN link will be saved. With VC2.5 U5 and all we can do live cloning of VM's For the VM's which has snapshot I usually copy it "as it is " to the filer and then do the same thing out of filer. Register the VMX and all set.

Copy using SCP was very painful so I found new way to do it TAR

Get inside the VMFS volume.

tar zcf - <vm_folder_name>/ | ssh root@<target ESX host name> "cd /vmfs/volumes/<target vol name>/; tar zpxvf -"


iguy said...

What kind of WAN link you got? Its cheaper to ship a FAS?? Dang.

Vikash Kumar Roy said...

Infact I did my own analysis and it is not. Very well said Ian. I am very sure guys who take such decision had never this kind of analysis. What the heck I am doing ? Just following orders. :)