diff options
| author | Bill Peck <bpeck@redhat.com> | 2014-06-18 16:01:17 -0400 |
|---|---|---|
| committer | Bill Peck <bpeck@redhat.com> | 2014-06-18 16:01:17 -0400 |
| commit | 28578152b71235ccd3525af39d33879133a37ff1 (patch) | |
| tree | c59a1a675ee8fd6e8811c6874486c364a0f8eb38 | |
| parent | b0ebdea3e19299c763e8bfb20f8e8bd9e86b1265 (diff) | |
| download | tests-28578152b71235ccd3525af39d33879133a37ff1.tar.gz tests-28578152b71235ccd3525af39d33879133a37ff1.tar.xz tests-28578152b71235ccd3525af39d33879133a37ff1.zip | |
Change the boot args for the guest image. Should run the new recipe.
| -rwxr-xr-x | distribution/virt/import/runtest.sh | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/distribution/virt/import/runtest.sh b/distribution/virt/import/runtest.sh index ba8d8e3..958b015 100755 --- a/distribution/virt/import/runtest.sh +++ b/distribution/virt/import/runtest.sh @@ -60,6 +60,28 @@ function DeBug () fi } +function ChangeBootArgs () +{ + DeBug "Enter ChangeBootArgs" + IMAGE=$1 + GUESTRECIPEID=$2 + + # FIXME: check for first loop device is free + + mkdir /mnt/boot + losetup /dev/loop0 $IMAGE + kpartx -a /dev/loop0 + BOOT=$(blkid -l -o device -t LABEL="/boot") + mount $BOOT /mnt/boot + # Change recipeid + if [ -e "/mnt/boot/grub/grub.conf" ]; then + sed -i "s/\(BEAKER_RECIPE_ID=\)[^ ]*/\1$GUESTRECIPEID/" /mnt/boot/grub/grub.conf + fi + umount /mnt/boot + kpartx -d /dev/loop0 + losetup -d /dev/loop0 +} + function SelectKernel () { DeBug "Enter SelectKernel" @@ -960,6 +982,8 @@ while read -r guest_recipeid guest_name guest_mac guest_args ; do exit 1 fi + ChangeBootArgs $basedir/${guest_name}.img ${guest_recipeid} + #bridge=$(ip route list | awk '/^default / { print $NF }' | sed 's/^[^0-9]*//') #CMDLINE="-b xenbr${bridge} -n ${guestname} -f ${IMAGE} $args" CMDLINE="--name ${guest_name} --mac ${guest_mac} $guest_args --debug --nographics --noreboot --import" |
