• +86-135-5029-3426
  • sales@vinchin.com
logo

Vinchin Blog

Vinchin Blog Principle of Virtual-to-Virtual.

Principle of Virtual-to-Virtual.

2020-09-14

Virtual-to-Virtual

V2V migration is about moving operating systems and data between virtual machines, taking care of host-level differences, and handling different virtual hardware. The virtual machine migrates from the VMM of one physical machine to the VMM of another physical machine, and the two VMM types can be the same or different. If VMware migrates to KVM, KVM migrates to KVM. Virtual machines can be moved from one VM Host system to another in a number of ways.


V2V online migration

Online Migration: also known as Live Migration. It refers to the migration of virtual machines between different physical hosts while ensuring the normal operation of services on the virtual machine. The logical steps are almost exactly the same as offline migration. The difference is that, in order to ensure the availability of virtual machine services during the migration, there is only a very short downtime during the migration. In the previous stage of migration, the service runs on the source host. When the migration reaches a certain stage, the destination host has already possessed the necessary resources to run the system. After a very short switch, the control of the source host is transferred to the destination host, and the service continues to run on the destination host. For the service itself, the transition process is transparent to the user because the switching time is so short that the user does not feel the interruption of the service. Online migration is suitable for scenarios with high requirements for service availability.

In addition, in some cases where Shared storage is not used, the storage block migration technique can be used to realize the V2V virtual machine migration online. Compared with the online migration based on Shared storage, the online migration of data blocks requires the simultaneous migration of virtual machine disk image and system memory state, and the migration performance is reduced. However, it makes it possible to transfer the computer environment by using the migration technology under the environment of distributed local storage, and ensures the availability of operating system services during the migration process, thus extending the application scope of virtual machine online migration. V2V online migration technology eliminates the hardware and software correlation and is a powerful tool for software and hardware system upgrades, maintenance, and other management operations.


V2V memory migration technique

For the migration of the memory state of the VM, there is a pre-copy (pre-copy) policy. After the migration has begun, the source host VM is still running and the destination host VM has not been started. The migration flows through a loop that sends in-memory data from the source host VM to the destination host VM. The first round of the loop sends all the memory page data, and each subsequent round of the loop sends the dirty page memory dirty Pages that were written by the VM during the previous round of pre-copy. Until the time is right, the pre-copy loop ends, the shutdown copy phase occurs, the source host is suspended, and there are no more memory updates. Dirty pages from the last cycle are transmitted to the destination host VM. The pre-copy mechanism greatly reduces the amount of memory data that needs to be transferred during the down copy phase, thus greatly reducing the downtime.

However, for the part of memory with very fast update speed, each cycle will become dirty and the pre-copy needs to be repeated, which also leads to many cycles and longer migration times. To address this situation, the KVM virtual machine establishes three principles: centralization principle, dirty Pages in a loopless than or equal to 50; Nonproliferation: fewer dirty Pages are transmitted in a loop than are newly generated; The finite cycle rule, the number of cycles must be less than 30. In the implementation, the following measures are taken:

Finite cycles: the number of cycles and the effect is controlled, and the pre-copy effect per round is calculated. If the pre-copy effect on reducing the inconsistent amount of memory is not significant, or if the number of cycles exceeds the upper limit, the cycle will be stopped and enter the stop copy phase.

Set up a memory access monitoring module in the kernel of the migrated VM. During the memory pre-copy process, a VM process is restricted to performing up to 40 memory writes during a scheduled run. This directly limits the rate at which memory gets dirty during the pre-copy process, at the expense of limiting the number of processes running on the VM.


For your backup data, there is live migration technology of Vinchin Backup & Recovery v6.0 that supports the migrate between the backup storage to production storage. When the VM is not in production state, you can migrate both the original backup file and new data in the cache file from backup storage to production storage using Vinchin live migration technology or other migration tools. 

  • Tag:
  • Virtualization

Interested Blogs More

DOWNLOAD NOW YOU CAN ENJOY A 60-DAYS FULL-FEATURED FREE TRIAL !