[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • To: "dinesh chandrasekaran" <dinesh_chan8@xxxxxxxxxxx>
  • From: "Derek Murray" <Derek.Murray@xxxxxxxxxxxx>
  • Date: Tue, 9 Sep 2008 21:37:57 +0100
  • Cc: xen developers community <xen-devel@xxxxxxxxxxxxxxxxxxx>, xen users community <xen-users@xxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Tue, 09 Sep 2008 13:38:21 -0700
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:reply-to:sender:to:subject:cc:in-reply-to :mime-version:content-type:content-transfer-encoding :content-disposition:references:x-google-sender-auth; b=mu0OdISEHkeS8HruEGr+Qm2qZYJShZDHx80CBkDi8kkTZL716hRgCh0c7DHCflZmRh EPZrbS6MASQVkODM23VYAAIHzEGxWSIQ+HM7zBpyqMCvRoOKZlFQCNRq/lzwm1pIENTZ 6252FpqpnXyKI9PYae4qJNXBbykPjpm0v5Ah4=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

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

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.