pty issue with ve 4 containers (converted from 3)

Problem still present for Centos 6.x (yum updates of initscripts package).

P.
 
Please try this "semi optimal" work-around.

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.

You can find the container-hooks here: https://linuxcontainers.org/lxc/manpages/man5/lxc.container.conf.5.html
Note that some hooks are executed on the hostnode (like 'pre-start') and some on the LXC (like 'start').

So if you use the latter one, the commands should be on the the LXC.
Example (non-working):
Code:
lxc.hook.start: sh -c "perl -pi -w -e 's/^(\/sbin\/start_udev)/# \$1/g' /etc/rc.d/rc.sysinit"

If someone succeeds, I'm glad to hear from you.

Regards,
Ruben
 
A better solution:

Enter the container 101 (example) from the host command prompt:
Code:
root@pve01:~# pct enter 101

Inside the container enter:
Code:
[root@ct101 ~]# rpm -e --nodeps udev
[root@ct101 ~]# reboot

This will remove the udev package. Problem is solved but not sure what the side effects are.

Hope this helps!
 
The side effect is that /dev/shm is missing now! :mad:

Had to run the following commands inside the CT manually after creating it and disabling /sbin/start_udev:
Code:
# mknod -m 600 /dev/initctl p
# mkdir -m 1777 /dev/shm
# mount /dev/shm
 
Last edited:

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!