21 June, 2011

KVM virtual console to physical TTY

This took me longer than it should've to figure out... I wanted to take the virtual console (pts) from a KVM virtual machine, and map it to a physical tty, so that I could login to my virtual machine from the physical keyboard, without having to login to the virtual host itself.

This can be done with a simple one-liner: screen /dev/pts/1 > /dev/tty9 < /dev/tty9 &

Add that to /etc/rc.d/rc.local to start on system startup (hopefully after the VM has started), and I'm all set!