unmanaged CT can't working in VE7

lunersea

New Member
Jul 11, 2021
2
0
1
35
when i use lxc-start -n xxx -F -lDEBUG -o xxx.log

Code:
lxc-start 104 20210711153105.251 INFO     lsm - lsm/lsm.c:lsm_init_static:40 - Initialized LSM security driver AppArmor
lxc-start 104 20210711153105.251 INFO     conf - conf.c:run_script_argv:332 - Executing script "/usr/share/lxc/hooks/lxc-pve-prestart-hook" for container "104", config section "lxc"
lxc-start 104 20210711153106.952 DEBUG    conf - conf.c:run_buffer:305 - Script exec /usr/share/lxc/hooks/lxc-pve-prestart-hook 104 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 104 20210711153106.956 DEBUG    conf - conf.c:run_buffer:305 - Script exec /usr/share/lxc/hooks/lxc-pve-prestart-hook 104 lxc pre-start produced output: error in setup task PVE::LXC::Setup::unified_cgroupv2_support

lxc-start 104 20210711153106.982 ERROR    conf - conf.c:run_buffer:316 - Script exited with status 1
lxc-start 104 20210711153106.982 ERROR    start - start.c:lxc_init:816 - Failed to run lxc.hook.pre-start for container "104"
lxc-start 104 20210711153106.983 ERROR    start - start.c:__lxc_start:2007 - Failed to initialize container "104"
lxc-start 104 20210711153106.983 INFO     conf - conf.c:run_script_argv:332 - Executing script "/usr/share/lxc/hooks/lxc-pve-poststop-hook" for container "104", config section "lxc"
lxc-start 104 20210711153108.561 DEBUG    conf - conf.c:run_buffer:305 - Script exec /usr/share/lxc/hooks/lxc-pve-poststop-hook 104 lxc post-stop produced output: umount: /var/lib/lxc/.pve-staged-mounts/mp1: not mounted.

lxc-start 104 20210711153108.561 DEBUG    conf - conf.c:run_buffer:305 - Script exec /usr/share/lxc/hooks/lxc-pve-poststop-hook 104 lxc post-stop produced output: command 'umount -- /var/lib/lxc/.pve-staged-mounts/mp1' failed: exit code 32

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

lxc-start 104 20210711153108.572 DEBUG    conf - conf.c:run_buffer:305 - Script exec /usr/share/lxc/hooks/lxc-pve-poststop-hook 104 lxc post-stop produced output: command 'umount -- /var/lib/lxc/.pve-staged-mounts/mp0' failed: exit code 32

lxc-start 104 20210711153108.633 INFO     conf - conf.c:run_script_argv:332 - Executing script "/usr/share/lxcfs/lxc.reboot.hook" for container "104", config section "lxc"
lxc-start 104 20210711153109.143 ERROR    lxc_start - tools/lxc_start.c:main:308 - The container failed to start
lxc-start 104 20210711153109.143 ERROR    lxc_start - tools/lxc_start.c:main:313 - Additional information can be obtained by setting the --logfile and --logpriority options

i am sure my template support cgroup2
 
and i check your code of /usr/share/perl5/PVE/LXC/Setup.pm
from line 424
Code:
sub unified_cgroupv2_support {
    my ($self) = @_;
    $self->protected_call(sub {
    $self->{plugin}->unified_cgroupv2_support();
    });
}

you forget a check if its unmanaged here
it should be


Code:
sub unified_cgroupv2_support {
    my ($self) = @_;
    return if !$self->{plugin}; # unmanaged
    $self->protected_call(sub {
    $self->{plugin}->unified_cgroupv2_support();
    });
}
problem solved
 

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!