Hello, I''m searching for a way to register a custom script in the hypervisor/dom0 that will be called whenever a guest changes state (starts, stops, migrates). Does any sort of mechanism exist in xVM Xen? I''ve noticed scripts in /usr/lib/xen/scripts which get called for block-device and vnic initialization and teardown, so I was hoping there might be some more general event hook mechanism. I''d like to use this as a way to track which guests are running on which hypervisors. Ideas? --joe
I don''t know if any general event hook exists, someone else will have to answer to that; however in the past when demoing xVM locally I have used virsh domstate/virsh list and parsed based on that output. Not the best solution but it worked well enough for my purposes. -Andrew Joseph Mocker wrote:> Hello, > > I''m searching for a way to register a custom script in the > hypervisor/dom0 that will be called whenever a guest changes state > (starts, stops, migrates). > > Does any sort of mechanism exist in xVM Xen? I''ve noticed scripts in > /usr/lib/xen/scripts which get called for block-device and vnic > initialization and teardown, so I was hoping there might be some more > general event hook mechanism. > > I''d like to use this as a way to track which guests are running on which > hypervisors. > > Ideas? > > --joe > _______________________________________________ > xen-discuss mailing list > xen-discuss@opensolaris.org >
On Mon, Feb 09, 2009 at 01:08:11PM -0800, Joseph Mocker wrote:> I''m searching for a way to register a custom script in the > hypervisor/dom0 that will be called whenever a guest changes state > (starts, stops, migrates). > > Does any sort of mechanism exist in xVM Xen? I''ve noticed scripts inThe newer version of libvirt includes callbacks in the API, but we don''t have that yet. regards john