[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] python xs.read/write in domU
I'm trying to read from xenstore inside of domU in python. In this example my domid is 4. I can read from inside domU just fine from the command line but not using the xs API from python even with correct permissions. root@xen1:~# xenstore-read /local/domain/4/name xen1.numnum.net root@xen1:~# python test.py Traceback (most recent call last): File "test.py", line 6, in <module> xs = xshandle() File "/usr/lib/python2.5/site-packages/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') test.py is: #!/usr/bin/env python from xen.xend.xenstore.xstransact import * from xen.xend.xenstore.xsutil import * xs = xshandle() th = xs.transaction_start() print xs.read(th, "/local/domain/4/name") xs.transaction_end(th) #xstransact.Read("/local/domain/4/name") This code works fine in dom0. I've found that if i do xenstore-read -s it will give me the same No such file or directory error. The -s parameter forces xenstore-read to call xs_daemon_open() instead of xs_domain_open(). The python lowlevel xs file always calls xs_daemon_open(). Is this the issue? What is the difference between daemon and domain_open? Also just to test, I tried to run xend inside domU. Xend fails with an operation not permitted error, but then when I run test.py after that I get a Connection Refused error instead of No such file or directory. Not sure what is going on. I'm using Ubuntu 7.10 with Xen 3.1.0 from their prebuilt packages. Thanks Kareem _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |