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
- Double-click the XenCenter desktop icon. The XenCenter Client launches.
- 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.
- 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
- Select xenserver from the left pane.
- Click the Console tab in the right pane.
- Click into Console window.
- Press Enter to login. You are logged into the server console (Domain 0).
- Proceed to the next exercise.
Exercise 2 – Log in to the Server Console using PuTTY SSH client
- Go to Start > Run on the Training Desktop.
- Type the following command in the Open field and click OK:
c:XenSourceputty [email protected]
A Putty Security Alert appears. - Click Yes. A password prompt appears.
- Enter myxenpw (no text appears) and press Enter. You are logged into the server console (Domain 0) remotely.
- Proceed to the next exercise.
Exercise 3 – View the XenServer Log File
- Remain in the Putty SSH client.
Note: This Exercise can be completed in either the XenCenter or Putty SSH client. - Type the following command and press Enter:
less /var/log/xensource.log
The XenServer log file is displayed. - 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 |
- Type q to exit the file viewer.
- 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. - Proceed to the next exercise.
Exercise 4 – Restart a VM using XenCenter Client
- Return to the XenCenter Client.
- Select WindowsServer from the left pane file tree and click Start on the toolbar.
- Wait for the VM to start.
- Click Shut Down on the toolbar with WindowsServer still selected.
- Wait for the VM to shut down.
- Switch back to the Putty SSH client and view the output from the tail -f command.
- Press Ctrl-C to terminate the tail -f command.
- Proceed to the next exercise.
Exercise 5 – Generate Diagnostic File for Submission to Technical Support
- Remain in the Putty SSH client.
- Type the following command and press Enter
xen-bugtool —yestoall
Note: If both dashes are not placed before yestoall, you will be prompted for each report individually. - 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.
- Proceed to the next exercise.
Exercise 6 – Securely Copy Diagnostic File to a Windows client
- Go to Start > All Programs > Accessories > Command Prompt on the Training Desktop. The Command Prompt appears.
- Type the following command and press Enter:
cd c:xensource - 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. - 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 - This lab is now complete.