hashicorp / packer

Packer is a tool for creating identical machine images for multiple platforms from a single source configuration.
http://www.packer.io
Other
15.1k stars 3.33k forks source link

Compress post-processor produces 37 byte tar.gz #7851

Closed hoshsadiq closed 5 years ago

hoshsadiq commented 5 years ago

I've tried this on Linux and Windows but I continually get the same result. That is, I get an disk.raw.tar.gz with nothing but some sort of headers in it, and when extracting that, it's all empty:

$ ls -la
total 12
drwxr-xr-x 2 hosh hosh 4096 Jul  8 12:40 .
drwxrwxr-x 5 hosh hosh 4096 Jul  8 12:41 ..
-rw-rw-r-- 1 hosh hosh   37 Jul  8 12:40 disk.raw.tar.gz
$ file disk.raw.tar.gz
disk.raw.tar.gz: gzip compressed data
$ strings disk.raw.tar.gz
$ cat disk.raw.tar.gz
        nb`X.
$ hexdump -C output/disk.raw.tar.gz
00000000  1f 8b 08 00 00 09 6e 88  00 ff 62 18 05 a3 60 14  |......n...b...`.|
00000010  8c 58 00 00 00 00 ff ff  01 00 00 ff ff 2e af b5  |.X..............|
00000020  ef 00 04 00 00                                    |.....|
00000025
$ gunzip disk.raw.tar.gz
$ ls -la
total 12
drwxr-xr-x 2 hosh hosh 4096 Jul  8 12:45 .
drwxrwxr-x 5 hosh hosh 4096 Jul  8 12:41 ..
-rw-rw-r-- 1 hosh hosh 1024 Jul  8 12:40 disk.raw.tar
$ cat disk.raw.tar
$ strings disk.raw.tar

packer json/log: https://gist.github.com/hoshsadiq/5172d3aaed0da52bd6d64eb2834c31bf Additional info:

$ packer version
Packer v1.4.2
$ uname -a
Linux XPS-15-9560 5.0.7-050007-generic #201904052141 SMP Fri Apr 5 21:43:20 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
rickard-von-essen commented 5 years ago

Try setting skip_export: false does it work then?

hoshsadiq commented 5 years ago

Gah! Now I feel silly. Thanks this did the trick.

ghost commented 4 years ago

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.