* Is it possible to follow a rebooted domain (with a different ID)?
@ 2013-01-07 10:48 Razvan Cojocaru
2013-01-07 10:57 ` Ian Campbell
2013-01-07 11:15 ` Mats Petersson
0 siblings, 2 replies; 4+ messages in thread
From: Razvan Cojocaru @ 2013-01-07 10:48 UTC (permalink / raw)
To: xen-devel@lists.xen.org
Hello,
I have an application, running in dom0 userspace, that receives
mem_events about a domU HVM guest. At some point, the HVM guest (a
Windows machine) restarts, at which point I need to shut down my
userspace application, find it's new ID (with 'xm list'), then re-start
my application passing the new ID as a parameter.
What I'd like to be able to do is to automatically follow the domain
after it has started again. Is it possible to do this from dom0
userspace (using libxc), and if it is, how?
A related question is this: is it possible to get notifications from
userspace about a new domU that's just been started (regardless of
whether it's a reboot of a previously watched domU or not)?
Thanks,
Razvan Cojocaru
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Is it possible to follow a rebooted domain (with a different ID)?
2013-01-07 10:48 Is it possible to follow a rebooted domain (with a different ID)? Razvan Cojocaru
@ 2013-01-07 10:57 ` Ian Campbell
2013-01-07 11:15 ` Mats Petersson
1 sibling, 0 replies; 4+ messages in thread
From: Ian Campbell @ 2013-01-07 10:57 UTC (permalink / raw)
To: Razvan Cojocaru; +Cc: xen-devel@lists.xen.org
On Mon, 2013-01-07 at 10:48 +0000, Razvan Cojocaru wrote:
> Hello,
>
> I have an application, running in dom0 userspace, that receives
> mem_events about a domU HVM guest. At some point, the HVM guest (a
> Windows machine) restarts, at which point I need to shut down my
> userspace application, find it's new ID (with 'xm list'), then re-start
> my application passing the new ID as a parameter.
>
> What I'd like to be able to do is to automatically follow the domain
> after it has started again. Is it possible to do this from dom0
> userspace (using libxc), and if it is, how?
>
> A related question is this: is it possible to get notifications from
> userspace about a new domU that's just been started (regardless of
> whether it's a reboot of a previously watched domU or not)?
I don't think this can be done using just libxc.
xenstore fires @introduceDomain and @releaseDomain pseudo-watches when
domains come and go. They don't tell you which so you would need to
track the domain you are interested in yourself (libxl has some helpers
for this sort of thing I think).
I'm not sure how to map from the old domid to the new one other than by
following the name or uuid.
Ian.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Is it possible to follow a rebooted domain (with a different ID)?
2013-01-07 10:48 Is it possible to follow a rebooted domain (with a different ID)? Razvan Cojocaru
2013-01-07 10:57 ` Ian Campbell
@ 2013-01-07 11:15 ` Mats Petersson
2013-01-07 12:10 ` Razvan Cojocaru
1 sibling, 1 reply; 4+ messages in thread
From: Mats Petersson @ 2013-01-07 11:15 UTC (permalink / raw)
To: xen-devel
On 07/01/13 10:48, Razvan Cojocaru wrote:
> Hello,
>
> I have an application, running in dom0 userspace, that receives
> mem_events about a domU HVM guest. At some point, the HVM guest (a
> Windows machine) restarts, at which point I need to shut down my
> userspace application, find it's new ID (with 'xm list'), then re-start
> my application passing the new ID as a parameter.
>
> What I'd like to be able to do is to automatically follow the domain
> after it has started again. Is it possible to do this from dom0
> userspace (using libxc), and if it is, how?
Xenstore will keep track of the name of the domain, which has to be
unique, so you should be able to "find" your domain again by looking for
its name. I've just reinstalled everything on my test-box, so I can't
look at exactly where the name is stored [I don't have any VM's on
there!], but I think you can figure it out yourself with a bit of
"xenstore-ls".
>
> A related question is this: is it possible to get notifications from
> userspace about a new domU that's just been started (regardless of
> whether it's a reboot of a previously watched domU or not)?
You can have a xenstore watch for that.
I was looking at some code that does that the other day in xenconsoled
[it watches for "new domain appearing"]. Have a look at
xen/tools/console/daemon/io.c (I think!)
--
Mats
>
> Thanks,
> Razvan Cojocaru
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Is it possible to follow a rebooted domain (with a different ID)?
2013-01-07 11:15 ` Mats Petersson
@ 2013-01-07 12:10 ` Razvan Cojocaru
0 siblings, 0 replies; 4+ messages in thread
From: Razvan Cojocaru @ 2013-01-07 12:10 UTC (permalink / raw)
To: Mats Petersson; +Cc: xen-devel
> Xenstore will keep track of the name of the domain, which has to be
> unique, so you should be able to "find" your domain again by looking for
> its name. I've just reinstalled everything on my test-box, so I can't
> look at exactly where the name is stored [I don't have any VM's on
> there!], but I think you can figure it out yourself with a bit of
> "xenstore-ls".
> [...]
>> A related question is this: is it possible to get notifications from
>> userspace about a new domU that's just been started (regardless of
>> whether it's a reboot of a previously watched domU or not)?
> You can have a xenstore watch for that.
>
> I was looking at some code that does that the other day in xenconsoled
> [it watches for "new domain appearing"]. Have a look at
> xen/tools/console/daemon/io.c (I think!)
Thank you for all the replies, I appreciate your help! I'll look those up.
Thanks,
Razvan Cojocaru
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-01-07 12:10 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-07 10:48 Is it possible to follow a rebooted domain (with a different ID)? Razvan Cojocaru
2013-01-07 10:57 ` Ian Campbell
2013-01-07 11:15 ` Mats Petersson
2013-01-07 12:10 ` Razvan Cojocaru
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).