Autostart LXC Debian Buster not work

Hello,

Despite having performed the solution suggested in the line below, the autostart of my LXCs does not work under Debian Buster when the machine is rebooted.

https://discuss.linuxcontainers.org/t/autostart-of-container-during-boot-on-debian-buster-not-working/6563

Configuration of my LXC or the autostart option is enabled.

# Network configuration
lxc.net.0.type = veth
lxc.net.0.link = virbr0
lxc.net.0.name = eth0
lxc.net.0.flags = up
lxc.start.auto = 1
lxc.net.0.ipv4.address = x.x.x.x/24
lxc.net.0.ipv4.gateway = x.x.x.x

Do you have any leads on this subject?

Thank you in advance

Do you have the lxc systemd service enabled?

How can I see it?

systemctl | grep lxc

systemctl | grep lxc
var-lib-lxcfs.mount loaded active mounted /var/lib/lxcfs
lxc-net.service loaded active exited LXC network bridge setup
lxc.service loaded active exited LXC Container Initialization and Autoboot Code
lxcfs.service loaded active running FUSE filesystem for LXC

If you do:

systemctl stop lxc
systemctl start lxc

Do all of your containers stop, and then the ones marked as auto start start?

Without reboot of the machine it works but if I reboot the machine systemctl does not work anymore. I am required to start the LXCs with a lxc-start and then if I do a systemctl stop / start lxc it works.

After reboot systemctl start lxc not work
systemctl start lxc
lxc-ls -f
NAME STATE AUTOSTART GROUPS IPV4 IPV6 UNPRIVILEGED
cn1 STOPPED 1 - - - false
cn2 STOPPED 1 - - - false
cn3 STOPPED 1 - - - false
cn4 STOPPED 1 - - - false
cn5 STOPPED 1 - - - false

but if I do a manual lxc-start of my containers then a systemdctl stop / start lxc it works

systemctl stop lxc
lxc-ls -f
NAME STATE AUTOSTART GROUPS IPV4 IPV6 UNPRIVILEGED
cn1 STOPPED 1 - - - false
cn2 STOPPED 1 - - - false
cn3 STOPPED 1 - - - false
cn4 STOPPED 1 - - - false
cn5 STOPPED 1 - - - false

systemctl start lxc
lxc-ls -f
NAME STATE AUTOSTART GROUPS IPV4 IPV6 UNPRIVILEGED
cn1 RUNNING 1 - x.x.x.x - false
cn2 RUNNING 1 - x.x.x.x - false
cn3 RUNNING 1 - x.x.x.x - false
cn4 RUNNING 1 - x.x.x.x - false
cn5 RUNNING 1 - x.x.x.x - false