What reason could prevent console output from "virsh -c qemu:///system console guest1"?

Solution 1:

I'm fairly sure you do need to configure the guest to use a serial console. You need three things for this to work:

  1. give the guest a virtual serial device of type pty (for example by adding one in the virt-manager vm info page)

  2. tell the kernel to use that for its output, by adding boot parameters like serial=tty0 console=ttyS0,115200n8 into GRUB_CMDLINE_LINUX in /etc/default/grub; then run sudo update-grub

  3. (optional) put a getty on ttyS0 so that you get a login prompt

See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=507650 for more.

Solution 2:

One possibility is that your virtual machine does not have a serial console configured.

virsh dumpxml guest1

will show if there is a serial console configured or not. There should be something similar as

<serial type='pty'>
<target port='0'/>
</serial>

Solution 3:

Here it is very well explained:

Serial console for Ubuntu server 10.04 KVM guests

Solution 4:

I just ran into this.

Here is what I have inthe XML config on the host (running KVM):

<serial type='pty'>
  <source path='/dev/pts/0'/>
  <target port='0'/>
</serial>
<console type='pty' tty='/dev/pts/0'>
  <source path='/dev/pts/0'/>
  <target port='0'/>
</console>

I also had to add the following in /etc/default/grub.conf in the VM (append to the "kernel" command):

kernel ..... serial=tty0 console=ttyS0,115200n8

Finally I secured the ttyS0 by adding "/etc/securetty" to enable root login from here

vi /etc/securetty
ttyS0

You might need to muck with your getty settings (as described by the other answer) as well

Hope this helps