I'm running KVM on a Ubuntu 10.04 host. The guest OS is also Ubuntu 10.04 .
I am attempting to connect to the guest using the 'console' command. It appears I can establish a connection, but I get no output.
$ sudo virsh -c qemu:///system console guest1
Connected to domain guest1
Escape character is ^]
(NOTHING HERE)
^]
$
I don't have a 'serial' device configured, but I do have these 'console' devices.
<console type='pty' tty='/dev/pts/2'>
<source path='/dev/pts/2'/>
<target port='0'/>
</console>
<console type='pty' tty='/dev/pts/2'>
<source path='/dev/pts/2'/>
<target port='0'/>
</console>
Are these sufficient for a console, or do I need a serial device as well?
What do I need to do in order to get the KVM console to work?
I'm fairly sure you do need to configure the guest to use a serial console. You need three things for this to work:
give the guest a virtual serial device of type
pty
(for example by adding one in thevirt-manager
vm info page)tell the kernel to use that for its output, by adding boot parameters like
serial=tty0 console=ttyS0,115200n8
intoGRUB_CMDLINE_LINUX
in/etc/default/grub
; then runsudo update-grub
(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.
One possibility is that your virtual machine does not have a serial console configured.
will show if there is a serial console configured or not. There should be something similar as
Here it is very well explained:
Serial console for Ubuntu server 10.04 KVM guests
I just ran into this.
Here is what I have inthe XML config on the host (running KVM):
I also had to add the following in /etc/default/grub.conf in the VM (append to the "kernel" command):
Finally I secured the ttyS0 by adding "/etc/securetty" to enable root login from here
You might need to muck with your getty settings (as described by the other answer) as well
Hope this helps