I am at my wit’s end and do not know why my LXC containers do not want to start. I run it using sudo but this gives the same error.
Do any of you have the same error and could fix it?
Name: mydebianlxc
Status: STOPPED
Type: container
Architecture: x86_64
Created: 2022/08/15 10:55 CEST
Last Used: 2022/08/15 11:07 CEST
Log:
lxc mydebianlxc 20220815090734.607 ERROR conf - ../src/lxc/conf.c:lxc_map_ids:3672 - newuidmap failed to write mapping "": newuidmap 255943 0 1000000 1000000000
lxc mydebianlxc 20220815090734.607 ERROR start - ../src/lxc/start.c:lxc_spawn:1788 - Failed to set up id mapping.
lxc mydebianlxc 20220815090734.607 ERROR lxccontainer - ../src/lxc/lxccontainer.c:wait_on_daemonized_start:877 - Received container state "ABORTING" instead of "RUNNING"
lxc mydebianlxc 20220815090734.608 ERROR start - ../src/lxc/start.c:__lxc_start:2107 - Failed to spawn container "mydebianlxc"
lxc mydebianlxc 20220815090734.609 WARN start - ../src/lxc/start.c:lxc_abort:1036 - Kein passender Prozess gefunden - Failed to send SIGKILL via pidfd 17 for process 255943
lxc 20220815090739.640 ERROR af_unix - ../src/lxc/af_unix.c:lxc_abstract_unix_recv_fds_iov:218 - Die Verbindung wurde vom Kommunikationspartner zurückgesetzt - Failed to receive response
lxc 20220815090739.640 ERROR commands - ../src/lxc/commands.c:lxc_cmd_rsp_recv_fds:128 - Failed to receive file descriptors for command "get_state"
Is it the first time you tried to start LXC containers or did it work before on this system? Did you checked the Arch Wiki on how to set up LXC and did you see the note on how to run unprivileged containers? What command did you used to start the container?
The first section describes the difference between unprivileged containers and privileged containers. The commands and output are just to illustrate it. You don’t need to run theses, specially since the first command is run inside a container.
If you are a container noob, are you sure LXC is the correct choice? LXC can be easily used on Ubuntu, since it is developed by Canonical(the company behind Ubuntu). On other distributions, it might require some (a lot) work.
If you want to use LXC start with the setup section. Do not blindly copy, paste and run commands. Read it carefully. If you don’t want to run unprivileged containers you can skip a lot.
If you use AppArmor, you might need to configure it. I don’t use it, so I don’t know if it needs to be configured. Since it is not a Arch Linux default there is no information on LXC and AppArmor in the Arch Wiki. You would need to research this on your own.