I have a problem by converting OpenVZ container to LXC. It don't starts. Attach a history of commands and logs
root@vps2:~# pct restore 102 vzdump-130.tar --storage=local-lvm --ostype=centos --unprivileged
recovering backed-up configuration from 'vzdump-130.tar'
Logical volume "vm-102-disk-0" created.
Creating filesystem with 64064512 4k blocks and 16023552 inodes
Filesystem UUID: b2c47833-c71e-4bcf-be57-1ac5f32002cf
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872
restoring 'vzdump-130.tar' now..
extracting archive '/root/vzdump-130.tar'
Total bytes read: 28386017280 (27GiB, 276MiB/s)
Architecture detection failed: open '/bin/sh' failed: No such file or directory
Falling back to amd64.
Use `pct set VMID --arch ARCH` to change.
merging backed-up and given configuration..
###########################################################
Converting OpenVZ configuration to LXC.
Please check the configuration and reconfigure the network.
###########################################################
/etc/os-release file not found and autodetection failed, falling back to 'unmanaged'
got unexpected ostype (unmanaged != centos)
root@vps2:~# pct set 102 --ostype centos
root@vps2:~# nano /etc/pve/storage.cfg
root@vps2:~# lxc-start -n 102 -F -lDEBUG -o lxc-102.log
lxc-start: 102: conf.c: run_buffer: 316 Script exited with status 1
lxc-start: 102: start.c: lxc_init: 816 Failed to run lxc.hook.pre-start for container "102"
lxc-start: 102: start.c: __lxc_start: 2007 Failed to initialize container "102"
lxc-start: 102: tools/lxc_start.c: main: 308 The container failed to start
lxc-start: 102: tools/lxc_start.c: main: 313 Additional information can be obtained by setting the --logfile and --logpriority options
root@vps2:~# ls
lxc-102.log vzdump-130.tar
root@vps2:~# cat lxc-102.log
lxc-start 102 20211004211336.454 INFO lsm - lsm/lsm.c:lsm_init_static:40 - Initialized LSM security driver AppArmor
lxc-start 102 20211004211336.455 INFO conf - conf.c:run_script_argv:332 - Executing script "/usr/share/lxc/hooks/lxc-pve-prestart-hook" for container "102", config section "lxc"
lxc-start 102 20211004211336.804 DEBUG conf - conf.c:run_buffer:305 - Script exec /usr/share/lxc/hooks/lxc-pve-prestart-hook 102 lxc pre-start produced output: Can't call method "unified_cgroupv2_support" on an undefined value at /usr/share/perl5/PVE/LXC/Setup.pm line 428.
lxc-start 102 20211004211336.805 DEBUG conf - conf.c:run_buffer:305 - Script exec /usr/share/lxc/hooks/lxc-pve-prestart-hook 102 lxc pre-start produced output: error in setup task PVE::LXC::Setup::unified_cgroupv2_support
lxc-start 102 20211004211336.816 ERROR conf - conf.c:run_buffer:316 - Script exited with status 1
lxc-start 102 20211004211336.816 ERROR start - start.c:lxc_init:816 - Failed to run lxc.hook.pre-start for container "102"
lxc-start 102 20211004211336.816 ERROR start - start.c:__lxc_start:2007 - Failed to initialize container "102"
lxc-start 102 20211004211336.816 INFO conf - conf.c:run_script_argv:332 - Executing script "/usr/share/lxcfs/lxc.reboot.hook" for container "102", config section "lxc"
lxc-start 102 20211004211337.319 INFO conf - conf.c:run_script_argv:332 - Executing script "/usr/share/lxc/hooks/lxc-pve-poststop-hook" for container "102", config section "lxc"
lxc-start 102 20211004211338.786 ERROR lxc_start - tools/lxc_start.c:main:308 - The container failed to start
lxc-start 102 20211004211338.787 ERROR lxc_start - tools/lxc_start.c:main:313 - Additional information can be obtained by setting the --logfile and --logpriority options
lxc-start 102 20211005070441.774 INFO confile - confile.c:set_config_idmaps:2092 - Read uid map: type u nsid 0 hostid 100000 range 65536
lxc-start 102 20211005070441.774 INFO confile - confile.c:set_config_idmaps:2092 - Read uid map: type g nsid 0 hostid 100000 range 65536
lxc-start 102 20211005070441.775 INFO lsm - lsm/lsm.c:lsm_init_static:40 - Initialized LSM security driver AppArmor
lxc-start 102 20211005070441.775 INFO conf - conf.c:run_script_argv:332 - Executing script "/usr/share/lxc/hooks/lxc-pve-prestart-hook" for container "102", config section "lxc"
lxc-start 102 20211005070442.539 DEBUG conf - conf.c:run_buffer:305 - Script exec /usr/share/lxc/hooks/lxc-pve-prestart-hook 102 lxc pre-start produced output: /etc/os-release file not found and autodetection failed, falling back to 'unmanaged'
got unexpected ostype (unmanaged != centos)
lxc-start 102 20211005070442.540 DEBUG conf - conf.c:run_buffer:305 - Script exec /usr/share/lxc/hooks/lxc-pve-prestart-hook 102 lxc pre-start produced output: Can't call method "unified_cgroupv2_support" on an undefined value at /usr/share/perl5/PVE/LXC/Setup.pm line 428.
lxc-start 102 20211005070442.542 DEBUG conf - conf.c:run_buffer:305 - Script exec /usr/share/lxc/hooks/lxc-pve-prestart-hook 102 lxc pre-start produced output: error in setup task PVE::LXC::Setup::unified_cgroupv2_support
lxc-start 102 20211005070442.552 ERROR conf - conf.c:run_buffer:316 - Script exited with status 1
lxc-start 102 20211005070442.552 ERROR start - start.c:lxc_init:816 - Failed to run lxc.hook.pre-start for container "102"
lxc-start 102 20211005070442.552 ERROR start - start.c:__lxc_start:2007 - Failed to initialize container "102"
lxc-start 102 20211005070442.553 INFO conf - conf.c:run_script_argv:332 - Executing script "/usr/share/lxcfs/lxc.reboot.hook" for container "102", config section "lxc"
lxc-start 102 20211005070443.554 INFO conf - conf.c:run_script_argv:332 - Executing script "/usr/share/lxc/hooks/lxc-pve-poststop-hook" for container "102", config section "lxc"
lxc-start 102 20211005070443.800 ERROR lxc_start - tools/lxc_start.c:main:308 - The container failed to start
lxc-start 102 20211005070443.800 ERROR lxc_start - tools/lxc_start.c:main:313 - Additional information can be obtained by setting the --logfile and --logpriority options
root@vps2:~# pct restore 102 vzdump-130.tar --storage=local-lvm --ostype=centos --unprivileged
recovering backed-up configuration from 'vzdump-130.tar'
Logical volume "vm-102-disk-0" created.
Creating filesystem with 64064512 4k blocks and 16023552 inodes
Filesystem UUID: b2c47833-c71e-4bcf-be57-1ac5f32002cf
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872
restoring 'vzdump-130.tar' now..
extracting archive '/root/vzdump-130.tar'
Total bytes read: 28386017280 (27GiB, 276MiB/s)
Architecture detection failed: open '/bin/sh' failed: No such file or directory
Falling back to amd64.
Use `pct set VMID --arch ARCH` to change.
merging backed-up and given configuration..
###########################################################
Converting OpenVZ configuration to LXC.
Please check the configuration and reconfigure the network.
###########################################################
/etc/os-release file not found and autodetection failed, falling back to 'unmanaged'
got unexpected ostype (unmanaged != centos)
root@vps2:~# pct set 102 --ostype centos
root@vps2:~# nano /etc/pve/storage.cfg
root@vps2:~# lxc-start -n 102 -F -lDEBUG -o lxc-102.log
lxc-start: 102: conf.c: run_buffer: 316 Script exited with status 1
lxc-start: 102: start.c: lxc_init: 816 Failed to run lxc.hook.pre-start for container "102"
lxc-start: 102: start.c: __lxc_start: 2007 Failed to initialize container "102"
lxc-start: 102: tools/lxc_start.c: main: 308 The container failed to start
lxc-start: 102: tools/lxc_start.c: main: 313 Additional information can be obtained by setting the --logfile and --logpriority options
root@vps2:~# ls
lxc-102.log vzdump-130.tar
root@vps2:~# cat lxc-102.log
lxc-start 102 20211004211336.454 INFO lsm - lsm/lsm.c:lsm_init_static:40 - Initialized LSM security driver AppArmor
lxc-start 102 20211004211336.455 INFO conf - conf.c:run_script_argv:332 - Executing script "/usr/share/lxc/hooks/lxc-pve-prestart-hook" for container "102", config section "lxc"
lxc-start 102 20211004211336.804 DEBUG conf - conf.c:run_buffer:305 - Script exec /usr/share/lxc/hooks/lxc-pve-prestart-hook 102 lxc pre-start produced output: Can't call method "unified_cgroupv2_support" on an undefined value at /usr/share/perl5/PVE/LXC/Setup.pm line 428.
lxc-start 102 20211004211336.805 DEBUG conf - conf.c:run_buffer:305 - Script exec /usr/share/lxc/hooks/lxc-pve-prestart-hook 102 lxc pre-start produced output: error in setup task PVE::LXC::Setup::unified_cgroupv2_support
lxc-start 102 20211004211336.816 ERROR conf - conf.c:run_buffer:316 - Script exited with status 1
lxc-start 102 20211004211336.816 ERROR start - start.c:lxc_init:816 - Failed to run lxc.hook.pre-start for container "102"
lxc-start 102 20211004211336.816 ERROR start - start.c:__lxc_start:2007 - Failed to initialize container "102"
lxc-start 102 20211004211336.816 INFO conf - conf.c:run_script_argv:332 - Executing script "/usr/share/lxcfs/lxc.reboot.hook" for container "102", config section "lxc"
lxc-start 102 20211004211337.319 INFO conf - conf.c:run_script_argv:332 - Executing script "/usr/share/lxc/hooks/lxc-pve-poststop-hook" for container "102", config section "lxc"
lxc-start 102 20211004211338.786 ERROR lxc_start - tools/lxc_start.c:main:308 - The container failed to start
lxc-start 102 20211004211338.787 ERROR lxc_start - tools/lxc_start.c:main:313 - Additional information can be obtained by setting the --logfile and --logpriority options
lxc-start 102 20211005070441.774 INFO confile - confile.c:set_config_idmaps:2092 - Read uid map: type u nsid 0 hostid 100000 range 65536
lxc-start 102 20211005070441.774 INFO confile - confile.c:set_config_idmaps:2092 - Read uid map: type g nsid 0 hostid 100000 range 65536
lxc-start 102 20211005070441.775 INFO lsm - lsm/lsm.c:lsm_init_static:40 - Initialized LSM security driver AppArmor
lxc-start 102 20211005070441.775 INFO conf - conf.c:run_script_argv:332 - Executing script "/usr/share/lxc/hooks/lxc-pve-prestart-hook" for container "102", config section "lxc"
lxc-start 102 20211005070442.539 DEBUG conf - conf.c:run_buffer:305 - Script exec /usr/share/lxc/hooks/lxc-pve-prestart-hook 102 lxc pre-start produced output: /etc/os-release file not found and autodetection failed, falling back to 'unmanaged'
got unexpected ostype (unmanaged != centos)
lxc-start 102 20211005070442.540 DEBUG conf - conf.c:run_buffer:305 - Script exec /usr/share/lxc/hooks/lxc-pve-prestart-hook 102 lxc pre-start produced output: Can't call method "unified_cgroupv2_support" on an undefined value at /usr/share/perl5/PVE/LXC/Setup.pm line 428.
lxc-start 102 20211005070442.542 DEBUG conf - conf.c:run_buffer:305 - Script exec /usr/share/lxc/hooks/lxc-pve-prestart-hook 102 lxc pre-start produced output: error in setup task PVE::LXC::Setup::unified_cgroupv2_support
lxc-start 102 20211005070442.552 ERROR conf - conf.c:run_buffer:316 - Script exited with status 1
lxc-start 102 20211005070442.552 ERROR start - start.c:lxc_init:816 - Failed to run lxc.hook.pre-start for container "102"
lxc-start 102 20211005070442.552 ERROR start - start.c:__lxc_start:2007 - Failed to initialize container "102"
lxc-start 102 20211005070442.553 INFO conf - conf.c:run_script_argv:332 - Executing script "/usr/share/lxcfs/lxc.reboot.hook" for container "102", config section "lxc"
lxc-start 102 20211005070443.554 INFO conf - conf.c:run_script_argv:332 - Executing script "/usr/share/lxc/hooks/lxc-pve-poststop-hook" for container "102", config section "lxc"
lxc-start 102 20211005070443.800 ERROR lxc_start - tools/lxc_start.c:main:308 - The container failed to start
lxc-start 102 20211005070443.800 ERROR lxc_start - tools/lxc_start.c:main:313 - Additional information can be obtained by setting the --logfile and --logpriority options