]> xenbits.xensource.com Git - people/iwj/osstest.git/commitdiff
TestSupport: use qemu-img to create vhd image
authorWei Liu <wei.liu2@citrix.com>
Thu, 8 Sep 2016 15:52:48 +0000 (16:52 +0100)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Mon, 26 Sep 2016 10:48:33 +0000 (11:48 +0100)
We would like to delete blktap2 from xen.git at some point, but vhd-util
is part of blktap2. Let's switch to use qemu-img to create vhd image to
remove the dependency on blktap2 in osstest.

We want to use the distro qemu-utils, so add that to the package list
in ts-xen-install.

Note that vhd format is named "vpc" in qemu-img.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Osstest/TestSupport.pm
ts-xen-install

index 04b8b3f4be8d6b39525299812b52f3e71e080689..b18a19e5cb5ef92ff4197924574ba3d7ea676541 100644 (file)
@@ -1761,7 +1761,8 @@ sub prepareguest_part_lvmdisk ($$$) {
 
 sub make_vhd ($$$) {
     my ($ho, $gho, $disk_mb) = @_;
-    target_cmd_root($ho, "vhd-util create -n $gho->{Rootimg} -s $disk_mb");
+    my $disk_mb_s = sprintf("%dM", $disk_mb);
+    target_cmd_root($ho, "qemu-img create -f vpc $gho->{Rootimg} $disk_mb_s");
 }
 sub make_qcow2 ($$$) {
     my ($ho, $gho, $disk_mb) = @_;
index 3d0f39497f732f434ba6fc0605b8178754a89a76..2a1784dfe572595014845098a900d59c4a89b9fa 100755 (executable)
@@ -54,6 +54,7 @@ sub packages () {
     target_install_packages($ho,
                             qw(bridge-utils vncsnapshot libaio1 libpixman-1-0
                                libsdl1.2debian libglib2.0-0 liblzma5
+                              qemu-utils
                                netcat-openbsd));
     if ($ho->{Suite} =~ m/jessie/) {
         target_install_packages($ho, 'libnl-route-3-200');