3

Following the normal procedure yields this error:

lxc_start - start.c:start:1438 - No such file or directory - failed to exec /sbin/init
  • Note that this is LXC you're working with, not LXD. – Thomas Ward Oct 9 '18 at 16:19
2

Running arm containers on an intel host is possible using qemu but it does not work out the box and requires copying a qemu file onto the container rootfs

Steps for a 16.04 host.

Assuming lxd-client package is installed.

sudo apt-get install qemu-user-static
lxc launch ubuntu:15.04/armhf arm1

Should output:

Creating arm1
Starting arm1
error: Error calling 'lxd forkstart arm1 /var/lib/lxd/containers /var/log/lxd/arm1/lxc.conf': err='exit status 1'
Try `lxc info --show-log arm1` for more info

To fix run:

sudo cp /usr/bin/qemu-arm-static /var/lib/lxd/containers/arm1/rootfs/usr/bin
# then start it again.
lxc start arm1

then you can log in by:

lxc exec arm1 bash
  • This is no longer doable, please read discuss.linuxcontainers.org/t/… – Thomas Ward Oct 9 '18 at 16:18
  • This was only doable in LXC but not in MODERN LXD. Read askubuntu.com/questions/1060089/… and the previous post. – Thomas Ward Oct 9 '18 at 16:19
  • @ThomasWard - doesn't the error message "Error calling 'lxd forkstart arm1 /var/lib/lxd/containers /var/log/lxd/arm1/lxc.conf': err='exit status 1'" show I was using lxd? – Tom Oct 9 '18 at 19:45
  • Can't tell, but I can assure you with 100% certainty that you can't launch ARM containers on x86/x86_64 architecture anymore, and stgraber who is the god of LXC/LXD even states so in the linked discussion thread. So back in 2016 this may have been doable, but modern LXD does not support crossarch emulation, and if it did work in LXD in 2016, then it doesn't now. – Thomas Ward Oct 9 '18 at 19:54
  • If you try and do your commands now in modern LXD, it'll actually just yell at you and say "Not Supported" even if you have qemu-arm-static and such – Thomas Ward Oct 9 '18 at 19:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.