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/
Home Products Support Community News


Re: [Xen-devel] How does domain0 export information to guest through xe

To: 胡少龙 <sunofblack@xxxxxxxx>
Subject: Re: [Xen-devel] How does domain0 export information to guest through xenstore
From: "Fajar A. Nugraha" <fajar@xxxxxxxxx>
Date: Mon, 9 Aug 2010 11:40:05 +0700
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Sun, 08 Aug 2010 21:41:03 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <911857.94436.qm@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
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>
References: <911857.94436.qm@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Mon, Aug 9, 2010 at 7:31 AM, 胡少龙 <sunofblack@xxxxxxxx> 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
# DOMU_ID=`virsh domid domUname`
# xenstore-write /local/domain/${DOMU_ID}/my-data "test-data"
# xenstore-read /local/domain/${DOMU_ID}/my-data

on domU:
# xenstore-read my-data


Xen-devel mailing list

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