DaanHoogland commented on a change in pull request #3976: Enable sending 
hypervior host name via metadata - VR and Config Drive
URL: https://github.com/apache/cloudstack/pull/3976#discussion_r401877966
 
 

 ##########
 File path: 
plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtMigrateCommandWrapper.java
 ##########
 @@ -141,6 +146,12 @@ Use VIR_DOMAIN_XML_SECURE (value = 1) prior to v1.0.0.
             xmlDesc = dm.getXMLDesc(xmlFlag);
             xmlDesc = replaceIpForVNCInDescFile(xmlDesc, target);
 
+            String oldIsoVolumePath = getOldVolumePath(disks, vmName);
+            String newIsoVolumePath = 
getNewVolumePathIfDatastoreHasChanged(libvirtComputingResource, conn, to);
+            if (newIsoVolumePath != null && 
!newIsoVolumePath.equals(oldIsoVolumePath)) {
+                s_logger.debug("Editing mount path");
+                xmlDesc = replaceDiskSourceFile(xmlDesc, newIsoVolumePath, 
vmName);
+            }
 
 Review comment:
   I think even this part could be factorred out. the method is still almost 
200 lines. (no biggy)

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

Reply via email to