VMDISK_FILESYSTEM=ext3
# settings are for speed and not data safety, we format anyway on next run
VMDISK_MOUNT_OPTIONS=__default
+VMDISK_ROOT_CLEAN=no
HUGETLBFSPATH=
MEMSIZE=
RUNNING_IN_VM=
VMDISK_MOUNT_OPTIONS=$(echo $ARG | sed 's/^\"\(.*\)\"$/\1/g')
shift
;;
+ *-vmdisk-cleanup)
+ needarg
+ VMDISK_ROOT_CLEAN="$ARG"
+ shift
+ ;;
*-rpmlist)
needarg
RPMLIST="--rpmlist $ARG"
XENID="${XENID#root_}"
xm destroy "build_$XENID" >/dev/null 2>&1
fi
+ if [ "$VMDISK_ROOT_CLEAN" = "yes" ]; then
+ #delete VM image so later we can recreate a new one
+ echo "Deleting $VM_IMAGE"
+ rm -rf "$VM_IMAGE"
+ fi
if test ! -e "$VM_IMAGE"; then
echo "Creating $VM_IMAGE (${VMDISK_ROOTSIZE}M)"
mkdir -p "${VM_IMAGE%/*}"