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-users

RE: [Xen-devel] xenstore -- read UUID

To: <derek.murray@xxxxxxxxxxxx>, xen developers community <xen-devel@xxxxxxxxxxxxxxxxxxx>, xen users community <xen-users@xxxxxxxxxxxxxxxxxxx>
Subject: RE: [Xen-devel] xenstore -- read UUID
From: dinesh chandrasekaran <dinesh_chan8@xxxxxxxxxxx>
Date: Wed, 10 Sep 2008 05:54:56 +0530
Cc:
Delivery-date: Tue, 09 Sep 2008 17:25:21 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
Importance: Normal
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx

Hi Derek,

they were 2 seperate questions... sorry for the typos...
How to access xenstore from Dom-0? -- which you said 'YES'...
And How to access xenstore from hypervosor?
Yes.. as you said 'make xen' doesnt include /usr/include libraries and I did check that...

If the hypervisor has no knowledge about XenStore, Dom-0 must have the full control over the xenstore.
I need to build a table with some fields one of which should never change during a VMs lifetime.
For example, if I chose the domain_id whose value is transient, If the VM reboots, its domain_id changes.
That is the reason why I opted for the UUID of a domain that persists over time even after migration to another machine.
The only way I could get a domain's UUID is through the xenstore and want to take away domain-0 from the picture, which
according to you is almost impossible.

anyway out?

regards,
Dinesh C

> Date: Tue, 9 Sep 2008 21:37:57 +0100
> From: Derek.Murray@xxxxxxxxxxxx
> To: dinesh_chan8@xxxxxxxxxxx
> Subject: Re: [Xen-devel] xenstore -- read UUID
> CC: xen-devel@xxxxxxxxxxxxxxxxxxx; xen-users@xxxxxxxxxxxxxxxxxxx
>
> Hi Dinesh,
>
> In what context are you trying to run this code? You say that you want
> to read the UUID from Dom0, but xen/common/memory.c is part of the
> hypervisor (and not Dom0). If you try to compile that code into
> xen/common/memory.c, it will fail, because building the hypervisor
> does not include the user-space headers (i.e. the contents of
> /usr/include/).
>
> The hypervisor has (almost) no knowledge about XenStore, and so it
> would be very difficult to access XenStore from there. However, if you
> want to access this information in Dom0, your code should work in a
> user-space application.
>
> Could you provide more details about what you are trying to do?
>
> Regards,
>
> Derek Murray.
>
> On Tue, Sep 9, 2008 at 8:36 PM, dinesh chandrasekaran
> <dinesh_chan8@xxxxxxxxxxx> wrote:
> > Hi All,
> >
> > Im trying to read the UUID of a domain-U from domain-0 using the
> > following code from inside say xen/common/memory.c.
> >
> > The include file <xs.h> is present both in /usr/include and
> > tools/xenstore/xs.h
> >
> > #include <xs.h>
> > static int get_domain_uuid(unsigned int domain_id) {
> > struct xs_handle *xs;
> > xs_transaction_t t;
> > char *path;
> > unsigned int *len;
> > void *uuid;
> > xs = xs_daemon_open();
> > if (xs == NULL)
> > return 1;
> > path = xs_get_domain_path(xs, domain_id);
> > if (path == NULL)
> > return 1;
> > strcat (path, '/uuid');
> > len = strlen(path) + 1;
> > uuid = xs_read(xs, t, path, len);
> > printf('%lx \n', (char) (*uuid));
> > xs_daemon_close(xs);
> > free(path);
> > return 0;
> > }
> >
> > when compiled throws an error ( xs.h - no such file or directory).
> >
> > How to access xenstore and read the doamin UUID from dom-0 specifically from
> > inside xen/common/memory.c?
> >
> > regards,
> > Dinesh C
> >
> > ________________________________
> > Voice your opinion on the burning issues of the day. Discuss, debate with
> > the world. Logon to message boards on MSN. Try it!
> > _______________________________________________
> > Xen-devel mailing list
> > Xen-devel@xxxxxxxxxxxxxxxxxxx
> > http://lists.xensource.com/xen-devel
> >
> >


Watch useful tips on recipes, fitness, yoga and fashion only on MSN videos. Try it!
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>