harikrishna-patnala commented on code in PR #9243: URL: https://github.com/apache/cloudstack/pull/9243#discussion_r1638098707
########## plugins/hypervisors/vmware/src/main/java/com/cloud/hypervisor/vmware/resource/VmwareResource.java: ########## @@ -2203,7 +2203,7 @@ protected StartAnswer execute(StartCommand cmd) { throw new Exception("Failed to find the newly create or relocated VM. vmName: " + vmInternalCSName); } } - if (deployAsIs) { + if (deployAsIs && !vmMo.hasSnapshot()) { Review Comment: This seems right to me as I see some other calls of tearDownVmDevices() method before this call which does handle snapshot existance. https://github.com/shapeblue/cloudstack/blob/78e07cff62dd98d9b88852a47407e80fa57537d2/plugins/hypervisors/vmware/src/main/java/com/cloud/hypervisor/vmware/resource/VmwareResource.java#L2826-L2834 private void tearDownVmDevices(VirtualMachineMO vmMo, boolean hasSnapshot, boolean deployAsIs) throws Exception { if (deployAsIs) { vmMo.tearDownDevices(new Class<?>[]{VirtualEthernetCard.class}); } else if (!hasSnapshot) { vmMo.tearDownDevices(new Class<?>[]{VirtualDisk.class, VirtualEthernetCard.class}); } else { vmMo.tearDownDevices(new Class<?>[]{VirtualEthernetCard.class}); } } -- 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. To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org