cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhais...@apache.org
Subject [1/2] git commit: updated refs/heads/4.5 to a6c630c
Date Wed, 02 Sep 2015 05:09:06 GMT
Repository: cloudstack
Updated Branches:
  refs/heads/4.5 6cdde0feb -> a6c630c54


Support live migration on older version of Libvirt

Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/f5b51970
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/f5b51970
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/f5b51970

Branch: refs/heads/4.5
Commit: f5b51970488df6204508f7d2e6e8e7b03e865711
Parents: 5a6928c
Author: Mike Tutkowski <mike.tutkowski@solidfire.com>
Authored: Tue Sep 1 16:00:08 2015 -0600
Committer: Mike Tutkowski <mike.tutkowski@solidfire.com>
Committed: Tue Sep 1 16:00:08 2015 -0600

----------------------------------------------------------------------
 .../hypervisor/kvm/resource/LibvirtComputingResource.java      | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f5b51970/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
----------------------------------------------------------------------
diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
index ae48783..0123798 100755
--- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
+++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java
@@ -3096,8 +3096,12 @@ public class LibvirtComputingResource extends ServerResourceBase implements
Serv
                                VIR_DOMAIN_XML_MIGRATABLE flag (value = 8)
                                https://libvirt.org/html/libvirt-libvirt-domain.html#virDomainXMLFlags
 
+                               Use VIR_DOMAIN_XML_SECURE (value = 1) prior to v1.0.0.
+
              */
-            xmlDesc = dm.getXMLDesc(8).replace(_privateIp, cmd.getDestinationIp());
+            int xmlFlag = conn.getLibVirVersion() >= 1000000 ? 8 : 1; // 1000000 equals
v1.0.0
+
+            xmlDesc = dm.getXMLDesc(xmlFlag).replace(_privateIp, cmd.getDestinationIp());
 
             dconn = new Connect("qemu+tcp://" + cmd.getDestinationIp() + "/system");
 


Mime
View raw message