Where are the LXC container configuration files located?

25,190

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

Share:
25,190

Related videos on Youtube

Egee
Author by

Egee

Updated on September 18, 2022

Comments

  • Egee
    Egee over 1 year

    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.

  • Girish
    Girish over 4 years
    I don't see config file in /var/lib/lxd. though, there is /var/lib/lxd/containers/<name of the container>/ contains backup.yaml, metadata.yaml, rootf and templates. host and container both are ubuntu 18.04 in my case.