So their is need for some tool to manage virtualization, Libvirt is an opensource daemon used for managing virtualization. It can manage many virtualization technologies like KVM, XEN, VMWARE ESX, QEMU.
Livirt has many use cases. I worked on a use case to detect change in vm states on event bases.
Open stack on back end use libvirt for virtualization. What if we want to detect any change in virtual machine states??? First method is you continuously check your vm by using ssh and polling, but it's bad approach. Libvirt allows you to detect vm current state. Libvirt developers writes a python plugin that detect any change in vm state and show it to you, without polling and any other over head on server. You can get agent from here. It is opensource, so you can modify it as you can.
Libvirt has 5 states for any vm
- Undefined
- Defined
- Runing
- Paused
- Saved
The agent get state from libvirt whenever any of these event occurred and show details. Agent register itself in libvirt and get state on every event change. The agent show many details some of them are
- Name of instance (openstack name, created by openstack)
- UUID of instance
- Event name
- Defined,
- Undefined
- Started
- Suspended
- Resumed
- Stopped
- Shutdown
- Event Detail (Detail of event to clarify action)
- Added
- Updated
- Removed
- Booted
- Migrated
- Restored
- Snapshot
- Wakeup
- Paused
- Migrated
- IOError
- Watchdog
- Restored
- Snapshot
- Unpaused
- Migrated
- Snapshot
- Shutdown
- Destroyed
- Crashed
- Migrated
- Saved
- Failed
- Snapshot
- Finished
0 comments:
Post a Comment