From: Ian Campbell Subject: Re: Write a key-value pair to xenstore using the libxl Date: Wed, 6 Jul 2011 09:11:54 +0100 Message-ID: <1309939914.634.143.camel@zakaz.uk.xensource.com> References: <38a3dc11.12c42.130fe65cfa0.Coremail.gbtux@126.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <38a3dc11.12c42.130fe65cfa0.Coremail.gbtux@126.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: zhikai Cc: xen-devel List-Id: xen-devel@lists.xenproject.org On Wed, 2011-07-06 at 08:42 +0100, zhikai wrote: > 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.