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

St├ęphane Graber stgraber at ubuntu.com
Tue Jul 26 20:00:45 UTC 2016


On Tue, Jul 26, 2016 at 09:18:16PM +0200, tapczan wrote:
> Hello
> 
> I'm trying to create custom LXC image. I've create root file system
> tarball (rootfs.tar.xz - directly at its root) and meta tar ball:
> 
> # file meta.tar.xz
> meta.tar.xz: XZ compressed data
> 
> # tar tf meta.tar.xz
> ./
> ./metadata.yaml
> ./templates/
> ./templates/upstart-override.tpl
> ./templates/hostname.tpl
> ./templates/hosts.tpl
> 
> metadata.yaml is at root in the archive
> 
> But import finished with error:
> 
> # lxc image import meta.tar.xz rootfs.tar.xz
> Transferring image: 100%
> error: Could not extract image metadata.yaml from tar: exit status 2
> (tar: metadata.yaml: Not found in archive)
> 
> Any idea where to find any hint on this?

root at castiana:~# tar tf /var/lib/lxd/images/628c432840e1aedc44006d3c6f7ace79d50753d2267b159289cd2e7490f2348f
metadata.yaml
templates/
templates/upstart-override.tpl
templates/cloud-init-meta.tpl
templates/interfaces.tpl
templates/cloud-init-user.tpl
templates/cloud-init-vendor.tpl


So I wonder if the issue is the prefixing with ./ that your tarball
appears to have.

-- 
St├ęphane Graber
Ubuntu developer
http://www.ubuntu.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20160726/8d570949/attachment.sig>


More information about the lxc-users mailing list