rhtyd commented on a change in pull request #3218: [WIP DO NOT MERGE] vmware:
don't use redundant worker VM to extract volume
URL: https://github.com/apache/cloudstack/pull/3218#discussion_r286852747
##########
File path:
plugins/hypervisors/vmware/src/main/java/com/cloud/hypervisor/vmware/manager/VmwareStorageManagerImpl.java
##########
@@ -1014,16 +1018,19 @@ private void
exportVolumeToSecondaryStroage(VirtualMachineMO vmMo, String volume
String datastoreVolumePath = getVolumePathInDatastore(dsMo,
volumePath + ".vmdk", searchExcludedFolders);
workerVm.attachDisk(new String[] {datastoreVolumePath}, morDs);
vmMo = workerVm;
Review comment:
Same reason as before, using different instances/variable, it's easier to
track is we need to destroy the worker vm after we're done. If we re-use
`vmMo`, we might accidently destroy the user-vm.
----------------------------------------------------------------
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]
With regards,
Apache Git Services