diff --git a/cheatsheets/personal/lxd b/cheatsheets/personal/lxd new file mode 100644 index 0000000..90f820f --- /dev/null +++ b/cheatsheets/personal/lxd @@ -0,0 +1,68 @@ +lxc start +lxc stop +lxc delete + +lxc exec -- +lxc exec ubuntu-container -- apt-get update +lxc exec -- /bin/bash +lxc exec -- su --login + +lxc file pull / +lxc file pull ubuntu-container/etc/hosts . +lxc file pull ubuntu-container/var/log/syslog - | less +lxc file pull -r / +lxc file push / +lxc file push -r / + +lxc copy --help +lxc publish --help # (publishes to local image store, view with 'lxc image list) + + +lxc snapshot +lxc info # also lists snapshots +lxc restore +lxc delete / + + +lxc list +lxc list type=container +lxc list status=running +lxc list ubuntu.* + +lxc info +lxc info --show-log + + +lxc launch servername:imagename +lxc launch images:ubuntu/20.04 +lxc launch images:ubuntu/20.04 ubuntu-limited -c limits.cpu=1 -c limits.memory=192MiB +lxc launch images:ubuntu/20.04 ubuntu-config < config.yaml + +lxc remote list + +lxc image list images: +lxc image list images:debian + +lxc config edit ubuntu +lxc config set = = ... +lxc config set ubuntu-limited limits.memory=128MiB +lxc config device add = = ... +lxc config device add ubuntu-container disk-storage-device disk source=/share/c1 path=/opt +lxc config device remove +lxc config device show +lxc config show -e + +lxc network list +lxc network show lxdbr0 +lxc bridge edit lxdbr0 + +lxc profile list +lxc profile show +lxc profile create +lxc profile set = = ... +lxc profile device add = = ... +lxc profile edit +lxc profile edit < profile.yaml +lxc profile add +lxc launch -p -p ... +lxc profile remove