Troubleshooting

Troubleshooting Citrix Xensource

Introduction

XenServer logs event information that can be helpful for administrators diagnosing problems. It also provides a utility to gather system information to provide to XenServer technical support.

Objective

In this lab, you will:

  • View logs
  • Generate a diagnostic file

Pre-Requisites

Before you begin, you must have:

  • Installed the XenCenter Client on a Windows computer
  • Obtained the IP address from the local display of a XenServer
  • Used XenCenter Client to connect to a XenServer

Launch the XenCenter Management Client

  1. Double-click the XenCenter desktop icon. The XenCenter Client launches.
  2. Click Add your XenServer in the right pane on the Home tab. The Connect New Server dialog box appears, prompting for a XenServer to connect to.
  3. Enter the following values:
Field Value
Hostname 10.20.1.40
User name root (default)
Password myxenpw

Click Connect. The XenCenter Client connects to the specified XenServer, which appears as the first object on the file tree in the left pane of the application window.

Exercise 1 – Log in to the Server Console using XenCenter Client

  1. Select xenserver from the left pane.
  2. Click the Console tab in the right pane.
  3. Click into Console window.
  4. Press Enter to login. You are logged into the server console (Domain 0).
  5. Proceed to the next exercise.

Exercise 2 – Log in to the Server Console using PuTTY SSH client

  1. Go to Start > Run on the Training Desktop.
  1. Type the following command in the Open field and click OK:
    c:XenSourceputty [email protected]

    A
    Putty Security Alert appears.
  2. Click Yes. A password prompt appears.
  3. Enter myxenpw (no text appears) and press Enter. You are logged into the server console (Domain 0) remotely.
  4. Proceed to the next exercise.

Exercise 3 – View the XenServer Log File

  1. Remain in the Putty SSH client.
    Note: This Exercise can be completed in either the XenCenter or Putty SSH client.
  2. Type the following command and press Enter:
    less /var/log/xensource.log

    The XenServer log file is displayed.
  3. Navigate the log file using the following commands:
Command Function
d Page down
b Page up
G Go to end of file
g Go to start of file
/example Search forward for the text example
?example Search backward for the text example
n Find next occurrence of search string
q Quit
  1. Type q to exit the file viewer.
  2. Type the following command and press Enter:
    tail -f /var/log/xensource.log

    Updates to the log file are actively displayed. Keep this command running while performing the next exercise.
  3. Proceed to the next exercise.

Exercise 4 – Restart a VM using XenCenter Client

  1. Return to the XenCenter Client.
  2. Select WindowsServer from the left pane file tree and click Start on the toolbar.
  3. Wait for the VM to start.
  4. Click Shut Down on the toolbar with WindowsServer still selected.
  5. Wait for the VM to shut down.
  6. Switch back to the Putty SSH client and view the output from the tail -f command.
  7. Press Ctrl-C to terminate the tail -f command.
  8. Proceed to the next exercise.

Exercise 5 – Generate Diagnostic File for Submission to Technical Support

  1. Remain in the Putty SSH client.
  2. Type the following command and press Enter
    xen-bugtoolyestoall
    Note: If both dashes are not placed before yestoall, you will be prompted for each report individually.
  3. Record the filename created at the end of this process. The filename is of the form “bug-report-datestamp.tar.bz2” where datestamp indicates the date the diagnostic file was created.
  4. Proceed to the next exercise.

Exercise 6 – Securely Copy Diagnostic File to a Windows client

  1. Go to Start > All Programs > Accessories > Command Prompt on the Training Desktop. The Command Prompt appears.
  2. Type the following command and press Enter:
    cd c:xensource
  3. Type the following command and press Enter:
    pscp [email protected]:/var/opt/xen/bug-report/bug-report-datestamp.tar.bz2 .
    Replace datestamp with the date stamp of the file generated in the previous Exercise.
    Note: Be careful to include the dot at the end of the command. This refers to the current directory on the Windows machine.

    The pscp command starts.
  4. Enter [email protected]’s password: myxenpw (no text appears) and press Enter. The diagnostic file is transferred to the local Windows machine.
    Note: The CLI also includes the xe host-bugreport-upload command. This command runs xen-bugtool and automatically uploads the resulting file to XenServer support.
    Example: xe host-bugreport-upload host=TRNSRV-A-04
  5. This lab is now complete.