Hi,
I successfully can start ubuntu privileged lxc containers on my debian 11 host but after creating alpine instances i get error messages :
I create container via:
lxc-create -t download - n name1
And get the result a created conatiner
I picked alpine 3.16 amd64 but have tried edge releases as well.
lxc-start -n name1 results in
I get error messades lxccontainer.c: wait_on daemonized start:859 Received container state “ABORTING” instead of “RUNNING”
Something with apparmor perhaps?
I have tried setting STP interface on but no change.
I tried to run apparmor_parser command before starting container but that command just hangs.
default.conf:
lxc.net.0.type=veth
lxc.net.0.link=lxcbr0
lxc.net.0.flags=up
lxc.net.0.hwaddr=00:16:3e:xx:xx:xx
lxc.apparmor.profile=generated
lxc.apparmor.allow_nesting=1
Anybody have ideas of what to do? can I do modifications of alpine rootfs image before starting?
Regards
Holger
Thanks, I suspect maybe I have to little memory for the alpine container. Maybe I need to somehow assign memory by creating a file /etc/usenet.
(I have no other container running simultaneously though)
lxc-start -F -n name1 -l debug:
lxc-start:name1:sync.c: __sync_wait:36 An error occurred in another process(expected sequence number 7)
lxc-start:name1::start.c __lxc_start:1999 Failed to spawn container "name1"
tail /var/log/kern.log:
[4413.779390] lxbr0: port 1(veth2CGvx) entered blocking state
[4413.779394] lxbr0: port 1(veth2CGvx) entered forwarding state
[4413.850039] Not activating Manadatory Access control as /sbin/tomoyo-init does not exist.
[5116.039952] audit:type=1400 audit(1708859227.179:27):apparmor="STATUS" operation="profile_remove" profile="/usr/bin/lxc-start" name="lxc-name1_</var/lib/lxc>" pid=1478 comm="apparmor_parser"
[5116.08008] lxcbr0: port 1(veth2CGvx) entered disable
At the top of the debug file another error message appears: lxc-start name1 ERROR start -start.c:start 2090- Exec format error-Failed to exec "/sbin/init"
I noticed that the ubuntu containers that all start and work has fstab content: #UNCONFIGURED FSTAB FOR BASE SYSTEM
while the alpine container that will not start has fstab
I see some google results might indicate something with zfs filesystems must be mounted with exec=on
although a bit unclear to me if there is somewhere to configure that.
Thankyou, Yeah, I have picked wrong architecture for my containers.
Alpine container that not works:
file /var/lib/lxc/name1/rootfs/sbin/init:
/var/lib/lxc/name1/rootfs/sbin/init: symbolic link to /bin/busybox
For the working ubuntu container:
file /var/lib/lxc/ubuntucontainer/rootfs/sbin/init:
/var/lib/lxc/ubuntucontainer/rootfs/sbin/init: symbolic link to /lib/systemd/systemd
(Ubuntu container works somehow anyway with downloaded amd64 image)
As a workaround I deleted the content inside alpine rootfs , and then grabbed the x86 minirootfs from their alpine download site,put it into name1’s rootfs folde,extracted it,and then I could do lxc-start - n name1 and lxc-attach -n name1.
Networking I configured manually afterwards.
So now all works.