Jump to content
Forums in Read-Only Mode - Please use Reddit ×

Unable to start lxd container


Recommended Posts

I am trying to launch a container with lxd and am not having any such luck.  These are the steps I followed:

https://wiki.gentoo.org/wiki/LXD

1. install lxd (I did not install criu and will add that for a future build)

2. manually configure kernel for lxd (I didn't do ebuild lxc or ebuild criu)

3. lxd group / user didn't exist, so I created it

4. add myself to that group

5. started lxd

6. initialized lxd (the order on the gentoo website says otherwise, but I couldn't do it in that order)

7. lxd automatically setup the network interface via the lxd service, so I didn't have the net.lxbr0 to worry about

8. images repository already existed, I just chose alpine linux since it was tiny

 

lxc launch images:alpine/3.4
Creating the container
Container name is: peaceful-racer
Starting peaceful-racer
error: Failed to run: /usr/sbin/lxd forkstart peaceful-racer /var/lib/lxd/containers /var/log/lxd/peaceful-racer/lxc.conf: 
Try `lxc info --show-log local:peaceful-racer` for more info
lxc info --show-log local:peaceful-racer
Name: peaceful-racer
Remote: unix://
Architecture: x86_64
Created: 2018/03/13 10:24 UTC
Status: Stopped
Type: persistent
Profiles: default

Log:

            lxc 20180313102453.772 WARN     lxc_monitor - monitor.c:lxc_monitor_fifo_send:111 - Failed to open fifo to send message: No such file or directory.
            lxc 20180313102453.772 WARN     lxc_monitor - monitor.c:lxc_monitor_fifo_send:111 - Failed to open fifo to send message: No such file or directory.
            lxc 20180313102454.308 ERROR    lxc_conf - conf.c:lxc_map_ids:2736 - newuidmap failed to write mapping "": newuidmap 18127 0 1000000 1000000000
            lxc 20180313102454.309 ERROR    lxc_start - start.c:lxc_spawn:1276 - Failed to set up id mapping.
            lxc 20180313102454.448 WARN     lxc_network - network.c:lxc_delete_network_priv:2557 - Failed to remove interface "vethPDC82W" from "lxdbr0": Invalid argument
            lxc 20180313102454.448 WARN     lxc_monitor - monitor.c:lxc_monitor_fifo_send:111 - Failed to open fifo to send message: No such file or directory.
            lxc 20180313102454.448 WARN     lxc_monitor - monitor.c:lxc_monitor_fifo_send:111 - Failed to open fifo to send message: No such file or directory.
            lxc 20180313102454.449 ERROR    lxc_container - lxccontainer.c:wait_on_daemonized_start:760 - Received container state "ABORTING" instead of "RUNNING"
            lxc 20180313102454.452 ERROR    lxc_start - start.c:__lxc_start:1459 - Failed to spawn container "peaceful-racer".
            lxc 20180313102454.452 WARN     lxc_monitor - monitor.c:lxc_monitor_fifo_send:111 - Failed to open fifo to send message: No such file or directory.
            lxc 20180313102454.452 WARN     lxc_monitor - monitor.c:lxc_monitor_fifo_send:111 - Failed to open fifo to send message: No such file or directory.
            lxc 20180313102454.610 ERROR    lxc_conf - conf.c:lxc_map_ids:2736 - newuidmap failed to write mapping "": newuidmap 18143 0 1000000 1000000000 1000000000 0 1
            lxc 20180313102454.611 ERROR    lxc_conf - conf.c:userns_exec_1:3824 - error setting up {g,u}id mappings for child process "18143"
            lxc 20180313102454.611 ERROR    lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1286 - Error destroying /sys/fs/cgroup/openrc//lxc/peaceful-racer
            lxc 20180313102454.645 ERROR    lxc_conf - conf.c:lxc_map_ids:2736 - newuidmap failed to write mapping "": newuidmap 18145 0 1000000 1000000000 1000000000 0 1
            lxc 20180313102454.645 ERROR    lxc_conf - conf.c:userns_exec_1:3824 - error setting up {g,u}id mappings for child process "18145"
            lxc 20180313102454.645 ERROR    lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1286 - Error destroying /sys/fs/cgroup/cpuset//lxc/peaceful-racer
            lxc 20180313102454.676 ERROR    lxc_conf - conf.c:lxc_map_ids:2736 - newuidmap failed to write mapping "": newuidmap 18147 0 1000000 1000000000 1000000000 0 1
            lxc 20180313102454.677 ERROR    lxc_conf - conf.c:userns_exec_1:3824 - error setting up {g,u}id mappings for child process "18147"
            lxc 20180313102454.677 ERROR    lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1286 - Error destroying /sys/fs/cgroup/cpu//lxc/peaceful-racer
            lxc 20180313102454.708 ERROR    lxc_conf - conf.c:lxc_map_ids:2736 - newuidmap failed to write mapping "": newuidmap 18149 0 1000000 1000000000 1000000000 0 1
            lxc 20180313102454.709 ERROR    lxc_conf - conf.c:userns_exec_1:3824 - error setting up {g,u}id mappings for child process "18149"
            lxc 20180313102454.709 ERROR    lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1286 - Error destroying /sys/fs/cgroup/cpuacct//lxc/peaceful-racer
            lxc 20180313102454.743 ERROR    lxc_conf - conf.c:lxc_map_ids:2736 - newuidmap failed to write mapping "": newuidmap 18151 0 1000000 1000000000 1000000000 0 1
            lxc 20180313102454.743 ERROR    lxc_conf - conf.c:userns_exec_1:3824 - error setting up {g,u}id mappings for child process "18151"
            lxc 20180313102454.743 ERROR    lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1286 - Error destroying /sys/fs/cgroup/blkio//lxc/peaceful-racer
            lxc 20180313102454.777 ERROR    lxc_conf - conf.c:lxc_map_ids:2736 - newuidmap failed to write mapping "": newuidmap 18153 0 1000000 1000000000 1000000000 0 1
            lxc 20180313102454.778 ERROR    lxc_conf - conf.c:userns_exec_1:3824 - error setting up {g,u}id mappings for child process "18153"
            lxc 20180313102454.778 ERROR    lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1286 - Error destroying /sys/fs/cgroup/memory//lxc/peaceful-racer
            lxc 20180313102454.810 ERROR    lxc_conf - conf.c:lxc_map_ids:2736 - newuidmap failed to write mapping "": newuidmap 18155 0 1000000 1000000000 1000000000 0 1
            lxc 20180313102454.811 ERROR    lxc_conf - conf.c:userns_exec_1:3824 - error setting up {g,u}id mappings for child process "18155"
            lxc 20180313102454.811 ERROR    lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1286 - Error destroying /sys/fs/cgroup/devices//lxc/peaceful-racer
            lxc 20180313102454.841 ERROR    lxc_conf - conf.c:lxc_map_ids:2736 - newuidmap failed to write mapping "": newuidmap 18157 0 1000000 1000000000 1000000000 0 1
            lxc 20180313102454.842 ERROR    lxc_conf - conf.c:userns_exec_1:3824 - error setting up {g,u}id mappings for child process "18157"
            lxc 20180313102454.842 ERROR    lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1286 - Error destroying /sys/fs/cgroup/freezer//lxc/peaceful-racer
            lxc 20180313102454.874 ERROR    lxc_conf - conf.c:lxc_map_ids:2736 - newuidmap failed to write mapping "": newuidmap 18159 0 1000000 1000000000 1000000000 0 1
            lxc 20180313102454.874 ERROR    lxc_conf - conf.c:userns_exec_1:3824 - error setting up {g,u}id mappings for child process "18159"
            lxc 20180313102454.875 ERROR    lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1286 - Error destroying /sys/fs/cgroup/net_cls//lxc/peaceful-racer
            lxc 20180313102454.903 ERROR    lxc_conf - conf.c:lxc_map_ids:2736 - newuidmap failed to write mapping "": newuidmap 18161 0 1000000 1000000000 1000000000 0 1
            lxc 20180313102454.903 ERROR    lxc_conf - conf.c:userns_exec_1:3824 - error setting up {g,u}id mappings for child process "18161"
            lxc 20180313102454.903 ERROR    lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1286 - Error destroying /sys/fs/cgroup/perf_event//lxc/peaceful-racer
            lxc 20180313102454.928 ERROR    lxc_conf - conf.c:lxc_map_ids:2736 - newuidmap failed to write mapping "": newuidmap 18163 0 1000000 1000000000 1000000000 0 1
            lxc 20180313102454.929 ERROR    lxc_conf - conf.c:userns_exec_1:3824 - error setting up {g,u}id mappings for child process "18163"
            lxc 20180313102454.929 ERROR    lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1286 - Error destroying /sys/fs/cgroup/hugetlb//lxc/peaceful-racer
            lxc 20180313102454.960 ERROR    lxc_conf - conf.c:lxc_map_ids:2736 - newuidmap failed to write mapping "": newuidmap 18165 0 1000000 1000000000 1000000000 0 1
            lxc 20180313102454.960 ERROR    lxc_conf - conf.c:userns_exec_1:3824 - error setting up {g,u}id mappings for child process "18165"
            lxc 20180313102454.960 ERROR    lxc_cgfsng - cgroups/cgfsng.c:recursive_destroy:1286 - Error destroying /sys/fs/cgroup/pids//lxc/peaceful-racer
            lxc 20180313102454.961 WARN     lxc_monitor - monitor.c:lxc_monitor_fifo_send:111 - Failed to open fifo to send message: No such file or directory.
            lxc 20180313102454.961 WARN     lxc_monitor - monitor.c:lxc_monitor_fifo_send:111 - Failed to open fifo to send message: No such file or directory.
            lxc 20180313102454.963 WARN     lxc_commands - commands.c:lxc_cmd_rsp_recv:125 - Command get_cgroup failed to receive response: Connection reset by peer.

 

lxc config --expanded show peaceful-racer
architecture: x86_64
config:
  image.architecture: amd64
  image.description: Alpine 3.4 amd64 (20180312_17:50)
  image.os: Alpine
  image.release: "3.4"
  image.serial: "20180312_17:50"
  volatile.base_image: 2ef5588b926349408eb1689bda8aa2f42123248f1bb3fc34c2ad4d6c5bb02962
  volatile.eth0.hwaddr: 00:16:3e:67:65:8b
  volatile.eth0.name: eth0
  volatile.idmap.base: "0"
  volatile.idmap.next: '[{"Isuid":true,"Isgid":true,"Hostid":1000000,"Nsid":0,"Maprange":1000000000}]'
  volatile.last_state.idmap: '[{"Isuid":true,"Isgid":true,"Hostid":1000000,"Nsid":0,"Maprange":1000000000}]'
  volatile.last_state.power: STOPPED
devices:
  eth0:
    nictype: bridged
    parent: lxdbr0
    type: nic
  root:
    path: /
    pool: default
    type: disk
ephemeral: false
profiles:
- default
stateful: false
description: ""


My system is using a squashfs root with an ext4 backed overlayfs.

Link to comment
Share on other sites

Please follow https://www.funtoo.org/LXD

 

7 hours ago, walterw said:

I didn't do ebuild lxc or ebuild criu

lxc is a dependency for lxd

7 hours ago, walterw said:

ERROR    lxc_conf - conf.c:lxc_map_ids:2736 - newuidmap failed to write mapping "": newuidmap 18127 0 1000000 1000000000

looks like problem with uid/gid maps

show me your /etc/subuid and /ect/subgid please

did you restart lxd after changing the values in subuid/subgid?

 

Link to comment
Share on other sites

×
×
  • Create New...