VMware {code} Community
GeoffPHiggins
Contributor
Contributor

Linked clone from current running point

I'm looking into linked clones ( using vSphere 4.1 ) at the moment and, while linked cloning from a snapshot works fine for me, I'm having some difficulty with linked cloning from the current running point.

So, I create a fresh vm and attempt to create a linked clone ( see attached code ) from its current running point using a diskMoveType of VirtualMachineRelocateDiskMoveOptions.moveChildMostDiskBacking as outlined in the Programming Guide but I end up with a full clone instead. I notice that if I take a snapshot of my fresh vm and retry my code again, I do indeed get a linked clone based on the current running point.

Not sure if I've done something wrong or misunderstood how linked cloning from current running point should work. Does the source vm really need to have a snapshot for linked cloning from the current running point to work ?

Any thoughts ?

Thanks,

Geoff.

0 Kudos
2 Replies
BenN
Enthusiast
Enthusiast

Does the source vm really need to have a snapshot for linked cloning from the current running point to work ?

I'm pretty sure this is true. If you look at the description in the SDK reference:

http://www.vmware.com/support/developer/vc-sdk/visdk400pubs/ReferenceGuide/vim.vm.RelocateSpec.DiskM...

for moveChildMostDiskBacking (MCMDB) it says:

"This option only differs from moveAllDiskBackingsAndAllowSharing and moveAllDiskBackingsAndDisallowSharing

when the virtual disk has a parent backing".

In other words, when the virtual disk has a snapshot. MCMDB is really just a convenient way to say "I want a clone, do the least amount of

disk copying that you can". If it can create a linked clone, it will, otherwise it reverts to standard full clone.

Note, BTW, that MCMDB was broken in earlier versions of vSphere 4, in that it would create a linked delta disk as designed, but would

then proceed to (slowly) copy the entire parent disk into the delta disk. I assume that's fixed by now, though.

0 Kudos
GeoffPHiggins
Contributor
Contributor

Thanks BenN,

I didn't pay enough attention to that when I read it previously.

It's a pity though that a snapshot is required. Sounds like the sort of thing that will irk at least some of our customers.

Thanks again,

Geoff.

0 Kudos