Using serial console to access virtual machines (Centos, KVM)
Last time I promised, that I’ll write how to connect to VM via serial console. So – this time very shortly and without any explanations:
On the guest OS:
echo ttyS0 >> /etc/securetty
Now add following param to kernel params in /etc/grub.conf:
console=ttyS0
And the last thing:
echo "S0:12345:respawn:/sbin/agetty ttyS0 115200" >> /etc/inittab && init q
Now restart the guest OS, and You’re good to connect to VM via:
virsh console guest_id
If You feel like interested in what happened above – please ask questions in comments – I’ll explain :)