Search

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

download PDF
Symptom
This error message appears when attempting to connect to a guest virtual machine's console:
# 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:
    <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:
    console=ttyS0,115200
  3. Run the followings command:
    # virsh start vm && virsh console vm
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.

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.