mirror of https://github.com/apache/cloudstack.git
Fixed the issue of VM deletion not cleaning the VM folder on vVols datastore. Fixed it by deleting the VM as complete entity including the extra root disks.
This commit is contained in:
parent
5fdabc1cb0
commit
048e8c8744
|
|
@ -2670,13 +2670,12 @@ public class VmwareStorageProcessor implements StorageProcessor {
|
|||
List<VirtualDisk> virtualDisks = vmMo.getVirtualDisks();
|
||||
List<String> managedDatastoreNames = getManagedDatastoreNamesFromVirtualDisks(virtualDisks);
|
||||
|
||||
List<String> detachedDisks = vmMo.detachAllDisksExcept(vol.getPath(), diskInfo != null ? diskInfo.getDiskDeviceBusName() : null);
|
||||
VmwareStorageLayoutHelper.moveVolumeToRootFolder(new DatacenterMO(context, morDc), detachedDisks);
|
||||
|
||||
// let vmMo.destroy to delete volume for us
|
||||
// vmMo.tearDownDevices(new Class<?>[] { VirtualDisk.class, VirtualEthernetCard.class });
|
||||
|
||||
if (isManaged) {
|
||||
List<String> detachedDisks = vmMo.detachAllDisksExcept(vol.getPath(), diskInfo != null ? diskInfo.getDiskDeviceBusName() : null);
|
||||
VmwareStorageLayoutHelper.moveVolumeToRootFolder(new DatacenterMO(context, morDc), detachedDisks);
|
||||
vmMo.unregisterVm();
|
||||
}
|
||||
else {
|
||||
|
|
|
|||
Loading…
Reference in New Issue