3

I am not using packer yet, just looking through the documentation. Some VMs it supports can be built from iso images. The examples cover use cases where the ISO is available online through the iso_url key in the JSON description file. But, can Packer handle the cases where the iso file is compressed (e.g. https://example.com/images/image.iso.xz)?

1

I tried the dumbest approach, i.e. just to plug the iso.xz file into iso_url and see what happens. Of course, this failed (even after manipulating the iso extension key).

What I ended up doing --- knowing a lot about Bash scripting, and not much about Packer, Go and the like --- is to wrap packer calls in a script that downloads and decompresses the image, then calls Packer on the decompressed image.

I would be curious to know if there are more elegant approaches.

1

Packer doesn't support compression natively with iso_url, in this sample (Virtualbox builder) doc you can see that compression is not mentioned.

So either you continue with your current solution, or you can also, look at extending packer to include this functionality.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.