How Do I Migrate a Virtual Machine?
Live migration, also called dynamic migration, live migration, that is, virtual machine save / restore, usually the complete running status of the entire virtual machine is saved, and can be quickly restored to the original hardware platform or even a different hardware platform on. After recovery, the virtual machine still runs smoothly and users will not notice any difference.
- Computer sharing: In some public places users need to share computers, but due to different system configurations and software it takes a lot of time to configure and restore. Then use
- In order to keep up with the pace of VMware's virtualization supremacy, Microsoft has supported hot migration between physical and virtual machines since Hyper-V 2.0. Hot migration may not be a high demand for the laboratory, but it is a watershed for virtualization maturity for the enterprise.
- Hyper-V Live Migration is not an unplanned downtime in a fault state.
- This application scenario is only used for planned outages such as upgrades and hardware replacement.
- Thermal migration steps:
- I. Suggest a connection between the source and target computers
- Hot migration is essentially an implementation of clustering. The speed and efficiency of communication are related to the source and target servers. When the source server or the target server is overloaded, the WMI call to clusres.dll fails due to timeout. In this scenario, during the PRO call hot migration process, the source virtual machine will be suspended (suspended) and the transfer status will be stuck, resulting in the virtual machine being suspended for a long time. The relevant patches provided on Microsoft's official website need to be deployed on all nodes.
- Second, transfer virtual machine configuration and device information
- It is worth noting here that this section does not transfer the XML configuration file in the virtual machine directory, but only the information in the registry. The above two steps complete the preparation for migration, inform the target server virtual machine of the resources required, and allocate the required resources.
- Third, transfer virtual machine memory
- This part is the core technology part of the migration. Whether it is VMware or Hyper-V for migration, it is an inevitable problem. Those selling so-called services will not be disconnected, but it is a legend. From a technical point of view, the disconnection time has been reduced from the second level to the millisecond level.
- Describe the process of memory transfer in detail:
- 1. Lock the memory of the Guest host and transfer the information to the target server.
- 2. The Guest host continues to run, and a new memory partition is opened in the Host host to provide services for the Guest host. This area holds only the changes.
- 3. The new memory partition will continue to be locked and transferred.
- 4. Repeat 2 ~ 3 to ensure that the difference between the original HOST server and the target HOST server changes the memory within a very small clock cycle until the memory transfer in operation 1 is completed.
- Fourth, suspend (suspend) the source virtual machine and transfer status
- This part contains 3 operations:
- 1.Hang the origin virtual machine
- 2.Transfer the last source virtual machine memory change fragment
- 3. Notify the storage and mount the storage to the target server
- The fourth step is the key to migration time consumption. The key is to save the real-time memory state. The method adopted for rapid migration in Hyper-V 1.0 is to hang the originating virtual machine and then process the memory. So during the migration process, you will find that the downtime is directly proportional to the amount of memory consumed by the virtual machine. In hot migration, the downtime is no longer determined by the memory consumed by the migrated virtual machine. The key point in determining downtime is the size of a relatively small change in memory. According to the actual measurement, in the live migration operation, the ping packet monitoring is between 2 and 6 according to the system load. It can fully meet the high availability requirements of general enterprises [2] .