Tag Archives: virsh

KVM enable console

If you did default Centos OS installation, you may be missing console access from virsh virtual machine administration.

If you have started VM from virsh like this:

start –console VM and you see only:

Connected to domain VM_NAME
Escape character is ^]

you should change your VM default configuration like this:

vi /etc/init/ttyS0.conf

# ttyS0 – agetty
#
# This script starts a agetty on ttyS0

stop on runlevel [S016]
start on runlevel [23]
respawn
exec agetty -h -L -w /dev/ttyS0 115200 vt102

and finish initctl start ttyS0

you also can change a bit you grub.conf file a bit:

grubby –update-kernel=ALL –args=’console=ttyS0,115200n8 console=tty0′

if you will add this kernel commands, you will see kernel messages when your system is booting, but its not necessary.

If you can access console as root user you should add this:

echo “ttyS0” >> /etc/securetty