How to determine what profiles are part of an LXD container or archive when copying or importing

368 Views Asked by At

I get the following error when trying to import an LXD container from a backup.tar.gz archive:

$: sudo lxc import backup.tar.gz

Error: Failed importing backup: Failed loading profiles for instance: Profile not found

This error provides no information regarding what specific profile/s aren't available on the system, so it's not clear how to recreate them.

Is there a way to determine what profiles are part of a container or exported backup.tar.gz file?


Fortunately, I have an old container (but different version) of the backup.tar.gz file. I attempted to determine what profiles were attached using:

$: sudo lxc <container> info

This only provides snapshot and active instance details, but nothing about profiles. As a work around, I was able to publish the container on another server as an image.

$: sudo lxc publish local:<container> host2: --alias <container>

The resulting image doesn't have any attached profiles. Now I can recreate containers from this image without error, but this isn't ideal, and only possible because I was fortunate in having a working container available.

1

There are 1 best solutions below

0
dano_ On

I found an answer to part of my question.

$: sudo lxc config show <container>

Does show what profiles are attached to my working container. However, this doesn't help in the case of importing from an archive.