From: dinesh chandrasekaran Subject: RE: xenstore -- read UUID Date: Fri, 12 Sep 2008 02:35:53 +0530 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0248283965==" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Geoffrey Lefebvre , xen developers community , xen users community List-Id: xen-devel@lists.xenproject.org --===============0248283965== Content-Type: multipart/alternative; boundary="_07361da7-a8a5-4b3a-b9ff-74f0ef823460_" --_07361da7-a8a5-4b3a-b9ff-74f0ef823460_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi geoffrey=2C the xen_domain_handle_t in the domain handle field is an un= signed char array of size 16. Where could the UUID be accessed from? or how would you relate the d->handle to the domain's uuid (where d is of t= ype struct domain *d). is all the 16 entries in the d->handle clubbed together to get the domain's= uuid? thanks=2C Dinesh C > Date: Wed=2C 10 Sep 2008 08:31:11 -0700 > From: geoffrey@cs.ubc.ca > To: Derek.Murray@cl.cam.ac.uk > Subject: Re: [Xen-devel] xenstore -- read UUID > CC: dinesh_chan8@hotmail.com=3B xen-devel@lists.xensource.com=3B xen-user= s@lists.xensource.com >=20 > Hi everyone=2C >=20 > Sorry for the late joining to this thread. >=20 > If you really want to gather a domain's uuid from within the > hypervisor=2C it's actually possible to do without xenstore. > A domain's uuid gets stored as a xen_domain_handle_t in the domain > handle field (see xen/include/xen/sched.h and xen/commom/domctl.c). > The uuid of a domain gets passed to xen on domain creation. The uuid > can also be read from a privileged domain by issuing the > XEN_DOMCTL_getdomaininfo hypercall. >=20 > But as Derek mentioned earlier=2C you can read the domain uuid from a > guest via xenstore which is probably a better idea. >=20 > cheers=2C >=20 > geoffrey >=20 > On Wed=2C Sep 10=2C 2008 at 4:49 AM=2C Derek Murray wrote: > > Hi Dinesh=2C > > > > On Wed=2C Sep 10=2C 2008 at 1:24 AM=2C dinesh chandrasekaran > > wrote: > >> they were 2 seperate questions... sorry for the typos... > >> How to access xenstore from Dom-0? -- which you said 'YES'... > > > > Yes=2C this is certainly possible: your code should work (I haven't > > tested it) in Dom0 user-space. For another example=2C see > > tools/xenstore/xsls.c=2C which implements ls functionality for xenstore > > using the same interface. > > > >> And How to access xenstore from hypervosor? > > > > There is no code to do this in Xen at the moment. > > > >> If the hypervisor has no knowledge about XenStore=2C Dom-0 must have t= he full > >> control over the xenstore. > > > > Correct. XenStore is simply implemented as a user-space daemon > > (xenstored)=2C running as root in Dom0. > > > >> I need to build a table with some fields one of which should never cha= nge > >> during a VMs lifetime. > >> For example=2C if I chose the domain_id whose value is transient=2C If= the VM > >> reboots=2C 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 w= ant to > >> take away domain-0 from the picture=2C which > >> according to you is almost impossible. > > > > Instead of Dom0=2C you could possibly do this in a stubdomain. It is > > possible to access XenStore from a MiniOS-based domain. > > > > Regards=2C > > > > Derek Murray. > > > > _______________________________________________ > > Xen-devel mailing list > > Xen-devel@lists.xensource.com > > http://lists.xensource.com/xen-devel > > _________________________________________________________________ Search for videos of Bollywood=2C Hollywood=2C Mollywood and every other wo= od=2C only on Live.com=20 http://www.live.com/?scope=3Dvideo&form=3DMICOAL= --_07361da7-a8a5-4b3a-b9ff-74f0ef823460_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi geoffrey=2C
 =3B =3B =3B&nb= sp=3B =3B =3B =3B =3B =3B =3B =3B =3B = =3B =3B =3B the xen_domain_handle_t in the domain handle field is a= n unsigned char array of size 16.
Where could the UUID be accessed from?=
or how would you relate the d->=3Bhandle to the domain's uuid (where = d is of type struct domain *d).
is all the 16 entries in the d->=3Bhan= dle clubbed together to get the domain's uuid?

thanks=2C
Dinesh C=

>=3B Date: Wed=2C 10 Sep 2008 08:31:11 -0700
>=3B From: geof= frey@cs.ubc.ca
>=3B To: Derek.Murray@cl.cam.ac.uk
>=3B Subject: R= e: [Xen-devel] xenstore -- read UUID
>=3B CC: dinesh_chan8@hotmail.com= =3B xen-devel@lists.xensource.com=3B xen-users@lists.xensource.com
>= =3B
>=3B Hi everyone=2C
>=3B
>=3B Sorry for the late joini= ng to this thread.
>=3B
>=3B If you really want to gather a doma= in's uuid from within the
>=3B hypervisor=2C it's actually possible to= do without xenstore.
>=3B A domain's uuid gets stored as a xen_domain= _handle_t in the domain
>=3B handle field (see xen/include/xen/sched.h= and xen/commom/domctl.c).
>=3B The uuid of a domain gets passed to xe= n on domain creation. The uuid
>=3B can also be read from a privileged= domain by issuing the
>=3B XEN_DOMCTL_getdomaininfo hypercall.
>= =3B
>=3B But as Derek mentioned earlier=2C you can read the domain uu= id from a
>=3B guest via xenstore which is probably a better idea.
= >=3B
>=3B cheers=2C
>=3B
>=3B geoffrey
>=3B
>= =3B On Wed=2C Sep 10=2C 2008 at 4:49 AM=2C Derek Murray <=3BDerek.Murray@= cl.cam.ac.uk>=3B wrote:
>=3B >=3B Hi Dinesh=2C
>=3B >=3B>=3B >=3B On Wed=2C Sep 10=2C 2008 at 1:24 AM=2C dinesh chandrasekaran=
>=3B >=3B <=3Bdinesh_chan8@hotmail.com>=3B wrote:
>=3B >= =3B>=3B they were 2 seperate questions... sorry for the typos...
>= =3B >=3B>=3B How to access xenstore from Dom-0? -- which you said 'YES'= ...
>=3B >=3B
>=3B >=3B Yes=2C this is certainly possible: yo= ur code should work (I haven't
>=3B >=3B tested it) in Dom0 user-spa= ce. For another example=2C see
>=3B >=3B tools/xenstore/xsls.c=2C wh= ich implements ls functionality for xenstore
>=3B >=3B using the sam= e interface.
>=3B >=3B
>=3B >=3B>=3B And How to access xens= tore from hypervosor?
>=3B >=3B
>=3B >=3B There is no code to= do this in Xen at the moment.
>=3B >=3B
>=3B >=3B>=3B If t= he hypervisor has no knowledge about XenStore=2C Dom-0 must have the full>=3B >=3B>=3B control over the xenstore.
>=3B >=3B
>=3B= >=3B Correct. XenStore is simply implemented as a user-space daemon
&= gt=3B >=3B (xenstored)=2C running as root in Dom0.
>=3B >=3B
&g= t=3B >=3B>=3B I need to build a table with some fields one of which sho= uld never change
>=3B >=3B>=3B during a VMs lifetime.
>=3B &g= t=3B>=3B For example=2C if I chose the domain_id whose value is transient= =2C If the VM
>=3B >=3B>=3B reboots=2C its domain_id changes.
&= gt=3B >=3B>=3B That is the reason why I opted for the UUID of a domain = that persists over
>=3B >=3B>=3B time even after migration to anot= her machine.
>=3B >=3B>=3B The only way I could get a domain's UUI= D is through the xenstore and want to
>=3B >=3B>=3B take away doma= in-0 from the picture=2C which
>=3B >=3B>=3B according to you is a= lmost impossible.
>=3B >=3B
>=3B >=3B Instead of Dom0=2C you = could possibly do this in a stubdomain. It is
>=3B >=3B possible to = access XenStore from a MiniOS-based domain.
>=3B >=3B
>=3B >= =3B Regards=2C
>=3B >=3B
>=3B >=3B Derek Murray.
>=3B &g= t=3B
>=3B >=3B _______________________________________________
&g= t=3B >=3B Xen-devel mailing list
>=3B >=3B Xen-devel@lists.xensour= ce.com
>=3B >=3B http://lists.xensource.com/xen-devel
>=3B >= =3B


MSN Technology brings you the latest on gadgets=2C gizmo= s and the new hits in the gaming market. Try it now! = --_07361da7-a8a5-4b3a-b9ff-74f0ef823460_-- --===============0248283965== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --===============0248283965==--