From 32b4784e7e56def630ca80a9ae1356c901bde35a Mon Sep 17 00:00:00 2001 From: Wei Liu Date: Thu, 8 Sep 2016 16:52:48 +0100 Subject: [PATCH] TestSupport: use qemu-img to create vhd image 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 Acked-by: Ian Jackson Signed-off-by: Ian Jackson --- Osstest/TestSupport.pm | 3 ++- ts-xen-install | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm index 04b8b3f4..b18a19e5 100644 --- a/Osstest/TestSupport.pm +++ b/Osstest/TestSupport.pm @@ -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) = @_; diff --git a/ts-xen-install b/ts-xen-install index 3d0f3949..2a1784df 100755 --- a/ts-xen-install +++ b/ts-xen-install @@ -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'); -- 2.39.5