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
Config.mk file.

The Config.mk file is in the source root directory.

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

PYTHON      ?= python
PYTHON_PREFIX_ARG ?= --prefix="$(PREFIX)"

to :

PYTHON = python
PYTHON_PREFIX_ARG =

Save the changes. Then,

# make clean

# make install-xen

# make install-tools

# make install-stubdom


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


Everything should be working fine now.

Tuning Config.mk 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
/usr/lib/python2.6/site-packages,
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 !

4 comments:

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

    ReplyDelete
  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 !

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

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

    ReplyDelete