osstest: update FreeBSD guests and cleanup
v2 cover osstest: update FreeBSD guests and cleanup
The first patch in this series updates FreeBSD guests in OSSTest to use raw images instead of qcow2 (which are no longer provided by upstream). The second patch is a cleanup for ts-freebsd-install which should not change functionality.
PATCH v2 1/2 osstest: update FreeBSD guests to 10.1
Update FreeBSD guests in OSSTest to FreeBSD 10.1. The following images should be placed in the osstest images folder:
ftp://ftp.freebsd.org/pub/FreeBSD/releases/VM-IMAGES/10.1-RELEASE/amd64/Latest/FreeBSD-10.1-RELEASE-amd64.raw.xz ftp://ftp.freebsd.org/pub/FreeBSD/releases/VM-IMAGES/10.1-RELEASE/i386/Latest/FreeBSD-10.1-RELEASE-i386.raw.xz
Since new images are in raw format rather than qcow2 remove the runes to convert from qcow2 to raw.
---
Changes since v1:
- Remove the runes to convert the image from qcow2 to raw.
--- make-flight | 2 +- ts-freebsd-install | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-)
make-flight +1 -1
@@ -150,7 +150,7 @@ do_freebsd_tests () { job_create_test test-$xenarch$kern-$dom0arch$qemuu_suffix-freebsd10-$freebsdarch \ test-freebsd xl $xenarch $dom0arch \ freebsd_arch=$freebsdarch \ - freebsd_image=${FREEBSD_IMAGE_PREFIX-FreeBSD-10.0-RELEASE-}$freebsdarch${FREEBSD_IMAGE_SUFFIX--20140116-r260789.qcow2.xz} \ + freebsd_image=${FREEBSD_IMAGE_PREFIX-FreeBSD-10.1-RELEASE-}$freebsdarch${FREEBSD_IMAGE_SUFFIX-.raw.xz} \ all_hostflags=$most_hostflags done
ts-freebsd-install +2 -5
@@ -51,8 +51,7 @@ our $freebsd_vm_repo= '/var/images'; sub prep () { my $authkeys= authorized_keys(); - target_install_packages_norec($ho, qw(rsync lvm2 qemu-utils - xz-utils kpartx)); + target_install_packages_norec($ho, qw(rsync lvm2 xz-utils kpartx)); $gho= prepareguest($ho, $gn, $guesthost, 22, $disk_mb + 1,
@@ -76,9 +75,7 @@ sub prep () { target_cmd_root($ho, <<END, 900); set -ex - xz -dkc $rimage > $rimagebase.qcow2 - qemu-img convert -f qcow2 $rimagebase.qcow2 -O raw $rimagebase.raw - rm $rimagebase.qcow2 + xz -dkc $rimage > $rimagebase.raw dd if=$rimagebase.raw of=$gho->{Lvdev} bs=1M rm $rimagebase.raw
Signature · 7 lines
1.9.5 (Apple Git-50.3) _______________________________________________ Xen-devel mailing list [email protected] http://lists.xen.org/xen-devel
Re: [PATCH v2 1/2] osstest: update FreeBSD guests to 10.1
Roger Pau Monne writes ("[PATCH v2 1/2] osstest: update FreeBSD guests to 10.1"):
Quoted 2 lines
Update FreeBSD guests in OSSTest to FreeBSD 10.1. The following images should be placed in the osstest images folder:
Thanks for the quick turnaround. I have pushed this and 2/2 to osstest pretest (with my acks) and will keep an eye on it.
Ian.
PATCH v2 2/2 osstest: clean ts-freebsd-install script
In reply to Roger Pau MonneRemove some unused variables from ts-freebsd-install script. Also make the third parameter of target_put_guest_image optional and fix both callers of this function.
--- Osstest/TestSupport.pm | 4 ++-- ts-freebsd-install | 21 ++------------------- 2 files changed, 4 insertions(+), 21 deletions(-)
Osstest/TestSupport.pm +2 -2
@@ -1554,7 +1554,7 @@ END return $cfgpath; } -sub target_put_guest_image ($$$) { +sub target_put_guest_image ($$;$) { my ($ho, $gho, $default) = @_; my $specimage = $r{"$gho->{Guest}_image"}; $specimage = $default if !defined $specimage;
@@ -1574,7 +1574,7 @@ sub more_prepareguest_hvm ($$$$;@) { my @disks = "phy:$gho->{Lvdev},hda,w"; if (!$xopts{NoCdromImage}) { - target_put_guest_image($ho, $gho, undef); + target_put_guest_image($ho, $gho); my $postimage_hook= $xopts{PostImageHook}; $postimage_hook->() if $postimage_hook;
ts-freebsd-install +2 -19
@@ -36,18 +36,6 @@ our $gho; our $mnt= '/root/freebsd_root'; -our $freebsd_version= "10.0-BETA3"; - -# Folder where the FreeBSD VM images are stored inside of the host -# -# The naming convention of the stored images is: -# FreeBSD-$freebsd_version-$arch.qcow2.xz -# ie: FreeBSD-10.0-BETA3-amd64.qcow2.xz -# -# Used only if the runvar <guest>_image is not set. -# -our $freebsd_vm_repo= '/var/images'; - sub prep () { my $authkeys= authorized_keys();
@@ -59,13 +47,8 @@ sub prep () { more_prepareguest_hvm($ho, $gho, $ram_mb, $disk_mb, NoCdromImage => 1); - target_put_guest_image($ho, $gho, - "$freebsd_vm_repo/FreeBSD-$freebsd_version-". - (defined($r{"$gho->{Guest}_arch"}) - # Use amd64 as default arch - ? $r{"$gho->{Guest}_arch"} : 'amd64'). - ".qcow2.xz"); - + target_put_guest_image($ho, $gho); + my $rootpartition_dev = target_guest_lv_name($ho, $gho->{Name}) . "--disk3"; target_cmd_root($ho, "umount $gho->{Lvdev} ||:");
Signature · 7 lines
1.9.5 (Apple Git-50.3) _______________________________________________ Xen-devel mailing list [email protected] http://lists.xen.org/xen-devel