B.5. Internal error cannot find character device (null)


Symptom
This error message appears when attempting to connect to a guest virtual machine's console:
Copy to Clipboard Toggle word wrap
# virsh console test2 Connected to domain test2 Escape character is ^] error: internal error cannot find character device (null)
Investigation
This error message shows that there is no serial console configured for the guest virtual machine.
Solution
Set up a serial console in the guest's XML file.

Procedure B.1. Setting up a serial console in the guest's XML

  1. Add the following XML to the guest virtual machine's XML using virsh edit:
    Copy to Clipboard Toggle word wrap
    <serial type='pty'>
      <target port='0'/>
    </serial>
    <console type='pty'>
      <target type='serial' port='0'/>
    </console>
  2. Set up the console in the guest kernel command line.
    To do this, either log in to the guest virtual machine to edit the /boot/grub/grub.conf file directly, or use the virt-edit command line tool. Add the following to the guest kernel command line:
    Copy to Clipboard Toggle word wrap
    console=ttyS0,115200
  3. Run the followings command:
    Copy to Clipboard Toggle word wrap
    # virsh start vm && virsh console vm
Back to top
Red Hat logoGithubredditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

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

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.

Theme

© 2025 Red Hat, Inc.