Is a serial console possible for an HVM VM?
-
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=ubuntucommand, 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!
-
@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 usexl console -t pv VMnameto 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-listfor 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=ttyS0and 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).
QEMUdoes 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. -
@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.
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