HostOnNet Blog


KVM ubuntu guest console not working

On KVM Virtual Machine running Ubuntu Guest, console command shows blank screen.

[root@server70 ~]# virsh console vm1
Connected to domain vm1
Escape character is ^]

This is because serial console is not running in Ubuntu Guest. Connect to guest using VNC. Create file

vi /etc/init/ttyS0.conf

Add following content

respawn
exec /sbin/getty -L 115200  ttyS0 xterm

The content of the file is

boby@ubuntu:~$ cat /etc/init/ttyS0.conf 

respawn
exec /sbin/getty -L 115200  ttyS0 xterm
boby@ubuntu:~$ 

Now, start serial console with command

sudo start ttyS0

Now console will allow you to login.

kvm_console

To auto start serial console on boot, modify /etc/init/ttyS0.conf as follows

boby@ubuntu:~$ cat /etc/init/ttyS0.conf 
start on stopped rc RUNLEVEL=[2345]
stop on runlevel [!2345]
respawn
exec /sbin/getty -L 115200  ttyS0 xterm
boby@ubuntu:~$ 

Posted in Virtualization