Mailing List Archive

XenStore access problem: xen.lowlevel.xs.Error: (2, 'No such file or directory')
Hi,

I write a very simple python script to access xen store.

It works OK on dom0, but on a guest domain, it gives the following
error message:

Traceback (most recent call last):
File "./mybus.py", line 11, in <module>
xs = xshandle() # From xsutil
File "/home/me/xen-build/dist/install/usr/lib/python/xen/xend/xenstore/xsutil.py",
line 18, in xshandle
xs_handle = xen.lowlevel.xs.xs()
xen.lowlevel.xs.Error: (2, 'No such file or directory')

I don't know which file or directory that "xs" is trying to access.

below is part of my script:

import sys
sys.path.append('/usr/lib/python')

from xen.xend.xenstore.xswatch import *

xs = xshandle() # <-------- error happens here
path = xs.get_domain_path(0) + "/mynode"
th = xs.transaction_start()
buf = xs.read(th, path)
xs.transaction_end(th)
print "Got %s" % buf

Can anyone give me some hint?

ps: another question is why it try to access file from my build
directory instead of /usr/lib/python/xen ?

Thanks in advance
weiming

_______________________________________________
xen-api mailing list
xen-api@lists.xensource.com
http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-api