[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-API] XenStore access problem: xen.lowlevel.xs.Error: (2, 'No such file or directory')


  • To: xen-api@xxxxxxxxxxxxxxxxxxx
  • From: weiming <zephyr.zhao@xxxxxxxxx>
  • Date: Fri, 16 Nov 2007 16:27:23 -0500
  • Delivery-date: Fri, 16 Nov 2007 13:27:51 -0800
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=twTUCxvOr6g54ju8acHXSeQbLoWFRjQk4lUHz+Oii2rNKZdMD8iiDSzDEVxUPhEpxZ48wIFGIpDgfsECM0cl2l6wT7F51tQ87ACa2Px1oq55+eW5kTX7a2ic1FH8r0zqO45hCCZGHEetZpuA54EU0+/nkqtOYZJhoKXv5v551jo=
  • List-id: Discussion of API issues surrounding Xen <xen-api.lists.xensource.com>

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@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-api


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.