A.5. Troubleshooting with Serial Consoles

download PDF
Linux kernels can output information to serial ports. This is useful for debugging kernel panics and hardware issues with video devices or headless servers.
To enable serial console output for KVM guests:
  1. Ensure that the domain XML file of the guest includes configuration for the serial console. For example:
      <console type='pty'>
        <source path='/dev/pts/16'/>
        <target type='virtio' port='1'/>
        <alias name='console1'/>
  2. On the guest, follow the How can I enable serial console for Red Hat Enterprise Linux 7? article on Red Hat Knowledgebase.
On the host, you can then access the serial console with the following command, where guestname is the name of the guest virtual machine:
# virsh console guestname
You can also use virt-manager to display the virtual text console. In the guest console window, select Serial 1 in Text Consoles from the View menu.
Red Hat logoGithubRedditYoutubeTwitter


Try, buy, & sell


About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.