Sunday, October 18, 2009

Xen-tools and ubuntu Dom0

Installing Xen as described here does not install the xen-tools properly. Even if the hypervisor and Dom0 are up perfectly, there is nothing more that can be done without xen-tools.

$ sudo xm list

Traceback (most recent call last):
File "/usr/sbin/xm", line 5, in
from xen.xm import main
ImportError: No module named xen.xm

Thanks to Shriniket and Hormazd for reproducing the error :-)

As described here, the solution to this problem involves editing the file.

The file is in the source root directory.

The following lines (line no. 38 and 39) have to be changed from :

PYTHON      ?= python

to :

PYTHON = python

Save the changes. Then,

# make clean

# make install-xen

# make install-tools

# make install-stubdom

# make clean and # make install-tools might be sufficient.
Haven't tried it.

Everything should be working fine now.

Tuning results Xen packages to be placed
into /usr/local/lib/python2.6/dist-packages due to
Changeset 19594 in xen-3.4-testing.hg.
Otherwise, Xen packages would go to
which is not default location for python 2.6 on Ubuntu 9.04
( as opposed to Fedora 11 ).
Thus you won’t be able to start xend in Dom0.

Cheers !


  1. Thanx man.. Will try that out now..
    Btw, how did you get to this solution?
    And what does the change signify? If you could just throw some light on that..

  2. Hi ! I've edited the post. Check out the last paragraph.

    Well, since all the xen-tools are written in python, i had an idea of where things might be wrong. So, i was always searching in that direction ... :-)

    Thanks !

  3. Quoting, i usually point to source. Seems like you don't.

  4. There is a link pointing to the source. Seems like you somehow managed to miss it.