Rounding virtual_size metadata up to nearest GB
#2
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
It was rounding down before which was causing the VM to blow up when you try
and launch it with vagrant-libvirt due to the filesystem extending beyond the
end of the disk (assuming your root filesystem spans the whole disk). This happens any time you specify a
disk_sizethat doesn't fall on a gigabyte boundary.Alternatively, you could imitate
vagrant-libvirt's metadata and only allowdisk_sizeto be specified in GBs. I assumed you had a good reason for choosing MB instead but let me know what you think. That would eliminiate vagrant from having to make disk images that are slightly bigger than necessary, though in general I have never experienced problems with that.I am very new to Go, so if there is a more concise way to do this please let me know.