[lxc-users] lxc / lxd I'm lost somewhere

Serge Hallyn serge.hallyn at ubuntu.com
Sat Feb 27 00:42:08 UTC 2016


Quoting Benoit GEORGELIN - Association Web4all (benoit.georgelin at web4all.fr):
> Hi, 
> 
> I have a (stupid?) question, I think I have a misunderstanding of something around LXD and LXC 
> 
> Here is what I don't understand 
> 
> $ lxc list 
> +--------------+---------+------+------+------------+-----------+ 
> | NAME | STATE | IPV4 | IPV6 | TYPE | SNAPSHOTS | 
> +--------------+---------+------+------+------------+-----------+ 
> | test1-debian | STOPPED | | | PERSISTENT | 0 | 
> +--------------+---------+------+------+------------+-----------+ 
> 
> $ lxc-ls -f 
> NAME STATE IPV4 IPV6 GROUPS AUTOSTART 
> ----------------------------------------------------------- 
> Chaul RUNNING 1xx.xxx.xxx.xxx - - NO 
> laravel RUNNING 1xx.xxx.xxx.xxx - - NO 
> 
> 
> What are the difference between both commands ? 
> Why LXD REST API only knows about the content of lxc list but not about lxc-ls ? 
> 
> Thanks for you help 

They are a completely distinct set of containers.  For one, the lxc-ls
ones are in /var/lib/lxc while lxc list ones are in /var/lib/lxd/containers.
For another, the configuration for lxd containers is in the lxd database,
not in configuration files, while the lxc ones are in /var/lib/lxc/$container/config.

-serge


More information about the lxc-users mailing list