Cloud Platform for Networking: Virtual Machine Migration: V2V
V2V is the operating system and data migration between the VSs, considering the machine-level differences and dealing with the different virtual hardware. The VM migrates from a physical machine to another, while the VMM on these two physical machine may be the same or different, such as the migration from VMware to KVM or from KVM to KVM. There are several ways to migrate the VM from one VM Host system to another. V2V migration can be divided into offline (also known as the static migration) and online migration (also known as live migration).
Before the offline migration, the VMs are paused. If the VM uses the shared storage, the migration will be simple that only the system status is copied to the destination host for recreating this VM. If the VM uses the local store, not only the system status but also the image of the VM should be copied. The offline migration is relatively simple, but there is a serious drawback that the VM must be stopped providing services.
The online migration overcome the shortcomings that the VM must be stopped during the offline migration, so the VM is available during the migration. Actually, the original machine is also stopped, but there is a short pause for switch the VM while the destination host is available to provide the services. Since the switching is very rapid, the migration does not affect the services provided by the VM.
The online migration is also divided into the shared storage model and the local storage model. With the local storage, the system status, memory data, and disk image are migrated via block migration in OpenStack. In the KVM, at the beginning of the block migration, the system disk and data disk are created on the destination host member with the same path on the source host, and a VM with the same configuration as the original VM is created on the destination host through Libvirt API. Then the data migration is started, while the source VM is still running, so the data on these two VM should be synchronized after the migration. Finally, the source VM is shut down while the destination VM starts providing the services