ia64/xen-unstable

changeset 8310:9558361d8040

Add initial VMX support to xm-test:

1) Added script create_disk_image to make full virt image
2) Changed XenDomain.py to build separate XmTestDomain object
for vmx guests (this structure will need to be cleaned up)
3) Changed ramdisk Makefile.am to create disk.img if vmx configured

Signed-off-by: Daniel Stekloff <dsteklof@us.ibm.com>
author stekloff@elm3b216.beaverton.ibm.com
date Fri Dec 09 11:04:55 2005 +0000 (2005-12-09)
parents da3b19d7bf9e
children 53cff3f88e45
files tools/xm-test/configure.ac tools/xm-test/lib/XmTestLib/XenDomain.py tools/xm-test/lib/XmTestLib/config.py.in tools/xm-test/ramdisk/Makefile.am tools/xm-test/ramdisk/bin/create_disk_image tools/xm-test/tests/block-list/04_block-list_nodb_pos.py
line diff
     1.1 --- a/tools/xm-test/configure.ac	Fri Dec 09 10:40:41 2005 +0000
     1.2 +++ b/tools/xm-test/configure.ac	Fri Dec 09 11:04:55 2005 +0000
     1.3 @@ -15,13 +15,14 @@ RD_PATH=../../ramdisk
     1.4  TENV="PYTHONPATH=$PYTHONPATH:$TESTLIB:/usr/lib/python RD_PATH=$RD_PATH"
     1.5  
     1.6  AC_ARG_ENABLE(vmx-support,
     1.7 -	[[  --enable-vmx-support           use block devices instead of ramdisks]],
     1.8 +	[[  --enable-vmx-support           enable hardware virtual machine assist]],
     1.9  	[
    1.10  		ENABLE_VMX=True
    1.11  	],[
    1.12  		ENABLE_VMX=False
    1.13  	])
    1.14  
    1.15 +AM_CONDITIONAL(VMX, test x$ENABLE_VMX = xTrue)
    1.16  AC_SUBST(ENABLE_VMX)
    1.17  
    1.18  AC_SUBST(TENV)
     2.1 --- a/tools/xm-test/lib/XmTestLib/XenDomain.py	Fri Dec 09 10:40:41 2005 +0000
     2.2 +++ b/tools/xm-test/lib/XmTestLib/XenDomain.py	Fri Dec 09 11:04:55 2005 +0000
     2.3 @@ -23,13 +23,18 @@ import commands
     2.4  import os
     2.5  import re
     2.6  import time
     2.7 -import random
     2.8  
     2.9  from Xm import *
    2.10  from Test import *
    2.11  from config import *
    2.12  
    2.13 -BLOCK_ROOT_DEV = "hdd1"
    2.14 +BLOCK_ROOT_DEV = "hda"
    2.15 +
    2.16 +def XmTestDomain(name=None, extraOpts=None, config="/dev/null"):
    2.17 +    if ENABLE_VMX_SUPPORT:
    2.18 +        return XmTestVmxDomain(name, extraOpts, config)
    2.19 +    else:
    2.20 +        return XmTestPvDomain(name, extraOpts, config)
    2.21  
    2.22  def getDefaultKernel():
    2.23      dom0Ver = commands.getoutput("uname -r");
    2.24 @@ -77,7 +82,21 @@ class XenDomain:
    2.25              c += " %s=%s" % (k, self.opts[k])
    2.26          
    2.27          return c
    2.28 -        
    2.29 +
    2.30 +    def getUniqueName(self):
    2.31 +        #
    2.32 +        # We avoid multiple duplicate names
    2.33 +        # here because they stick around in xend
    2.34 +        # too long
    2.35 +        #
    2.36 +        unixtime = int(time.time())
    2.37 +        test_name = sys.argv[0]
    2.38 +        test_name = re.sub("\.test", "", test_name)
    2.39 +        test_name = re.sub("[\/\.]", "", test_name)
    2.40 +        name = "%s-%i" % (test_name, unixtime)
    2.41 +
    2.42 +        return name
    2.43 +
    2.44      def start(self):
    2.45  
    2.46          if self.configVals:
    2.47 @@ -135,6 +154,18 @@ class XenDomain:
    2.48  
    2.49          self.configVals["disk"].append("%s,%s,%s" % (pdev,vdev,acc))
    2.50  
    2.51 +    def configAddVif(self, type, mac, bridge):
    2.52 +        if not self.configVals:
    2.53 +            self.configVals = {}
    2.54 +
    2.55 +        if not self.configVals.has_key("vif"):
    2.56 +            self.configVals["vif"] = []
    2.57 +
    2.58 +        if mac:
    2.59 +            self.configVals["vif"].append("%s,%s,%s" % (type,mac,bridge))
    2.60 +        else:
    2.61 +            self.configVals["vif"].append("%s,%s" % (type,bridge))
    2.62 +
    2.63      def __writeConfig(self, configFileName):
    2.64  
    2.65          conf = file(configFileName, "w")
    2.66 @@ -144,46 +175,84 @@ class XenDomain:
    2.67  
    2.68          conf.close()
    2.69  
    2.70 -
    2.71 -class XmTestDomain(XenDomain):
    2.72 -
    2.73 -    def __getUniqueName(self):
    2.74 -        #
    2.75 -        # We avoid multiple duplicate names
    2.76 -        # here because they stick around in xend
    2.77 -        # too long
    2.78 -        #
    2.79 -        unixtime = int(time.time())
    2.80 -        test_name = sys.argv[0]
    2.81 -        test_name = re.sub("\.test", "", test_name)
    2.82 -        test_name = re.sub("[\/\.]", "", test_name)
    2.83 -        name = "%s-%i" % (test_name, unixtime)
    2.84 -
    2.85 -        return name
    2.86 -
    2.87 -    def __randomize(self):
    2.88 -        # Random amount of memory between min and free_memory/2
    2.89 -        freeMem = int(getInfo("free_memory"))
    2.90 -        self.defaults["memory"] = random.randint(self.minSafeMem(),
    2.91 -                                                 freeMem/2)
    2.92 -        
    2.93 -        self.defaults["vcpus"] = random.randint(1, 16)
    2.94 -
    2.95 -        self.defaults["nics"] = random.randint(0, 8)
    2.96 -
    2.97 -        if verbose:
    2.98 -            print "*** Defaults after randomization:"
    2.99 -            for k in self.defaults.keys():
   2.100 -                print "***  %10s : %s" % (k, self.defaults[k])
   2.101 +class XmTestVmxDomain(XenDomain):
   2.102  
   2.103      def __prepareBlockRoot(self, rdpath):
   2.104 -        image = os.path.abspath(rdpath + "/initrd.img")
   2.105 -        self.configAddDisk("file:%s" % image, BLOCK_ROOT_DEV, "w")
   2.106 -        self.defaults["root"] = "/dev/%s" % BLOCK_ROOT_DEV
   2.107 -        del self.defaults["ramdisk"]
   2.108 +        image = os.path.abspath(rdpath + "/disk.img")
   2.109 +        self.configAddDisk("file:%s" % image, "ioemu:%s" % BLOCK_ROOT_DEV, "w")
   2.110 +
   2.111 +    def __prepareVif(self):
   2.112 +        self.configAddVif("type=ioemu", None, "bridge=xenbr0")
   2.113 +
   2.114 +    def __prepareDeviceModel(self):
   2.115 +        arch = os.uname()[4]
   2.116 +        if re.search('64', arch):
   2.117 +            self.configSetVar("device_model", "\"/usr/lib64/xen/bin/qemu-dm\"")
   2.118 +        else:
   2.119 +            self.configSetVar("device_model", "\"/usr/lib/xen/bin/qemu-dm\"")
   2.120 +
   2.121 +    def __init__(self, name=None, extraOpts=None, config="/dev/null"):
   2.122 +
   2.123 +        rdpath = os.environ.get("RD_PATH")
   2.124 +        if not rdpath:
   2.125 +            rdpath = "../../ramdisk"
   2.126 +
   2.127 +        self.opts = {}
   2.128 +        self.configVals = {}
   2.129 +
   2.130 +        # Defaults
   2.131 +        self.defaults = {"memory"    : 64,
   2.132 +                         "vcpus"     : 1,
   2.133 +                         "nics"      : 0,
   2.134 +                         "kernel"    : "/usr/lib/xen/boot/vmxloader",
   2.135 +                         "builder"   : "\'vmx\'",
   2.136 +                         "name"      : name or self.getUniqueName()
   2.137 +                         }
   2.138 +
   2.139 +        self.domID = None;
   2.140 +        self.config = config;
   2.141  
   2.142 -    def __init__(self, name=None, extraOpts=None, config="/dev/null",
   2.143 -                 random=False):
   2.144 +        self.__prepareBlockRoot(rdpath)
   2.145 +	#self.__prepareVif()
   2.146 +        self.__prepareDeviceModel()
   2.147 +        #self.configSetVar("boot","\'c\'")
   2.148 +        self.configSetVar("sdl","0")
   2.149 +        self.configSetVar("vnc","0")
   2.150 +        self.configSetVar("vncviewer","0")
   2.151 +        self.configSetVar("nographic","1")
   2.152 +        self.configSetVar("serial","\'pty\'")
   2.153 +
   2.154 +        # Copy over defaults
   2.155 +        for key in self.defaults.keys():
   2.156 +            self.opts[key] = self.defaults[key]
   2.157 +
   2.158 +        # Merge in extra options
   2.159 +        if extraOpts:
   2.160 +            for key in extraOpts.keys():
   2.161 +                self.opts[key] = extraOpts[key]
   2.162 +
   2.163 +    def start(self):
   2.164 +        """We know how about how long everyone will need to wait
   2.165 +        for our disk image to come up, so we do it here as a convenience"""
   2.166 +
   2.167 +#        for i in range(0,5):
   2.168 +#            status, output = traceCommand("xm list")
   2.169 +
   2.170 +        XenDomain.start(self)
   2.171 +        waitForBoot()
   2.172 +
   2.173 +    def startNow(self):
   2.174 +        XenDomain.start(self)
   2.175 +
   2.176 +    def getMem(self):
   2.177 +        return int(self.opts["memory"])
   2.178 +
   2.179 +    def minSafeMem(self):
   2.180 +        return 16
   2.181 +
   2.182 +class XmTestPvDomain(XenDomain):
   2.183 +
   2.184 +    def __init__(self, name=None, extraOpts=None, config="/dev/null"):
   2.185  
   2.186          rdpath = os.environ.get("RD_PATH")
   2.187          if not rdpath:
   2.188 @@ -198,19 +267,13 @@ class XmTestDomain(XenDomain):
   2.189                           "nics"    : 0,
   2.190                           "kernel"  : getDefaultKernel(),
   2.191                           "root"    : "/dev/ram0",
   2.192 -                         "name"    : name or self.__getUniqueName(),
   2.193 +                         "name"    : name or self.getUniqueName(),
   2.194                           "ramdisk" : rdpath + "/initrd.img"
   2.195                           }
   2.196  
   2.197          self.domID = None;
   2.198          self.config = config;
   2.199  
   2.200 -        if random:
   2.201 -            self.__randomize()
   2.202 -
   2.203 -        if USE_BLKDEV_FOR_ROOT:
   2.204 -            self.__prepareBlockRoot(rdpath)
   2.205 -        
   2.206          # Copy over defaults
   2.207          for key in self.defaults.keys():
   2.208              self.opts[key] = self.defaults[key]
     3.1 --- a/tools/xm-test/lib/XmTestLib/config.py.in	Fri Dec 09 10:40:41 2005 +0000
     3.2 +++ b/tools/xm-test/lib/XmTestLib/config.py.in	Fri Dec 09 11:04:55 2005 +0000
     3.3 @@ -1,4 +1,4 @@
     3.4  #!/usr/bin/python
     3.5  
     3.6 -USE_BLKDEV_FOR_ROOT = @ENABLE_VMX@
     3.7 +ENABLE_VMX_SUPPORT = @ENABLE_VMX@
     3.8  
     4.1 --- a/tools/xm-test/ramdisk/Makefile.am	Fri Dec 09 10:40:41 2005 +0000
     4.2 +++ b/tools/xm-test/ramdisk/Makefile.am	Fri Dec 09 11:04:55 2005 +0000
     4.3 @@ -9,10 +9,16 @@ BR_IMG = $(BR_SRC)/rootfs.i386.ext2
     4.4  
     4.5  BR_ROOT = build_i386/root
     4.6  
     4.7 +VMX_SCRIPT = bin/create_disk_image
     4.8 +
     4.9  XMTEST_MAJ_VER = $(shell echo @PACKAGE_VERSION@ | perl -pe 's/(\d+)\.(\d+)\.\d+/\1.\2/')
    4.10  XMTEST_VER_IMG = initrd-$(XMTEST_MAJ_VER).img
    4.11  
    4.12 +if VMX
    4.13 +all: initrd.img disk.img
    4.14 +else
    4.15  all: initrd.img
    4.16 +endif
    4.17  
    4.18  $(BR_TAR):
    4.19  	wget $(BR_URL)
    4.20 @@ -37,6 +43,10 @@ all: initrd.img
    4.21  initrd.img: $(XMTEST_VER_IMG)
    4.22  	ln -sf $(XMTEST_VER_IMG) initrd.img
    4.23  
    4.24 +disk.img: $(XMTEST_VER_IMG)
    4.25 +	chmod a+x $(VMX_SCRIPT)
    4.26 +	$(VMX_SCRIPT) -r $(XMTEST_VER_IMG) -i disk.img
    4.27 +
    4.28  existing:
    4.29  	@[ -f $(XMTEST_VER_IMG) ] && ln -sf $(XMTEST_VER_IMG) initrd.img || \
    4.30  	echo Error, $(XMTEST_VER_IMG) not found
    4.31 @@ -49,3 +59,4 @@ am_config_clean-local:
    4.32  	rm -f initrd.img
    4.33  	rm -f $(BR_TAR)
    4.34  	rm -Rf patches make.d
    4.35 +	rm -f disk.img
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/tools/xm-test/ramdisk/bin/create_disk_image	Fri Dec 09 11:04:55 2005 +0000
     5.3 @@ -0,0 +1,317 @@
     5.4 +#!/bin/bash
     5.5 +###############################################################################
     5.6 +##
     5.7 +##  Copyright (C) International Business Machines  Corp., 2005
     5.8 +##  Author(s):  Daniel Stekloff <dsteklof@us.ibm.com>
     5.9 +##
    5.10 +##  This program is free software; you can redistribute it and/or modify
    5.11 +##  it under the terms of the GNU General Public License as published by
    5.12 +##  the Free Software Foundation; under version 2 of the License.
    5.13 +##
    5.14 +##  This program is distributed in the hope that it will be useful,
    5.15 +##  but WITHOUT ANY WARRANTY; without even the implied warranty of
    5.16 +##  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    5.17 +##  GNU General Public License for more details.
    5.18 +##
    5.19 +##  You should have received a copy of the GNU General Public License
    5.20 +##  along with this program; if not, write to the Free Software
    5.21 +##  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    5.22 +##
    5.23 +###############################################################################
    5.24 +function cleanup()
    5.25 +{
    5.26 +	if [ "$LOOPD" ]; then
    5.27 +		losetup -d $LOOPD
    5.28 +	fi
    5.29 +	if [ "$LOOPP" ]; then
    5.30 +		losetup -d $LOOPP
    5.31 +	fi
    5.32 +	if  [ -e "$IMAGE" ]; then
    5.33 +		rm -f "$IMAGE"
    5.34 +	fi
    5.35 +	if  [ -e "$LCONF" ]; then
    5.36 +		rm -f "$LCONF"
    5.37 +	fi
    5.38 +}
    5.39 +
    5.40 +function die()
    5.41 +{
    5.42 +	cleanup
    5.43 +	echo "$@"
    5.44 +	exit 1
    5.45 +}
    5.46 +
    5.47 +function usage()
    5.48 +{
    5.49 +	cat << EOU
    5.50 +Command creates a vmx guest disk image for xm-test. 
    5.51 +
    5.52 +Usage: $0 [OPTIONS]
    5.53 +
    5.54 +OPTIONS:
    5.55 +    -i|--image <name>        Image name to create.
    5.56 +    -k|--kernel <name>       Kernel name to use for disk image.
    5.57 +    -r|--rootfs <image>      Rootfs image to use for disk image.
    5.58 +
    5.59 +EOU
    5.60 +}
    5.61 +
    5.62 +function check_dependencies()
    5.63 +{
    5.64 +	which lilo > /dev/null 2>&1
    5.65 +	if [ $? -ne 0 ]; then
    5.66 +		die "$PROGNAME requires lilo version 22.7+ to be installed."
    5.67 +	fi
    5.68 +	local pass="$( lilo -V | cut -f3 -d " " | awk -F "." '
    5.69 +		{
    5.70 +			if ($1 >= 22 && $2 >= 7)
    5.71 +				print "true"
    5.72 +			else
    5.73 +				print "false"
    5.74 +		}')"
    5.75 +	if [ $pass = "false" ]; then
    5.76 +		die "$PROGNAME requires lilo version 22.7+ to be installed."
    5.77 +	fi
    5.78 +}
    5.79 +
    5.80 +function initialize_globals()
    5.81 +{
    5.82 +	PROGNAME="create_disk_image"
    5.83 +	IMAGE="hvm.img"
    5.84 +	KERNEL=""
    5.85 +	LCONF="lilo.conf"
    5.86 +	LOOPD=""    # Loop device for entire disk image
    5.87 +	LOOPP=""    # Loop device for ext partition
    5.88 +	ROOTFS=""
    5.89 +	MNT="/tmp/$PROGNAME-mnt"
    5.90 +	SIZE=8192
    5.91 +	SECTORS=32
    5.92 +	HEADS=8
    5.93 +	CYLINDERS=$(($SIZE/$SECTORS/$HEADS*2))
    5.94 +	BSIZE=$(($SIZE-$SECTORS))
    5.95 +	OFFSET=$(($SECTORS*512))
    5.96 +}
    5.97 +
    5.98 +function get_options()
    5.99 +{
   5.100 +	while [ $# -gt 0 ]; do
   5.101 +		case $1 in
   5.102 +			-i|--image)
   5.103 +				shift
   5.104 +				IMAGE=${1}
   5.105 +				shift
   5.106 +				;;
   5.107 +			-k|--kernel)
   5.108 +				shift
   5.109 +				KERNEL=${1}
   5.110 +				shift
   5.111 +				;;
   5.112 +			-r|--rootfs)
   5.113 +				shift
   5.114 +				ROOTFS=${1}
   5.115 +				shift
   5.116 +				;;
   5.117 +			*)
   5.118 +				usage
   5.119 +				exit 1
   5.120 +				;;
   5.121 +		esac
   5.122 +	done
   5.123 +}
   5.124 +
   5.125 +function get_loopd()
   5.126 +{
   5.127 +	local loop
   5.128 +
   5.129 +	for i in `seq 0 7`; do
   5.130 +		losetup /dev/loop$i > /dev/null 2>&1
   5.131 +		if [ $? -ne 0 ]; then
   5.132 +			# found one
   5.133 +			echo $i
   5.134 +			return 0
   5.135 +		fi
   5.136 +	done
   5.137 +	die "No free loopback devices."
   5.138 +}
   5.139 +
   5.140 +function losetup_image()
   5.141 +{
   5.142 +	local loop=$1
   5.143 +	shift
   5.144 +
   5.145 +	# If offset, then associate with it
   5.146 +	if [ $# -eq 1 ]; then
   5.147 +		losetup -o $1 $loop $IMAGE
   5.148 +	else
   5.149 +		losetup $loop $IMAGE
   5.150 +	fi
   5.151 +
   5.152 +	if [ $? -ne 0 ]; then
   5.153 +		die "Failed to losetup $IMAGE to $loop."
   5.154 +	fi
   5.155 +
   5.156 +	echo "Associated $IMAGE with $loop"
   5.157 +}
   5.158 +
   5.159 +function create_disk_image()
   5.160 +{
   5.161 +	dd bs=1024 count=$SIZE of=$IMAGE if=/dev/zero
   5.162 +
   5.163 +	fdisk -b 512 -C $CYLINDERS -H $HEADS -S $SECTORS "$IMAGE" > /dev/null 2>&1 << EOF
   5.164 +n
   5.165 +p
   5.166 +1
   5.167 +1
   5.168 +
   5.169 +a
   5.170 +1
   5.171 +w
   5.172 +EOF
   5.173 +}
   5.174 +
   5.175 +function makefs_image()
   5.176 +{
   5.177 +	mke2fs -N 24 -b 1024 $LOOPP $BSIZE
   5.178 +
   5.179 +	if [ $? -ne 0 ]; then
   5.180 +		die "mke2fs $LOOPP failed."
   5.181 +	fi
   5.182 +}
   5.183 +
   5.184 +function dd_rootfs_to_image()
   5.185 +{
   5.186 +	if [ ! "$ROOTFS" ]; then
   5.187 +		die "Must specify rootfs image to use."
   5.188 +	fi
   5.189 +
   5.190 +	dd if="$ROOTFS" of="$LOOPP" > /dev/null 2>&1
   5.191 +	if [ $? -ne 0 ]; then
   5.192 +		die "Failed to dd $ROOTFS to $LOOPP."
   5.193 +	fi
   5.194 +}
   5.195 +
   5.196 +function get_kernel()
   5.197 +{
   5.198 +	# look in /boot for an existing kernel
   5.199 +	local -a kernels=( `ls /boot | grep vmlinuz` )
   5.200 +	local k
   5.201 +
   5.202 +	for k in ${kernels[@]}; do
   5.203 +		case "$k" in
   5.204 +			*xen*)
   5.205 +				continue
   5.206 +				;;
   5.207 +			*)
   5.208 +				KERNEL="/boot/$k"
   5.209 +				echo "Using kernel $KERNEL"
   5.210 +				break
   5.211 +				;;
   5.212 +		esac
   5.213 +	done
   5.214 +}
   5.215 +
   5.216 +function copy_kernel_to_image()
   5.217 +{
   5.218 +	if [ ! "$KERNEL" ]; then
   5.219 +		get_kernel || die "Couldn't find a kernel to use."
   5.220 +	fi
   5.221 +
   5.222 +	mkdir "$MNT/boot"
   5.223 +
   5.224 +	cp "$KERNEL" "$MNT/boot"
   5.225 +}
   5.226 +
   5.227 +function lilo_image()
   5.228 +{
   5.229 +	local kernel=`basename $KERNEL`
   5.230 +
   5.231 +	(
   5.232 +	cat <<EOC
   5.233 +boot=$LOOPD
   5.234 +delay=10
   5.235 +geometric
   5.236 +map=$MNT/boot/map
   5.237 +disk=$LOOPD
   5.238 +        bios=0x80
   5.239 +        sectors=$SECTORS
   5.240 +        heads=$HEADS
   5.241 +        cylinders=$CYLINDERS
   5.242 +        partition=$LOOPP
   5.243 +                start=$SECTORS
   5.244 +image=$MNT/boot/$kernel
   5.245 +	append="root=0301 console=tty0 console=ttyS0"
   5.246 +#	append="root=0301"
   5.247 +        label=Linux
   5.248 +        read-only
   5.249 +EOC
   5.250 +	) > "/$MNT/boot/$LCONF"
   5.251 +}
   5.252 +
   5.253 +function install_lilo()
   5.254 +{
   5.255 +	lilo -C "$MNT/boot/$LCONF"
   5.256 +	if [ $? -ne 0 ]; then
   5.257 +		die "Failed to install $MNT/boot/$LCONF."
   5.258 +	fi
   5.259 +}
   5.260 +
   5.261 +function add_getty_to_inittab()
   5.262 +{
   5.263 +	local itab=$MNT/etc/inittab
   5.264 +
   5.265 +	if [ -e "$itab" ]; then
   5.266 +		echo "# Start getty on serial line" >> $itab
   5.267 +		echo "S0:12345:respawn:/sbin/getty ttyS0" >> $itab
   5.268 +	fi
   5.269 +}
   5.270 +
   5.271 +
   5.272 +# Main starts here
   5.273 +initialize_globals
   5.274 +check_dependencies
   5.275 +
   5.276 +get_options "$@"
   5.277 +
   5.278 +create_disk_image
   5.279 +
   5.280 +# Get the first free loop device
   5.281 +ldev=$(get_loopd)
   5.282 +LOOPD="/dev/loop$ldev"
   5.283 +losetup_image $LOOPD
   5.284 +
   5.285 +# Now associate where the partition will go
   5.286 +ldev=$(get_loopd)
   5.287 +LOOPP="/dev/loop$ldev"
   5.288 +losetup_image $LOOPP $OFFSET
   5.289 +
   5.290 +makefs_image
   5.291 +
   5.292 +dd_rootfs_to_image
   5.293 +
   5.294 +if [ -e "$MNT" ]; then
   5.295 +	rm -Rf "$MNT"
   5.296 +fi
   5.297 +
   5.298 +mkdir "$MNT";
   5.299 +if [ $? -ne 0 ]; then
   5.300 +	die "Failed to create temporary mount point $MNT."
   5.301 +fi
   5.302 +
   5.303 +mount "$LOOPP" "$MNT";
   5.304 +if [ $? -ne 0 ]; then
   5.305 +	die "Failed to mount $LOOPP on $MNT."
   5.306 +fi
   5.307 +
   5.308 +copy_kernel_to_image
   5.309 +#add_getty_to_inittab
   5.310 +
   5.311 +lilo_image
   5.312 +install_lilo
   5.313 +
   5.314 +umount "$MNT"
   5.315 +rm -Rf "$MNT";
   5.316 +
   5.317 +losetup -d $LOOPD
   5.318 +losetup -d $LOOPP
   5.319 +
   5.320 +exit 0
     6.1 --- a/tools/xm-test/tests/block-list/04_block-list_nodb_pos.py	Fri Dec 09 10:40:41 2005 +0000
     6.2 +++ b/tools/xm-test/tests/block-list/04_block-list_nodb_pos.py	Fri Dec 09 11:04:55 2005 +0000
     6.3 @@ -21,7 +21,7 @@ status, output = traceCommand("xm block-
     6.4  if status != 0:
     6.5      FAIL("xm block-list returned bad status, expected 0, status is %i" % status)
     6.6  
     6.7 -if USE_BLKDEV_FOR_ROOT:
     6.8 +if ENABLE_VMX_SUPPORT:
     6.9      SKIP("Using block device for root, so this case does not apply")
    6.10  
    6.11  if output != "":