To be able to use virsh console to access a vm console directly from a KVM host, a serial port in the vm needs to be configured.

Debian/Ubuntu

Create a serial port

Create file /etc/init/ttyS0.conf with the following content

exec /sbin/getty -8 115200 ttyS0 xterm
Configure GRUB

Configure GRUB to start output to our serial port

in file /etc/default/grub/ add console=ttyS0

GRUB_CMDLINE_LINUX_DEFAULT=”console=ttyS0″
Update GRUB

Update GRUB for the changes to take effect on the next boot, by executing the following command

update-grub2