shwstppr commented on a change in pull request #5170: URL: https://github.com/apache/cloudstack/pull/5170#discussion_r661357017
########## File path: plugins/hypervisors/vmware/src/main/java/com/cloud/hypervisor/vmware/resource/VmwareResource.java ########## @@ -7501,7 +7501,7 @@ private Answer execute(PrepareUnmanageVMInstanceCommand cmd) { VolumeObjectTO newVol = new VolumeObjectTO(); newVol.setDataStoreUuid(entry.second().getUuid()); String newPath = vmMo.getVmdkFileBaseName(disk); - ManagedObjectReference morDs = HypervisorHostHelper.findDatastoreWithBackwardsCompatibility(targetHyperHost, entry.second().getUuid()); + ManagedObjectReference morDs = HypervisorHostHelper.findDatastoreWithBackwardsCompatibility(targetHyperHost != null ? targetHyperHost : sourceHyperHost, entry.second().getUuid()); Review comment: @weizhouapache Method gets `sourceHyperHost` either from caller or the host which is processing the command, https://github.com/apache/cloudstack/pull/5170/files#diff-77635c5f7eb9cef514aaf69e2fdc9217619afc9005bf8db9585c176e7401a88bR7329-R7331 Cannot be null if the command is being processed -- 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