Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

packer-plugin-vagrant has been updated with breaking changes #52

Closed
dafyddj opened this issue Oct 12, 2023 · 9 comments
Closed

packer-plugin-vagrant has been updated with breaking changes #52

dafyddj opened this issue Oct 12, 2023 · 9 comments

Comments

@dafyddj
Copy link

dafyddj commented Oct 12, 2023

Hi,

packer-plugin-vagrant has recently been updated to v1.1.0 and the structure of the files included in the Vagrant box has changed. See hashicorp/packer-plugin-vagrant#48

If I'm not mistaken, this causes the check on this line to fail:

if !image_path || !image_path.file?

This is using vagrant-qemu version v0.3.5

@ppggff
Copy link
Owner

ppggff commented Oct 13, 2023

Thanks, do you have a example box for test?

@dafyddj
Copy link
Author

dafyddj commented Oct 13, 2023

You can try this one

@ppggff
Copy link
Owner

ppggff commented Oct 19, 2023

To support the new version of libvirt box, I need to find a workable libvirt machine for test.
(See how libvirt convert multiple disk config to qemu command)
It'll take a while.

There is temporary workaround for single disk box: use the image file directly.

Install box and find image path:

# install box as "test_new_box"
vagrant box add --name test_new_box ./alpine318-packer_plugin_v1.1.0.box

# find the image file, the default location for "test_new_box":
~/.vagrant.d/boxes/test_new_box/0/libvirt/box_0.img

Set image_path config in Vagrantfile.

qe.image_path = "/Users/xxx/.vagrant.d/boxes/test_new_box/0/libvirt/box_0.img"

@dafyddj
Copy link
Author

dafyddj commented Oct 19, 2023

Thanks for the update

@Xantios
Copy link

Xantios commented Jan 20, 2024

running into this same issue, currently hardcoding paths in my Vagrantfile.
is there any plans on fixing this so i don't need a workaround ?

@unixerius
Copy link

unixerius commented Feb 2, 2024

Instead of hardcoding the path, I decided to symlink "box_0.img" to "box.img" which is equally nasty. Both solutions break on the next update of the box image.

For me, the issues occured with generic/alma9 and generic/fedora39.

@unixerius
Copy link

I've made a pull request to at least get this plugin working again with boxes that have one single drive image.

@ppggff
Copy link
Owner

ppggff commented Feb 27, 2024

Please try the new v0.3.6

@unixerius
Copy link

I can confirm that your version 0.3.6 seems to be working for me.

Please feel free to close this issue.

@ppggff ppggff closed this as completed Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants