Troubleshooting PTY allocation request failed on channel 0

When installing new virtual machine on a Debian “Lenny” host,
You might get the following error message once you try SSH the new domU:

PTY allocation request failed on channel 0
stdin: is not a tty

One way to solve the problem is installing udev ont the host guest (in case it is not installed yet).
Log in to your Dom0 and than connect your domU’s console with xm console [domU ID]
At the domU console run:


apt-get install udev

Edit and add the following line to /etc/fstab (At the domU Console):

none            /dev/pts      devpts    defaults        0   0

execute :

mkdir /dev/pts

mount -a

Another solution can solve the missing mesg y line which you can find in /etc/bashrc or in ~/.bashrc or ~/.profile file. comment the line, and try to log in via ssh.

Now try to login.

Good Luck!

10 comments

  1. Witek says:

    you can do this, or install udev. It also helps.

  2. Boris says:

    Thanks for the tip!!

  3. mark says:

    It is the coolest site,keep so!

  4. jhoni says:

    So goooooood thanks

  5. Yuda says:

    how do I wrote that on the domU since I can’t even go into a shell in domU ??
    I’ve already install udev on the domU using custom role I’ve made.

  6. Omer Segev says:

    If you have access to your Dom0, than you should connect your domU console via xm console domU ID.

  7. The problem is I can get a shell even after xm console to the domU. It’s just hang up.

  8. Omer Segev says:

    Did you try adding -
    extra = ‘console=hvc0 xencons=tty‘

    To your domU config file?
    If not, than try doing it and xm shutdown domu. and create it again with -c flag.

  9. Yuda says:

    after add in domU config file and doing xm create domU -c it still silent after

    Starting periodic command scheduler: crond.

    and if I ssh to it, it still have these output :
    PTY allocation request failed on channel 0
    stdin: is not a tty

  10. Yuda says:

    Thanks, it works now after I delete then create the domU again.

Leave a Reply

Your email address will not be published. Required fields are marked *

*