Migration service, in the context of virtual machines, is the process of moving a virtual machine from one host server or storage location to another; there are different techniques of VM migration, hot/life migration, cold/regular migration, and live storage migration of a virtual machine.
In process of migration, all key machines’ components, such as CPU, storage disks, networking, and memory, are completely virtualized, thereby facilitating the entire state of a virtual machine to be captured by a set of easily moved data files.
2.2.1. Migrations Techniques
Live Migration and High Availability
Live migration (which is also called hot or real-time migration) can be defined as the movement of a virtual machine from one physical host to another while being powered on.
Live migration process takes place without any noticeable effect from the end user’s point of view (a matter of milliseconds).
One of the most significant advantages of live migration is the fact that it facilitates proactive maintenance in case of failure, because the potential problem can be resolved before the disruption of service occurs.
Live migration can also be used for load balancing in which work is shared among computers in order to optimize the utilization of available CPU resources.
Live Migration Anatomy, Xen Hypervisor Algorithm
In this section we will explain live migration’s mechanism and how memory and virtual machine
states are being transferred, through the network, from one host A to another host B; The Xen hypervisor is an example for this mechanism.
The logical steps that are executed when migrating an OS are summarized in below Figure
In this research, the migration process has been viewed as a transactional interaction between the two hosts involved:
Stage 0: Pre-Migration. An active virtual machine exists on the physical host A.
Stage 1: Reservation. A request is issued to migrate an OS from host A to host B (a precondition is that the necessary resources exist on B and on a VM container of that size).
Stage 2: Iterative Pre-Copy. During the first iteration, all pages are transferred from A to B. Subsequent iterations copy only those pages dirtied during the previous transfer phase.
Stage 3: Stop-and-Copy. Running OS instance at A is suspended, and its network traffic is redirected to B. CPU state and any remaining inconsistent memory pages are then transferred. At the end of this stage, there is a consistent suspended copy of the VM at both A and B. The copy at A is considered primary and is resumed in case of failure.
Stage 4: Commitment. Host B indicates to A that it has successfully received a consistent OS image. Host A acknowledges this message as a commitment of the migration transaction. Host A may now discard the original VM, and host B becomes the primary host.
Stage 5: Activation. The migrated VM on B is now activated. Post-migration code runs to reattach the device’s drivers to the new machine and advertise moved IP addresses.
Regular/Cold Migration.
Cold migration is the migration of a powered-off virtual machine. With cold migration, you have the option of moving the associated disks from one data store to another.
The two main differences between live migration and cold migration are that live migration needs a shared storage for virtual machines in the server’s pool, but cold migration does not; also, in live migration for a virtual machine between two hosts, there would be certain CPU compatibility checks to be applied; while in cold migration this checks do not apply.
The cold migration process is simple to implement (as the case for the VMware product), and it can be summarized as follows:
- The configuration files, including the NVRAM file (BIOS settings), log files, as well as the disks of the virtual machine, are moved from the source host to the destination host’s associated storage area.
- The virtual machine is registered with the new host.
- After the migration is completed, the old version of the virtual machine is deleted from the source host.
Comments