[SOLVED] lxc container cannot start normally

TangFeng

New Member
Aug 6, 2023
3
0
1
When i try to start the lxc container i face the following problem

Code:
run_buffer: 322 Script exited with status 32
lxc_init: 844 Failed to run lxc.hook.pre-start for container "101"
__lxc_start: 2027 Failed to initialize container "101"
TASK ERROR: startup for container '101' failed

So I try to uselxc-start -n 101 -F -l DEBUG -o /tmp/101.loggot this information


Code:
root@pve:~# cat /tmp/101.log
lxc-start 101 20230806134953.920 INFO     confile - ../src/lxc/confile.c:set_config_idmaps:2273 - Read uid map: type u nsid 0 hostid 100000 range 65536
lxc-start 101 20230806134953.920 INFO     confile - ../src/lxc/confile.c:set_config_idmaps:2273 - Read uid map: type g nsid 0 hostid 100000 range 65536
lxc-start 101 20230806134953.920 INFO     lsm - ../src/lxc/lsm/lsm.c:lsm_init_static:38 - Initialized LSM security driver AppArmor
lxc-start 101 20230806134953.920 INFO     conf - ../src/lxc/conf.c:run_script_argv:338 - Executing script "/usr/share/lxc/hooks/lxc-pve-prestart-hook" for container "101", config section "lxc"
lxc-start 101 20230806134956.690 DEBUG    conf - ../src/lxc/conf.c:run_buffer:311 - Script exec /usr/share/lxc/hooks/lxc-pve-prestart-hook 101 lxc pre-start produced output: mount: /var/lib/lxc/.pve-staged-mounts/rootfs: can't read superblock on /dev/mapper/ssd-vm--101--disk--0.
       dmesg(1) may have more information after failed mount system call.

lxc-start 101 20230806134956.692 DEBUG    conf - ../src/lxc/conf.c:run_buffer:311 - Script exec /usr/share/lxc/hooks/lxc-pve-prestart-hook 101 lxc pre-start produced output: command 'mount /dev/dm-0 /var/lib/lxc/.pve-staged-mounts/rootfs' failed: exit code 32

lxc-start 101 20230806134956.812 ERROR    conf - ../src/lxc/conf.c:run_buffer:322 - Script exited with status 32
lxc-start 101 20230806134956.820 ERROR    start - ../src/lxc/start.c:lxc_init:844 - Failed to run lxc.hook.pre-start for container "101"
lxc-start 101 20230806134956.820 ERROR    start - ../src/lxc/start.c:__lxc_start:2027 - Failed to initialize container "101"
lxc-start 101 20230806134956.825 INFO     conf - ../src/lxc/conf.c:run_script_argv:338 - Executing script "/usr/share/lxcfs/lxc.reboot.hook" for container "101", config section "lxc"
lxc-start 101 20230806134956.584 INFO     conf - ../src/lxc/conf.c:run_script_argv:338 - Executing script "/usr/share/lxc/hooks/lxc-pve-poststop-hook" for container "101", config section "lxc"
lxc-start 101 20230806134957.228 DEBUG    conf - ../src/lxc/conf.c:run_buffer:311 - Script exec /usr/share/lxc/hooks/lxc-pve-poststop-hook 101 lxc post-stop produced output: umount: /var/lib/lxc/101/rootfs: not mounted

lxc-start 101 20230806134957.229 DEBUG    conf - ../src/lxc/conf.c:run_buffer:311 - Script exec /usr/share/lxc/hooks/lxc-pve-poststop-hook 101 lxc post-stop produced output: command 'umount --recursive -- /var/lib/lxc/101/rootfs' failed: exit code 1

lxc-start 101 20230806134957.348 ERROR    conf - ../src/lxc/conf.c:run_buffer:322 - Script exited with status 1
lxc-start 101 20230806134957.348 ERROR    start - ../src/lxc/start.c:lxc_end:985 - Failed to run lxc.hook.post-stop for container "101"
lxc-start 101 20230806134957.349 ERROR    lxc_start - ../src/lxc/tools/lxc_start.c:main:306 - The container failed to start
lxc-start 101 20230806134957.349 ERROR    lxc_start - ../src/lxc/tools/lxc_start.c:main:311 - Additional information can be obtained by setting the --logfile and --logpriority options

pveversion -v

Code:
root@pve:~# pveversion -v
proxmox-ve: 8.0.2 (running kernel: 6.2.16-6-pve)
pve-manager: 8.0.4 (running version: 8.0.4/d258a813cfa6b390)
pve-kernel-6.2: 8.0.5
proxmox-kernel-helper: 8.0.3
proxmox-kernel-6.2.16-6-pve: 6.2.16-7
proxmox-kernel-6.2: 6.2.16-7
pve-kernel-6.2.16-5-pve: 6.2.16-6
pve-kernel-6.2.16-4-pve: 6.2.16-5
pve-kernel-6.2.16-3-pve: 6.2.16-3
ceph-fuse: 17.2.6-pve1+3
corosync: 3.1.7-pve3
criu: 3.17.1-2
glusterfs-client: 10.3-5
ifupdown2: 3.2.0-1+pmx3
ksm-control-daemon: 1.4-1
libjs-extjs: 7.0.0-3
libknet1: 1.25-pve1
libproxmox-acme-perl: 1.4.6
libproxmox-backup-qemu0: 1.4.0
libproxmox-rs-perl: 0.3.1
libpve-access-control: 8.0.4
libpve-apiclient-perl: 3.3.1
libpve-common-perl: 8.0.7
libpve-guest-common-perl: 5.0.4
libpve-http-server-perl: 5.0.4
libpve-rs-perl: 0.8.5
libpve-storage-perl: 8.0.2
libspice-server1: 0.15.1-1
lvm2: 2.03.16-2
lxc-pve: 5.0.2-4
lxcfs: 5.0.3-pve3
novnc-pve: 1.4.0-2
proxmox-backup-client: 3.0.2-1
proxmox-backup-file-restore: 3.0.2-1
proxmox-kernel-helper: 8.0.3
proxmox-mail-forward: 0.2.0
proxmox-mini-journalreader: 1.4.0
proxmox-widget-toolkit: 4.0.6
pve-cluster: 8.0.3
pve-container: 5.0.4
pve-docs: 8.0.4
pve-edk2-firmware: 3.20230228-4
pve-firewall: 5.0.3
pve-firmware: 3.7-1
pve-ha-manager: 4.0.2
pve-i18n: 3.0.5
pve-qemu-kvm: 8.0.2-4
pve-xtermjs: 4.16.0-3
qemu-server: 8.0.6
smartmontools: 7.3-pve1
spiceterm: 3.3.0
swtpm: 0.8.0+pve1
vncterm: 1.8.0
zfsutils-linux: 2.1.12-pve1

pct config 101
Code:
pct config 101root@pve:~# pct config 101
arch: amd64
cores: 2
features: nesting=1
hostname: ubuntu
memory: 4096
net0: name=eth0,bridge=vmbr0,gw=10.0.0.2,hwaddr=06:E8:A7:6D:43:C5,ip=10.0.0.3/24,ip6=auto,type=veth
ostype: ubuntu
rootfs: ssd:vm-101-disk-0,size=220G
swap: 4096
unprivileged: 1

/etc/pve/storage.cfg

Code:
root@pve:~# cat /etc/pve/storage.cfg
dir: local
        path /var/lib/vz
        content vztmpl,iso,backup

lvmthin: local-lvm
        thinpool data
        vgname pve
        content images,rootdir

lvm: ssd
        vgname ssd
        content rootdir,images
        nodes pve
        shared 0

These are the problems I am currently encountering and the information I have collected, and I hope to get your help
 
dumpe2fs /dev/mapper/ssd-vm--101--disk--0 | grep superblock

Code:
root@pve:~# dumpe2fs /dev/mapper/ssd-vm--101--disk--0 | grep superblock
dumpe2fs 1.47.0 (5-Feb-2023)
  Primary superblock at 0, Group descriptors at 1-28
  Backup superblock at 32768, Group descriptors at 32769-32796
  Backup superblock at 98304, Group descriptors at 98305-98332
  Backup superblock at 163840, Group descriptors at 163841-163868
  Backup superblock at 229376, Group descriptors at 229377-229404
  Backup superblock at 294912, Group descriptors at 294913-294940
  Backup superblock at 819200, Group descriptors at 819201-819228
  Backup superblock at 884736, Group descriptors at 884737-884764
  Backup superblock at 1605632, Group descriptors at 1605633-1605660
  Backup superblock at 2654208, Group descriptors at 2654209-2654236
  Backup superblock at 4096000, Group descriptors at 4096001-4096028
  Backup superblock at 7962624, Group descriptors at 7962625-7962652
  Backup superblock at 11239424, Group descriptors at 11239425-11239452
  Backup superblock at 20480000, Group descriptors at 20480001-20480028
  Backup superblock at 23887872, Group descriptors at 23887873-23887900
 
Hi,
you can try running pct fsck 101 to attempt to repair the file system. Maybe that is already enough to fix the issue.
 
  • Like
Reactions: TangFeng

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!