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
[email protected]
http://lists.xensource.com/xen-devel
Quoted 4 lines · 胡少龙
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-dataon domU:
# xenstore-read my-data test-data
Signature · 1 line
Fajar