Troubleshooting Linux Virtual Machines in XenServer

Troubleshooting Linux Virtual Machines in XenServer

book

Article ID: CTX137216

calendar_today

Updated On:

Description

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.


Instructions

Procedure 1: Access to Console of Single Guest VM

To access guest Linux based VM serial console, complete the following procedure:

  1. Open XenCenter, go to General tab of the VM which you want access, and check for the UUID:

    User-added image

  2. Open XenServer text console, run the list_domains command, and find the VM UUID in the output:

    User-added image

  3. Run the following command to access guest VM console:
    /usr/lib/xen/bin/xenconsole <domain id>

Procedure 2: Log Output of Newly Created Linux VMs to Text File

To collect and save output from all VMs running on the XenServer host, complete the following procedure:

  1. Run the following command on XenServer host:
    xenstore-write /local/logconsole/@ /tmp/console.%d.log

  2. Restart the VM from which you want to collect the console output.

  3. 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.

  4. Run the following command to stop logging console output:
    xenstore-rm /local/logconsole/@

Issue/Introduction

This article describes about troubleshooting Linux virtual machines in XenServer

Additional Information

CTX121442 - How to Configure Serial Console Access on XenServer
CTX131909 - How to Enable Serial Ports on Dell Servers