mirror of
https://github.com/vagrant-libvirt/vagrant-libvirt.git
synced 2025-02-25 18:55:27 -06:00
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:
parent
5840a95ab4
commit
b9a61d8e26
@ -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
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user