On Tue, Mar 12, 2019 at 08:34:02PM +0900, Tomasz Chmielewski wrote: > I would like to add some own "metadata" for a container. > > I thought I'd use "description" for that, since it's present in "lxc config > show <container>": > > This however doesn't work: > > $ lxc config show testcontainer | grep ^description > description: "" > > $ lxc config set testcontainer description "some description" > Error: Invalid config: Unknown configuration key: description > > > What would be the best way to set the description for a container?
Unfortunately the CLI doesn't have a great way to non-interactively modify the description. Your best bet is to use `lxc config show` piped through `sed` and then piped back into `lxc config edit`, something like: lxc config show testcontainer | sed "s/description:.*/description: \"blah\"/" | lxc config edit testcontainer -- Stéphane Graber Ubuntu developer http://www.ubuntu.com
signature.asc
Description: PGP signature
_______________________________________________ lxc-users mailing list lxc-users@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-users