lxc list
gives a list of containers. When there are a lot of them it is hard to remember what are they for. Is there any solution to add description to this list ? eg. "this machine is for apache and mysql"
lxc list
gives a list of containers. When there are a lot of them it is hard to remember what are they for. Is there any solution to add description to this list ? eg. "this machine is for apache and mysql"
One can control the columns displayed by
lxc list
with the-c
flag. However, there's a predefined list of columns, and as far as I'm aware you can't add new ones. You can see available columns by typinglxc list --help
.There is, still, one tool you can use, and that's the
user.*
free-form key/value configuration option (see the documentation). You may set your own keys withThen, you can either filter containers by these values, as in
or you can read these keys for a specific container with
lxc config show <my-container>
(or, better yet,lxc config show <my-container> | grep <my-key>
).You can also remove such keys with
lxc config unset <my-container> user.<my-key>
, or manually withlxc config edit <my-container>
.There is a description (at least in 22.04 there is). You can see it if you list the containers like this:-
You can set/edit the container description like this:-
And putting your description after the line that starts (that line already existed in my installation):-