kvm serial console access

How to setup a serial console access to a libvirt based KVM machine?


# ttyS0 - getty
# This service maintains a getty on ttyS0 from the point the system is
# started until it is shut down again.

start on stopped rc RUNLEVEL=[2345]
stop on runlevel [!2345]

exec /sbin/getty -L 38400 ttyS0 vt102


GRUB_CMDLINE_LINUX="console=ttyS0,38400n8 console=tty0"


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

Now you can connect:

$ virsh console VM

About tompos

Hungary, Budapest
This entry was posted in Fedora, IT, Linux, RedHat, Ubuntu. Bookmark the permalink.

Leave a Reply