Wednesday, 8 June 2016

Libvirt objects state

10:48 Posted by SRE Hacks No comments
Libvirt

libvirt is an open source API, daemon and management tool for managing platform virtualization. It can be used to manage KVM, Xen, VMware ESX, QEMU and other virtualization technologies. These APIs are widely used in the orchestration layer of hypervisors in the development of a cloud-based solution.

To avoid ambiguity about the terms used, here are the definitions for some of the specific concepts used in libvirt documentation:
  • a node is a single physical machine
  • an hypervisor is a layer of software allowing to virtualize a node in a set of virtual machines with possibly different configurations than the node itself
  • a domain is an instance of an operating system (or subsystem in the case of container virtualization) running on a virtualized machine provided by the hypervisor
Libvirt distinguishes between two different types of domains: transient and persistent.
  • Transient domains only exist until the domain is shutdown or when the host server is restarted.
  • Persistent domains last indefinitely.


Libvirt States

There are five states of Instance (virtual machine) in libvirt. They are as following

  • Undefined
  • Defined
  • Runing
  • Paused
  • Saved

  • Undefined - This is a baseline state. Libvirt does not know anything about domains in this state because the domain hasn't been defined or created yet.
  • Defined or Stopped - The domain has been defined, but it's not running. This state is also called stopped. Only persistent domains can be in this state. When a transient domain is stopped or shut down, it ceases to exist.
  • Running - The domain has been created and started either as transient or persistent domain. Either domain in this state is being actively executed on the node's hypervisor.
  • Paused - The domain execution on hypervisor has been suspended. Its state has been temporarily stored until it is resumed. The domain does not have any knowledge whether it was paused or not. If you are familiar with processes in operating systems, this is the similar.
  • Saved - Similar to the paused state, but the domain state is stored to persistent storage. Again, the domain in this state can be restored and it does not notice that any time has passed.

0 comments:

Post a Comment