X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-autoinstaller.git/blobdiff_plain/a6b4b67cebc34d1c7915f420e03b39f5ae4b448d..b0ebf462b826d3ea53afd1930279599d0bfb0fc6:/common/usr/sbin/sipb-xen-create-image diff --git a/common/usr/sbin/sipb-xen-create-image b/common/usr/sbin/sipb-xen-create-image index 997e12a..2e71fde 100644 --- a/common/usr/sbin/sipb-xen-create-image +++ b/common/usr/sbin/sipb-xen-create-image @@ -2,20 +2,20 @@ # Usage: no command-line args. # "arguments" come in environment: # TARGET a device filename -# IMAGESIZE the desired filesystem size in megabytes (rest will be swap) +# FSSIZE the desired filesystem size in megabytes (rest will be swap) # ARCH, DIST, MIRROR # HOSTNAME, IP set -e -echo ,"${IMAGESIZE}"$',L,*\n,,S\n;\n;' | sfdisk -uM -H 255 -S 63 "$TARGET" +echo ,"${FSSIZE}"$',L,*\n,,S\n;\n;' | sfdisk -uM -H 255 -S 63 "$TARGET" -kpartx -a "$TARGET" # should be no-op in guest +dmsetup info "$TARGET" 2>/dev/null && kpartx -a "$TARGET" xen-create-image --image-dev "${TARGET}1" --swap-dev "${TARGET}2" --fs ext3 --ide \ --hostname "$HOSTNAME" --ip="$IP" --netmask=255.255.0.0 --gateway=18.181.0.1 \ - --arch "$ARCH" --dist "$DIST" --mirror "$MIRROR" --cache=yes + --arch "$ARCH" --dist "$DIST" --mirror "$MIRROR" --cache=yes --verbose -kpartx -d $VOLUME +dmsetup info "$TARGET" 2>/dev/null && kpartx -d "$TARGET" exit 0