Serial ports might seem like ancient technology now adays. I virtualize everything on my server, for my server virtualization needs I use KVM together with libvirt. This means I usually use virt-manager for managing my VM's, this is nice when you have a linux environment on the same LAN as the server. However if you're doing it over the net it takes a long time to do anything (especially in the VNC-client in virt-manager).
Most of my new VM's these days are CentOS 6 machines, to enable them to send data to tty0 and well as ttyS0 do the following (in /etc/boot/boot):
Add the following to make grub pass through to tty0 and ttyS0:
serial --unit=0 --speed=19200 terminal --timeout=8 console serial
To tell the kernel that it should send the serial port append the following to the kernel parameters:
In CentOS 6, when the last console statement is to a ttyS, CentOS automatically spawns a getty on the serial port (as explained in /etc/init/serial.conf):
# On boot, a udev helper examines /dev/console. If a serial console is the # primary console (last console on the commandline in grub), the event # 'fedora.serial-console-available ' is emitted, which # triggers this script. It waits for the runlevel to finish, ensures # the proper port is in /etc/securetty, and starts the getty.
In Debian I've been doing this for years by adding/changing the following in /etc/default/grub (and running update-grub afterwards):
GRUB_TERMINAL=serial GRUB_SERIAL_COMMAND="serial --speed=9600 --unit=0 --word=8 --parity=no --stop=1" GRUB_CMDLINE_LINUX_DEFAULT="quiet console=tty0 console=ttyS0,9600n8"
And uncommenting ttyS0 in /etc/inittab:
T0:23:respawn:/sbin/getty -L ttyS0 9600 vt100