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

Benoit GEORGELIN - Association Web4all benoit.georgelin at web4all.fr
Tue Mar 1 15:34:10 UTC 2016


Hi Serge, 

Thanks for your input. 
I still don't understand how I can manage the equivalent to create a container using LXD instant of lxc-create. 

My goal is just to create a container with a permanent existence . 
To me, lxc launch is only for volatile containers, a bit more like a docker container 

I'll try to understand more how I should work with LXD instant of only LXC . I understand all the capabilities of LXD but I misunderstand how I can just do what i am doing right now : 

- Create a dedicated système user (unpriv container) 
- Apply a specific lxc.config file 
- Create a new rootfs with LVM or BTRFS 
- Create a new container like this 
lxc-create -n test -t ubuntu -B lvm --lvname test --vgname vg_node1 --fstype ext4 --fssize 1GB 

So the specific user will have his own container . 

User A will have his own space for containers 
User B will have his own space for containers 

They should do "lxc-ls -f" or "lxc list" and see only their own containers 

Maybe this is not a typical use case ? 

Cordialement, 

Benoît 

De: "Serge Hallyn" <serge.hallyn at ubuntu.com> 
À: "lxc-users" <lxc-users at lists.linuxcontainers.org> 
Envoyé: Lundi 29 Février 2016 13:41:45 
Objet: Re: [lxc-users] lxc / lxd I'm lost somewhere 

See https://github.com/lxc/lxd for how to set up lxd using lvm. 

Quoting Benoit GEORGELIN - Association Web4all (benoit.georgelin at web4all.fr): 
> It's a bit confusing. Thanks for the explanation . 
> 
> I thought I was using LXD but since the beginning I am just using LXC . 
> 
> Do you know what will be the command to create a new container using LXD witch will be the same as doing this : 
> 
> lxc-create -n test -t ubuntu -B lvm --lvname test --vgname vg_node1 --fstype ext4 --fssize 1GB 
> This is how I use to deploy new containers.. so obviously, it's not LXD aware. 
> 
> Thanks 
> 
> Cordialement, 
> Benoit 
> 
> 
> De: "Serge Hallyn" <serge.hallyn at ubuntu.com> 
> À: "lxc-users" <lxc-users at lists.linuxcontainers.org> 
> Envoyé: Vendredi 26 Février 2016 19:42:08 
> Objet: Re: [lxc-users] lxc / lxd I'm lost somewhere 
> 
> 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 
> _______________________________________________ 
> lxc-users mailing list 
> lxc-users at lists.linuxcontainers.org 
> http://lists.linuxcontainers.org/listinfo/lxc-users 

> _______________________________________________ 
> lxc-users mailing list 
> lxc-users at lists.linuxcontainers.org 
> http://lists.linuxcontainers.org/listinfo/lxc-users 

_______________________________________________ 
lxc-users mailing list 
lxc-users at lists.linuxcontainers.org 
http://lists.linuxcontainers.org/listinfo/lxc-users 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20160301/6bb521b9/attachment.html>


More information about the lxc-users mailing list