胡少龙
2010-Aug-09 00:31 UTC
[Xen-devel] How does domain0 export information to guest through xenstore
Hi, I am tring to write xenstore some information ,so that a guest can read, if i simply xenstore-write /foo "123" in domain 0, guest have not the permission to read this ,and guest domain number are dynamic, so i can not write a program to write /local/domain/X, which X is the domain id i want to export information to, can i ? So, is there a path (a static path,without domain number)that i write to in domain 0, and guests have the permission to read ? Or, some other solution? Thanks. Hu Shaolong _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Fajar A. Nugraha
2010-Aug-09 04:40 UTC
Re: [Xen-devel] How does domain0 export information to guest through xenstore
On Mon, Aug 9, 2010 at 7:31 AM, 胡少龙 <sunofblack@yahoo.cn> wrote:> > Hi, > I am tring to write xenstore some information ,so that a guest can read, if i simply xenstore-write /foo "123" in domain 0, guest have not the permission to read this ,and guest domain number are dynamic, so i can not write a program to write /local/domain/X, which X is the domain id i want to export information to, can i ? > So, is there a path (a static path,without domain number)that i write to in domain 0, and guests have the permission to read ?You could make use of virsh to convert domU name to id. Something like this: On dom0: # virsh domid domUname 41 # DOMU_ID=`virsh domid domUname` # xenstore-write /local/domain/${DOMU_ID}/my-data "test-data" # xenstore-read /local/domain/${DOMU_ID}/my-data test-data on domU: # xenstore-read my-data test-data -- Fajar _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel