Lily Huang
2006-Dec-28 04:09 UTC
[Xen-devel] How to get the persistent identifier of a domain?
Hi, As we know, a domainU''s domid may change after system reboots. Does Xen provide a persistent identifier for each domU? I tried UUID, but UUID also changes across reboots. Any idea on this? If Xen does provide such a mechanism to persistently identify a domain U? What is it? Thanks, lily _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ewan Mellor
2006-Dec-28 10:58 UTC
Re: [Xen-devel] How to get the persistent identifier of a domain?
On Wed, Dec 27, 2006 at 11:09:43PM -0500, Lily Huang wrote:> Hi, > > As we know, a domainU''s domid may change after system reboots. Does Xen > provide a persistent identifier for each domU? I tried UUID, but UUID also > changes across reboots. Any idea on this? If Xen does provide such a > mechanism to persistently identify a domain U? What is it?Which UUID do you mean? The one that xm list --long shows you as the UUID for the domain certainly shouldn''t change across reboots (it doesn''t for me). Ewan. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Lily Huang
2006-Dec-28 17:14 UTC
Re: [Xen-devel] How to get the persistent identifier of a domain?
Thanks for your reply. Here is my experimental setting. I start a domu, run "xm list --long", the uuid shown to me was (uuid 6cc8ab86-4ad4-7820-3326-53d666ff96aa). Then, I shut down this domu, and start the same domu again. I got a different uuid: (uuid 0c9ee2d6-4a9f-c0bf-989f-148bec284e15). You can see these two uuids are different. I am using the latest xen-unstable. Any further thought? If the persistent identifier does exists, do we have a programmable solution to get the persistent identifier (not command line, because it dump too much information and need additional work to filter the useless information)? Thanks, lily On 12/28/06, Ewan Mellor <ewan@xensource.com> wrote:> > On Wed, Dec 27, 2006 at 11:09:43PM -0500, Lily Huang wrote: > > > Hi, > > > > As we know, a domainU''s domid may change after system reboots. Does Xen > > provide a persistent identifier for each domU? I tried UUID, but UUID > also > > changes across reboots. Any idea on this? If Xen does provide such a > > mechanism to persistently identify a domain U? What is it? > > Which UUID do you mean? The one that xm list --long shows you as the > UUID for the domain certainly shouldn''t change across reboots (it > doesn''t for me). > > Ewan. >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ewan Mellor
2006-Dec-28 17:19 UTC
Re: [Xen-devel] How to get the persistent identifier of a domain?
On Thu, Dec 28, 2006 at 12:14:48PM -0500, Lily Huang wrote:> Thanks for your reply. > > Here is my experimental setting. I start a domu, run "xm list --long", the > uuid shown to me was (uuid 6cc8ab86-4ad4-7820-3326-53d666ff96aa). Then, I > shut down this domu, and start the same domu again. I got a different > uuid: > (uuid 0c9ee2d6-4a9f-c0bf-989f-148bec284e15). You can see these two uuids > are different. > > I am using the latest xen-unstable.Do you mean that you''ve done xm create <file>, xm shutdown <domain>, and then xm create <file> again? You are right, this will in effect create two separate VMs, with the same configuration, but different identities (and different UUIDs). If you use the new support for persistent VMs, then you should find that the VM retains its identity. xm new <file>, xm start <domain>, xm shutdown <domain>, xm start <domain> should have the same effect as the commands above, but you will see that the VM retains its UUID. HTH, Ewan. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
M.A. Williamson
2006-Dec-28 17:29 UTC
Re: [Xen-devel] How to get the persistent identifier of a domain?
>> Here is my experimental setting. I start a domu, run "xm list --long", >> the uuid shown to me was (uuid 6cc8ab86-4ad4-7820-3326-53d666ff96aa). >> Then, I shut down this domu, and start the same domu again. I got a >> different uuid: (uuid 0c9ee2d6-4a9f-c0bf-989f-148bec284e15). You can see >> these two uuids are different. >> >> I am using the latest xen-unstable. > >Do you mean that you''ve done xm create <file>, xm shutdown <domain>, and >then xm create <file> again? You are right, this will in effect create >two separate VMs, with the same configuration, but different identities >(and different UUIDs).IIRC if you''re using config files instead of the persistent VM support you can also ensure a stable UUID by specifying it in the VM config file? Cheers, Mark>If you use the new support for persistent VMs, then you should find >that the VM retains its identity. xm new <file>, xm start <domain>, >xm shutdown <domain>, xm start <domain> should have the same effect as >the commands above, but you will see that the VM retains its UUID. > >HTH, > >Ewan. > >_______________________________________________ >Xen-devel mailing list >Xen-devel@lists.xensource.com >http://lists.xensource.com/xen-devel >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Lily Huang
2006-Dec-28 19:19 UTC
Re: [Xen-devel] How to get the persistent identifier of a domain?
Thanks for kind help from your guys. After I specified the uuid in the configuration file, I got stable uuid across reboots. Now next question is: how to get the uuid using program instead of command line. I mean, in the kernel space. Thanks, -lily On 28 Dec 2006 17:29:54 +0000, M.A. Williamson <maw48@cam.ac.uk> wrote:> > >> Here is my experimental setting. I start a domu, run "xm list --long", > >> the uuid shown to me was (uuid 6cc8ab86-4ad4-7820-3326-53d666ff96aa). > >> Then, I shut down this domu, and start the same domu again. I got a > >> different uuid: (uuid 0c9ee2d6-4a9f-c0bf-989f-148bec284e15). You can > see > >> these two uuids are different. > >> > >> I am using the latest xen-unstable. > > > >Do you mean that you''ve done xm create <file>, xm shutdown <domain>, and > >then xm create <file> again? You are right, this will in effect create > >two separate VMs, with the same configuration, but different identities > >(and different UUIDs). > > IIRC if you''re using config files instead of the persistent VM support you > can also ensure a stable UUID by specifying it in the VM config file? > > Cheers, > Mark > > >If you use the new support for persistent VMs, then you should find > >that the VM retains its identity. xm new <file>, xm start <domain>, > >xm shutdown <domain>, xm start <domain> should have the same effect as > >the commands above, but you will see that the VM retains its UUID. > > > >HTH, > > > >Ewan. > > > >_______________________________________________ > >Xen-devel mailing list > >Xen-devel@lists.xensource.com > >http://lists.xensource.com/xen-devel > > >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Ewan Mellor
2006-Dec-29 01:30 UTC
Re: [Xen-devel] How to get the persistent identifier of a domain?
On Thu, Dec 28, 2006 at 02:19:18PM -0500, Lily Huang wrote:> Thanks for kind help from your guys. > > After I specified the uuid in the configuration file, I got stable uuid > across reboots. Now next question is: how to get the uuid using program > instead of command line. I mean, in the kernel space.vm = xenstore-read "vm" uuid = xenstore-read "$vm/uuid" You ought to be able to do that from either kernel or userspace in a domU, with the appropriate libraries installed. Ewan. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel