Add the following line to /etc/pve/lxc/XXXX.conf at your hostnode.
Code:
lxc.hook.stop: sh -c "pct mount ${LXC_NAME}; perl -pi -w -e 's/^(\/sbin\/start_udev)/# \$1/g' /var/lib/lxc/${LXC_NAME}/rootfs/etc/rc.d/rc.sysinit; pct unmount ${LXC_NAME}"
This hook will be executed after a VPS stop. The code mounts the VPS filesystem, does some regexp magic on rc.sysinit (commenting /sbin/start_udev) and unmounts the VPS filesystem.
I'm assuming the update of the initscripts only become active after a VPS is stopped and started from the hostnode (e.g. pct stop/start)
So entering the command "reboot" from within the VPS won't work. In my findings the VPS even doesn't come up.... I think "lxc.hook.stop" is used by Proxmox itself and we can't "enqueue" to it.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.