confusing example from 'lxc help image'
Bug #1530413 reported by
James Troup
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lxd (Ubuntu) |
Fix Released
|
Low
|
Stéphane Graber |
Bug Description
'lxc help image' with lxd installed from Ubuntu 15.10 includes this
text:
| Create, delete, list image aliases. Example:
| lxc remote add store2 images.
| lxc image alias list store2:
But if I try it, I get this:
| james@ornery:~$ lxc remote add store2 images.
| james@ornery:~$ lxc image alias list store2:
| error: not found
| james@ornery:~$
Am I meant to get this error? What is an alias? Why 'store2' rather
than just 'store'?
Changed in lxd (Ubuntu): | |
status: | New → Triaged |
importance: | Undecided → Low |
Changed in lxd (Ubuntu): | |
assignee: | nobody → Stéphane Graber (stgraber) |
To post a comment you must log in.
Thanks for reporting this.
images. linuxcontainers .org is a fake LXD server implemented through static files and rewrite rules, it doesn't implement the API that "alias list" uses. I'll add the missing file to images. linuxcontainers .org which should take care of the error you've received.
And yes, I agree that the help here could do with some improvement, at the very least point to other help messages to better understand some of the concepts.
Briefly: removed through "lxc remote ..."
- The LXD text client (lxc) can interact with multiple servers, those are called "remotes" and can be added/changed/
- LXD is image based, all containers must be created from an image. The unique identifier used by LXD for images is the sha256 of their compressed tarball representation. As humans don't usually enjoy typing a full sha256 to tell LXD what they want, LXD has the concept of image aliases which is a human-friendly name that you can add to a particular image.
So the two commands you typed did: linuxcontainers .org linuxcontainers .org
- lxc remote add store2 images.
Added a new remote called "store2" pointing to the public image server (fake LXD) at images.
- lxc image alias list store2:
Attempted to list all image aliases set on the "store2" remote.