Virtual machine migration method and device and storage medium

By reserving resources and copying local storage data during the virtual machine migration process, the problem of excessive downtime of virtual machine migration is solved, and a more efficient migration process is achieved, reducing the risk of task interruption.

CN119718531APending Publication Date: 2025-03-28HANGZHOU ALICLOUD FEITIAN INFORMATION TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202311256023.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-26
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

During the virtual machine migration process, especially when cold migration of virtual machines with storage-intensive tasks, it takes a long time to migrate local storage data, resulting in too long downtime of virtual machines and causing task interruption.

Method used

Migration is achieved by reserving resources at the destination of the migration and copying local stored data to the reserved resources during the virtual machine operation, shutting down the machine to complete the copy of the remaining data after reaching the specified standard, and switching the virtual machine to bind to the reserved resources.

Benefits of technology

It effectively reduces the downtime during the virtual machine migration process, making the migration of local stored data time-consuming and independent of the virtual machine migration execution cycle, avoiding long-term task interruption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119718531A_ABST
    Figure CN119718531A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a virtual machine migration method and device and a storage medium. According to the embodiment of the invention, on the premise that the target virtual machine is kept bound to the resource currently occupied by the target virtual machine in the migration source end, the reserved resource is allocated for the target virtual machine from the migration destination end, so that the target virtual machine can normally run at the migration source end without being interfered by the reserved resource, and the occupation right of the reserved resource can be obtained without migration. On the basis, local storage data corresponding to the target virtual machine in the migration source end can be copied to the reserved resources in the running process of the target virtual machine. Therefore, during the shutdown period of the target virtual machine, the local storage data needing to be migrated is very small, and the migration time consumption of the local storage data is independent of the migration execution period of the virtual machine, so that the shutdown duration in the migration process of the virtual machine can be effectively reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of Internet technology, and in particular to a virtual machine migration method, device and storage medium. Background Art

[0002] Local storage resources refer to storage resources such as hard disks that come with physical servers. Virtual machines that use local storage resources usually carry storage-intensive tasks, that is, tasks that require a large number of read and write operations on local storage. Therefore, the amount of local storage data of such virtual machines is usually relatively large.

[0003] In the process of cold migration of such virtual machines, it often takes a long time to migrate the local storage data, resulting in excessive downtime of the virtual machine and long-term interruption of various tasks carried by the virtual machine. Summary of the invention

[0004] Multiple aspects of the present application provide a virtual machine migration method, device, and storage medium to reduce the downtime during virtual machine migration.

[0005] The present invention provides a method for migrating a virtual machine, including:

[0006] Allocate reserved resources for the target virtual machine from the migration destination end under the premise of keeping the target virtual machine bound to the resources currently occupied by the target virtual machine in the migration source end;

[0007] During the operation of the target virtual machine in the migration source end, triggering the copying of the local storage data corresponding to the target virtual machine in the migration source end to the reserved resources;

[0008] If the copy progress of the local storage data reaches the specified standard, the target virtual machine is controlled to be shut down, and the remaining local storage data corresponding to the target virtual machine is triggered to be copied to the reserved resources;

[0009] The target virtual machine is switched to be bound to the reserved resources, and the target virtual machine is migrated to the reserved resources.

[0010] The present application also provides a control device, including:

[0011] A resource reservation service module, configured to allocate reserved resources to the target virtual machine from the migration destination while keeping the target virtual machine bound to the resources currently occupied by the target virtual machine in the migration source end;

[0012] A local storage data migration module, used for triggering the copying of the local storage data corresponding to the target virtual machine in the migration source end to the reserved resources during the operation of the target virtual machine in the migration source end; if the copy progress of the local storage data reaches a specified standard, the target virtual machine is controlled to be shut down, and then the remaining local storage data corresponding to the target virtual machine is triggered to be copied to the reserved resources;

[0013] The virtual machine migration module is used to switch the target virtual machine to be bound to the reserved resources and migrate the target virtual machine to the reserved resources during the shutdown of the target virtual machine.

[0014] The embodiment of the present application also provides a management and control device, including a memory and a processor;

[0015] The memory is used to store one or more computer instructions;

[0016] The processor is coupled to the memory and is configured to execute the one or more computer instructions to execute the virtual machine migration method described above.

[0017] The embodiment of the present application also provides a virtual machine management and control system, including a management and control device, a migration source end where a target virtual machine is located, and a migration destination end selected for the target virtual machine;

[0018] The control device is used to allocate reserved resources to the target virtual machine from the migration destination end under the premise that the target virtual machine remains bound to the resources currently occupied by it in the migration source end; issue a data pre-copy task to the migration source end while the target virtual machine is running in the migration source end; control the target virtual machine to shut down if the copy progress of the locally stored data reaches a specified standard; after completing the copy of the locally stored data, switch the target virtual machine to be bound to the reserved resources, and migrate the target virtual machine to the reserved resources;

[0019] The migration source end is used to perform the data pre-copy task to copy the local storage data corresponding to the target virtual machine to the reserved resources; and after the target virtual machine is shut down, continue to copy the remaining local storage data corresponding to the target virtual machine to the reserved resources. The embodiment of the present application also provides a computer-readable storage medium storing computer instructions, which, when executed by one or more processors, causes the one or more processors to execute the aforementioned virtual machine migration method.

[0020] In an embodiment of the present application, reserved resources are allocated to the target virtual machine from the migration destination end under the premise of keeping the target virtual machine bound to the resources currently occupied by it in the migration source end, so that the target virtual machine can operate normally at the migration source end without being disturbed by the reserved resources, and can obtain the right to occupy the reserved resources without migration. On this basis, during the operation of the target virtual machine, its corresponding local storage data in the migration source end can be copied to the reserved resources, and after the copy progress of the local storage data reaches the specified standard, the target virtual machine can be controlled to shut down, and the remaining local storage data corresponding to the target virtual machine can be copied to the reserved resources. During the shutdown period, the target virtual machine can be switched to be bound to the reserved resources, and the target virtual machine can be migrated to the reserved resources. In this way, the target virtual machine and its local storage data can be migrated to the reserved resources, and the migration time of the local storage data is independent of the virtual machine migration execution cycle, so the downtime during the virtual machine migration process can be effectively reduced. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0022] Figure 1 A logical schematic diagram of a virtual machine migration method provided by an exemplary embodiment of the present application;

[0023] Figure 2 A flowchart of a virtual machine migration method provided by an exemplary embodiment of the present application;

[0024] Figure 3 A flowchart of a virtual machine migration method provided by another exemplary embodiment of the present application;

[0025] Figure 4 A schematic diagram of the structure of a control device provided for another exemplary embodiment of the present application;

[0026] Figure 5 A schematic diagram of the working logic of a control device provided in another exemplary embodiment of the present application;

[0027] Figure 6 A schematic structural diagram of a control device provided as yet another exemplary embodiment of the present application. DETAILED DESCRIPTION

[0028] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.

[0029] Before introducing the technical solutions provided by the embodiments of the present application, several technical concepts involved in the present application are briefly described:

[0030] Local storage resources refer to storage resources such as hard disks that come with the physical server.

[0031] Cloud shared storage resources refer to cloud storage resources such as storage clusters or cloud storage nodes, which can be shared and used by multiple physical servers over the network.

[0032] Local storage virtual machines can be understood as virtual machines that use local storage resources for data storage. In other words, this type of virtual machine uses local storage resources such as hard disks on the physical server where it is located for data storage.

[0033] Cloud shared storage virtual machines can be understood as virtual machines that use cloud shared storage resources for data storage. That is, such virtual machines perform read and write operations on cloud shared storage resources through the network to store data in the cloud shared storage resources.

[0034] The basic principle of virtual machine cold migration is to shut down the virtual machine, copy the components and data to be migrated to the migration destination, and restart the virtual machine after the copy is completed. That is, during the virtual machine migration process, the virtual machine remains in a shut down state, and the tasks carried by it will also be stagnant.

[0035] During the research, the inventor discovered that for cloud-based shared storage virtual machines, it is not necessary to migrate the data stored in the cloud-based shared storage resources during the migration process. Instead, after the migration is completed, it is sufficient to re-establish access to the cloud-based shared storage resources for the migrated virtual machine. However, for local storage virtual machines, since local storage resources are isolated, physical servers do not have access rights to each other's local storage resources. Thus, after the virtual machine is migrated, the migration destination will no longer be able to access the local storage data in the migration source. Therefore, in the process of migrating a local storage virtual machine, its corresponding local storage data needs to be migrated.

[0036] The inventors also found that most of the tasks carried by local storage virtual machines are storage-intensive tasks. Therefore, the data volume of local storage data of such virtual machines is usually large. Accordingly, it takes a long time to migrate the local storage data, usually N days or even longer. This results in that in the process of migrating such virtual machines, it takes a long time to migrate the local storage data. Accordingly, the downtime of the virtual machine will also be very long, which brings many inconveniences to the tasks carried by the virtual machine.

[0037] In response to the above technical difficulties, the present application proposes an innovative virtual machine migration method for reducing the downtime during the virtual machine migration process when local storage data needs to be migrated.

[0038] The technical solutions provided by various embodiments of the present application are described in detail below in conjunction with the accompanying drawings.

[0039] Figure 1 A logical schematic diagram of a virtual machine migration method provided by an exemplary embodiment of the present application. Figure 2 A flowchart of a virtual machine migration method provided by an exemplary embodiment of the present application. Figure 1 The method may be executed by a control device, which may be implemented as software, hardware, or a combination of software and hardware, and may be integrated into a control device. Figure 1 , the control device in this embodiment can communicate with each physical server and has resource management authority for each physical server, and virtual machines are running on the physical servers. In some exemplary application scenarios, each physical server may be a cloud server. In this scenario, the control device may refer to a cloud control system. Accordingly, this embodiment is to transform the cloud control system to execute the virtual machine migration method provided in this embodiment in the cloud control system. It should be understood that in this scenario, the physical implementation form of the control device in the embodiment may be a single server or a server cluster, etc., which is not limited here. Of course, in other exemplary application scenarios, the physical server may also be a non-cloud server, for example, a private server in an enterprise's private computer room, etc. Accordingly, the control device may be a device in the computer room used to manage physical servers. It is worth noting that the above application scenarios are only exemplary, and this embodiment does not limit the application scenarios.

[0040] Continue to refer Figure 1For ease of description, the target virtual machine is used as an example to illustrate the migration method of the virtual machine in this embodiment. It should be understood that the target virtual machine can be any virtual machine to be migrated. In this embodiment, the physical server where the target virtual machine is located before migration is described as the migration source, and the physical server where the target virtual machine should be located after migration is described as the migration destination. In this embodiment, both the migration source and the migration destination have local storage resources.

[0041] On this basis, reference Figure 2 The virtual machine migration method provided in this embodiment may include:

[0042] Step 200: Allocate reserved resources for the target virtual machine from the migration destination end while keeping the target virtual machine bound to the resources currently occupied by it in the migration source end;

[0043] Step 201: During the operation of the target virtual machine in the migration source end, trigger the copying of the local storage data corresponding to the target virtual machine in the migration source end to the reserved resources;

[0044] Step 202: If the copy progress of the local storage data reaches the specified standard, the target virtual machine is controlled to be shut down, and the remaining local storage data corresponding to the target virtual machine is triggered to be copied to the reserved resources;

[0045] Step 203: Switch the target virtual machine to be bound to the reserved resources, and migrate the target virtual machine to the reserved resources.

[0046] In this embodiment, as mentioned above, the control device has resource management authority over each physical server. From the perspective of the control device, in the process of managing physical resources, it is necessary to occupy resources through virtual machines, and a virtual machine can only be bound to a single physical server and occupy physical resources. Otherwise, during the operation of the virtual machine, the control device will not be able to determine which physical server to schedule the work tasks on the virtual machine, which may cause the virtual machine to fail. It is for this reason that in the existing migration scheme, the virtual machine must be shut down first, and then the binding relationship between the virtual machine and the physical machine must be switched to the migration destination and the physical machine resource occupation must be completed before the migration of locally stored data can begin, which results in the migration time of locally stored data being limited to the migration cycle.

[0047] In this embodiment, a resource reservation mechanism is proposed to break through this technical barrier. The resource reservation mechanism in this embodiment means that: on the one hand, the control device can keep the target virtual machine bound to the resources it currently occupies in the migration source end; on the other hand, it can allocate reserved resources to the target virtual machine from the migration destination end. That is, from the perspective of the control device, the resources occupied by the target virtual machine are still the resources in the migration source end and have not changed, which can ensure that the target virtual machine can run normally in the migration source end. Under this premise, the control device can also demarcate a part of the resources from the migration destination end and reserve these resources for the target virtual machine. Reference Figure 2 The reserved resources in this embodiment are the same as the resources currently occupied by the target virtual machine in the migration source end, and also include local storage resources to carry the local storage data of the target virtual machine. Of course, the reserved resources can also include computing resources and network resources required by the target virtual machine. Here, there is no limitation on the type of resources in the reserved resources.

[0048] Accordingly, through the resource reservation mechanism, the target virtual machine can obtain the right to occupy the reserved resources without migration.

[0049] Among them, in step 200, the control device is not limited to the implementation method to implement the resource reservation mechanism. Under the premise of not changing the original resource binding state of the target virtual machine, it is sufficient to enable the control device to recognize that the resource occupant corresponding to the reserved resources is actually the target virtual machine. The implementation method of the resource reservation mechanism will be described in detail later, and will not be elaborated here.

[0050] In this way, the target virtual machine can operate normally based on the resources currently occupied by it in the migration source end, that is, the target virtual machine can maintain normal operation at the migration source end, the target virtual machine has no perception of the reserved resources, and the reserved resources will not cause any interference to the operation of the target virtual machine.

[0051] Continue to refer Figure 2 In step 201, during the normal operation of the target virtual machine at the migration source, the local storage data corresponding to the target virtual machine at the migration source can be copied to the reserved resources. It should be understood that the migration process of the target virtual machine has not started at this time, and the target virtual machine is still operating normally at the migration source. That is, in step 201, before the target virtual machine is migrated, the local storage data corresponding to the target virtual machine can be pre-copied to the reserved resources. Obviously, in step 201, the time taken to migrate the local storage data will be independent of the migration cycle, and during the pre-copy process, the virtual machine does not need to be shut down but can operate normally, so that no matter how long the migration of the local storage data takes, it will not affect the downtime during the migration cycle.

[0052] In this embodiment, in order to ensure the accuracy of the above-mentioned pre-copy process, the control device can initiate a data pre-copy task to the migration source end, and specify the storage address corresponding to the reserved resource in the task, so that the migration source end can execute the data pre-copy task in a bypass manner, and accurately copy the local storage resources corresponding to the target virtual machine to the relevant storage location in the reserved resource. In the migration source end, the target virtual machine has no perception of the data pre-copy task.

[0053] In this embodiment, during the process of pre-copying the local storage data, the target virtual machine is still in operation, so dirty page data may continue to appear. To this end, in an optional implementation of pre-copying:

[0054] In the first round of copying, all local storage data can be copied to the reserved resources;

[0055] In a non-first round of copying, dirty page data generated by the operation of the target virtual machine during the previous round of copying can be obtained; and the dirty page data can be updated to the reserved resources.

[0056] The first round of copy refers to the first round of copy operations performed by the migration source after receiving the aforementioned data pre-copy task, and the copy operations performed thereafter are described as non-first round of copy.

[0057] In this optional implementation, the migration source end can report the description information of the dirty page data generated during the operation of the target virtual machine to the control device. The description information of the dirty page data may include but is not limited to the location and data volume of the dirty page. In this way, the control device can accurately know the newly generated dirty page data during each round of copying. In addition to the need to copy the local storage data in full in the first round of copying, in non-first rounds of copying, it is only necessary to update the dirty page data generated by the target virtual machine during the previous round of copying to the reserved resources. Since the amount of dirty page data is much smaller than the total amount of local storage data, only the first round of copying will take a long time, and the time for non-first rounds of copying will continue to shorten. This is because the time for non-first rounds of copying becomes shorter, and the dirty page data generated by the target virtual machine in a round of copying will also decrease, which can further shorten the time for the next round of copying.

[0058] Considering that the pre-copy of the local storage data cannot completely copy the local storage data to the reserved resources, it is proposed in step 202 that a specified standard can be set, and when the copy progress of the local storage data reaches the specified standard, the migration source end is notified to stop executing the data pre-copy task and control the target virtual machine to shut down. It can be understood that how many rounds of copying the migration source end needs to perform during the execution of the data pre-copy task depends on when the copy progress of the local storage data reaches the specified standard. In actual applications, there is no need to manually intervene in the number of copy rounds.

[0059] An exemplary designated standard may be: the amount of dirty page data generated by the operation of the target virtual machine in the most recent round of copying is less than a specified threshold. The essence of this exemplary designated standard can also be understood as being used to determine whether the migration time required for the next round of dirty page data is less than a specified time threshold. When the data copy speed is known, the quotient between the amount of dirty page data and the data copy speed can be calculated here as the migration time required for the dirty page data. The specified threshold mentioned in the designated standard can be determined based on the acceptable downtime of the task carried on the target virtual machine. For example, if the acceptable downtime of the task carried on the target virtual machine is 10 minutes, the time threshold for the migration time required for the next round of dirty page data can be set to 8 minutes, and accordingly, the specified threshold corresponding to the data volume can be set to 1G. Of course, this is merely exemplary, and the present embodiment is not limited to this.

[0060] Continue to refer Figure 2 , after the target virtual machine is shut down, in step 202, it can be triggered to copy the remaining local storage data corresponding to the target virtual machine to the reserved resources. In actual applications, when the target virtual machine is shut down, the dirty page data generated in its memory will be automatically stored in the local storage resources to which it is bound. Since before the shutdown, the target virtual machine is bound to the local storage resources in the migration source, after the target virtual machine is controlled to shut down, all dirty page data in the target virtual machine that has not yet been migrated will be stored in the local storage resources of the migration source. This ensures that in step 202, after the target virtual machine is shut down, it can be triggered to copy all the remaining local storage data corresponding to the target virtual machine to the reserved resources. Here, the remaining local storage data is the dirty page data that has not yet been migrated. In addition, the migration source can continue to update the remaining dirty page data to the reserved resources according to the storage address specified in the data pre-copy task received from the control device in the previous text,

[0061] At this point, the complete migration of the local storage data of the target virtual machine can be completed. It can be understood that only the copy operation of the remaining local storage data in step 202 occupies the downtime of the target virtual machine, while the pre-copy process in step 201 does not occupy the downtime of the target virtual machine at all. Since the amount of the remaining local storage data is very small, and the target virtual machine is controlled to shut down only after it has been confirmed that the required migration time can meet the downtime threshold that the task carried by the target virtual machine can tolerate, therefore, the downtime of the target virtual machine will not exceed the aforementioned downtime threshold due to the remaining local storage data.

[0062] During the downtime, in addition to continuing to copy the remaining local storage data, refer to Figure 2In step 203, the target virtual machine may be switched to be bound to the reserved resources, and the target virtual machine may be migrated to the reserved resources. It should be understood that there is no rigid sequence between the copying of the remaining local storage data and the migration of the target virtual machine, and the two aspects of the work may be performed simultaneously without affecting each other.

[0063] In step 203, the target virtual machine can be switched to be bound to the reserved resources, so that the target virtual machine will occupy the reserved resources with its own identity, and accordingly, the target virtual machine's right to occupy the relevant resources in the migration source will be released. On this basis, other components of the target virtual machine except the local storage data can be migrated to the reserved resources. Here, a standard migration scheme can be adopted to migrate the target virtual machine to the reserved resources. Among them, the standard migration scheme can be roughly described as: a complete client image snapshot can be saved for the target virtual machine in the migration source, and the client image snapshot contains the relevant information of other components in the target virtual machine except the local storage data; after the target virtual machine is shut down, the client image snapshot can be copied to the migration destination (specifically referring to the reserved resources in this embodiment). It should be understood that in the process of migrating the target virtual machine to the reserved resources, there is no need to consider the local storage data of the target virtual machine.

[0064] At this point, the migration of the target virtual machine can be completed, and the local storage data of the target virtual machine is also completely migrated to the migration destination.

[0065] After the migration is completed, the target virtual machine can be controlled to start up, and then the target virtual machine will continue to run based on the aforementioned reserved resources. It should be understood that after the migration is completed, the aforementioned reserved resources have essentially become physical resources bound to the target virtual machine.

[0066] An exemplary boot process may be:

[0067] After completing the migration, the control device may send a migration completion notification to the user terminal corresponding to the target virtual machine. After receiving the migration completion notification, the user terminal may initiate a startup request for the target virtual machine. After receiving the startup request, the control device may dispatch the startup request to the migration destination terminal corresponding to the target virtual machine. The startup request includes the description information of the reserved resources to control the migration destination terminal to start the target virtual machine based on the reserved resources.

[0068] It should be understood that the resources bound to the target virtual machine have been switched to reserved resources. Therefore, after receiving the start request for the target virtual machine, the control device can search for the resource binding relationship of the target virtual machine in accordance with the traditional protocol in the process of scheduling the start request. In this way, the description information of the reserved resources will be read from the resource binding relationship, and the description information of the reserved resources will be added to the start request, rather than the description information of the resources occupied by the target virtual machine in the migration source. Accordingly, the migration destination can respond to the start request, thereby starting the target virtual machine based on the reserved resources.

[0069] In summary, in this embodiment, under the premise of keeping the target virtual machine bound to the resources currently occupied by it in the migration source end, reserved resources are allocated to the target virtual machine from the migration destination end, so that the target virtual machine can operate normally at the migration source end without being disturbed by the reserved resources, and can obtain the right to occupy the reserved resources without migration. On this basis, during the operation of the target virtual machine, its corresponding local storage data in the migration source end can be copied to the reserved resources, and after the copy progress of the local storage data reaches the specified standard, the target virtual machine can be controlled to shut down, and the remaining local storage data corresponding to the target virtual machine can be copied to the reserved resources. During the shutdown period, the target virtual machine can be switched to be bound to the reserved resources, and the target virtual machine can be migrated to the reserved resources. In this way, the target virtual machine and its local storage data can be migrated to the reserved resources, and the migration time of the local storage data is independent of the virtual machine migration execution cycle, so the downtime during the virtual machine migration process can be effectively reduced.

[0070] Figure 3 A flowchart of a virtual machine migration method provided by another exemplary embodiment of the present application. Figure 3 , the method may include:

[0071] Step 300: On the premise that the target virtual machine is kept bound to the resources currently occupied by it in the migration source end, physical resources that match the specifications of the currently occupied resources are demarcated from the migration destination end as reserved resources allocated to the target virtual machine;

[0072] Step 301: configure a clone identifier for the target virtual machine;

[0073] Step 302: Establish a resource binding relationship between the avatar identifier and the reserved resource to allocate the reserved resource to the target virtual machine;

[0074] Step 303: During the operation of the target virtual machine based on the currently occupied resources, copy the local storage data corresponding to the target virtual machine in the migration source end to the reserved resources;

[0075] Step 304: If the copy progress of the local storage data reaches the specified standard, the target virtual machine is controlled to be shut down, and the remaining local storage data corresponding to the target virtual machine is copied to the reserved resources;

[0076] Step 305: Switch the target virtual machine to be bound to the reserved resources, and migrate the target virtual machine to the reserved resources.

[0077] Among them, steps 303 to 305 can refer to the relevant description in the above-mentioned embodiment, and will not be repeated here.

[0078] In this embodiment, based on step 300 to step 302, an exemplary implementation of a resource reservation mechanism is provided. The exemplary implementation will be described in detail below.

[0079] In this exemplary implementation, the control device may maintain a resource binding relationship for each virtual machine, wherein the resource binding relationship records the identifier of the virtual machine and the description information of the resource to which it is bound. In step 300, the control device may maintain the resource binding relationship between the target virtual machine device and the resources currently occupied by it in the migration source end unchanged, so as to keep the target virtual machine bound to the resources currently occupied by it in the migration source end.

[0080] Under this premise, in step 300, the control device can demarcate physical resources that are compatible with the specifications of the resources currently occupied by the target virtual machine in the migration source end from the migration destination end as reserved resources, and allocate the reserved resources to the target virtual machine. Among them, specification adaptation means that the specifications of the reserved resources demarcated are large enough to ensure that the target virtual machine can be carried. Preferably, the specifications of the reserved resources and the resources currently occupied by the target virtual machine in the migration source end can be completely consistent. Of course, the specifications of the reserved resources may also be larger than the specifications of the currently occupied resources to ensure that the reserved resources can fully carry the target virtual machine and its locally stored data. As mentioned above, the target virtual machine cannot be bound to physical resources on multiple physical servers at the same time. Therefore, the target virtual machine’s right to occupy the reserved resources cannot be achieved through resource binding.

[0081] To this end, it is proposed in step 301 to configure a clone identifier for the target virtual machine. And in step 302, a resource binding relationship between the clone identifier and the reserved resources can be established. Among them, the resource binding relationship between the clone identifier and the reserved resources is consistent with the format of the resource binding relationship of the target virtual machine. That is, in addition to the resource binding relationship between the target virtual machine and the resources bound to it in the migration source, a new resource binding relationship is established, and the binding parties in the new resource binding relationship are the clone identifier associated with the target virtual machine and the reserved resources allocated to the target virtual machine. In this way, the resource binding relationship originally described by the target virtual machine will not be affected by the newly created resource binding relationship for the clone identifier, and the two resource binding relationships are independent of each other. In actual applications, the format of the resource binding relationship can usually adopt a data table, etc., which is not limited here.

[0082] In this embodiment, the clone identifier is a custom identifier that is different from the original identifier of the target virtual machine, but is associated with the target virtual machine. Based on this, on the one hand, the clone identifier is not consistent with the original identifier of the target virtual machine, so it will not cause the identifier of the target virtual machine to be bound to the physical resources of multiple physical servers at the same time. From the cognitive perspective of the control device, the identifier of the target virtual machine is only bound to the resources currently occupied by it in the migration source end, and is not bound to the reserved resources, so that the target virtual machine can run normally at the migration source end. On the other hand, from the cognitive perspective of the control device, the reserved resources are in a certain resource binding relationship, which ensures that the reserved resources are in an occupied state. Since there is an association between the clone identifier and the target virtual machine, the clone identifier actually replaces the target virtual machine and occupies the reserved resources.

[0083] It can be seen that in this exemplary implementation, the reserved resources can be allocated to the target virtual machine by binding the reserved resources with the clone identifier instead of the target virtual machine. That is, the clone identifier can be used as an intermediate medium to indirectly realize the target virtual machine's right to occupy the reserved resources.

[0084] Preferably, the clone identifier itself can be used as the resource occupant, and the clone identifier is not used to refer to any virtual machine entity. That is, although it is defined as a clone identifier, in this exemplary implementation, it is not necessary to create a clone virtual machine for the target virtual machine, but only configure an avatar identifier for it. From the cognitive perspective of the control device, there is already a resource occupant (that is, the clone identifier corresponding to the target virtual machine) in the resource binding relationship to which the reserved resources belong, and the control device can recognize that the reserved resources have been occupied for sure. The control device also recognizes the association between the target virtual machine and the clone identifier. Therefore, the control device can recognize the target virtual machine's right to occupy the reserved resources by using the clone identifier as a medium without binding the target virtual machine to the reserved resources.

[0085] Following this exemplary implementation, in step 305, the resource binding relationship between the avatar identifier and the reserved resource can also be used to switch the target virtual machine to be bound to the reserved resource.

[0086] In an exemplary switching scheme: the resource binding relationship between the target virtual machine and the resources currently occupied by it in the migration source end can be released; the avatar identifier corresponding to the target virtual machine is searched; in the resource binding relationship where the avatar identifier is located, the avatar identifier is replaced with the identifier of the target virtual machine to switch the target virtual machine to be bound to the reserved resources. In this exemplary switching scheme, the resource binding relationship between the avatar identifier and the reserved resources is modified, and the avatar identifier is replaced with the identifier of the target virtual machine, so that the resource binding relationship becomes a resource binding relationship between the target virtual machine and the reserved resources. The resource binding relationship between the target virtual machine and the resources currently occupied by it in the migration source end will be released.

[0087] In another exemplary switching scheme: the clone identifier corresponding to the target virtual machine can be searched; the description information of the reserved resources can be obtained from the binding relationship where the clone identifier is located; in the resource binding relationship corresponding to the target virtual machine, the description information of the currently occupied resources is replaced with the description information of the reserved resources, so as to switch the target virtual machine to be bound to the reserved resources. In this exemplary switching scheme, the resource binding relationship originally located in the target virtual machine is modified, and the description information of the original physical resources (that is, the currently occupied resources of the target virtual machine in the migration source end) is replaced with the description information of the reserved resources, so that the resource binding relationship becomes a resource binding relationship between the target virtual machine and the reserved resources. The resource binding relationship between the clone identifier and the reserved resources will be released.

[0088] Regardless of the above switching scheme, in the end, the avatar identifier can be hidden, and the resource binding relationship between the target virtual machine and the reserved resources can be directly established, and the resource binding relationship between the target virtual machine and the resources currently occupied by it in the migration source can be unbound. Thus, the target virtual machine can be switched to be bound to the reserved resources.

[0089] In summary, in the implementation method of the above-mentioned resource reservation mechanism, by configuring a clone identifier for the target virtual machine, and using the clone identifier as the resource occupant of the reserved resources, the reserved resources can be indirectly allocated to the target virtual machine based on the association between the target virtual machine and the clone identifier, thereby realizing the target virtual machine's right to occupy the reserved resources without affecting the normal operation of the target virtual machine at the migration source end.

[0090] It should be understood that Figure 3The implementation method of the resource reservation mechanism provided in is only exemplary, and other implementation methods can also be used in this embodiment to implement the resource reservation mechanism. For example, a blank clone virtual machine of the same specification as the target virtual machine is created in the migration destination, and the clone virtual machine is used to occupy the reserved resources. After the target virtual machine is shut down, the identifier of the clone virtual machine is changed to the identifier of the target virtual machine to complete the switching of the resource binding relationship. This will not be elaborated here.

[0091] In addition, it should be noted that some of the processes described in the above embodiments and drawings include multiple operations that appear in a specific order, but it should be clearly understood that these operations may not be executed in the order in which they appear in this document or may be executed in parallel. The operation serial numbers, such as 201, 202, etc., are only used to distinguish between different operations, and the serial numbers themselves do not represent any execution order.

[0092] refer to Figure 1 The present application may also provide a virtual machine management and control system, which may include a management and control device and multiple physical servers, wherein the multiple physical servers may include a migration source end where the target virtual machine is located and a migration destination end determined for the target virtual machine. The target virtual machine may also be any virtual machine that needs to be migrated. In addition, in this embodiment, the process of determining the migration destination end for the target virtual machine is not limited, for example, a load balancing strategy may be used to determine the migration destination end for the target virtual machine.

[0093] Based on this, the control device in this embodiment can be used to allocate reserved resources to the target virtual machine from the migration destination end under the premise that the target virtual machine remains bound to the resources currently occupied by it in the migration source end; while the target virtual machine is running in the migration source end, a data pre-copy task is issued to the migration source end; if the copy progress of the locally stored data reaches a specified standard, the target virtual machine is controlled to shut down; after completing the copy of the locally stored data, the target virtual machine is switched to be bound to the reserved resources, and the target virtual machine is migrated to the reserved resources;

[0094] Correspondingly, the migration source end in this embodiment can be used to execute the data pre-copy task to copy the local storage data corresponding to the target virtual machine to the reserved resources; and after the target virtual machine is shut down, continue to copy the remaining local storage data corresponding to the target virtual machine to the reserved resources.

[0095] It should be understood that the division of labor between the control device, the migration source end and the migration destination end provided in this embodiment is exemplary and not limited thereto. Other division of labor modes may also be used in this embodiment to implement the migration of the target virtual machine.

[0096] For example, the control device can also send the data pre-copy task to the migration destination, so that the migration destination can actively establish a data copy channel with the migration source and take the lead in completing the data pre-copy task. It is not limited to the aforementioned data pre-copy task being completed by the migration source.

[0097] Alternatively, the control device can complete the data pre-copy task independently, and the migration source and migration destination serve as cooperative parties. In this case, the control device can first copy the local storage data corresponding to the target virtual machine in the migration source to the control device, and then copy these data to the reserved resources in the migration destination.

[0098] We will not provide more examples of division of labor for other work links here, but it should be understood that in this embodiment, the division of labor between the management and control equipment, the migration source and the migration destination can be flexibly changed while ensuring the completion of goals such as data copying and virtual machine migration.

[0099] In addition, the specific technical details in the relevant work links in this embodiment can be referred to the description in the aforementioned method embodiment. In order to save space, no further details will be given here, but this should not cause any loss to the protection scope of the virtual machine management and control system in this application.

[0100] Figure 4 This is a schematic diagram of a control device provided by another exemplary embodiment of the present application. Figure 4 The control device may include a resource reservation service module 40, a local storage data migration module 41 and a virtual machine migration module 42. Figure 4 The control device provided in this embodiment can be deployed in the control layer, and the control layer can be located between the virtual machine layer and the physical resource layer. The physical resource layer includes various physical resources on multiple physical servers, and the virtual machine layer includes multiple virtual machines. The control device in this embodiment can control the physical resources in the physical resource layer and the virtual machines in the virtual machine layer through the modules it includes.

[0101] The following will take the migration process of the target virtual machine as an example to explain in detail the various models in the control device in this embodiment.

[0102] In this embodiment, the resource reservation service module 40 may be used to allocate reserved resources to the target virtual machine from the migration destination while keeping the target virtual machine bound to the resources currently occupied by it in the migration source end;

[0103] The local storage data migration module 41 can be used to trigger the copying of the local storage data corresponding to the target virtual machine in the migration source end to the reserved resources during the operation of the target virtual machine in the migration source end; if the copy progress of the local storage data reaches the specified standard, the target virtual machine is controlled to be shut down, and then the remaining local storage data corresponding to the target virtual machine is triggered to be copied to the reserved resources;

[0104] The virtual machine migration module 42 may be used to switch the target virtual machine to be bound to the reserved resources and migrate the target virtual machine to the reserved resources during the shutdown of the target virtual machine.

[0105] In an optional implementation of allocating reserved resources for a target virtual machine from a migration destination, the resource reservation service module 40 may be used to:

[0106] Determining, from the migration destination, physical resources that match the specifications of the currently occupied resources as the reserved resources;

[0107] Configuring a clone identifier for the target virtual machine;

[0108] A resource binding relationship between the avatar identifier and the reserved resource is established to allocate the reserved resource to the target virtual machine.

[0109] In an optional implementation of switching the target virtual machine to be bound to the reserved resources, the virtual machine migration module 42 may be used to:

[0110] Release the resource binding relationship between the target virtual machine and the currently occupied resources;

[0111] Find the clone identifier corresponding to the target virtual machine;

[0112] In the resource binding relationship where the clone identifier is located, the clone identifier is replaced with the identifier of the target virtual machine, so as to switch the target virtual machine to be bound to the reserved resource.

[0113] In another optional implementation of switching the target virtual machine to be bound to the reserved resources, the virtual machine migration module 42 may be used to:

[0114] Find the clone identifier corresponding to the target virtual machine;

[0115] Acquire description information of the reserved resources from the binding relationship of the avatar identifier;

[0116] In the resource binding relationship corresponding to the target virtual machine, the description information of the currently occupied resources is replaced with the description information of the reserved resources, so as to switch the target virtual machine to be bound to the reserved resources;

[0117] The resource binding relationship between the avatar identifier and the reserved resource is released.

[0118] Preferably, the clone identifier itself serves as a resource occupant, and the clone identifier is not used to refer to any virtual machine entity.

[0119] Figure 5 This is a working logic diagram of a control device provided in another exemplary embodiment of the present application. Figure 5 , which shows a schematic diagram of the interaction logic between the resource reservation service module 40, the local storage data migration module 41, the virtual machine migration module 42, the migration source end and the migration destination end.

[0120] refer to Figure 5 The party that needs to migrate the virtual machine can submit a resource reservation request to the resource reservation service module 40. The resource reservation service module 40 can create a resource reservation instance in response to the resource reservation request to allocate reserved resources to the target virtual machine from the migration destination. The resource reservation instance can be understood as metadata used to describe the resource binding relationship between the aforementioned avatar identifier and the reserved resources. After the resource reservation instance is created, the reserved resources can be allocated to the target virtual machine.

[0121] Afterwards, the party requiring virtual machine migration can submit a pre-copy task request for local storage data to the local storage data migration module 41. The local storage data migration module 41 can control the migration source to pre-copy the local storage data corresponding to the target virtual machine to the reserved resources in the migration destination during the operation of the target virtual machine.

[0122] In an exemplary pre-copy solution, the local storage data migration module 41 may be used to:

[0123] In the first round of copying, triggering the copying of all locally stored data to the reserved resources;

[0124] In a non-first round of copying, dirty page data generated by the operation of the target virtual machine during the last round of copying is determined; and updating of the dirty page data to the reserved resources is triggered.

[0125] Preferably, if the amount of dirty page data generated by the operation of the target virtual machine in the most recent round of copying is less than a specified threshold, it is determined that the copy progress of the locally stored data reaches a specified standard.

[0126] After completing the pre-copy task, the local storage data migration module 41 can control the target virtual machine to shut down. The party that requires the migration of the virtual machine can continue to submit a virtual machine migration task request to the virtual machine migration module 42. On the one hand, the virtual machine migration module 42 can notify the local storage data migration module 41 to trigger the copy of the remaining local storage data; on the other hand, the virtual machine migration module 42 can switch the target virtual machine to be bound to the reserved resources and migrate the target virtual machine to the reserved resources. Figure 5 The virtual machine migration module 42 may be used to migrate other components of the target virtual machine except for the locally stored data to the reserved resources during the shutdown of the target virtual machine.

[0127] After completing the migration, the virtual machine migration module 42 may further control the target virtual machine to start, so that the target virtual machine continues to run based on the reserved resources.

[0128] In an exemplary startup solution, the virtual machine migration module 42 may send a message to a user terminal (eg, Figure 5 The migration requester of the virtual machine shown in the figure) sends a migration completion notification; after receiving a start request for the target virtual machine initiated by the user end, the start request is scheduled to the migration destination end, and the start request includes description information of the reserved resources to control the migration destination end to start the target virtual machine based on the reserved resources.

[0129] It is worth noting that the technical details in the above-mentioned embodiments of the control device can be referred to the relevant description in the aforementioned method embodiment. In order to save space, they will not be repeated here, but this should not cause a loss in the scope of protection of this application.

[0130] Figure 6 A schematic diagram of a control device provided by another exemplary embodiment of the present application is shown in FIG. Figure 6 , the management and control device may include: a memory 60 and a processor 61.

[0131] The processor 61 is coupled to the memory 60 and is used to execute the computer program in the memory 60 to:

[0132] Allocate reserved resources for the target virtual machine from the migration destination end under the premise of keeping the target virtual machine bound to the resources currently occupied by the target virtual machine in the migration source end;

[0133] During the operation of the target virtual machine in the migration source end, triggering the copying of the local storage data corresponding to the target virtual machine in the migration source end to the reserved resources;

[0134] If the copy progress of the local storage data reaches the specified standard, the target virtual machine is controlled to be shut down, and the remaining local storage data corresponding to the target virtual machine is triggered to be copied to the reserved resources;

[0135] The target virtual machine is switched to be bound to the reserved resources, and the target virtual machine is migrated to the reserved resources.

[0136] In an optional embodiment, when allocating reserved resources for the target virtual machine from the migration destination, the processor 61 may be configured to:

[0137] Determining, from the migration destination, physical resources that match the specifications of the currently occupied resources as the reserved resources;

[0138] Configuring a clone identifier for the target virtual machine;

[0139] A resource binding relationship between the avatar identifier and the reserved resource is established to allocate the reserved resource to the target virtual machine.

[0140] In an optional embodiment, when switching the target virtual machine to be bound to the reserved resource, the processor 61 may be configured to:

[0141] Release the resource binding relationship between the target virtual machine and the currently occupied resources;

[0142] Find the clone identifier corresponding to the target virtual machine;

[0143] In the resource binding relationship where the clone identifier is located, the clone identifier is replaced with the identifier of the target virtual machine, so as to switch the target virtual machine to be bound to the reserved resource.

[0144] In an optional embodiment, when switching the target virtual machine to be bound to the reserved resource, the processor 61 may be configured to:

[0145] Find the clone identifier corresponding to the target virtual machine;

[0146] Acquire description information of the reserved resources from the binding relationship of the avatar identifier;

[0147] In the resource binding relationship corresponding to the target virtual machine, the description information of the currently occupied resources is replaced with the description information of the reserved resources, so as to switch the target virtual machine to be bound to the reserved resources;

[0148] The resource binding relationship between the avatar identifier and the reserved resource is released.

[0149] In an optional embodiment, the clone identifier itself serves as a resource occupant, and the clone identifier is not used to refer to any virtual machine entity.

[0150] In an optional embodiment, when the processor 61 copies the local storage data corresponding to the target virtual machine in the migration source end to the reserved resources, it can be used to:

[0151] In the first round of copying, triggering the copying of all locally stored data to the reserved resources;

[0152] In a non-first round of copying, dirty page data generated in a previous round of copying is determined; and updating of the dirty page data to the reserved resources is triggered.

[0153] In an optional embodiment, the processor 61 may also be configured to:

[0154] If the amount of dirty page data generated in the most recent round of copying is less than a specified threshold, it is determined that the copy progress of the local storage data reaches a specified standard.

[0155] In an optional embodiment, when migrating the target virtual machine to the reserved resources, the processor 61 may be configured to:

[0156] During the shutdown of the target virtual machine, other components of the target virtual machine except the local storage data are migrated to the reserved resources.

[0157] In an optional embodiment, after migrating the target virtual machine to the reserved resources, the processor 61 may further be used to:

[0158] The target virtual machine is controlled to start, so that the target virtual machine continues to run based on the reserved resources.

[0159] In an optional embodiment, the processor 61, in the process of controlling the startup of the target virtual machine, may be used to:

[0160] Send a migration completion notification to the user terminal corresponding to the target virtual machine; after receiving a start request for the target virtual machine initiated by the user terminal, schedule the start request to the migration destination terminal, wherein the start request includes description information of the reserved resources to control the migration destination terminal to start the target virtual machine based on the reserved resources.

[0161] Further, if Figure 6 As shown, the management and control device also includes: a communication component 62, a power supply component 63 and other components. Figure 6 Only some components are shown schematically, which does not mean that the control equipment only includes Figure 6 Components shown.

[0162] It is worth noting that the technical details in the above-mentioned embodiments of the control device can be referred to the relevant description in the aforementioned method embodiment. In order to save space, they will not be repeated here, but this should not cause a loss in the scope of protection of this application.

[0163] Accordingly, an embodiment of the present application further provides a computer-readable storage medium storing a computer program, which, when executed, can implement each step that can be executed by the control device in the above method embodiment.

[0164] Above Figure 6 The memory in the computer is used to store computer programs and can be configured to store various other data to support operations on the computing platform. Examples of such data include instructions for any application or method operating on the computing platform, contact data, phone book data, messages, pictures, videos, etc. The memory can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0165] Above Figure 6 The communication component in is configured to facilitate wired or wireless communication between the device where the communication component is located and other devices. The device where the communication component is located can access a wireless network based on a communication standard, such as WiFi, 2G, 3G, 4G / LTE, 5G and other mobile communication networks, or a combination thereof. In an exemplary embodiment, the communication component receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0166] Above Figure 6 The power supply component in the device provides power to various components of the device where the power supply component is located. The power supply component may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device where the power supply component is located.

[0167] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0168] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0169] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0170] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0171] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0172] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0173] The above is only the embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the protection scope of the present application.

Claims

1. A virtual machine migration method, characterized in that: include: Allocate reserved resources for the target virtual machine from the migration destination end under the premise of keeping the target virtual machine bound to the resources currently occupied by the target virtual machine in the migration source end; During the operation of the target virtual machine in the migration source end, triggering the copying of the local storage data corresponding to the target virtual machine in the migration source end to the reserved resources; If the copy progress of the local storage data reaches the specified standard, the target virtual machine is controlled to be shut down, and the remaining local storage data corresponding to the target virtual machine is triggered to be copied to the reserved resources; The target virtual machine is switched to be bound to the reserved resources, and the target virtual machine is migrated to the reserved resources.

2. The method according to claim 1, characterized in that Allocating reserved resources to the target virtual machine from the migration destination includes: Determining, from the migration destination, physical resources that match the specifications of the currently occupied resources as the reserved resources; Configuring a clone identifier for the target virtual machine; A resource binding relationship between the avatar identifier and the reserved resource is established to allocate the reserved resource to the target virtual machine.

3. The method according to claim 2, characterized in that Switching the target virtual machine to be bound to the reserved resource includes: Release the resource binding relationship between the target virtual machine and the currently occupied resources; Find the clone identifier corresponding to the target virtual machine; In the resource binding relationship where the clone identifier is located, the clone identifier is replaced with the identifier of the target virtual machine, so as to switch the target virtual machine to be bound to the reserved resource.

4. The method according to claim 2, characterized in that: Switching the target virtual machine to be bound to the reserved resource includes: Find the clone identifier corresponding to the target virtual machine; Acquire description information of the reserved resources from the binding relationship of the avatar identifier; In the resource binding relationship corresponding to the target virtual machine, the description information of the currently occupied resources is replaced with the description information of the reserved resources, so as to switch the target virtual machine to be bound to the reserved resources; The resource binding relationship between the avatar identifier and the reserved resource is released.

5. The method according to claim 1, characterized in that Copying the local storage data corresponding to the target virtual machine in the migration source end to the reserved resources includes: In the first round of copying, all locally stored data is copied to the reserved resources; In a non-first round of copying, dirty page data generated by the operation of the target virtual machine during the last round of copying is obtained; and the dirty page data is updated to the reserved resources.

6. The method according to claim 5, characterized in that Also includes: If the amount of dirty page data generated by the operation of the target virtual machine in the most recent round of copying is less than a specified threshold, it is determined that the copy progress of the local storage data reaches a specified standard.

7. The method according to claim 1, characterized in that Migrating the target virtual machine to the reserved resources includes: During the shutdown of the target virtual machine, other components of the target virtual machine except the local storage data are migrated to the reserved resources.

8. The method according to claim 1, characterized in that: After migrating the target virtual machine to the reserved resources, the method further includes: The target virtual machine is controlled to start, so that the target virtual machine continues to run based on the reserved resources.

9. The method according to claim 8, characterized in that Controlling the target virtual machine to start up so that the target virtual machine continues to run based on the reserved resources includes: Sending a migration completion notification to a user terminal corresponding to the target virtual machine; After receiving a start request for the target virtual machine initiated by the user end, the start request is scheduled to the migration destination end, wherein the start request includes description information of the reserved resources to control the migration destination end to start the target virtual machine based on the reserved resources.

10. A control device, characterized in that: include: A resource reservation service module, configured to allocate reserved resources to the target virtual machine from the migration destination while keeping the target virtual machine bound to the resources currently occupied by the target virtual machine in the migration source end; A local storage data migration module, used for copying the local storage data corresponding to the target virtual machine in the migration source end to the reserved resources during the operation of the target virtual machine in the migration source end; If the copy progress of the local storage data reaches the specified standard, the target virtual machine is controlled to be shut down, and the remaining local storage data corresponding to the target virtual machine is copied to the reserved resources; The virtual machine migration module is used to switch the target virtual machine to be bound to the reserved resources and migrate the target virtual machine to the reserved resources during the shutdown of the target virtual machine.

11. A control device, characterized in that: including memory and processor; The memory is used to store one or more computer instructions; The processor is coupled to the memory and is configured to execute the one or more computer instructions so as to execute the virtual machine migration method according to any one of claims 1 to 9.

12. A virtual machine management and control system, characterized in that: Including the control device, the migration source end where the target virtual machine is located, and the migration destination end selected for the target virtual machine; The control device is used to allocate reserved resources to the target virtual machine from the migration destination end under the premise of keeping the target virtual machine bound to the resources currently occupied by it in the migration source end; During the operation of the target virtual machine in the migration source end, a data pre-copy task for the local storage data corresponding to the target virtual machine is issued to the migration source end; if the copy progress of the local storage data reaches a specified standard, the target virtual machine is controlled to be shut down; after the local storage data copy is completed, the target virtual machine is switched to be bound to the reserved resource, and the target virtual machine is migrated to the reserved resource; The migration source end is used to perform the data pre-copy task to copy the local storage data corresponding to the target virtual machine to the reserved resources; And after the target virtual machine is shut down, the remaining local storage data corresponding to the target virtual machine continues to be copied to the reserved resources.

13. A computer-readable storage medium storing computer instructions, characterized in that: When the computer instructions are executed by one or more processors, the one or more processors are caused to execute the virtual machine migration method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Virtual machine migration method

    CN101464812A

  • Virtual storage migration method and system and virtual machine monitor

    CN102073462A

  • On-line migration method and device of virtual machine

    CN107133093A

  • Virtual disk migration method, device and equipment and readable storage medium

    CN110688064A

  • Pre-warming destination for fast live migration

    US20130326174A1