<div dir="ltr"><p class="MsoNormal">Hi all,<span></span></p>

<p class="MsoNormal"><span> </span></p>

<p class="MsoNormal">I am fairly new to LXC/LXD, having just tested it for a week
or so on an Ubuntu machine. I wanted to try to run it on an embedded system (running
on a x86_64 CPU) and I built both LXC and LXD with Yocto (using a go toolchain).<span></span></p>

<p class="MsoNormal">As a note, this system at the moment lacks apparmor and criu.<span></span></p><p class="MsoNormal">The system is IPv6 enabled.</p>

<p class="MsoNormal">All the building process seemed to go quite smoothly and I
managed to start manually the LXD daemon (with “start-stop-daemon -S -p
/var/run/lxd.pid -x /usr/bin/lxd -- --verbose”) but I think there is something
amiss or in my configuration or in some dependencies as I experience various
issues:<span></span></p>

<p class="gmail-MsoListParagraph"><span style="font-family:symbol">·<span style="font-variant-numeric:normal;font-stretch:normal;font-size:7pt;line-height:normal;font-family:"times new roman"">        
</span></span>If I start the daemon with the default sysvinit script
that’s in the Ubuntu package it seems to start but then exits on the timeout (but as said, if I run it manually with the command above it runs without evident issues)<span></span></p>

<p class="gmail-MsoListParagraph"><span style="font-family:symbol">·<span style="font-variant-numeric:normal;font-stretch:normal;font-size:7pt;line-height:normal;font-family:"times new roman"">        
</span></span>When I run the daemon init (lxd init), if I have it configure a network I get the following error:</p><p class="gmail-MsoListParagraph"><br></p><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><p class="gmail-MsoListParagraph">error: Failed to list ipv6 rules for lxdbr0 (table )</p></blockquote><div><br></div><div>and I don't see any bridge created.</div><p class="gmail-MsoListParagraph">Every subsequent run of the the daemon, I get the following error:</p><p class="gmail-MsoListParagraph"><span style="text-indent:36pt"><br></span></p><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><p class="gmail-MsoListParagraph"><span style="text-indent:36pt">Failed to
bring up network              
err="Failed to list ipv6 rules for lxdbr0 (table )"
name=lxdbr0</span></p></blockquote><p class="gmail-MsoListParagraph"><br></p>

<p class="gmail-MsoListParagraph"><span style="font-family:symbol">·<span style="font-variant-numeric:normal;font-stretch:normal;font-size:7pt;line-height:normal;font-family:"times new roman"">        
</span></span>When I try to create&start a container with “lxc
launch” the container it fails with the following error (<span style="text-indent:48px">poetic-stork in the example is a ubuntu/xenial image from images: )</span>:</p><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><p class="gmail-MsoListParagraph"><br></p><p class="gmail-MsoListParagraph">error: Failed to run: /usr/bin/lxd forkstart <span style="text-indent:48px">poetic-stork</span>/var/lib/lxd/containers /var/log/lxd/<span style="text-indent:48px">poetic-stork</span>/lxc.conf: </p></blockquote><div><br></div><div>and in the server/daemon log I see:</div><p class="gmail-MsoListParagraph"><span style="text-indent:36pt"><br></span></p><span style="text-indent:48px">INFO[04-18|14:42:49] Starting container                       action=start created=2017-04-18T14:28:26+0000 ephemeral=false name=</span><span style="text-indent:48px">poetic-stork</span><span style="text-indent:48px"> stateful=false used=2017-04-18T14:38:03+0000</span><div><span style="text-indent:48px">EROR[04-18|14:42:49] stop hook failed                         container=</span><span style="text-indent:48px">poetic-stork</span><span style="text-indent:48px"> err="Container is already running a start operation"</span><p class="gmail-MsoListParagraph"><br></p><p class="gmail-MsoListParagraph">Just after the image creation it warns that the image has been created without a network attached to it..</p><p class="gmail-MsoListParagraph"><br></p><p class="gmail-MsoListParagraph"><span style="font-family:symbol">·<span style="font-variant-numeric:normal;font-stretch:normal;font-size:7pt;line-height:normal;font-family:"times new roman"">        
</span></span>The log when the container (from “lxc
info --show-log poetic-stork”) is:<span></span></p><p class="MsoNormal"><span> </span></p><p class="MsoNormal" style="margin-left:72pt">Name: poetic-stork<span></span></p><p class="MsoNormal" style="margin-left:72pt">Remote:
unix:/var/lib/lxd/unix.socket<span></span></p><p class="MsoNormal" style="margin-left:72pt">Architecture: x86_64</p><p class="MsoNormal" style="margin-left:72pt">Created: 2017/04/18 14:51 UTC</p><p class="MsoNormal" style="margin-left:72pt">Status: Stopped<br></p><p class="MsoNormal" style="margin-left:72pt"><span></span></p><p class="MsoNormal" style="margin-left:72pt">Type: persistent<span></span></p><p class="MsoNormal" style="margin-left:72pt">Profiles: default <span></span></p><p class="MsoNormal" style="margin-left:72pt">Log:<span></span></p><p class="MsoNormal" style="margin-left:72pt"><span> </span></p><p class="MsoNormal" style="margin-left:72pt">            lxc 20170418145150.125 INFO     lxc_start - start.c:lxc_check_inherited:235 - Closed inherited fd: 3.</p><p class="MsoNormal" style="margin-left:72pt">            lxc 20170418145150.126 INFO     lxc_start - start.c:lxc_check_inherited:235 - Closed inherited fd: 7.</p><p class="MsoNormal" style="margin-left:72pt">            lxc 20170418145150.130 INFO     lxc_container - lxccontainer.c:do_lxcapi_start:804 - Attempting to set proc title to [lxc monitor] /var/lib/lxd/containers poetic-stork</p><p class="MsoNormal" style="margin-left:72pt">            lxc 20170418145150.130 INFO     lxc_utils - utils.c:setproctitle:1519 - setting cmdline failed - Invalid argument</p><p class="MsoNormal" style="margin-left:72pt">            lxc 20170418145150.131 INFO     lxc_start - start.c:lxc_check_inherited:235 - Closed inherited fd: 7.</p><p class="MsoNormal" style="margin-left:72pt">            lxc 20170418145150.131 INFO     lxc_conf - conf.c:run_script_argv:424 - Executing script "/usr/bin/lxd callhook /var/lib/lxd 3 start" for container "poetic-stork", config section "lxc".</p><p class="MsoNormal" style="margin-left:72pt">            lxc 20170418145150.133 INFO     lxc_start - start.c:lxc_check_inherited:235 - Closed inherited fd: 3.</p><p class="MsoNormal" style="margin-left:72pt">            lxc 20170418145150.133 INFO     lxc_start - start.c:lxc_check_inherited:235 - Closed inherited fd: 7.</p><p class="MsoNormal" style="margin-left:72pt">            lxc 20170418145150.137 INFO     lxc_monitor - monitor.c:lxc_monitor_sock_name:185 - Using monitor socket name "lxc/d78a9d7e97b4b375//var/lib/lxd/containers".</p><p class="MsoNormal" style="margin-left:72pt">            lxc 20170418145150.231 INFO     lxc_start - start.c:lxc_init:475 - Container "poetic-stork" is initialized.</p><p class="MsoNormal" style="margin-left:72pt">            lxc 20170418145150.232 INFO     lxc_cgroup - cgroup.c:cgroup_init:68 - cgroup driver cgroupfs-ng initing for poetic-stork</p><p class="MsoNormal" style="margin-left:72pt">            lxc 20170418145150.234 INFO     lxc_confile - confile.c:config_idmap:1531 - read uid map: type u nsid 0 hostid 1000000 range 1000000000</p><p class="MsoNormal" style="margin-left:72pt">            lxc 20170418145150.234 INFO     lxc_confile - confile.c:config_idmap:1531 - read uid map: type g nsid 0 hostid 1000000 range 1000000000</p><p class="MsoNormal" style="margin-left:72pt">            lxc 20170418145150.234 INFO     lxc_start - start.c:lxc_spawn:1154 - Cloned CLONE_NEWUSER.</p><p class="MsoNormal" style="margin-left:72pt">            lxc 20170418145150.235 INFO     lxc_start - start.c:lxc_spawn:1154 - Cloned CLONE_NEWNS.</p><p class="MsoNormal" style="margin-left:72pt">            lxc 20170418145150.235 INFO     lxc_start - start.c:lxc_spawn:1154 - Cloned CLONE_NEWPID.</p><p class="MsoNormal" style="margin-left:72pt">            lxc 20170418145150.235 INFO     lxc_start - start.c:lxc_spawn:1154 - Cloned CLONE_NEWUTS.</p><p class="MsoNormal" style="margin-left:72pt">            lxc 20170418145150.235 INFO     lxc_start - start.c:lxc_spawn:1154 - Cloned CLONE_NEWIPC.</p><p class="MsoNormal" style="margin-left:72pt">            lxc 20170418145150.240 ERROR    lxc_start - start.c:lxc_spawn:1171 - Failed to set up id mapping.</p><p class="MsoNormal" style="margin-left:72pt">            lxc 20170418145150.240 ERROR    lxc_start - start.c:__lxc_start:1346 - Failed to spawn container "poetic-stork".</p><p class="MsoNormal" style="margin-left:72pt">            lxc 20170418145150.260 INFO     lxc_conf - conf.c:run_script_argv:424 - Executing script "/usr/bin/lxd callhook /var/lib/lxd 3 stop" for container "poetic-stork", config section "lxc".</p><p class="MsoNormal" style="margin-left:72pt">            lxc 20170418145150.292 ERROR    lxc_conf - conf.c:run_buffer:405 - Script exited with status 1.</p><p class="MsoNormal" style="margin-left:72pt">            lxc 20170418145150.292 ERROR    lxc_start - start.c:lxc_fini:546 - Failed to run lxc.hook.post-stop for container "poetic-stork".</p><p class="MsoNormal" style="margin-left:72pt">            lxc 20170418145150.292 WARN     lxc_commands - commands.c:lxc_cmd_rsp_recv:172 - Command get_cgroup failed to receive response: Connection reset by peer.</p><p class="MsoNormal" style="margin-left:72pt">            lxc 20170418145150.293 WARN     lxc_commands - commands.c:lxc_cmd_rsp_recv:172 - Command get_cgroup failed to receive response: Connection reset by peer.</p><p class="MsoNormal" style="margin-left:72pt">            lxc 20170418145150.298 ERROR    lxc_conf - conf.c:userns_exec_1:4453 - Error setting up child mappings</p><p class="MsoNormal" style="margin-left:72pt">            lxc 20170418145150.298 ERROR    lxc_cgfsng - cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/cpuset//lxc/poetic-stork</p><p class="MsoNormal" style="margin-left:72pt">            lxc 20170418145150.304 ERROR    lxc_conf - conf.c:userns_exec_1:4453 - Error setting up child mappings</p><p class="MsoNormal" style="margin-left:72pt">            lxc 20170418145150.304 ERROR    lxc_cgfsng - cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/cpu//lxc/poetic-stork</p><p class="MsoNormal" style="margin-left:72pt">            lxc 20170418145150.309 ERROR    lxc_conf - conf.c:userns_exec_1:4453 - Error setting up child mappings</p><p class="MsoNormal" style="margin-left:72pt">            lxc 20170418145150.309 ERROR    lxc_cgfsng - cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/cpuacct//lxc/poetic-stork</p><p class="MsoNormal" style="margin-left:72pt">            lxc 20170418145150.315 ERROR    lxc_conf - conf.c:userns_exec_1:4453 - Error setting up child mappings</p><p class="MsoNormal" style="margin-left:72pt">            lxc 20170418145150.315 ERROR    lxc_cgfsng - cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/blkio//lxc/poetic-stork</p><p class="MsoNormal" style="margin-left:72pt">            lxc 20170418145150.320 ERROR    lxc_conf - conf.c:userns_exec_1:4453 - Error setting up child mappings</p><p class="MsoNormal" style="margin-left:72pt">            lxc 20170418145150.320 ERROR    lxc_cgfsng - cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/memory//lxc/poetic-stork</p><p class="MsoNormal" style="margin-left:72pt">            lxc 20170418145150.325 ERROR    lxc_conf - conf.c:userns_exec_1:4453 - Error setting up child mappings</p><p class="MsoNormal" style="margin-left:72pt">            lxc 20170418145150.325 ERROR    lxc_cgfsng - cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/devices//lxc/poetic-stork</p><p class="MsoNormal" style="margin-left:72pt">            lxc 20170418145150.330 ERROR    lxc_conf - conf.c:userns_exec_1:4453 - Error setting up child mappings</p><p class="MsoNormal" style="margin-left:72pt">            lxc 20170418145150.330 ERROR    lxc_cgfsng - cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/freezer//lxc/poetic-stork</p><p class="MsoNormal" style="margin-left:72pt">            lxc 20170418145150.335 ERROR    lxc_conf - conf.c:userns_exec_1:4453 - Error setting up child mappings</p><p class="MsoNormal" style="margin-left:72pt">            lxc 20170418145150.335 ERROR    lxc_cgfsng - cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/net_cls//lxc/poetic-stork</p><p class="MsoNormal" style="margin-left:72pt">            lxc 20170418145150.340 ERROR    lxc_conf - conf.c:userns_exec_1:4453 - Error setting up child mappings</p><p class="MsoNormal" style="margin-left:72pt">            lxc 20170418145150.340 ERROR    lxc_cgfsng - cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/perf_event//lxc/poetic-stork</p><p class="MsoNormal" style="margin-left:72pt">            lxc 20170418145150.346 ERROR    lxc_conf - conf.c:userns_exec_1:4453 - Error setting up child mappings</p><p class="MsoNormal" style="margin-left:72pt">            lxc 20170418145150.346 ERROR    lxc_cgfsng - cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/net_prio//lxc/poetic-stork</p><p class="MsoNormal" style="margin-left:72pt">            lxc 20170418145150.351 ERROR    lxc_conf - conf.c:userns_exec_1:4453 - Error setting up child mappings</p><p class="MsoNormal" style="margin-left:72pt">            lxc 20170418145150.351 ERROR    lxc_cgfsng - cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/hugetlb//lxc/poetic-stork</p><p class="MsoNormal" style="margin-left:72pt">            lxc 20170418145150.356 ERROR    lxc_conf - conf.c:userns_exec_1:4453 - Error setting up child mappings</p><p class="MsoNormal" style="margin-left:72pt">            lxc 20170418145150.356 ERROR    lxc_cgfsng - cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/pids//lxc/poetic-stork</p><p class="MsoNormal" style="margin-left:72pt">            lxc 20170418145150.362 ERROR    lxc_conf - conf.c:userns_exec_1:4453 - Error setting up child mappings</p><p class="MsoNormal" style="margin-left:72pt">            lxc 20170418145150.362 ERROR    lxc_cgfsng - cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/debug//lxc/poetic-stork</p><p class="MsoNormal" style="margin-left:72pt">            lxc 20170418145150.368 ERROR    lxc_conf - conf.c:userns_exec_1:4453 - Error setting up child mappings</p><p class="MsoNormal" style="margin-left:72pt">            lxc 20170418145150.368 ERROR    lxc_cgfsng - cgfsng.c:recursive_destroy:1270 - Error destroying /sys/fs/cgroup/systemd//lxc/poetic-stork</p><p class="MsoNormal" style="margin-left:72pt">            lxc 20170418145441.943 INFO     lxc_confile - confile.c:config_idmap:1531 - read uid map: type u nsid 0 hostid 1000000 range 1000000000</p><p class="MsoNormal" style="margin-left:72pt">            lxc 20170418145441.943 INFO     lxc_confile - confile.c:config_idmap:1531 - read uid map: type g nsid 0 hostid 1000000 range 1000000000</p><p class="MsoNormal" style="margin-left:72pt">            lxc 20170418145441.954 INFO     lxc_confile - confile.c:config_idmap:1531 - read uid map: type u nsid 0 hostid 1000000 range 1000000000</p><p class="MsoNormal" style="margin-left:72pt">            lxc 20170418145441.954 INFO     lxc_confile - confile.c:config_idmap:1531 - read uid map: type g nsid 0 hostid 1000000 range 1000000000</p><p class="MsoNormal" style="margin-left:72pt"><br></p><p class="MsoNormal"><br></p><p class="MsoNormal">From the log it seems my kernel lacks some cgroup support,
but according to my check (via menuconfig) all the cgroup settings are there: is
there a way to check that everything needed is present? (e.g. I know docker had a script that checks the presence of
all the necessary kernel configuration/modules).<span></span></p><p class="gmail-MsoListParagraph">

























































































































































</p><p class="MsoNormal"><br></p><p class="gmail-MsoListParagraph">Any ideas?</p><p class="gmail-MsoListParagraph"><span style="text-indent:36pt"><br></span></p><p class="gmail-MsoListParagraph"><span style="text-indent:36pt">Regards,</span></p><p class="gmail-MsoListParagraph"><span style="text-indent:36pt">    Max</span></p><p class="gmail-MsoListParagraph" style="text-indent:36pt"><span></span></p></div></div>