Skip to contentSkip to conversation

Write a key-value pair to xenstore using the libxl

DISCUSSION zhikai 2 participants 2 messages Jul 6, 2011

lore
Share & tools
lore

zhikai

author
#0 lore raw

Hi,
I want to add a new key-value pair in vm config file and then need to get the value in VM using xenstore_read(). But I don't know how to store the key-value to xenstore using the libxl? Which method in libxl can I use to do this? Would anyone help me?

Thank you very much.
zhikai

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#1 lore raw
Quoted 4 lines · zhikai

I want to add a new key-value pair in vm config file and then need to get the value in VM using xenstore_read(). But I don't know how to store the key-value to xenstore using the libxl? Which method in libxl can I use to do this? Would anyone help me?

When you create a domain via libxl you can pass an "xsdata" in the libxl_domain_create_info which will cause extra xenstore keys to be written.

This is not currently exposed via the xl tool though so if you are using that you'll need to patch xl to read a key from the cfg file and populate this field.

Ian.