[lxc-users] Setting up unprivileged container in LVM

Bostjan Skufca bostjan at a2o.si
Sun Feb 21 16:37:33 UTC 2016


I think 770 permission on /home/gmc/.local/share/lxc/xxx or somewhere above
are the cause of it.

Usually when I create container and uidmapshift it (rootfs), I have to
chmod 755 /var/lib/lxc/container-name before it can start. This chmod step
is not needed for privileged containers.

I think this lxc-create behaviour change came with lxc 1.1, but do not
quote me on this.

b.


On 19 February 2016 at 23:37, Gordon <gordonmc at cox.net> wrote:

> I've been able to create and run an unprivileged container simply using
> the standard ext4 filesystem.
>
> I'm trying to do the same thing inside a logical volume so the container
> is limited to that space. I know unprivileged users can't manipulate
> volumes, so I'm creating and mounting the logical volumes first, and then
> creating the container inside the directory. I'm getting the following when
> I try to create the container and am stumped. Not sure if it's a permission
> problem or what. I can create files by hand.
>
> $ lxc-create -t download -n xxx -P /home/gmc/.local/share/lxc -- -d ubuntu
> -r trusty -a amd64
> lxc_container: lxclock.c: lxclock: 231 Error opening
> /run/user/1000/lxc/lock//home/gmc/.local/share/lxc/xxx
> lxc_container: lxccontainer.c: lxcapi_create: 1305 failed to save starting
> configuration for xxx
> lxc_container: lxc_create.c: main: 274 Error creating container xxx
>
> $ df /home/gmc/.local/share/lxc
> Filesystem                 1K-blocks    Used Available Use% Mounted on
> /dev/mapper/nuci3--vg-root   6146180 1755180   4055744  31% /
>
> $ df /home/gmc/.local/share/lxc/xxx
> Filesystem                     1K-blocks  Used Available Use% Mounted on
> /dev/mapper/nuci3--vg-lxc--xxx    999320  1284    960684 1%
> /home/gmc/.local/share/lxc/xxx
>
> $ ls -al /home/gmc/.local/share/lxc/xxx
> total 24
> drwxrwx--- 3 100000 gmc  4096 Feb 19 14:27 .
> drwxr-xr-x 4 gmc    gmc  4096 Feb 19 13:49 ..
> drwx------ 2 gmc    gmc 16384 Feb 19 13:49 lost+found
>
> _______________________________________________
> 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/20160221/4b6f573b/attachment.html>


More information about the lxc-users mailing list