Is this possible? Basically want to take a "snapshot file" and create a separate VM instance from it. If you powered off the VM, could you copy the delta file to a new location, rename it to a flat file, create a new VM and point it to that file? Or is that just crazy voodoo?
I guess I should explain why I want to do this. We have a production server that has a snapshot. They want a "test VM" to play with that has the exact same snapshots. However when you do a clone in VC, you lose the snapshots; or Ghost or Platespin for that matter. You end us losing the snapshot hierarchy that you had on the source VM.
No you can't just rename a -delta.vmdk to a -flat.vmdk, because the delta is a bitmap of the changes that have occured to the base -flat.vmdk on it's own it is meaningless.
To achieve what you want, power off the VM, use vmkfstools -i to make copies of the base VMDKs and all the delta's (always point at the .vmdk header files not the -flat.vmdk or -delta.vmdk when working with vmdk files). Then copy the .vmx and .vmsd files over, edit the .vmx file to reflect the new paths where you cloned the vmdk files too, likewise with the .vmsd, and change the name in the .vmx. Then register the VM with a host, power it on, and when asked create a new UUID. Voila, you have a clone with the snapshot tree intact, it's a manual process, but not too difficult.
You the man! I'll give this a try. thanks again. One other question, why doesn't VmWare let you do this through Virtual Center? It basically sounds like a clone, but clones don't support snapshots. So when I do the import with vmkfstools I just point at the "base .vmdk" and it will import everything including the deltas?
Message was edited by:
jonb157
So when I
do the import with vmkfstools I just point at the
"base .vmdk" and it will import everything including
the deltas?
No, you'll need to clone each vmdk manually, the base and all of the delta's.
Try using my vmclone.pl (perl script) - It takes care of all the manual work of renaming and cloning a VM - including the snapshot deltas. No guarantees (but it works for me):