summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/builder_common.sh3
-rw-r--r--tools/builder_defaults.sh2
2 files changed, 3 insertions, 2 deletions
diff --git a/tools/builder_common.sh b/tools/builder_common.sh
index 24e8fd4..f49cf39 100644
--- a/tools/builder_common.sh
+++ b/tools/builder_common.sh
@@ -845,6 +845,9 @@ create_ova_image() {
mkdir -p ${OVA_TMP}
+ # Calculate real swap size, removing 128 blocks (65536 bytes) beginning/loader
+ local OVA_SWAP_PART_SIZE=$((${OVA_SWAP_PART_SIZE_IN_GB}*1024*1024*1024-65536))
+
# Prepare folder to be put in image
customize_stagearea_for_image "ova"
install_default_kernel ${DEFAULT_KERNEL} "no"
diff --git a/tools/builder_defaults.sh b/tools/builder_defaults.sh
index 2dc9e53..18a7bdf 100644
--- a/tools/builder_defaults.sh
+++ b/tools/builder_defaults.sh
@@ -214,8 +214,6 @@ export VMDK_DISK_CAPACITY_IN_GB=${VMDK_DISK_CAPACITY_IN_GB:-"8"}
export OVA_FIRST_PART_SIZE_IN_GB=${OVA_FIRST_PART_SIZE_IN_GB:-"6"}
# swap partition size (freebsd-swap)
export OVA_SWAP_PART_SIZE_IN_GB=${OVA_SWAP_PART_SIZE_IN_GB:-"2"}
-# Calculate real swap size, removing 128 blocks (65536 bytes) beginning/loader
-export OVA_SWAP_PART_SIZE=$((${OVA_SWAP_PART_SIZE_IN_GB}*1024*1024*1024-65536))
# Temporary place to save files
export OVA_TMP=${OVA_TMP:-"${SCRATCHDIR}/ova_tmp"}
# end of OVF
OpenPOWER on IntegriCloud