Answers: <p>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). </p>
  
  <p>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.</p>
  
  <p>I would be curious to know if there are more elegant approaches.</p>
  
Answers: CC BY-SA 4.0
Answers: 2019-04-15T13:47:52.667Z
Answers: 2019-04-15T13:47:52.667Z
Answers: Mali Remorker
Answers: <p>Packer doesn't support compression natively with <code>iso_url</code>, in this sample (Virtualbox builder) <a href="https://www.packer.io/docs/builders/virtualbox-iso.html" rel="nofollow noreferrer">doc</a> you can see that compression is not mentioned.</p>
  
  <p>So either you continue with your current solution, or you can also, look at <a href="https://www.packer.io/docs/extending/index.html" rel="nofollow noreferrer">extending</a> packer to include this functionality.</p>
  
Answers: CC BY-SA 4.0
Answers: 2019-07-23T04:07:23.987Z
Answers: 2019-07-23T04:07:23.987Z
Answers: Matthieu Ducorps
Body: <p>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 <code>iso_url</code> key in the JSON description file. But, can Packer handle the cases where the iso file is compressed (e.g. <a href="https://example.com/images/image.iso.xz" rel="nofollow noreferrer">https://example.com/images/image.iso.xz</a>)?</p>
  
Tags: <packer>
Title: Packer and compressed ISO images
UserDisplayName: Mali Remorker
ThreadText: # Packer and compressed ISO images
  
  (Asked by: username_0 on 2019-04-15)
  
  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>)?
  
  **Tags:** packer
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_0 on 2019-04-15. Score: 1 | Accepted answer
  
  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.
  
  
  ---
  
  ### Answer by username_1 on 2019-07-23. Score: 1
  
  Packer doesn't support compression natively with `iso_url`, in this sample (Virtualbox builder) [doc](https://www.packer.io/docs/builders/virtualbox-iso.html) you can see that compression is not mentioned.
  
  So either you continue with your current solution, or you can also, look at [extending](https://www.packer.io/docs/extending/index.html) packer to include this functionality.
  
  
  ---
  
  