QEMU default command lines updates

- Fix a bug in clientctl which tried to test for kvm. This simply
   remove this faulty test  as the kvm command has been deprecated by the
   QEMU project for a couple of years now.

 - Specify by default 256M of RAM as this is the minimal amount required
   for the whole-OS live update test to succeed.

 - Update the default command printed out at the end of the x86_hdimage
   script to be more generic, less focused on one use-case.

Change-Id: Ic555d50a3a1471f7d35cc7fd369f2292add6ac39
This commit is contained in:
Lionel Sambuc 2015-01-23 18:30:39 +01:00 committed by David van Moolenbroek
parent f8ddf7c81d
commit d8d3052dd0
2 changed files with 3 additions and 5 deletions

View File

@ -290,15 +290,13 @@ function run_cmd {
function run { function run {
if [ "$HYPER" == "" ]; then if [ "$HYPER" == "" ]; then
if which kvm2 > /dev/null; then if [ -e /dev/kvm ]; then
HYPER=kvm
elif [ -e /dev/kvm ]; then
HYPER="qemu-system-i386 --enable-kvm" HYPER="qemu-system-i386 --enable-kvm"
else else
HYPER=qemu-system-i386 HYPER=qemu-system-i386
fi fi
fi fi
opts="-hda $IMAGE" opts="-m 256 -hda $IMAGE"
append="$APPEND rootdevname=c0d0p1" append="$APPEND rootdevname=c0d0p1"
[ ! -f $DISK ] || opts="$opts -hdb $DISK" [ ! -f $DISK ] || opts="$opts -hdb $DISK"
if [ "$OUT" == "F" ]; then if [ "$OUT" == "F" ]; then

View File

@ -199,5 +199,5 @@ then
echo "CD image at `pwd`/${IMG}" echo "CD image at `pwd`/${IMG}"
else else
echo "To boot this image on kvm:" echo "To boot this image on kvm:"
echo "cd ${MODDIR} && qemu-system-i386 -display none -serial stdio -kernel kernel -append \"console=tty00 rootdevname=c0d0p1\" -initrd \"${mods}\" -hda `pwd`/${IMG} --enable-kvm" echo "cd ${MODDIR} && qemu-system-i386 --enable-kvm -m 256 -kernel kernel -append \"rootdevname=c0d0p1\" -initrd \"${mods}\" -hda `pwd`/${IMG}"
fi fi