kvm: Strip trailing comma for qemu-img convert options Fix trailing comma for qemu-img convert options, Qemu 2.0+ not tolerant to it
Signed-off-by: Rohit Yadav <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/90ac1aba Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/90ac1aba Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/90ac1aba Branch: refs/heads/master Commit: 90ac1aba13d431cdccf51dde2c4727b96388d985 Parents: aee35c9 Author: Rohit Yadav <[email protected]> Authored: Fri May 22 13:32:56 2015 +0100 Committer: Rohit Yadav <[email protected]> Committed: Fri May 22 13:32:56 2015 +0100 ---------------------------------------------------------------------- .../kvm/src/org/apache/cloudstack/utils/qemu/QemuImg.java | 1 + 1 file changed, 1 insertion(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/90ac1aba/plugins/hypervisors/kvm/src/org/apache/cloudstack/utils/qemu/QemuImg.java ---------------------------------------------------------------------- diff --git a/plugins/hypervisors/kvm/src/org/apache/cloudstack/utils/qemu/QemuImg.java b/plugins/hypervisors/kvm/src/org/apache/cloudstack/utils/qemu/QemuImg.java index e8dbf92..500c2d0 100644 --- a/plugins/hypervisors/kvm/src/org/apache/cloudstack/utils/qemu/QemuImg.java +++ b/plugins/hypervisors/kvm/src/org/apache/cloudstack/utils/qemu/QemuImg.java @@ -236,6 +236,7 @@ public class QemuImg { for (Map.Entry<String, String> option : options.entrySet()) { optionsStr += option.getKey() + "=" + option.getValue() + ","; } + optionsStr = optionsStr.replaceAll(",$", ""); s.add(optionsStr); }
