# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1211564341 25200
# Node ID f3004051f9d21079d063b73d9fd4bf751a8c4078
# Parent 4a5a44d7b857df543af24d59380cb8fdbbb753a4
[TEST] #4 Make RHEL 5 XenFV guest grub conf use hda.
It looks like qemu on RHEL emulates an ide drive, not a scsi drive.
Update from 1 to 2:
-Instead of using distro, use qemu-dm version.
Update from 2 to 3:
-Handle case where qemu-dm is 32 bit, as well as 64 bit.
Update from 3 to 4:
-Make sure the elif actually checks for the 32 bit version, not the 54 bit version.
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r 4a5a44d7b857 -r f3004051f9d2 suites/libvirt-cim/images/xmt-makefv.sh
--- a/suites/libvirt-cim/images/xmt-makefv.sh Fri May 30 14:26:38 2008 +0800
+++ b/suites/libvirt-cim/images/xmt-makefv.sh Fri May 23 10:39:01 2008 -0700
@@ -14,6 +14,20 @@
PARTED="parted -s"
TMPMOUNT=/tmp/cimtest_image_temp
SIZE=16
+QEMU_VER=082
+QEMU_FILE=""
+
+if [ -e "/usr/lib64/xen/bin/qemu-dm" ]; then
+ QEMU_FILE="/usr/lib64/xen/bin/qemu-dm"
+elif [ -e "/usr/lib/xen/bin/qemu-dm" ]; then
+ QEMU_FILE="/usr/lib/xen/bin/qemu-dm"
+fi
+
+if [ -z $QEMU_FILE ]; then
+ CU_QEMU_VER=0
+else
+ CUR_QEMU_VER=`strings $QEMU_FILE | awk '/version [0-9]/ { print $5; }' | sed
's/,//' | sed 's/\.//g'`
+fi
die() {
echo "FAILED: $i" >&2
@@ -110,10 +124,19 @@
timeout 1
title Test Environment
root (hd0,0)
+EOF
+
+if [ $CUR_QEMU_VER -lt $QEMU_VER ]; then
+ cat >>${root}/grub/grub.conf <<EOF
+ kernel /vmlinuz root=/dev/hda1
+ initrd /initrd
+EOF
+else
+ cat >>${root}/grub/grub.conf <<EOF
kernel /vmlinuz root=/dev/sda1
initrd /initrd
EOF
-
+fi
}
ramdisk=$1
_______________________________________________
Libvirt-cim mailing list
Libvirt-cim(a)redhat.com
https://www.redhat.com/mailman/listinfo/libvirt-cim