lxd/

lxd: Manually remove lvm storage pool

lvremove /dev/default/LXDThinPool

To list all lvm pools:

lvdisplay
| 22 Apr 2022

Do not start LXD containers on boot

For all newly created containers:

lxc profile set default boot.autostart=false

Or for existing container:

lxc config set <container_name> boot.autostart false
| 28 Feb 2022

Unable to start Podman containers in LXD

[root@fe ~]# podman run hello-world
ERRO[0000] 'overlay' is not supported over extfs at "/var/lib/containers/storage/overlay" 
Error: kernel does not support overlay fs: 'overlay' is not supported over extfs at "/var/lib/containers/storage/overlay": backing file system is unsupported for this graph driver

To fix this error, you’ll need to edit /etc/containers/storage.conf file and make sure that it contains the following options:

[storage]
driver = "overlay"
[storage.options]
mount_program = "/usr/bin/fuse-overlayfs"

Run the following command to verify the result:

podman --log-level=debug ps -a
| 5 Feb 2022

lxd: delete all images

Delete all images which contain build-cache in their name:

lxc image list -c l --format csv | grep build-cache | xargs -I % lxc image delete %
| 2 Dec 2021

Setup lxd server as remote server

lxc config set core.https_address "[::]"
lxc config set core.trust_password new_password

After all clients are connected to the remote it is recommended to unset password:

lxc config unset core.trust_password
| 3 Sep 2021

Increase default storage size of lxd container

lxc storage set default volume.size 20GB
| 13 Jul 2021

lxd: Fix version in snap

snap refresh lxd --channel=3.18
| 1 Jan 2020

Lxd on Fedora 31

Fedora 31 has started to use cgroups v2 by default. According to Common F31 bugs it doesn’t play nice with Docker, lxd and others. To make fedora switch back to the old cgroups:

sudo grubby --update-kernel=ALL --args="systemd.unified_cgroup_hierarchy=0"
| 1 Jan 2020

lxd: Increase disk size of an existing container

lxc config device override mycontainer root size=20GB

Restart the container to apply changes.

| 1 Jan 2019