proxmox 5.1 - PTY allocation request failed on channel 0

astratelom

New Member
May 4, 2018
1
0
1
34
I moved container from proxmox 5.0 to 5.1 and after that i can't connect via ssh to this container.

i did try use this manual, but it not helped:

PTY Allocation
When ssh to VPS then you experience error "lxc Server refused to allocate pty":

  1. Enter to VPS, edit /etc/rc.sysinit
  2. Find /sbin/start_udev then comment out: #/sbin/start_udev
  3. Reboot VPS
It's centos 6.9 with cpanel.

lxc config:
cat /etc/pve/lxc/202.conf
arch: amd64
cores: 32
hostname: test-test
memory: 16384
net0: name=eth0,bridge=vmbr69,hwaddr=7A:89:EE:DD:88:D5,type=veth
net1: name=eth1,bridge=vmbr200,hwaddr=FE:EB:77:46:4D:77,type=veth
net2: name=eth2,bridge=vmbr103,hwaddr=56:4F:A6:AE:46:FF,type=veth
onboot: 1
ostype: centos
rootfs: local:202/vm-202-disk-1.raw,quota=1,size=500G
swap: 4096
lxc.apparmor.profile = unconfined


maybe anybody faced with this issue, could you give me advice
 
Did anyone ever find a proper fix for this one? It's pretty annoying. The CentOS 6.3 template works fine but once you upgrade to later versions it breaks SSH logins. I'm currently on 6.10

I've tried the other suggestions e.g. commenting /sbin/start_udev but that makes no difference. This basically means I can't use CentOS on Proxmox 5.x
 
I downloaded an lxc 6.10 image and did some diffs between that and my filesystem. Some of this information is documented in a few places but probably not for a openvz->lxc conversion. So here are the steps I needed to get it working:

1. Edit /etc/rc.sysinit to remove /sbin/start_udev

2. Edit /etc/fstab to remove /dev/shm and /dev/pts (left over from openvz)

3. Follow https://github.com/jazzl0ver/lxc-centos
to amend /etc/securetty and make sure /dev/shm is present

4. Just some additions I forgot about when restoring an old openvz image to remove traces of venet0

Edit /etc/sysconfig/network to remove GATEWAYDEV, NETWORKING_IPV6, IPV6_DEFAULTDEV

Remove /etc/sysconfig/network/network-scripts/venet/ifcfg-venet0*
 
Last edited:
  • Like
Reactions: NStorm and MaFL
2. Edit /etc/fstab to remove /dev/shm and /dev/pts (left over from openvz)
This are important step not covered in other threads & wiki page. These devices in fstab are enabled by default in OpenVZ images and should be disable or you won't get /dev/pts & /dev/shm working resulting in non-working SSH. Could someone add this to the wiki page please?
 
@NStorm : thanks for the hint! I updated the page and hope the explanation is clear (would be grateful for feedback)!
 
  • Like
Reactions: NStorm

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!