This article describes about troubleshooting Linux virtual machines in XenServer.
Serial console was used to access UNIX server consoles and most of the network devices (switches, routes). The simplicity of serial port hardware and its universality make them popular.
Serial console apart from hypervisor troubleshooting, as described in articles How to Configure Serial Console Access on XenServer, and How to Enable Serial Ports on Dell Servers can be used to troubleshooting guest VM.
Traditionally a single Physical Volume (PV) console to PV guests is provided to Xen. Storing the relevant information in XenStore under /local/domain/$DOMID/console, this location has not been changed. But new Xen hypervisor allows guest console on PV and HVM (Hardware Virtual Machine) mode. XenConsole is the utility to connect to a PV console or an emulated serial that has a tty as output. XenConsole takes a domid as parameter.
To access guest Linux based VM serial console, complete the following procedure:
Open XenCenter, go to General tab of the VM which you want access, and check for the UUID:
Open XenServer text console, run the list_domains command, and find the VM UUID in the output:
Run the following command to access guest VM console:
/usr/lib/xen/bin/xenconsole <domain id>
To collect and save output from all VMs running on the XenServer host, complete the following procedure:
Run the following command on XenServer host:
xenstore-write /local/logconsole/@ /tmp/console.%d.log
Restart the VM from which you want to collect the console output.
Verify if file /tmp/console.<domain ID>.log exists. This file should contain VM console output. To find domain ID, refer to Procedure 1: Access to Console of Single Guest VM.
Run the following command to stop logging console output:
xenstore-rm /local/logconsole/@
CTX121442 - How to Configure Serial Console Access on XenServer
CTX131909 - How to Enable Serial Ports on Dell Servers