connecting a virtual console with VirtualBox and SoCat

connecting a virtual console with VirtualBox and SoCat

There are times when being able to connect a console to a terminal application becomes useful. For example, Getting kernel panic messages and you need to get the entire message so that it can help you figure out what is going on. If using Virtualbox on linux, the serial console with need to be setup:

 

Once that is set, download and install the command screen and socat.

yum install screen socat

When the programs have finished installing. Run this command:

./socat-2.0.0-b9/socat UNIX-CONNECT:/tmp/NyLinuxVM-con PTY,link=/tmp/NyLinuxVM-con-pty &

This creates a socket to the virtual machines console and the & allows it run in the background.


screen /tmp/NyLinuxVM-con-pty

Now I can connect to the console using the command screen.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: