WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] Write a key-value pair to xenstore using the libxl

To: zhikai <gbtux@xxxxxxx>
Subject: Re: [Xen-devel] Write a key-value pair to xenstore using the libxl
From: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
Date: Wed, 6 Jul 2011 09:11:54 +0100
Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 06 Jul 2011 01:12:52 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <38a3dc11.12c42.130fe65cfa0.Coremail.gbtux@xxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: Citrix Systems, Inc.
References: <38a3dc11.12c42.130fe65cfa0.Coremail.gbtux@xxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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.




_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>