diff --git a/create-arista-veos-image/create-arista-veos-image.sh b/create-arista-veos-image/create-arista-veos-image.sh
index 4cdcdf78c795ec6aa04848e83178a697c4ea6a47..eb0afb46cf2a50285ad4599fb66b0c426e0fdb73 100644
--- a/create-arista-veos-image/create-arista-veos-image.sh
+++ b/create-arista-veos-image/create-arista-veos-image.sh
@@ -10,7 +10,8 @@
 # V1.21  checking whether it safe to unmount working directories
 # V1.3   added support to delete existing image with the same name and generating the default nova flavor
 # V1.31  added support for newer glance releases (e.g. kilo) used in VIRL 1.0.0 
-
+# V1.32  changed the extension of the bootloader iso to match the size of the partitions to be injected
+# V1.4   support for variable VEOS image sizes (as requested by @Jade_Deane to use custom VEOS images)
 
 # usage
 if [ ! $# -eq 3 ] ; then
@@ -76,7 +77,6 @@ echo "==========================================================="
 
 # create a copy of Aboot bootloader and extend it to 3G
 cp $1 $TMP_NAME.raw
-truncate -s +3G $TMP_NAME.raw
 
 echo
 echo "Extracting partitions from vEOS vmdk..."
@@ -150,6 +150,10 @@ PART2_START=$(fdisk -l $VEOS_VMDK_BASENAME.raw | grep "\.raw2" | tr -s " " | cut
 PART2_END=$(fdisk -l $VEOS_VMDK_BASENAME.raw | grep "\.raw2" | tr -s " " | cut -d ' ' -f 3)
 PART2_LENGTH=$(expr $PART2_END - $PART2_START)
 
+# extend the bootloader iso to be able to append the two partitions
+EXTENSION_SIZE=$(ls -lk $VEOS_VMDK_BASENAME.raw | tr -s " " | cut -d " " -f 5)
+truncate -s +$EXTENSION_SIZE $TMP_NAME.raw
+
 # append the two partitions from vmdk in the bootloader iso
 echo -e "n
 p