Add the convert method
Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/e9924a8b Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/e9924a8b Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/e9924a8b Branch: refs/heads/qemu-img Commit: e9924a8b52166f796459025c3cbf4c686d09b583 Parents: 79482f5 Author: Wido den Hollander <w...@42on.com> Authored: Thu Feb 14 20:41:10 2013 +0100 Committer: Wido den Hollander <w...@42on.com> Committed: Thu Feb 14 20:41:10 2013 +0100 ---------------------------------------------------------------------- .../org/apache/cloudstack/utils/qemu/QemuImg.java | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/e9924a8b/utils/src/org/apache/cloudstack/utils/qemu/QemuImg.java ---------------------------------------------------------------------- diff --git a/utils/src/org/apache/cloudstack/utils/qemu/QemuImg.java b/utils/src/org/apache/cloudstack/utils/qemu/QemuImg.java index c93d0ab..daa62ab 100644 --- a/utils/src/org/apache/cloudstack/utils/qemu/QemuImg.java +++ b/utils/src/org/apache/cloudstack/utils/qemu/QemuImg.java @@ -73,7 +73,14 @@ public class QemuImg { /* Convert the disk image filename or a snapshot snapshot_name to disk image output_filename using format output_fmt. */ public void convert(QemuImgFile srcFile, QemuImgFile destFile, List<Map<String, String>> options) { - + Script s = new Script(_qemuImgPath); + s.add("convert"); + s.add("-f"); + s.add(srcFile.getFormat().toString()); + s.add("-O"); + s.add(destFile.getFormat().toString()); + s.add(srcFile.getFileName()); + s.add(destFile.getFileName()); } public void convert(QemuImgFile srcFile, QemuImgFile destFile) {