[lxc-users] lxc image import: Could not extract image metadata.yaml from tar

tapczan tapczan at unx.pl
Tue Jul 26 20:47:03 UTC 2016


On 26 July 2016 at 22:00, Stéphane Graber <stgraber at ubuntu.com> wrote:
> So I wonder if the issue is the prefixing with ./ that your tarball
> appears to have.

Thanks for hint. Indeed it's a matter of prefix.
So the archive tarball has to be created in a way:

~/meta# tar cJf ../meta.tar.xz *

~/meta# tar tf ../meta.tar.xz
metadata.yaml
templates/
templates/upstart-override.tpl
templates/hostname.tpl
templates/hosts.tpl


Creating it differently (which practically gives same result in terms
of decompression) makes LXD to generate error:

~/meta# tar cJf ../meta.tar.xz .
or
~# tar cJf meta.tar.xz -C meta .

~/meta# tar tf ../meta.tar.xz
./
./metadata.yaml
./templates/
./templates/upstart-override.tpl
./templates/hostname.tpl
./templates/hosts.tpl


More information about the lxc-users mailing list