DaanHoogland commented on code in PR #12331:
URL: https://github.com/apache/cloudstack/pull/12331#discussion_r2645064153


##########
plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/wrapper/LibvirtMigrateCommandWrapper.java:
##########
@@ -314,6 +314,21 @@ Use VIR_DOMAIN_XML_SECURE (value = 1) prior to v1.0.0.
                 if (logger.isDebugEnabled()) {
                     logger.debug(String.format("Cleaning the disks of VM [%s] 
in the source pool after VM migration finished.", vmName));
                 }
+                DomainState dmState = null;
+                try {
+                    dmState = destDomain.getInfo().state;
+                } catch (final LibvirtException e) {
+                    logger.info("Failed to get domain state for VM: " + vmName 
+ " due to: " + e.getMessage());
+                }
+
+                if (dmState == DomainState.VIR_DOMAIN_PAUSED) {
+                    logger.info("Resuming VM " + vmName + " on destination 
after migration");
+                    try {
+                        destDomain.resume();
+                    } catch (final Exception e) {
+                        logger.error("Failed to resume vm " + vmName + " on 
destination after migration due to : " + e.getMessage());
+                    }
+                }

Review Comment:
   new method..?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to