In case anyone is interested, that is how it's done:
virt-sparsify --machine-readable input.img --convert qcow2 box.img
or
qemu-img convert -O qcow2 imput.img box.img
Then you're going to have to create minimal metadata.json and Vagrantfile, containing following:
Vagrant.configure(2) do |config|
config.vm.provider :libvirt do |libvirt|
end
end
Finally, put these 3 files into tarball:
tar cvf <box_name.box> Vagrantfile box.img metadata.json
Resulting box is ready to be added to vagrant and used to bring the VM up:
vagrant
vagrant box add <arbitrary_box_name> <box_name.box>
vagrant init --minimal arbitrary_box_name
vagrant up
Source