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 "$TARGET"
+dmsetup info "$TARGET" 2>/dev/null && kpartx -d "$TARGET"
exit 0