OpenVZ Forum


Home » General » Support » Unable to open pty: No such file or directory (Unable to open pty: No such file or directory)
Unable to open pty: No such file or directory [message #45026] Sun, 22 January 2012 10:43 Go to next message
JimL is currently offline  JimL
Messages: 116
Registered: February 2007
Senior Member
I've looked at a dozen or more responses to this error but I can't find a solution that works for me.

I upgraded my system from Centos 5.6 to 6.2. Now the centos 4.7 VEs that ran on 5.6 won't run and give the unable to open pty messages.

vzctl exec 225 ls /dev/pts returns zero files.

vzctl exec 225 /sbin/MAKEDEV pty doesn't complain but doesn't create anything in /dev/pts

I also tried vzctl exec 225 /sbin/MAKEDEV tty

When I do an vzctl exec 225 ls -l /dev, I see

crw-rw-rw- 1 root tty 2, 176 Jan 22 04:56 ptya0
crw-rw-rw- 1 root tty 2, 177 Jan 22 04:56 ptya1
crw-rw-rw- 1 root tty 2, 178 Jan 22 04:56 ptya2
crw-rw-rw- 1 root tty 2, 179 Jan 22 04:56 ptya3
crw-rw-rw- 1 root tty 2, 180 Jan 22 04:56 ptya4
crw-rw-rw- 1 root tty 2, 181 Jan 22 04:56 ptya5
crw-rw-rw- 1 root tty 2, 182 Jan 22 04:56 ptya6
(not a complete list)

I also have a VE running Ubuntu 8.04 that starts and runs fine. Comparing the dev list of the two VE's doesn't show any differences with respect to the ptys or /dev/pts.

I also have another almost identical Centos 4 VE, 226 and it exhibits the same behavior.

uname -a
Linux centos 2.6.32-042stab044.17 #1 SMP Fri Jan 13 12:53:58 MSK 2012 x86_64 x86_64 x86_64 GNU/Linux

One thing to note is that this system was running a 32 bit kernel when the VEs were generated and now I'm running a 64 bit kernel.

I did a fresh install of a minimal centos 4 VE and it works fine.

Is there any way I can make these VEs work?

Thanks,
Jim.

[Updated on: Sun, 22 January 2012 10:44]

Report message to a moderator

Re: Unable to open pty: No such file or directory [message #45110 is a reply to message #45026] Tue, 31 January 2012 01:37 Go to previous message
JimL is currently offline  JimL
Messages: 116
Registered: February 2007
Senior Member
Apparently this wasn't limited to Centos 6. Since the Centos 6 kernel crashes, I booted up my old Centos 5 partition, migrated the container to a Fedora 14 system and it had the same problem. Now it worked OK still on Centos 5 but I want to get that system upgraded to Centos 6 but since the OpenVZ kernel won't run, I had to get my important containers working somewhere else.

It didn't work on Fedora either. I started poking around and found that the following worked for me. YMMV

In addition to the MAKEDEV entries I had to perform the following steps from the host:

vzctl exec 225 bash
rm /dev/null
mknod /dev/null c 1 3
chmod 666 /dev/null
mknod /dev/ptmx c 5 2
chmod 666 /dev/null


I did restart sshd and all is well. I haven't shut it down yet to see if it comes up OK, but that got it running again. I can

vzctl enter 225

and

ssh 192.168.2.25

So I'm happy. well maybe that's a stretch.

Jim.

Note: I had to create the ptys via MAKEDEV too.

[Updated on: Tue, 31 January 2012 01:38]

Report message to a moderator

Previous Topic: vzdummy-apache and vzdev for RHEL 6 templates
Next Topic: Disturb VMs in two HDD
Goto Forum:
  


Current Time: Sun Oct 06 11:20:24 GMT 2024

Total time taken to generate the page: 0.05726 seconds