shwstppr commented on a change in pull request #4638:
URL: https://github.com/apache/cloudstack/pull/4638#discussion_r610589014



##########
File path: server/src/main/java/com/cloud/vm/UserVmManagerImpl.java
##########
@@ -6678,6 +6678,12 @@ public UserVm restoreVirtualMachine(final Account 
caller, final long vmId, final
                 newVol = volumeMgr.allocateDuplicateVolume(root, null);
             }
 
+            if (userVmDetailsDao.findDetail(vm.getId(), 
VmDetailConstants.ROOT_DISK_SIZE) == null && 
!newVol.getSize().equals(template.getSize())) {
+                VolumeVO resizedVolume = (VolumeVO) newVol;
+                resizedVolume.setSize(template.getSize());
+                _volsDao.update(resizedVolume.getId(), resizedVolume);

Review comment:
       @sureshanaparti Duplicating using template, won't that affect other 
existing values of the entry - folder, path, etc?




-- 
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