hashicorp / packer-plugin-vagrant

Packer plugin for Vagrant
https://packer.io
Mozilla Public License 2.0
13 stars 24 forks source link

fix post-processor for windows #76

Closed zijpn closed 1 year ago

zijpn commented 1 year ago

I'm building a ubuntu 22.04 vagrant box for libvirt provider. The packer config is the one from https://github.com/lavabit/robox/blob/master/generic-libvirt.json.

This works fine when building on a linux host (which is probably the most common case). However, when building on a windows host this plugin fails to include the qcow2 image (renamed to box.img) in the box. I'm using Stefan Weil's QEMU for Windows distribution, which is rather slow, but it does produce a valid qcow2 image.

I've traced this down to be a problem with "/" that actually is a "\" when doing the build on windows. My fix is rather optimistic and simply removes the slash for the suffix test.

I'm using packer v1.8.5

hashicorp-cla commented 1 year ago

CLA assistant check
All committers have signed the CLA.