sciurus/vagrant-mutate

why hardcode 'box-disk1.img' as the image name?

Closed this issue · 1 comments

I have a pipeline I'm building wherein I am using https://github.com/jakobadam/packer-qemu-templates to build windows images into vagrant-kvm boxes and then I want to mutate them into libvirt.

However, this fails as the image created is packer-windows-2012R2-vagrant.qcow2 instead of box-disk1.img.

Isn't there a way to set the image name from the input source rather than hardcoding it?

I hard-coded it simply because I didn't know of any vagrant-kvm boxes that used a different image name. Yes, it would be possible to extract that information the box. Examine the existing disk_interface method and a sample box.xml to see how you would implement it. A PR is welcome!

In your pipeline, why not build vagrant-libvirt boxes directly from packer?