Skip to contentSkip to conversation

TestSupport: use qemu-img to create vhd image

PATCH In review Wei Liu 2 participants 4 messages Sep 8, 2016 – Sep 23, 2016

lore
Share & tools
lore

Wei Liu

author
#0 lore raw

PATCH 1/1 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.

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

---
 Osstest/TestSupport.pm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Osstest/TestSupport.pm +2 -1
index 7eb7bc4..3da36da 100644
@@ -1750,7 +1750,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) = @_;
Signature · 7 lines
2.1.4


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Acked-by on v1 1/1
#1 lore raw

Wei Liu writes ("[OSSTEST PATCH] TestSupport: use qemu-img to create vhd image"):

Quoted 5 lines

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.

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

FAOD, I haven't dropped this. This patch LGTM.

I have queued it for a push at some point. Right now there's a d-i update in the pipeline ahead of it.

Thanks,
Ian.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#2 lore raw

Ian Jackson writes ("Re: [OSSTEST PATCH] TestSupport: use qemu-img to create vhd image"):

Quoted 6 lines

FAOD, I haven't dropped this. This patch LGTM.

I have queued it for a push at some point. Right now there's a d-i update in the pipeline ahead of it.

Well, it did this:

++ ./make-flight osstest xen-unstable real
No such class disk_mb_s at Osstest/TestSupport.pm line 1764, near "my disk_mb_s" syntax error at Osstest/TestSupport.pm line 1764, near "my disk_mb_s ="
Global symbol "$disk_mb_s" requires explicit package name at Osstest/TestSupport.pm line 1765. BEGIN not safe after errors--compilation aborted at Osstest/TestSupport.pm line 1812. Compilation failed in require at Osstest/JobDB/Executive.pm line 24.
BEGIN failed--compilation aborted at Osstest/JobDB/Executive.pm line 24. Compilation failed in require at (eval 18) line 2.
+ flight=

This is because of a missing dollar sign. I will fix it up and retry.

Ian.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

author
#3 lore raw
Quoted 20 lines · Ian Jackson

Ian Jackson writes ("Re: [OSSTEST PATCH] TestSupport: use qemu-img to create vhd image"):

Quoted 6 lines

FAOD, I haven't dropped this. This patch LGTM.

I have queued it for a push at some point. Right now there's a d-i update in the pipeline ahead of it.

Well, it did this:

++ ./make-flight osstest xen-unstable real
No such class disk_mb_s at Osstest/TestSupport.pm line 1764, near "my disk_mb_s" syntax error at Osstest/TestSupport.pm line 1764, near "my disk_mb_s ="
Global symbol "$disk_mb_s" requires explicit package name at Osstest/TestSupport.pm line 1765. BEGIN not safe after errors--compilation aborted at Osstest/TestSupport.pm line 1812. Compilation failed in require at Osstest/JobDB/Executive.pm line 24.
BEGIN failed--compilation aborted at Osstest/JobDB/Executive.pm line 24. Compilation failed in require at (eval 18) line 2.
+ flight=

Quoted 2 lines

This is because of a missing dollar sign. I will fix it up and retry.

Oops... Sorry about that and thanks for fixing that up.

Quoted 1 line

Ian.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel