lxc storage list

To list Storage in LXD, use the command

Example

In this installation, we use btrfs file system for storing containers. The file location is /var/snap/lxd/common/lxd/disks/default.img. It is used by 7 containers. See LXD […]

Read More…

How to connect to lxd container

Linux Container

lxd is an easy-to-use command-line interface for lxc (Linux container). In this blog post, I will show how to create an lxd container and connect to it. To create an lxd container, run

Here vm-1 is the name of the container. ubuntu:20.04 tells lxc to create a new container with Ubuntu version 20.04. To […]

Read More…

Copy a file from host into LXD container

To copy file from host machine to LXD container run

Example

To copy a file from the host machine to an lxd container, run

To copy a file from LXD container to the local machine, run

If you need to copy a folder and files inside, you can use option –recursive […]

Read More…

LXD container snapshot and restore

lxc allow you to take snapshot, restore snapshot of a container. Here we create a snapshot, then delete the /etc folder from the container. Now the container is useless. Restore the container from snapshot to get it work again.

[…]

Read More…