summaryrefslogtreecommitdiffstats
path: root/tools/builder_common.sh
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2015-08-31 18:25:00 -0300
committerRenato Botelho <renato@netgate.com>2015-08-31 18:25:00 -0300
commit679b5a66fc52c217d38d640cd183f2e47c9e7eac (patch)
treeb04a2ba6df5297734ef654f995fbe823fda67411 /tools/builder_common.sh
parent774b0d82341ddcd6287d2a10979fac4d188f8a1c (diff)
downloadpfsense-679b5a66fc52c217d38d640cd183f2e47c9e7eac.zip
pfsense-679b5a66fc52c217d38d640cd183f2e47c9e7eac.tar.gz
First create a raw, then convert it to vmdk, and when convert, use -c to force it to respect size
Diffstat (limited to 'tools/builder_common.sh')
-rw-r--r--tools/builder_common.sh20
1 files changed, 10 insertions, 10 deletions
diff --git a/tools/builder_common.sh b/tools/builder_common.sh
index 4aa058e..4bf8c96 100644
--- a/tools/builder_common.sh
+++ b/tools/builder_common.sh
@@ -816,19 +816,19 @@ create_ova_image() {
# Create vmdk file
mkimg \
-s gpt \
- -f vmdk \
+ -f raw \
-b /boot/pmbr \
-p freebsd-boot:=/boot/gptboot \
-p freebsd-ufs/${PRODUCT_NAME}:=${OVA_TMP}/${OVFUFS} \
-p freebsd-swap/swap0::${OVA_SWAP_PART_SIZE} \
- -o ${OVA_TMP}/${OVFVMDK}.tmp 2>&1 >> ${LOGFILE}
+ -o ${OVA_TMP}/${OVFRAW} 2>&1 >> ${LOGFILE}
- if [ $? -ne 0 -o ! -f ${OVA_TMP}/${OVFVMDK}.tmp ]; then
+ if [ $? -ne 0 -o ! -f ${OVA_TMP}/${OVFRAW} ]; then
if [ -f ${OVA_TMP}/${OVFUFS} ]; then
rm -f ${OVA_TMP}/${OVFUFS}
fi
- if [ -f ${OVA_TMP}/${OVFVMDK}.tmp ]; then
- rm -f ${OVA_TMP}/${OVFVMDK}.tmp
+ if [ -f ${OVA_TMP}/${OVFRAW} ]; then
+ rm -f ${OVA_TMP}/${OVFRAW}
fi
echo ">>> ERROR: Error creating temporary vmdk image. STOPPING!" | tee -a ${LOGFILE}
print_error_pfS
@@ -837,12 +837,12 @@ create_ova_image() {
# We don't need it anymore
rm -f ${OVA_TMP}/${OVFUFS} >/dev/null 2>&1
- # Convert vmdk disk to modern version
- vmdktool -v ${OVA_TMP}/${OVFVMDK} ${OVA_TMP}/${OVFVMDK}.tmp
+ # Convert raw to vmdk
+ vmdktool -c${VMDK_DISK_CAPACITY_IN_GB}G -z9 -v ${OVA_TMP}/${OVFVMDK} ${OVA_TMP}/${OVFRAW}
if [ $? -ne 0 -o ! -f ${OVA_TMP}/${OVFVMDK} ]; then
- if [ -f ${OVA_TMP}/${OVFVMDK}.tmp ]; then
- rm -f ${OVA_TMP}/${OVFVMDK}.tmp
+ if [ -f ${OVA_TMP}/${OVFRAW} ]; then
+ rm -f ${OVA_TMP}/${OVFRAW}
fi
if [ -f ${OVA_TMP}/${OVFVMDK} ]; then
rm -f ${OVA_TMP}/${OVFVMDK}
@@ -851,7 +851,7 @@ create_ova_image() {
print_error_pfS
fi
- rm -f ${OVA_TMP}/i${OVFVMDK}.tmp
+ rm -f ${OVA_TMP}/i${OVFRAW}
ova_setup_ovf_template
OpenPOWER on IntegriCloud