|
|
|
|
|
|
|
|
|
|
xen-users
[Xen-users] Running scripts on domU create/shutdown?
Hi,
I'm working on the early design stages of a multi-dom0 xen
monitoring tool, (to replace my previous attempt "Argo").
One thing that would be very useful for a monitoring tool
would be the ability to run a script, or scripts, upon
dom0 events:
domU creation
domU shutdown
Ideally /etc/xen/events/domU-up.d/* + domU-down.d/* or
similar. (Running every executable the appropriate directory
with a single argument of the domain name would be sufficient
for my purposes.)
I've managed to write simple behavior for this by hacking
/etc/xen/scripts/vif-common.sh. I can detect startup/shutdown
by looking at the first command line argument.
From there I can examine $XENBUS_PATH to get the ID of the
domain which is being created/destroyed - however there
isn't a simple mechanism that I've seen to get the domain
name.
So two questions:
1. Is there a simple method to get the domain name
from the ID, short of parsing "xm list N"?
2. Would this kind of startup/shutdown hook be useful
to others, and if so would a patch be applied? (I'm
happy to submit my code.)
Steve
--
http://www.steve.org.uk/
_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users
|
|
|
|
|