kjh1004
September 6, 2021, 4:04pm
1
Hey,
I cannot launch any containers from images templates. I can only start virtual machines and existing containers. I tried different templates like local:archlinux, local:debian/11 with the below result:
$ Creating container1
Starting container1
Error: Failed to run: /usr/sbin/lxd forkstart container1 /var/lib/lxd/containers /var/log/lxd/container1/lxc.conf:
Try `lxc info --show-log local:container1` for more info
$ lxc info --show-log local:container1 ⚡[..........]
Name: container1
Location: none
Remote: unix://
Architecture: x86_64
Created: 2021/09/06 15:56 UTC
Status: Stopped
Type: container
Profiles: default
Log:
lxc container1 20210906155621.645 ERROR conf - conf.c:run_buffer:323 - Script exited with status 32
lxc container1 20210906155621.645 ERROR start - start.c:lxc_init:850 - Failed to run lxc.hook.pre-start for container "container1"
lxc container1 20210906155621.645 ERROR start - start.c:__lxc_start:1987 - Failed to initialize container "container1"
lxc container1 20210906155652.864 ERROR lxccontainer - lxccontainer.c:wait_on_daemonized_start:860 - No such file or directory - Failed to receive the container state
lxc 20210906155652.867 ERROR af_unix - af_unix.c:lxc_abstract_unix_recv_fds_iov:220 - Connection reset by peer - Failed to receive response
lxc 20210906155652.867 ERROR commands - commands.c:lxc_cmd_rsp_recv_fds:129 - Failed to receive file descriptors
LXD version: 4.0.7
Is it an issue related to templates or LXD itself? Can this problem be caused by running the background operation upgrading downloaded LXD images?
Any help is appreciated.
stgraber
(Stéphane Graber)
September 6, 2021, 6:37pm
2
Can you show lxc config show --expanded container1
?
kjh1004
September 6, 2021, 6:40pm
3
@stgraber
$ lxc launch local:fedora/34 fedora
Creating fedora
Starting fedora
Error: Failed to run: /usr/sbin/lxd forkstart fedora /var/lib/lxd/containers /var/log/lxd/fedora/lxc.conf:
Try `lxc info --show-log local:fedora` for more info
$ lxc config show --expanded fedora
architecture: x86_64
config:
image.architecture: amd64
image.description: Fedora 34 amd64 (20210905_20:33)
image.os: Fedora
image.release: "34"
image.serial: "20210905_20:33"
image.type: squashfs
image.variant: default
security.secureboot: "true"
volatile.base_image: 4b865c39cdd39df606169492a2d8191282077806cf733f5a0b183ba38bb8b362
volatile.eth0.host_name: vethe7705b43
volatile.eth0.hwaddr: 00:16:3e:f3:f8:04
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.uuid: 5917f66d-675a-4cb0-93ee-8b4c0cf79eb0
devices:
eth0:
name: eth0
network: lxdbr0
type: nic
root:
path: /
pool: lxd
type: disk
ephemeral: false
profiles:
- default
stateful: false
description: ""
stgraber
(Stéphane Graber)
September 6, 2021, 9:23pm
4
Anything interest in lxd.log? (/var/snap/lxd/common/lxd/logs/lxd.log)?
kjh1004
September 6, 2021, 9:28pm
5
@stgraber
$ sudo cat /var/log/lxd/fedora/lxc.log
lxc fedora 20210906212433.139 ERROR conf - conf.c:run_buffer:323 - Script exited with stat
us 32
lxc fedora 20210906212433.139 ERROR start - start.c:lxc_init:850 - Failed to run lxc.hook.
pre-start for container "fedora"
lxc fedora 20210906212433.139 ERROR start - start.c:__lxc_start:1987 - Failed to initializ
e container "fedora"
lxc fedora 20210906212503.571 ERROR lxccontainer - lxccontainer.c:wait_on_daemonized_start
:860 - No such file or directory - Failed to receive the container state
lxc 20210906212503.571 ERROR af_unix - af_unix.c:lxc_abstract_unix_recv_fds_iov:220 - Conn
ection reset by peer - Failed to receive response
lxc 20210906212503.571 ERROR commands - commands.c:lxc_cmd_rsp_recv_fds:129 - Failed to re
ceive file descriptors
$ sudo cat /var/log/lxd/fedora/forkstart.log
$ sudo cat /var/log/lxd/fedora/lxc.conf
lxc.log.file = /var/log/lxd/fedora/lxc.log
lxc.log.level = warn
lxc.console.buffer.size = auto
lxc.console.size = auto
lxc.console.logfile = /var/log/lxd/fedora/console.log
lxc.mount.auto = proc:rw sys:rw cgroup:rw:force
lxc.autodev = 1
lxc.pty.max = 1024
lxc.mount.entry = /dev/fuse dev/fuse none bind,create=file,optional 0 0
lxc.mount.entry = /dev/net/tun dev/net/tun none bind,create=file,optional 0 0
lxc.mount.entry = /proc/sys/fs/binfmt_misc proc/sys/fs/binfmt_misc none rbind,create=dir,opti
onal 0 0
lxc.mount.entry = /sys/fs/fuse/connections sys/fs/fuse/connections none rbind,create=dir,opti
onal 0 0
lxc.mount.entry = /sys/fs/pstore sys/fs/pstore none rbind,create=dir,optional 0 0
lxc.mount.entry = /sys/kernel/config sys/kernel/config none rbind,create=dir,optional 0 0
lxc.mount.entry = /sys/kernel/debug sys/kernel/debug none rbind,create=dir,optional 0 0
lxc.mount.entry = /sys/kernel/security sys/kernel/security none rbind,create=dir,optional 0 0
lxc.mount.entry = /sys/kernel/tracing sys/kernel/tracing none rbind,create=dir,optional 0 0
lxc.mount.entry = /dev/mqueue dev/mqueue none rbind,create=dir,optional 0 0
lxc.include = /usr/share/lxc/config/common.conf.d/
lxc.arch = linux64
lxc.hook.version = 1
lxc.hook.pre-start = /proc/14444/exe callhook /var/lib/lxd "default" "fedora" start
lxc.hook.stop = /usr/sbin/lxd callhook /var/lib/lxd "default" "fedora" stopns
lxc.hook.post-stop = /usr/sbin/lxd callhook /var/lib/lxd "default" "fedora" stop
lxc.tty.max = 0
lxc.uts.name = fedora
lxc.mount.entry = /var/lib/lxd/devlxd dev/lxd none bind,create=dir 0 0
lxc.seccomp.profile = /var/lib/lxd/security/seccomp/fedora
lxc.idmap = u 0 1000000 1000000000
lxc.idmap = g 0 1000000 1000000000
lxc.mount.auto = shmounts:/var/lib/lxd/shmounts/fedora:/dev/.lxd-mounts
lxc.net.0.type = phys
lxc.net.0.name = eth0
lxc.net.0.flags = up
lxc.net.0.link = veth3e881201
lxc.rootfs.path = dir:/var/lib/lxd/containers/fedora/rootfs
lxc.hook.pre-start = /bin/mount -t shiftfs -o mark,passthrough=3 "/var/lib/lxd/containers/fed
ora/rootfs" "/var/lib/lxd/containers/fedora/rootfs"
lxc.hook.pre-mount = /bin/mount -t shiftfs -o passthrough=3 "/var/lib/lxd/containers/fedora/r
ootfs" "/var/lib/lxd/containers/fedora/rootfs"
lxc.hook.start-host = /bin/umount -l "/var/lib/lxd/containers/fedora/rootfs"
kjh1004
September 6, 2021, 9:43pm
7
https://justpaste.it/6823h
I downloaded LXD images from images:
using their alias, not fingerprint.