VMware Cloud Community
TomP1
Contributor
Contributor
Jump to solution

snapshot and clone ?

I have a vm that I took a snapshot off. Some work has been done on the vm since then that I don't want to loose, but I also have a need now to make a copy of the way the vm was at the time of the snapshot. In otherwords I want a copy of clone of the vm at the time of the snapshot. Is this possible? what are the steps?

0 Kudos
1 Solution

Accepted Solutions
admin
Immortal
Immortal
Jump to solution

What you need to do is use vmkfstools to clone the base VMDK, this will create an exact copy of the VM's disk from the moment immediately before[/b] you took the snapshot.

Use the following commands when logged in to the Service Console as root. If you're not sure how to SSH into your ESX Service Console have a read of the following whitepaper.

http://www.xtravirt.com/index.php?option=com_remository&Itemid=75&func=fileinfo&id=10

When you're at the prompt as root (using su -), first make a new directory for the clone disk.

mkdir /vmfs/volumes/yourvolume/yourclonevm[/code]

Then clone the disk.

vmkfstools -i /vmfs/volumes/yourvolume/yourvm/yourvm.vmdk /vmfs/volumes/yourvolume/yourclonevm/yourclonevm.vmdk[/code]

Then create a new VM using the VI client with equal specification to the Vm you are cloning, and when it comes to adding a disk select "use an existing disk file" and then browse to your cloned VMDK file. You can then power on this new VM and it will be a clone of your other VM before the changes took place.

View solution in original post

0 Kudos
3 Replies
hicksj
Virtuoso
Virtuoso
Jump to solution

Sure... clone the system as it is now. Then revert the original VM.

Now you have 2 copies, one old, one new.

admin
Immortal
Immortal
Jump to solution

What you need to do is use vmkfstools to clone the base VMDK, this will create an exact copy of the VM's disk from the moment immediately before[/b] you took the snapshot.

Use the following commands when logged in to the Service Console as root. If you're not sure how to SSH into your ESX Service Console have a read of the following whitepaper.

http://www.xtravirt.com/index.php?option=com_remository&Itemid=75&func=fileinfo&id=10

When you're at the prompt as root (using su -), first make a new directory for the clone disk.

mkdir /vmfs/volumes/yourvolume/yourclonevm[/code]

Then clone the disk.

vmkfstools -i /vmfs/volumes/yourvolume/yourvm/yourvm.vmdk /vmfs/volumes/yourvolume/yourclonevm/yourclonevm.vmdk[/code]

Then create a new VM using the VI client with equal specification to the Vm you are cloning, and when it comes to adding a disk select "use an existing disk file" and then browse to your cloned VMDK file. You can then power on this new VM and it will be a clone of your other VM before the changes took place.

0 Kudos
hicksj
Virtuoso
Virtuoso
Jump to solution

Alex's process is a good one also - his doesn't require you to shutdown the source VM.

However, it is a more complex process requiring host console access. Console access is not always a viable option when the folks that need to perform the tasks are software developers who have limited rights within VI3.

0 Kudos