Ask Your Question

Detection of VM add ,delete and live migration

asked 2018-03-13 21:24:04 -0500

anonymous user


updated 2018-03-14 08:44:44 -0500

zaneb gravatar image

I have questions regarding detection of Virtual Machine add ,delete and Live migration in Openstack.

In our OpenStack deployment user keep adding and deleting virtual machines(VM) . We need to detect if user has added or deleted VMs or any live migration of VMs has happened or live migration has failed .

So I was exploring messages published in Rabbit Message Queue(RMQ) for this purpose and I could see that it is possible to detect the above mentioned situation based on the various messages published in RMQ. But the trouble I am facing that the RMQ will not be accessible to outside world as it will be running on private IP address space .

So my questions is there any REST Apis available to detect the VMs add, delete and live migration event and failure ? Also I was exploring alarms plugin available for OpenStack ( ( . But I could not find any help there as well for my need.

Could you please provide me some pointer on how we can detect those above scenarios at the moment those (add, delete , live migration ) happen in OpenStack environment ?

edit retag flag offensive close merge delete


Ceilometer events might be the answer. Instance creation and deletion are events; I don't know about live migration, though. Event definitions are in /etc/ceilometer/event_definitions.yaml. Documentation at

Bernd Bausch gravatar imageBernd Bausch ( 2018-03-14 00:52:01 -0500 )edit

There is an API for listing live-migrations:, but I believe it only covers migrations that are ongoing.

Bernd Bausch gravatar imageBernd Bausch ( 2018-03-14 00:56:12 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2018-03-14 08:43:54 -0500

zaneb gravatar image

You can create an event alarm in Aodh that will trigger off any oslo.messaging notification that you choose. (Note that this requires a configuration change.)

Here is an example of how to create these sorts of alarms in a Heat template.

edit flag offensive delete link more


Thanks all for your responses. Could you please let me know how we can access those alarm from outside of OpenStack ? Is there way to subscribe to those events like Rabbit Message Queue? Or I need to use REST query to get the alarm details? Can you provide some pointer to this?

somenathpal gravatar imagesomenathpal ( 2018-03-14 10:11:46 -0500 )edit

@somenathpal Aodh handles alarms by hitting one or more webhooks. If you want to subscribe to a queue of events rather than provide a webhook endpoint, you can direct the alarm to a Zaqar queue. In fact, the Heat template I linked actually does that.

zaneb gravatar imagezaneb ( 2018-04-13 10:10:30 -0500 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower


Asked: 2018-03-13 21:24:04 -0500

Seen: 289 times

Last updated: Mar 14 '18