qur/packer — pull request #2 by keitwb (2014-02-06 16:07:59+00:00)
Title: Rounding `virtual_size` metadata up to nearest GB

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_size` that doesn't fall on a gigabyte boundary.

Alternatively, you could imitate `vagrant-libvirt`'s metadata and only allow `disk_size` to 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.