[SOLVED] Gentoo systemd containers not start after upgrade to 8.0.4

Jorge Ventura

Member
Apr 28, 2023
13
3
8
My previous gentoo systemd containers didn't start after upgrade from 7 to 8 and here the solution:
  1. # pct mount <CT#>
  2. # touch /var/lib/lxc/<CT#>/rootfs/etc/inittab
  3. # pct unmount <CT#>
The patch I developed for version 7 to support gentoo LXC containers using systemd is still applicable for version 8 and new containers created there is no problem.

Ventura
 
Last edited:
If someone has interest to use the patch.
To apply,
  1. # cd /usr/share/perl5/PVE
  2. # patch -p3 < /path_of_the_patch/0001-pct-gentoo-plugin-fix-for-systemd.patch
  3. # systemctl restart pvedaemon.service
--
A new version of the patch arrived.
Tested with Proxmox 8.3.1.

  1. Added IPv6 support
  2. Removed extra openrc strings in systemd-networkd iface config file
 

Attachments

Last edited:
Since recent updates the latest patch no longer works. I have applied the same changes again manually and saved an entire file (attached).
I think it is better to avoid overwriting file on system update instead of reapplying a patch (which can fail). One can do this using dpkg-divert command:
Code:
# Assuming Gentoo.pm is in current directory
dpkg-divert --divert /usr/share/perl5/PVE/LXC/Setup/Gentoo.pm.orig --rename --local /usr/share/perl5/PVE/LXC/Setup/Gentoo.pm
cp Gentoo.pm /usr/share/perl5/PVE/LXC/Setup/Gentoo.pm
 

Attachments