OpenVZ: vzctl enter gives “Unable to open pty: No such file or directory”

Want to help support this blog? Try out Oh Dear, the best all-in-one monitoring tool for your entire website, co-founded by me (the guy that wrote this blogpost). Start with a 10-day trial, no strings attached.

We offer uptime monitoring, SSL checks, broken links checking, performance & cronjob monitoring, branded status pages & so much more. Try us out today!

Profile image of Mattias Geniar

Mattias Geniar, March 20, 2012

Follow me on Twitter as @mattiasgeniar

You can get the following error on OpenVZ hosts.

# vzctl enter 123
enter into CT 123 failed
Unable to open pty: No such file or directory

To fix this, you can re-create the pty and tty devices from the hardware node.

# vzctl exec 123 /sbin/MAKEDEV tty  
# vzctl exec 123 /sbin/MAKEDEV pty

The vzctl enter should work again.



Want to subscribe to the cron.weekly newsletter?

I write a weekly-ish newsletter on Linux, open source & webdevelopment called cron.weekly.

It features the latest news, guides & tutorials and new open source projects. You can sign up via email below.

No spam. Just some good, practical Linux & open source content.