I have issues creating a container. There are similar posts, but none of the answers solved my problem.
Here are some details.
✗ lxc info --show-log u20
Name: u20
Status: STOPPED
Type: container
Architecture: x86_64
Created: 2023/09/18 00:58 CEST
Last Used: 2023/09/18 09:56 CEST
Log:
lxc u20 20230918075611.794 WARN conf - ../src/src/lxc/conf.c:lxc_map_ids:3621 - newuidmap binary is missing
lxc u20 20230918075611.795 WARN conf - ../src/src/lxc/conf.c:lxc_map_ids:3627 - newgidmap binary is missing
lxc u20 20230918075611.797 WARN conf - ../src/src/lxc/conf.c:lxc_map_ids:3621 - newuidmap binary is missing
lxc u20 20230918075611.797 WARN conf - ../src/src/lxc/conf.c:lxc_map_ids:3627 - newgidmap binary is missing
lxc u20 20230918075611.896 ERROR cgfsng - ../src/src/lxc/cgroups/cgfsng.c:cgfsng_mount:2139 - No such file or directory - Failed to create cgroup at_mnt 24()
lxc u20 20230918075611.896 ERROR conf - ../src/src/lxc/conf.c:lxc_mount_auto_mounts:852 - No such file or directory - Failed to mount "/sys/fs/cgroup"
lxc u20 20230918075611.896 ERROR conf - ../src/src/lxc/conf.c:lxc_setup:4433 - Failed to setup remaining automatic mounts
lxc u20 20230918075611.896 ERROR start - ../src/src/lxc/start.c:do_start:1272 - Failed to setup container "u20"
lxc u20 20230918075611.896 ERROR sync - ../src/src/lxc/sync.c:sync_wait:34 - An error occurred in another process (expected sequence number 4)
lxc u20 20230918075611.909 WARN network - ../src/src/lxc/network.c:lxc_delete_network_priv:3631 - Failed to rename interface with index 0 from "eth0" to its initial name "veth7621ba36"
lxc u20 20230918075611.909 ERROR lxccontainer - ../src/src/lxc/lxccontainer.c:wait_on_daemonized_start:878 - Received container state "ABORTING" instead of "RUNNING"
lxc u20 20230918075611.909 ERROR start - ../src/src/lxc/start.c:__lxc_start:2107 - Failed to spawn container "u20"
lxc u20 20230918075611.909 WARN start - ../src/src/lxc/start.c:lxc_abort:1036 - No such process - Failed to send SIGKILL via pidfd 19 for process 18637
lxc 20230918075612.856 ERROR af_unix - ../src/src/lxc/af_unix.c:lxc_abstract_unix_recv_fds_iov:218 - Connection reset by peer - Failed to receive response
lxc 20230918075612.856 ERROR commands - ../src/src/lxc/commands.c:lxc_cmd_rsp_recv_fds:128 - Failed to receive file descriptors for command "get_init_pid"
config:
✗ lxc config show u20 --expanded
architecture: x86_64
config:
image.architecture: amd64
image.description: ubuntu 20.04 LTS amd64 (release) (20230908)
image.label: release
image.os: ubuntu
image.release: focal
image.serial: "20230908"
image.type: squashfs
image.version: "20.04"
volatile.base_image: 67c172d007a3787c92ac4fa8de30c68d3540743f8235882c46460bbe68aa3546
volatile.cloud-init.instance-id: 7e1f4ff3-8a16-447b-9fb7-90f467fc98af
volatile.eth0.hwaddr: 00:16:3e:17:17:3d
volatile.idmap.base: "0"
volatile.idmap.current: '[{"Isuid":true,"Isgid":false,"Hostid":1000000,"Nsid":0,"Maprange":1000000000},{"Isuid":false,"Isgid":true,"Hostid":1000000,"Nsid":0,"Maprange":1000000000}]'
volatile.idmap.next: '[{"Isuid":true,"Isgid":false,"Hostid":1000000,"Nsid":0,"Maprange":1000000000},{"Isuid":false,"Isgid":true,"Hostid":1000000,"Nsid":0,"Maprange":1000000000}]'
volatile.last_state.idmap: '[]'
volatile.last_state.power: STOPPED
volatile.last_state.ready: "false"
volatile.uuid: 49d8d4c9-70fb-46d2-bd7b-f30fd95ba47b
volatile.uuid.generation: 49d8d4c9-70fb-46d2-bd7b-f30fd95ba47b
devices:
eth0:
name: eth0
network: lxdbr0
type: nic
root:
path: /
pool: default
type: disk
ephemeral: false
profiles:
- default
stateful: false
description: ""
Running lxc monitor:
➜ lxc monitor --pretty
DEBUG [2023-09-18T10:02:31+02:00] Event listener server handler started id=5ac58b0f-cb99-41d1-ad29-c55c50d7e569 local=/var/snap/lxd/common/lxd/unix.socket remote=@
DEBUG [2023-09-18T10:02:38+02:00] Handling API request ip=@ method=GET protocol=unix url=/1.0 username=decoder
DEBUG [2023-09-18T10:02:38+02:00] Handling API request ip=@ method=GET protocol=unix url=/1.0/instances/u20 username=decoder
DEBUG [2023-09-18T10:02:38+02:00] Handling API request ip=@ method=GET protocol=unix url=/1.0/events username=decoder
DEBUG [2023-09-18T10:02:38+02:00] Event listener server handler started id=62c72d16-4272-4117-b22f-725ed78cc59c local=/var/snap/lxd/common/lxd/unix.socket remote=@
DEBUG [2023-09-18T10:02:38+02:00] Handling API request ip=@ method=PUT protocol=unix url=/1.0/instances/u20/state username=decoder
DEBUG [2023-09-18T10:02:38+02:00] Start started instance=u20 instanceType=container project=default stateful=false
DEBUG [2023-09-18T10:02:38+02:00] New operation class=task description="Starting instance" operation=a844e6cc-7198-4836-be7b-dd8be2760d9e project=default
INFO [2023-09-18T10:02:38+02:00] ID: a844e6cc-7198-4836-be7b-dd8be2760d9e, Class: task, Description: Starting instance CreatedAt="2023-09-18 10:02:38.716451633 +0200 CEST" Err= Location=none MayCancel=false Metadata="map[]" Resources="map[instances:[/1.0/instances/u20]]" Status=Running StatusCode=Running UpdatedAt="2023-09-18 10:02:38.716451633 +0200 CEST"
DEBUG [2023-09-18T10:02:38+02:00] Started operation class=task description="Starting instance" operation=a844e6cc-7198-4836-be7b-dd8be2760d9e project=default
DEBUG [2023-09-18T10:02:38+02:00] Instance operation lock created action=start instance=u20 project=default reusable=false
INFO [2023-09-18T10:02:38+02:00] Starting instance action=start created="2023-09-17 22:58:20.265711579 +0000 UTC" ephemeral=false instance=u20 instanceType=container project=default stateful=false used="2023-09-18 07:56:11.713556508 +0000 UTC"
INFO [2023-09-18T10:02:38+02:00] ID: a844e6cc-7198-4836-be7b-dd8be2760d9e, Class: task, Description: Starting instance CreatedAt="2023-09-18 10:02:38.716451633 +0200 CEST" Err= Location=none MayCancel=false Metadata="map[]" Resources="map[instances:[/1.0/instances/u20]]" Status=Pending StatusCode=Pending UpdatedAt="2023-09-18 10:02:38.716451633 +0200 CEST"
DEBUG [2023-09-18T10:02:38+02:00] Handling API request ip=@ method=GET protocol=unix url=/1.0/operations/a844e6cc-7198-4836-be7b-dd8be2760d9e username=decoder
DEBUG [2023-09-18T10:02:38+02:00] MountInstance started driver=btrfs instance=u20 pool=default project=default
DEBUG [2023-09-18T10:02:38+02:00] MountInstance finished driver=btrfs instance=u20 pool=default project=default
DEBUG [2023-09-18T10:02:38+02:00] Starting device device=eth0 instance=u20 instanceType=container project=default type=nic
DEBUG [2023-09-18T10:02:38+02:00] Scheduler: network: veth49994a65 has been added: updating network priorities
DEBUG [2023-09-18T10:02:38+02:00] Scheduler: network: vetha1ac6832 has been added: updating network priorities
DEBUG [2023-09-18T10:02:38+02:00] UpdateInstanceBackupFile started driver=btrfs instance=u20 pool=default project=default
DEBUG [2023-09-18T10:02:38+02:00] Starting device device=root instance=u20 instanceType=container project=default type=disk
DEBUG [2023-09-18T10:02:38+02:00] Skipping unmount as in use driver=btrfs pool=default refCount=1 volName=u20
DEBUG [2023-09-18T10:02:38+02:00] UpdateInstanceBackupFile finished driver=btrfs instance=u20 pool=default project=default
DEBUG [2023-09-18T10:02:38+02:00] Handling API request ip=@ method=GET protocol=unix url="/internal/containers/u20/onstart?project=default" username=root
DEBUG [2023-09-18T10:02:38+02:00] Scheduler: container u20 started: re-balancing
DEBUG [2023-09-18T10:02:38+02:00] Instance operation lock finished action=start err="Failed to run: /snap/lxd/current/bin/lxd forkstart u20 /var/snap/lxd/common/lxd/containers /var/snap/lxd/common/lxd/logs/u20/lxc.conf: exit status 1" instance=u20 project=default reusable=false
ERROR [2023-09-18T10:02:38+02:00] Failed starting instance action=start created="2023-09-17 22:58:20.265711579 +0000 UTC" ephemeral=false instance=u20 instanceType=container project=default stateful=false used="2023-09-18 07:56:11.713556508 +0000 UTC"
DEBUG [2023-09-18T10:02:38+02:00] Failure for operation class=task description="Starting instance" err="Failed to run: /snap/lxd/current/bin/lxd forkstart u20 /var/snap/lxd/common/lxd/containers /var/snap/lxd/common/lxd/logs/u20/lxc.conf: exit status 1" operation=a844e6cc-7198-4836-be7b-dd8be2760d9e project=default
DEBUG [2023-09-18T10:02:38+02:00] Start finished instance=u20 instanceType=container project=default stateful=false
DEBUG [2023-09-18T10:02:38+02:00] Event listener server handler stopped listener=62c72d16-4272-4117-b22f-725ed78cc59c local=/var/snap/lxd/common/lxd/unix.socket remote=@
INFO [2023-09-18T10:02:38+02:00] ID: a844e6cc-7198-4836-be7b-dd8be2760d9e, Class: task, Description: Starting instance CreatedAt="2023-09-18 10:02:38.716451633 +0200 CEST" Err="Failed to run: /snap/lxd/current/bin/lxd forkstart u20 /var/snap/lxd/common/lxd/containers /var/snap/lxd/common/lxd/logs/u20/lxc.conf: exit status 1" Location=none MayCancel=false Metadata="map[]" Resources="map[instances:[/1.0/instances/u20]]" Status=Failure StatusCode=Failure UpdatedAt="2023-09-18 10:02:38.716451633 +0200 CEST"
DEBUG [2023-09-18T10:02:39+02:00] Handling API request ip=@ method=GET protocol=unix url="/internal/containers/u20/onstopns?netns=%2Fproc%2F25164%2Ffd%2F4&project=default&target=stop" username=root
DEBUG [2023-09-18T10:02:39+02:00] Instance initiated stop action=stop instance=u20 instanceType=container project=default
DEBUG [2023-09-18T10:02:39+02:00] Instance operation lock created action=stop instance=u20 project=default reusable=false
DEBUG [2023-09-18T10:02:39+02:00] Stopping device device=eth0 instance=u20 instanceType=container project=default type=nic
DEBUG [2023-09-18T10:02:39+02:00] Handling API request ip=@ method=GET protocol=unix url="/internal/containers/u20/onstop?project=default&target=stop" username=root
DEBUG [2023-09-18T10:02:39+02:00] Instance operation lock inherited for stop action=stop instance=u20 instanceType=container project=default
DEBUG [2023-09-18T10:02:39+02:00] Instance stopped, cleaning up instance=u20 instanceType=container project=default
DEBUG [2023-09-18T10:02:39+02:00] Stopping device device=root instance=u20 instanceType=container project=default type=disk
DEBUG [2023-09-18T10:02:39+02:00] UnmountInstance started driver=btrfs instance=u20 pool=default project=default
DEBUG [2023-09-18T10:02:39+02:00] UnmountInstance finished driver=btrfs instance=u20 pool=default project=default
DEBUG [2023-09-18T10:02:39+02:00] Scheduler: container u20 stopped: re-balancing
DEBUG [2023-09-18T10:02:39+02:00] Instance operation lock finished action=stop err="<nil>" instance=u20 project=default reusable=false
INFO [2023-09-18T10:02:39+02:00] Shut down instance action=stop created="2023-09-17 22:58:20.265711579 +0000 UTC" ephemeral=false instance=u20 instanceType=container project=default stateful=false used="2023-09-18 08:02:38.791154927 +0000 UTC"
INFO [2023-09-18T10:02:39+02:00] Action: instance-shutdown, Source: /1.0/instances/u20