Add 1GB to the size of virtual disk as defined in metadata.json. Since teh awk int function truncates (not rounds) soemtimes the virtual disk was defined a bit too small causing sporadic boot failusres.

This commit is contained in:
Josh Smith 2015-10-09 15:55:03 -04:00
parent 5840a95ab4
commit b9a61d8e26

View File

@ -84,7 +84,9 @@ cd "$TMP_DIR"
#Using the awk int function here to truncate the virtual image size to an
#integer since the fog-libvirt library does not seem to properly handle
#floating point.
IMG_SIZE=$(qemu-img info "$TMP_IMG" | awk '/virtual size/{print int($3);}' | tr -d 'G')
IMG_SIZE=$(qemu-img info "$TMP_IMG" | awk '/virtual size/{print int($3)+1;}' | tr -d 'G')
echo "{$IMG_SIZE}"
cat > metadata.json <<EOF
{