Troubleshooting
If you're running into issues with your Xen installation there are two log files on the host system to help you out. The file /var/log/xend.log holds the same information as you receive when running 'xm log',
and contains basic information. Unfortunately these log messages are
often very short and contain little useful information. The following
is the output of trying to create a domain running the kernel for
NetBSD/xen.
-
[2005-06-27 02:23:02 xend] ERROR (SrvBase:163) op=create: Error creating domain:(0, 'Error')
Traceback (most recent call last):
File "/usr/lib/python2.4/site-packages/xen/xend/server/SrvBase.py", line 107, in _perform
val = op_method(op, req)
File "/usr/lib/python2.4/site-packages/xen/xend/server/SrvDomainDir.py", line 71, in op_create
raise XendError("Error creating domain: " + str(ex))
XendError: Error creating domain: (0, 'Error')
The second file, /var/log/xend-debug.log usually contains
much more detailed information. Trying to start the NetBSD/xen kernel
will result in the following log output:
-
ERROR: Will only load images built for Xen v3.0
ERROR: Actually saw: 'GUEST_OS=netbsd,GUEST_VER=2.0,XEN_VER=2.0,LOADER=generic,BSD_SYMTAB'
ERROR: Error constructing guest OS
If you are reporting errors or need help with your Xen setup you should always include both the xend.log and xend-debug.log messages that you receive.
Serial Console
For more difficult problems, serial console can be very helpful. If
the Xen kernel itself has died and the hypervisor has generated an
error, there is no way to record the error persistently on the local
host. Serial console lets you capture it on a remote host.
You need to set up the Xen host for serial console output, and set
up a remote host to capture it. For the console output, you need to set
appropriate options in /etc/grub.conf, for example:
-
title Fedora Core (2.6.16-1.2080_FC5xen0)
root (hd0,2)
kernel /xen.gz-2.6.16-1.2080_FC5 com1=38400,8n1 sync_console
module /vmlinuz-2.6.16-1.2080_FC5xen0 ro root=LABEL=/ rhgb quiet console=ttyS0 console=tty pnpacpi=off
module /initrd-2.6.16-1.2080_FC5xen0.img
for a 38400-bps serial console on com1 (ie. /dev/ttyS0 on Linux.)
The "sync_console" works around a problem that can cause hangs with
asynchronous hypervisor console output, and the "pnpacpi=off" works
around a problem that breaks input on serial console. "console=ttyS0
console=tty" means that kernel errors get logged both on the normal VGA
console and on serial console. Once that is done, you can install and
set up ttywatch (from fedora-extras) to capture the information on a
remote host connected by a standard null-modem cable.
Hints
Q: I am trying to start then xend service and nothing happens, then when I do a `xm list1 I get the following:
Alternatively, I run xend start manually and get the following error:
-
ERROR: Could not obtain handle on privileged command interface (2 = No such file or directory)
Traceback (most recent call last):
File "/usr/sbin/xend", line 33, in ?
from xen.xend.server import SrvDaemon
File "/usr/lib/python2.4/site-packages/xen/xend/server/SrvDaemon.py", line 21, in ?
import relocate
File "/usr/lib/python2.4/site-packages/xen/xend/server/relocate.py", line 26, in ?
from xen.xend import XendDomain
File "/usr/lib/python2.4/site-packages/xen/xend/XendDomain.py", line 33, in ?
import XendDomainInfo
File "/usr/lib/python2.4/site-packages/xen/xend/XendDomainInfo.py", line 37, in ?
import image
File "/usr/lib/python2.4/site-packages/xen/xend/image.py", line 30, in ?
xc = xen.lowlevel.xc.xc()
RuntimeError: (2, 'No such file or directory')
A: You have rebooted your host into a kernel that is not a xen-hypervisor kernel. Yes I did this myself in testing
You either need to select the xen-hypervisor kernel at boot time or
set the xen-hypervisor kernel as default in your grub.conf file.
Getting Help
If the Troubleshooting section above does not help you to solve your problem, check the Red Hat Bugzilla
for existing bug reports on Xen in FC5. The product is "Fedora Core",
and the component is "kernel" for bugs related to the xen0 kernel and
"xen" for bugs related to the tools. These reports contain useful
advice from fellow xen testers and often describe work-arounds.
For general Xen issues and useful information check the Xen project documentation, and mailing list archives.
Finally, discussion on Fedora Xen support issues occur on the Fedora Xen mailing list
Footnotes