lujiefsi commented on a change in pull request #4859:
URL: https://github.com/apache/cloudstack/pull/4859#discussion_r617415481



##########
File path: server/src/main/java/com/cloud/vm/UserVmManagerImpl.java
##########
@@ -2966,9 +2966,20 @@ public UserVm destroyVm(DestroyVMCmd cmd) throws 
ResourceUnavailableException, C
         checkForUnattachedVolumes(vmId, volumesToBeDeleted);
         validateVolumes(volumesToBeDeleted);
 
+        List<VolumeVO> allVolumes = null;
+        if (vm.getHypervisorType() == HypervisorType.VMware) {
+            allVolumes = _volsDao.findByInstance(vm.getId());
+            allVolumes.removeIf(vol -> vol.getVolumeType() == 
Volume.Type.ROOT);
+        }else {
+            allVolumes = volumesToBeDeleted;
+        }

Review comment:
       ops, have fixed it




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to