Skip to content

Commit 20e181c

Browse files
author
Jayakarteek Vasana
committed
CLOUDSTACK-9908 : Primary Storage allocated capacity goes very high after VM snapshot
1 parent 3f69c83 commit 20e181c

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareStorageManagerImpl.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1306,11 +1306,12 @@ private void setVolumeToPathAndSize(List<VolumeObjectTO> volumeTOs, Map<String,
13061306
// get volume's chain size for this VM snapshot; exclude current volume vdisk
13071307
DataStoreTO store = volumeTO.getDataStore();
13081308
ManagedObjectReference morDs = getDatastoreAsManagedObjectReference(baseName, hyperHost, store);
1309-
long size = getVMSnapshotChainSize(context, hyperHost, baseName + "*.vmdk", morDs, newPath);
1309+
long size = getVMSnapshotChainSize(context, hyperHost, baseName + ".vmdk", morDs, newPath);
1310+
size = getVMSnapshotChainSize(context, hyperHost, baseName + "-*.vmdk", morDs, newPath);
13101311

13111312
if (volumeTO.getVolumeType()== Volume.Type.ROOT) {
13121313
// add memory snapshot size
1313-
size += getVMSnapshotChainSize(context, hyperHost, vmName + "*.vmsn", morDs, null);
1314+
size += getVMSnapshotChainSize(context, hyperHost, vmName + "-*.vmsn", morDs, null);
13141315
}
13151316

13161317
volumeTO.setSize(size);

0 commit comments

Comments
 (0)