I'm developing a plugin for vsphere client, in that we provide virtual machine clone option also. Actually when i created a clone of
virtual machine to a new datastore, the newly created virtual machine is listed under the original datastore also. When i searched net i found out this may be due to linked clone. But i dont know how to create a full clone. This happened when i tried to create a clone directly from vsphere client also. I have specified the that i followed to create clone.
1. Created a datastore from a volume(this volume is our own volume)
2. Created a Virtual Machine.
3. Cloned our own volume to a new volume (Pls note these two volumes are not linked, but all the contents will be cloned)
4. Add the target of the new volume and rescan HBA.
5. QueryUnresolvedVmfsVolumes and resignature it using ResignatureUnresolvedVmfsVolume_Task
6. Using the datastore browser get the newly created datastore and get the vmx file path
7. Register virtual machine using RegisterVM_Task method.
8. All the operation succeeded successfully. But only thing is the newly created virtual machine is also listed under the original datastore.
vSphere Client approach:
1. Created volume, datastore and virtual machine.
2. Created another volume and datastore out of it.
3. Now tried to clone the above created virtual machine using Clone option from vcenter.
4. Virtual machine cloned successfully, but again it is listed under the original datastore.
Can anyone please suggest me how to resolve this? I saw there is something called full clone. How to do that? Or otherwise I wanted to find out the way to identify the virtual machines that are only part of the corresponding datastore(and not the cloned virtual machines)
Any comments/suggestions on this please?