All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Rees, Kevron" <kevron.m.rees@intel.com>
To: meta-virtualization@yoctoproject.org
Subject: using lxc-create in yocto environment
Date: Fri, 27 Jan 2017 08:36:38 -0800	[thread overview]
Message-ID: <CAFW5wYbS2P61xOMy0rpOJzYXwPfXdLBO=CUdLG6D_GfT51dd6Q@mail.gmail.com> (raw)

I'm trying to call "lxc-create" to create an unprivileged container
within the yocto environment.  I am using a config file containing
uid/gid mappings that seems to work on my host system:

lxc.include = /etc/lxc/default.conf
lxc.id_map = u 0 100000 65536
lxc.id_map = g 0 100000 65536

The command I'm using in my bitbake recipe is as follows:

lxc-create -l DEBUG -o muhlog.lob \
              --config=${S}/default.conf --lxcpath=${S}/var/lib/lxc \
              -t download --name=safety -- -d ubuntu -r xenial -a amd64 \
              --no-validate

"${S}" points to my working directory that has default.conf in it.

The output is as follows:

| DEBUG: Executing shell function do_compile
| newuidmap: write to uid_map failed: Operation not permitted
| error mapping child
| setgid: Invalid argument
| lxc-create: safety: lxccontainer.c: do_create_container_dir: 985
Failed to chown container dir
| lxc-create: safety: tools/lxc_create.c: main: 318 Error creating
container safety

The "error mapping child" error comes from
src/lxc/tools/lxc_usernsexec.c:370 when calling lxc_map_ids().

Any hints on why newuidmap would fail?  I'm hoping that's the root
issue here and the subsequent messages are just the result.

cheers,
-Kevron


             reply	other threads:[~2017-01-27 16:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-27 16:36 Rees, Kevron [this message]
2017-01-27 22:27 ` using lxc-create in yocto environment Rees, Kevron

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAFW5wYbS2P61xOMy0rpOJzYXwPfXdLBO=CUdLG6D_GfT51dd6Q@mail.gmail.com' \
    --to=kevron.m.rees@intel.com \
    --cc=meta-virtualization@yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.