The driver was earlier performing create from a source volume and create from
a snapshot point by copying the source volume container folder.
This is not valid in case of vSAN datastore where the volume data is not a
'file' in the container folder unlike VMFS/NFS datastores. So copying folder
will only copy descriptor file and hence the source and cloned volume will
end up writing to the same data location, eventually corrupting it.
The fix is to copy only the VMDK file (descriptor + data) and not the entire
container folder. The implementation does the following:
1. Create a volume backing
2. Delete the current VMDK
3. Make a copy of source volume's VMDK file to the destination using virtual
disk manager. In case of create from snapshot, we copy the VMDK file corresponding to the snapshot point.
Reviewed: https:/ /review. openstack. org/48915 github. com/openstack/ cinder/ commit/ fc7c36c9ca94de6 bd2481c59d77105 66dd4a1ddb
Committed: http://
Submitter: Jenkins
Branch: master
commit fc7c36c9ca94de6 bd2481c59d77105 66dd4a1ddb
Author: Kartik Bommepally <email address hidden>
Date: Mon Sep 30 02:45:37 2013 -0700
VMware ESX: Fixes vol clone & clone from snapshot
The driver was earlier performing create from a source volume and create from
a snapshot point by copying the source volume container folder.
This is not valid in case of vSAN datastore where the volume data is not a
'file' in the container folder unlike VMFS/NFS datastores. So copying folder
will only copy descriptor file and hence the source and cloned volume will
end up writing to the same data location, eventually corrupting it.
The fix is to copy only the VMDK file (descriptor + data) and not the entire
corresponding to the snapshot point.
container folder. The implementation does the following:
1. Create a volume backing
2. Delete the current VMDK
3. Make a copy of source volume's VMDK file to the destination using virtual
disk manager. In case of create from snapshot, we copy the VMDK file
Fixes bug: 1233034
Change-Id: I51c9870c11a6d6 6f9f47c1ad9aaa2 abc3dd0533a