From: Ian Campbell <ian.campbell@citrix.com>
To: ian.jackson@eu.citrix.com
Cc: Ian Campbell <ian.campbell@citrix.com>, xen-devel@lists.xen.org
Subject: [PATCH OSSTEST v8 04/14] distros: support booting Debian PV (d-i installed) guests with pvgrub.
Date: Wed, 8 Jul 2015 13:30:52 +0100 [thread overview]
Message-ID: <1436358662-12886-4-git-send-email-ian.campbell@citrix.com> (raw)
In-Reply-To: <1436358648.23508.32.camel@citrix.com>
This requires the use of the pv-grub-menu package which is in Jessie
onwards. (it is in wheezy-backports which is the subject of a
subsequent patch).
The bootloader to use is specified via a runvar {Guest}_bootloader.
Adjust make-distros-flight to use pvgrub for some subset of i386 and
amd64 guests to get coverage.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
v8: Added comment regarding new runvar. Since this was inspired by
Ian's comment on "distros: support PV guest install from Debian
netinst media I have retained the ack.
v7: Move definition of $extra_packages variable to here which is its
first usage.
Use {Guest}_suite not {Guest}_dist as runvar to choose version.
v3: Define and use arch_debian2xen and arch_xen2debian
Avoid pv-grub-x86_64.gz on i386 dom0, we don't built it there.
Fiddle with py vs pv grub stripy a bit.
---
Osstest.pm | 7 +++++++
Osstest/Debian.pm | 4 +++-
make-distros-flight | 20 +++++++++++++++++++-
ts-debian-di-install | 18 ++++++++++++++----
4 files changed, 43 insertions(+), 6 deletions(-)
diff --git a/Osstest.pm b/Osstest.pm
index 6535401..8f97dd2 100644
--- a/Osstest.pm
+++ b/Osstest.pm
@@ -39,6 +39,7 @@ BEGIN {
db_begin_work db_prepare
ensuredir get_filecontents_core_quiet system_checked
nonempty visible_undef show_abs_time
+ %arch_debian2xen %arch_xen2debian
);
%EXPORT_TAGS = ( );
@@ -54,6 +55,12 @@ scalar *main::DEBUG;
# declaration prevents `Name "main::DEBUG" used only once'
# scalar prevents `useless use of a variable in void context'
+our %arch_debian2xen = qw(i386 x86_32
+ amd64 x86_64
+ armhf armhf);
+our %arch_xen2debian;
+$arch_xen2debian{$arch_debian2xen{$_}} = $_ foreach keys %arch_debian2xen;
+
#---------- static default config settings ----------
our %c = qw(
diff --git a/Osstest/Debian.pm b/Osstest/Debian.pm
index 2d49ff8..1edf49f 100644
--- a/Osstest/Debian.pm
+++ b/Osstest/Debian.pm
@@ -867,7 +867,9 @@ sub preseed_create_guest ($$;@) {
my $suite= $xopts{Suite} || $c{DebianSuite};
- my $preseed_file= preseed_base($ho, $suite, $sfx, '', %xopts);
+ my $extra_packages = "pv-grub-menu" if $xopts{PvMenuLst};
+
+ my $preseed_file= preseed_base($ho, $suite, $sfx, $extra_packages, %xopts);
$preseed_file.= (<<END);
d-i partman-auto/method string regular
d-i partman-auto/choose_recipe \\
diff --git a/make-distros-flight b/make-distros-flight
index bdca7d1..c19e3ba 100755
--- a/make-distros-flight
+++ b/make-distros-flight
@@ -90,6 +90,11 @@ test_do_one_netboot () {
*) ;;
esac
+ stripy bootloader pvgrub pygrub \
+ "$xenarch" "amd64" \
+ "$dom0arch" "i386" \
+ "$domU" "amd64" \
+
case $domU in
i386|amd64)
diurl="$diurl/xen";;
@@ -97,8 +102,20 @@ test_do_one_netboot () {
diurl="$diurl/debian-installer/arm64";;
esac
+ case ${dom0arch}_${domU}_${gsuite} in
+ arm*_arm*_*) bootloader="pygrub";; # no pvgrub for arm
+
+ # Needs a menu.lst, not present in Squeeze+ due to switch to grub2,
+ # workedaround in Jessie+ with pv-grub-menu package.
+ *_squeeze) bootloader="pygrub";;
+ *_wheezy) bootloader="pygrub";;
+
+ # pv-grub-x86_64.gz is not built by 32-bit dom0 userspace build.
+ i386_amd64_*) bootloader="pygrub";;
+ esac
+
job_create_test \
- test-$xenarch$kern-$dom0arch-$domU-$gver-netboot-pygrub \
+ test-$xenarch$kern-$dom0arch-$domU-$gver-netboot-$bootloader \
test-debian-di xl $xenarch $dom0arch \
kernbuildjob=${bfi}build-$dom0arch-$kernbuild \
debian_arch=$domU \
@@ -106,6 +123,7 @@ test_do_one_netboot () {
debian_method=netboot \
debian_netboot_kernel="$diurl/vmlinuz" \
debian_netboot_ramdisk="$diurl/initrd.gz" \
+ debian_bootloader=$bootloader \
all_hostflags=$most_hostflags
}
diff --git a/ts-debian-di-install b/ts-debian-di-install
index 08019a9..a59194a 100755
--- a/ts-debian-di-install
+++ b/ts-debian-di-install
@@ -22,13 +22,16 @@
# Debian arch to install.
# - <gident>_method:
# Install method, currently only "netboot".
+# - <gident>_bootloader:
+# The PV bootloader to use when booting the guest. One of
+# "pvgrub" or "pygrub". Default is "pygrub".
#
# For method="netboot":
#
# - <gident>_netboot_kernel:
-# URL of the kernel to boot
+# URL of the kernel to boot.
# - <gident>_netboot_ramdisk:
-# URL of the ramdisk to boot
+# URL of the ramdisk to boot.
#
# If neither kernel nor ramdisk are specified then the current
# TftpDiVersion of d-i will be used, and the runvars will be set to
@@ -107,6 +110,8 @@ sub ginstall () {
my $method= $r{"$gho->{Guest}_method"};
my $tmpdir= "/root/$flight-$job-di";
+ my $bl= $r{"$gho->{Guest}_bootloader"};
+
target_cmd_root($ho, <<END);
rm -rf $tmpdir
mkdir $tmpdir
@@ -121,7 +126,7 @@ END
$method_cfg = setup_netboot($tmpdir, $arch, $suite);
- $ps_url = preseed_create_guest($gho, '', Suite=>$suite);
+ $ps_url = preseed_create_guest($gho, '', Suite=>$suite, PvMenuLst=>($bl eq "pvgrub"));
$extra_disk = "";
}
@@ -162,7 +167,12 @@ END
guest_await_shutdown($ho,$gho,3600);
guest_destroy($gho);
- my $blcfg = <<END;
+ my $xenarch = $arch_debian2xen{$arch};
+ my $pvgrub = "/usr/local/lib/xen/boot/pv-grub-$xenarch.gz";
+ my $blcfg = $bl eq "pvgrub" ? <<END : <<END;
+kernel = "$pvgrub"
+extra = "(hd0,0)/boot/grub/menu.lst"
+END
bootloader = "pygrub"
END
--
2.1.4
next prev parent reply other threads:[~2015-07-08 12:30 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-08 12:30 [PATCH OSSTEST v8 00/14] add distro domU testing flight Ian Campbell
2015-07-08 12:30 ` [PATCH OSSTEST v8 01/14] mfi-common: Allow make-*flight to filter the set of build jobs to include Ian Campbell
2015-07-08 12:30 ` [PATCH OSSTEST v8 02/14] TestSupport: Add helper to fetch a URL on a host Ian Campbell
2015-07-08 13:29 ` Ian Jackson
2015-07-08 12:30 ` [PATCH OSSTEST v8 03/14] distros: add support for installing Debian PV guests via d-i, flight and jobs Ian Campbell
2015-07-08 12:30 ` Ian Campbell [this message]
2015-07-08 12:30 ` [PATCH OSSTEST v8 05/14] distros: Support pvgrub for Wheezy too Ian Campbell
2015-07-08 13:32 ` Ian Jackson
2015-07-08 13:51 ` Ian Campbell
2015-07-08 13:58 ` Ian Jackson
2015-07-08 14:55 ` Ian Campbell
2015-07-08 15:25 ` Ian Jackson
2015-07-08 15:51 ` Ian Campbell
2015-07-08 12:30 ` [PATCH OSSTEST v8 06/14] Test pygrub and pvgrub on the regular flights Ian Campbell
2015-07-08 12:30 ` [PATCH OSSTEST v8 07/14] distros: add branch infrastructure Ian Campbell
2015-07-08 12:30 ` [PATCH OSSTEST v8 08/14] crontab-cambridge: Use hard tabs for alignment Ian Campbell
2015-07-08 13:32 ` Ian Jackson
2015-07-08 12:30 ` [PATCH OSSTEST v8 09/14] distros: Run one suite per day on a weekly basis Ian Campbell
2015-07-08 13:33 ` Ian Jackson
2015-07-08 12:30 ` [PATCH OSSTEST v8 10/14] Debian: Handle lack of bootloader support in d-i on ARM Ian Campbell
2015-07-08 12:30 ` [PATCH OSSTEST v8 11/14] ts-debian-di-install: Refactor root_disk specification Ian Campbell
2015-07-08 12:31 ` [PATCH OSSTEST v8 12/14] make-flight: refactor PV debian tests Ian Campbell
2015-07-08 12:31 ` [PATCH OSSTEST v8 13/14] Add testing of file backed disk formats Ian Campbell
2015-07-08 13:34 ` Ian Jackson
2015-07-08 12:31 ` [PATCH OSSTEST v8 14/14] make-distros-flight: Use ftp.debian.org directly Ian Campbell
2015-07-08 13:35 ` Ian Jackson
2015-07-23 14:40 ` [PATCH OSSTEST v8 00/14] add distro domU testing flight Ian Campbell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1436358662-12886-4-git-send-email-ian.campbell@citrix.com \
--to=ian.campbell@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).