nvazquez commented on a change in pull request #2983: KVM live storage 
migration intra cluster from NFS source and destination
URL: https://github.com/apache/cloudstack/pull/2983#discussion_r229306734
 
 

 ##########
 File path: 
plugins/hypervisors/kvm/src/main/java/org/apache/cloudstack/utils/qemu/QemuImg.java
 ##########
 @@ -30,8 +31,13 @@
 
     /* The qemu-img binary. We expect this to be in $PATH */
     public String _qemuImgPath = "qemu-img";
+    private String cloudQemuImgPath = "cloud-qemu-img";
     private int timeout;
 
+    private String getQemuImgPathScript = String.format("which %s >& 
/dev/null; " +
+                    "if [ $? -gt 0 ]; then echo \"%s\"; else echo \"%s\"; fi",
+            cloudQemuImgPath, _qemuImgPath, cloudQemuImgPath);
 
 Review comment:
   As this feature requires qemu-img command supporting snapshots I have 
introduced this check. This cloud-qemu-img can be included on KVM hosts to 
support snapshots as per: 
http://www.nux.ro/oldblog/archive/2014/01/Taking_KVM_volume_snapshots_with_Cloudstack_4_2_on_CentOS_6_5.html
   If cloud-qemu-img is present then we can use it, and if not just qemu-img. 
It is also done this way on scripts: 
https://github.com/apache/cloudstack/search?q=cloud-qemu-img&unscoped_q=cloud-qemu-img.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to