This first factors out all the partition sizing, and then resizes the images created to be 1GB instead of 512MB, to work around a size limitation with btrfs: mkfs_btrfs: /dev/vda2: device /dev/vda2 is too small (must be at least 256 MB)