[SOLVED] PVE7: LXC cant start with bind mounts

quotengrote

New Member
Jul 10, 2021
9
0
1
37
Hi all,

i have created following container:

Code:
mg@pve2:/etc/pve/lxc$ sudo cat 127.conf
arch: amd64
cores: 2
hostname: fileserver2
memory: 2048
mp0: /hdd_data_raidz/videos,mp=/shares_videos
mp1: /hdd_data_raidz/data_crypt,mp=/shares
mp2: /hdd_data_raidz/vm_backup,mp=/shares_pve_backup
mp3: /hdd_data_raidz/papa_backup,mp=/shares_papa_backup
mp4: /hdd_data_raidz/music,mp=/shares_music
mp5: /hdd_data_raidz/tmp,mp=/shares_tmp
mp6: /hdd_data_raidz/archiv,mp=/shares_archiv
net0: name=eth0,bridge=vmbr0,firewall=1,hwaddr=42:51:EE:46:EA:1F,ip=dhcp,type=veth
ostype: ubuntu
rootfs: ZFS_VM_QCOW:127/vm-127-disk-0.raw,size=8G
swap: 512

to which i mounted following datasets:

Code:
mg@pve2:/etc/pve/lxc$ sudo zfs list
NAME                                               USED  AVAIL     REFER  MOUNTPOINT
hdd_data_raidz                                    12.0T  2.07T      149K  /hdd_data_raidz
hdd_data_raidz/archiv                             10.8G  2.07T     10.7G  /hdd_data_raidz/archiv
hdd_data_raidz/data_crypt                         1.44T  2.07T     1.29T  /hdd_data_raidz/data_crypt
hdd_data_raidz/music                              2.17T  2.07T     2.17T  /hdd_data_raidz/music
hdd_data_raidz/papa_backup                        1.28T  2.07T     1.27T  /hdd_data_raidz/papa_backup
hdd_data_raidz/pve_backup                          337G  2.07T      337G  /hdd_data_raidz/pve_backup
hdd_data_raidz/tmp                                 405K  2.07T      170K  /hdd_data_raidz/tmp
hdd_data_raidz/videos                             6.79T  2.07T     6.69T  /hdd_data_raidz/videos

when i try to start the Container this error appears:
Code:
run_buffer: 316 Script exited with status 2
lxc_init: 816 Failed to run lxc.hook.pre-start for container "127"
__lxc_start: 2007 Failed to initialize container "127"
TASK ERROR: startup for container '127' failed

This container on the other hand works:
Code:
mg@pve2:/etc/pve/lxc$ sudo cat 109.conf

arch: amd64
cores: 2
hostname: fileserver2
memory: 2048
mp0: /hdd_data_raidz/videos,mp=/shares_videos
mp1: /hdd_data_raidz/data_crypt,mp=/shares
mp2: /hdd_data_raidz/pve_backup,mp=/shares_pve_backup
mp3: /hdd_data_raidz/papa_backup,mp=/shares_papa_backup
mp4: /hdd_data_raidz/music,mp=/shares_music
mp5: /hdd_data_raidz/tmp,mp=/shares_tmp
mp6: /hdd_data_raidz/archiv,mp=/shares_archiv
net0: name=eth0,bridge=vmbr0,firewall=1,hwaddr=42:51:EE:46:EA:1F,ip=dhcp,type=veth
onboot: 0
ostype: ubuntu
rootfs: ZFS_VM_ZVOL:subvol-109-disk-0,size=8G
startup: order=200
swap: 64


Does anyone have an Idea?
 
try start with:
lxc-start -n 127 -F -lDEBUG -o lxc-127.log

share the "lxc-127.log" with us.
 
Last edited:
Hi,

Code:
mg@pve2:~$ sudo lxc-start -n 127 -F -lDEBUG -o lxc-127.log                                                                                                                              [0/0]
lxc-start: 127: conf.c: run_buffer: 316 Script exited with status 2
lxc-start: 127: start.c: lxc_init: 816 Failed to run lxc.hook.pre-start for container "127"
lxc-start: 127: start.c: __lxc_start: 2007 Failed to initialize container "127"
lxc-start: 127: tools/lxc_start.c: main: 308 The container failed to start
lxc-start: 127: tools/lxc_start.c: main: 313 Additional information can be obtained by setting the --logfile and --logpriority options
mg@pve2:~$ cat lxc-127.log
cat: lxc-127.log: Permission denied
mg@pve2:~$ sudo cat lxc-127.log
lxc-start 127 20210710164510.929 INFO     lsm - lsm/lsm.c:lsm_init_static:40 - Initialized LSM security driver AppArmor
lxc-start 127 20210710164510.929 INFO     conf - conf.c:run_script_argv:332 - Executing script "/usr/share/lxc/hooks/lxc-pve-prestart-hook" for container "127", config section "lxc"
lxc-start 127 20210710164511.505 DEBUG    conf - conf.c:run_buffer:305 - Script exec /usr/share/lxc/hooks/lxc-pve-prestart-hook 127 lxc pre-start produced output: directory '/hdd_data_raidz
/vm_backup' does not exist

lxc-start 127 20210710164511.515 ERROR    conf - conf.c:run_buffer:316 - Script exited with status 2
lxc-start 127 20210710164511.515 ERROR    start - start.c:lxc_init:816 - Failed to run lxc.hook.pre-start for container "127"
lxc-start 127 20210710164511.515 ERROR    start - start.c:__lxc_start:2007 - Failed to initialize container "127"
lxc-start 127 20210710164511.515 INFO     conf - conf.c:run_script_argv:332 - Executing script "/usr/share/lxcfs/lxc.reboot.hook" for container "127", config section "lxc"
lxc-start 127 20210710164512.171 INFO     conf - conf.c:run_script_argv:332 - Executing script "/usr/share/lxc/hooks/lxc-pve-poststop-hook" for container "127", config section "lxc"
lxc-start 127 20210710164512.456 DEBUG    conf - conf.c:run_buffer:305 - Script exec /usr/share/lxc/hooks/lxc-pve-poststop-hook 127 lxc post-stop produced output: umount: /var/lib/lxc/.pve-
staged-mounts/mp3: not mounted.

lxc-start 127 20210710164512.456 DEBUG    conf - conf.c:run_buffer:305 - Script exec /usr/share/lxc/hooks/lxc-pve-poststop-hook 127 lxc post-stop produced output: command 'umount -- /var/li
b/lxc/.pve-staged-mounts/mp3' failed: exit code 32

lxc-start 127 20210710164512.460 DEBUG    conf - conf.c:run_buffer:305 - Script exec /usr/share/lxc/hooks/lxc-pve-poststop-hook 127 lxc post-stop produced output: umount: /var/lib/lxc/.pve-
staged-mounts/mp4: not mounted.

lxc-start 127 20210710164512.460 DEBUG    conf - conf.c:run_buffer:305 - Script exec /usr/share/lxc/hooks/lxc-pve-poststop-hook 127 lxc post-stop produced output: command 'umount -- /var/li
b/lxc/.pve-staged-mounts/mp4' failed: exit code 32

lxc-start 127 20210710164512.467 DEBUG    conf - conf.c:run_buffer:305 - Script exec /usr/share/lxc/hooks/lxc-pve-poststop-hook 127 lxc post-stop produced output: umount: /var/lib/lxc/.pve-
staged-mounts/mp2: not mounted.

lxc-start 127 20210710164512.467 DEBUG    conf - conf.c:run_buffer:305 - Script exec /usr/share/lxc/hooks/lxc-pve-poststop-hook 127 lxc post-stop produced output: command 'umount -- /var/li
b/lxc/.pve-staged-mounts/mp2' failed: exit code 32

lxc-start 127 20210710164512.511 DEBUG    conf - conf.c:run_buffer:305 - Script exec /usr/share/lxc/hooks/lxc-pve-poststop-hook 127 lxc post-stop produced output: umount: /var/lib/lxc/.pve-
staged-mounts/mp5: not mounted.

lxc-start 127 20210710164512.511 DEBUG    conf - conf.c:run_buffer:305 - Script exec /usr/share/lxc/hooks/lxc-pve-poststop-hook 127 lxc post-stop produced output: command 'umount -- /var/li
b/lxc/.pve-staged-mounts/mp5' failed: exit code 32

lxc-start 127 20210710164512.515 DEBUG    conf - conf.c:run_buffer:305 - Script exec /usr/share/lxc/hooks/lxc-pve-poststop-hook 127 lxc post-stop produced output: umount: /var/lib/lxc/.pve-
staged-mounts/mp6: not mounted.

lxc-start 127 20210710164512.515 DEBUG    conf - conf.c:run_buffer:305 - Script exec /usr/share/lxc/hooks/lxc-pve-poststop-hook 127 lxc post-stop produced output: command 'umount -- /var/li
b/lxc/.pve-staged-mounts/mp6' failed: exit code 32

lxc-start 127 20210710164512.539 ERROR    lxc_start - tools/lxc_start.c:main:308 - The container failed to start
lxc-start 127 20210710164512.539 ERROR    lxc_start - tools/lxc_start.c:main:313 - Additional information can be obtained by setting the --logfile and --logpriority options
mg@pve2:~$
 
lxc-start 127 20210710164511.505 DEBUG conf - conf.c:run_buffer:305 - Script exec /usr/share/lxc/hooks/lxc-pve-prestart-hook 127 lxc pre-start produced output:
directory '/hdd_data_raidz/vm_backup' does not exist

please run and post the output of:
pct config 127
 
  • Like
Reactions: quotengrote
Oh my f* god, i dont know why i didnt see this. I have now used the right dataset and it works.

Thank you!
 

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!