You are not logged in.

#1 2017-01-25 17:54:30

timfayz
Member
From: Kazan, Russia
Registered: 2016-01-14
Posts: 59
Website

Can't create LXC container.

Today I've installed lxc and I'm trying to run my first container. I've created /etc/subgid, /etc/subuid with `root:100000:65536` and ~/.config/lxc/default.conf with the following:

lxc.id_map = u 0 100000 65536
lxc.id_map = g 0 100000 65536
lxc.network.type = veth
lxc.network.link = lxcbr0
lxc.network.flags = up

Also I created /etc/lxc/lxc-usernet

timur veth lxcbr0 2

After running lxc-create I got as follows:

$ lxc-create --template=/usr/share/lxc/templates/lxc-archlinux --name=test
unshare: Invalid argument
read pipe: Permission denied
lxc-create: lxccontainer.c: do_create_container_dir: 978 Failed to chown container dir
lxc-create: tools/lxc_create.c: main: 318 Error creating container test

Running the same with sudo doesn't change much:

$ sudo lxc-create --template=/usr/share/lxc/templates/lxc-archlinux --name=test
unshare: Invalid argument
read pipe: Success
lxc-create: lxccontainer.c: create_run_template: 1290 container creation template for test failed
lxc-create: tools/lxc_create.c: main: 318 Error creating container test

Any ideas?

Last edited by timfayz (2017-01-27 20:25:18)

Offline

#2 2017-01-29 15:40:52

cephalicmarble
Member
Registered: 2017-01-25
Posts: 10

Re: Can't create LXC container.

Works fine for me! Why not try hanging back, first removing the directory with the config and rootfs inside (lxc-create will provision these as you specify to the cli) and then tinkering with the config as you wish.

Offline

Board footer

Powered by FluxBB