XCP-ng
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Is a serial console possible for an HVM VM?

    Scheduled Pinned Locked Moved Compute
    console
    3 Posts 2 Posters 2.5k Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • I Offline
      ivanfetch
      last edited by

      Hello,

      I'd like to confirm whether a serial console (text console) is possible for HVM virtual machines?

      I am completely blind, and often use a serial console for OS installation and troubleshooting, including boot loaders and kernel output before an OS is booted. The XOA-provided web console is not accessible to screen-reading software.

      I've attempted to connect to a text console of an Ubuntu Linux VM using the xe console vm=ubuntu command, which reports: No text console available.

      Some googling suggests that a serial console is not possible with HVM virtual machines, but I'd like to confirm this before moving away from xc-png.

      Thank you for your help!

      A 1 Reply Last reply Reply Quote 0
      • A Offline
        Andrew Top contributor @ivanfetch
        last edited by

        @ivanfetch Yes, but it may not be exactly what you want because it's not a true text console.

        From XCP Dom0 try xl console -t serial VMname (or ID number). This will connect you to /dev/ttyS0 serial port on the VM. You can also use xl console -t pv VMname to connect to /dev/hvc0 (that is not a serial port).

        Your VM needs to have a getty process or Console setup on that port.

        Use xl vm-list for a VM list.

        Control-] to exit the console (like telnet).

        I don't think this is 100% the solution you are looking for, but it's a place to start. You would need to boot a new VM and tell it to use the serial port as a console rather than the VGA that Xen provides. I was able to tell Debian 11 installer to use console=ttyS0 and then see/install it from the text console but I still had to use the VGA console to tell Debian to do that.

        Without providing instructions I would say there is a way to do everything from a command line but you would still need a boot ISO that ignores the VGA and uses the serial port. The best trick would be to create a VM without VGA support so the OS in the VM is forced to use the serial port (if supported). QEMU does have text-only serial console support as I have used it directly outside of Xen/XCP but I don't know if XCP will allow you to do that.

        I 1 Reply Last reply Reply Quote 1
        • I Offline
          ivanfetch @Andrew
          last edited by

          @Andrew Thank you very much for your reply. This helped a lot, and I was able to get serial access to VMs configured to use the serial port.

          1 Reply Last reply Reply Quote 0

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better 💗

          Register Login
          • First post
            Last post