9

I am working with LXC containers and I am attempting to setup a network configuration but I cannot locate the configuration file. Every piece of documentation or answered question has been for older outdated versions of LXC.

Much of the documentation I found refers to a folder in /var/lib/lxc, but that folder does not exist. Documentation also refers to commands such as "lxc-create" which also do not exist.

I am using LXD to manage my containers instead of libvirt, if that makes a difference.

cl-netbox
  • 31,491
Egee
  • 91

3 Answers3

5

I guess you are talking about the 'old' LXC containers. In case you are running Ubuntu 16.04 or Ubuntu 16.10, everything is located in the /var/lib/lxd folder, also the commands changed.

To get a list of the available commands, execute lxc help --all and for deeper information lxc manpage. Here you can find additional useful information about the "newer" LXD system containers in Ubuntu :

Linux Containers - LXD
LXD doc / configuration
The LXD 2.0 Story series

cl-netbox
  • 31,491
3

If you installed LXC/LXD using "snap", try looking in the folder

/var/snap/lxd

That's where I found them all on my Ubuntu 20.04 LTS install when I was looking for them.

shawty
  • 283
3

In case you are using multiple locations I find an easy way is

lxc storage list

which shows the path to each storage pool

LGTrader
  • 362