[SOLVED] Promox 5.3.1 - Failed to create directory "/sys/fs/cgroup/systemd/lxc/*

guess then you need to reboot the host
 
when i reboot the host, folders are removed but folders are created when the container start, indeed we can't start the ct, we cant delete folders ..
 
* command that works here:
`find /sys/fs/cgroup/*/lxc/802* -depth -type d -print -delete` (replace 802 with the actual ct id)
 
as @oguz suggested it seems that there is a problem with /sbin/init after the upgrade:
Code:
lxc-start 8022 20190403144525.650 NOTICE   start - start.c:start:2075 - Exec'ing "/sbin/init"
lxc-start 8022 20190403144525.650 ERROR    start - start.c:start:2078 - No such file or directory - Failed to exec "/sbin/init"

You could try to check the container's image and see why there is no /sbin/init:
* `pct mount $VMID`
* `ls /var/lib/lxc/$VMID/rootfs/sbin/init`

depending on whether it's an unprivileged container or privileged you can then try to either chroot inside it and try to install the missing packages, or to use `lxc-usernsexec` to change into the user-namespace for unprivileged containers and then chroot.

Probably it would be better to restore the original container from a backup and try to upgrade again - and make sure that init is upgraded properly (systemd is installed) before rebooting

Hope this helps!
 
Hi Stoiko,

I've found the good formula to upgrade my VM from wheezy to stretch.

The issue was effectively link to sbin folder with init scripts.

The formula was to "hold" some packages like init upstart during the upgrade.

Then at the end before rebooting, remove this packages and then reinstall it.

Thanks for your support !

Regards.
 
Glad your issue got resolved! Please mark the thread as 'SOLVED', so that others know what to expect.
Thanks!
 
this is how u can try to delete those:
find /sys/fs/cgroup/*/lxc/802* -type d | tac |xargs rmdir