Commit 81d3d555 authored by Nikos Skalkotos's avatar Nikos Skalkotos
Browse files

Make the size of the helper VM image configurable

Add a new HELPER_SIZE variable for this purpose. Default size is
hardcoded to 400MB
parent 87a73976
......@@ -372,6 +372,7 @@ fi
: ${IMAGE_DEBUG:="no"}
: ${VERSION_CHECK:="@VERSION_CHECK@"}
: ${HELPER_DIR:="@HELPER_DIR@"}
: ${HELPER_SIZE:="400"}
: ${HELPER_SOFT_TIMEOUT:=20}
: ${HELPER_HARD_TIMEOUT:=5}
: ${HELPER_USER:="nobody"}
......
......@@ -20,6 +20,9 @@
# HELPER_DIR: Directory hosting the helper files
# HELPER_DIR="@localstatedir@/lib/snf-image/helper/"
# HELPER_SIZE: Size of the helper VM image in MB
# HELPER_SIZE="400"
# HELPER_TIMOUT: Soft and hard timeout limits for helper instance. The helper
# instance will be terminated after a given time if it hasn't exited by itself.
# A TERM signal will be send if the instance is running after a
......
......@@ -114,7 +114,7 @@ rm -f "$HELPER_DIR/initrd" "$HELPER_DIR/kernel" "$HELPER_DIR/image"
echo -n "Allocating space for helper disk image..."
helper_img=$(mktemp "$HELPER_DIR/image.XXXXXX")
add_cleanup rm -f "$helper_img"
dd if=/dev/zero of="$helper_img" bs=1k count=400000 &> /dev/null
dd if=/dev/zero of="$helper_img" bs=1M count="$HELPER_SIZE" &> /dev/null
echo "done"
echo "Creating partitions..."
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment