Virtual machine migration method, and device and storage medium
By reserving resources at the destination of the migration and copying data, the problem of too long downtime during the virtual machine migration process is solved, and a more efficient virtual machine migration and data migration process is achieved.
Patent Information
- Application Number
- PCT/CN2024/115289
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-09-26
- Filing Date
- 2024-08-28
- Publication Date
- 2025-04-03
AI Technical Summary
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, affecting the continuity of tasks.
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 after meeting the specified criteria and completing the remaining data copying, and finally switching the virtual machine to the reserved resources for migration.
It effectively reduces the downtime during the virtual machine migration process, makes the migration of local stored data time-consuming and independent of the virtual machine migration execution cycle, and improves the continuity of tasks.
Smart Images

Figure CN2024115289_03042025_PF_FP_ABST
Abstract
Description
Virtual machine migration method, device and storage medium
[0001] This disclosure claims priority to a Chinese patent application filed with the Patent Office of China on September 26, 2023, with application number 202311256023.4 and application name “A method, device and storage medium for migrating a virtual machine”, the entire contents of which are incorporated by reference into this disclosure. Technical Field
[0002] The present disclosure relates to the field of Internet technology, and in particular to a virtual machine migration method, device, and storage medium. Background Art
[0003] Local storage resources refer to storage resources such as hard drives built into a physical server. Virtual machines that use local storage typically host storage-intensive tasks, requiring extensive read and write operations on local storage. Therefore, the amount of local storage data in these virtual machines is typically quite large.
[0004] During the cold migration of such virtual machines, it often takes a long time to migrate the local storage data, resulting in prolonged downtime of the virtual machines and long-term interruption of various tasks carried by the virtual machines.
[0005] Summary of the Invention
[0006] Various aspects of the present disclosure provide a virtual machine migration method, device, and storage medium to reduce downtime during virtual machine migration.
[0007] The present disclosure provides a method for migrating a virtual machine, including:
[0008] Allocate reserved resources for 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;
[0009] 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;
[0010] If the copy progress of the locally stored data reaches a specified standard, the target virtual machine is controlled to be shut down, and the remaining locally stored data corresponding to the target virtual machine is triggered to be copied to the reserved resources;
[0011] The target virtual machine is switched to be bound to the reserved resource, and the target virtual machine is migrated to the reserved resource.
[0012] The present disclosure also provides a control device, including:
[0013] 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;
[0014] A local storage data migration module is configured to trigger, while the target virtual machine is running on the migration source end, copying the local storage data corresponding to the target virtual machine on the migration source end to the reserved resources; if the copy progress of the local storage data reaches a specified standard, control the target virtual machine to be shut down, and then trigger copying the remaining local storage data corresponding to the target virtual machine to the reserved resources;
[0015] 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.
[0016] The embodiment of the present disclosure further provides a management and control device, including a memory and a processor;
[0017] The memory is used to store one or more computer instructions;
[0018] The processor is coupled to the memory and configured to execute the one or more computer instructions to perform the aforementioned virtual machine migration method.
[0019] The embodiment of the present disclosure further 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;
[0020] The control device is configured to allocate reserved resources to the target virtual machine from the migration destination end while the target virtual machine remains bound to the resources currently occupied by the target virtual machine 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; and 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;
[0021] The migration source is configured 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. The disclosed embodiments also provide 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.
[0022] In an embodiment of the present disclosure, under the premise of keeping the target virtual machine bound to the resources it currently occupies in the migration source, reserved resources are allocated to the target virtual machine from the migration destination, which enables the target virtual machine to operate normally in the migration source without being disturbed by the reserved resources, and to 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 can be copied to the reserved resources. Moreover, 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. Therefore, the downtime during the virtual machine migration process can be effectively reduced. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] The drawings described herein are used to provide a further understanding of the present disclosure and constitute a part of the present disclosure. The exemplary embodiments of the present disclosure and their descriptions are used to explain the present disclosure and do not constitute an improper limitation of the present disclosure. In the drawings:
[0024] FIG1 is a logical diagram of a virtual machine migration method provided by an exemplary embodiment of the present disclosure;
[0025] FIG2 is a flow chart of a method for migrating a virtual machine according to an exemplary embodiment of the present disclosure;
[0026] FIG3 is a flow chart of a method for migrating a virtual machine provided by another exemplary embodiment of the present disclosure;
[0027] FIG4 is a schematic structural diagram of a control device provided by another exemplary embodiment of the present disclosure;
[0028] FIG5 is a schematic diagram of the working logic of a control device provided in another exemplary embodiment of the present disclosure;
[0029] FIG6 is a schematic structural diagram of a control device provided by yet another exemplary embodiment of the present disclosure. DETAILED DESCRIPTION
[0030] To make the objectives, technical solutions, and advantages of the present disclosure more clear, the technical solutions of the present disclosure will be clearly and completely described below in conjunction with the specific embodiments of the present disclosure and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments of the present disclosure, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present disclosure.
[0031] Before introducing the technical solutions provided by various embodiments of the present disclosure, several technical concepts involved in the present disclosure are briefly explained:
[0032] Local storage resources refer to storage resources such as hard disks that come with the physical server.
[0033] 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 through the network.
[0034] Local storage VMs are VMs that use local storage resources for data storage. In other words, these VMs use local storage resources such as hard drives on the physical server where they reside for data storage.
[0035] Cloud-based shared storage virtual machines can be understood as virtual machines that use cloud-based shared storage resources for data storage. In other words, these virtual machines perform read and write operations on the cloud-based shared storage resources over the network to store data in the cloud-based shared storage resources.
[0036] The basic principle of virtual machine cold migration is to shut down the virtual machine and copy the components and data to be migrated to the migration destination. Only after the copy is complete can the virtual machine be restarted. In other words, during the virtual machine migration process, the virtual machine remains shut down, and the tasks it carries are also stalled.
[0037] During their research, the inventors discovered that for cloud-based shared storage virtual machines, the data stored in the cloud-based shared storage resources does not need to be migrated during the migration process. Instead, after the migration is complete, access to the cloud-based shared storage resources can be re-established for the migrated virtual machine. However, for local storage virtual machines, due to the isolation of local storage resources, physical servers do not have access to each other's local storage resources. Therefore, after the virtual machine is migrated, the migration destination will no longer be able to access the local storage data on the migration source. Therefore, during the migration of a local storage virtual machine, its corresponding local storage data must be migrated.
[0038] The inventors also discovered that the tasks performed by local storage virtual machines are mostly storage-intensive. Consequently, the volume of local storage data in these virtual machines is often quite large. Consequently, migrating this local storage data can take a long time, often requiring multiple days or even longer. This results in a significant downtime for these virtual machines, leading to significant inconvenience for the tasks being performed.
[0039] In response to the above technical difficulties, the present disclosure 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.
[0040] The technical solutions provided by various embodiments of the present disclosure are described in detail below with reference to the accompanying drawings.
[0041] Figure 1 is a logical diagram of a virtual machine migration method provided by an exemplary embodiment of the present disclosure. Figure 2 is a flow diagram of a virtual machine migration method provided by an exemplary embodiment of the present disclosure. Referring to Figure 1 , the method can be executed by a control and management device. The control and management device can be implemented as software, hardware, or a combination of software and hardware, and the control and management device can be integrated into a control and management device. Referring to Figure 1 , the control and management device in this embodiment can communicate with each physical server and have resource management authority over each physical server, on which virtual machines run. In some exemplary application scenarios, each physical server can be a cloud server. In such scenarios, the control and management device can refer to a cloud control and management system. Accordingly, this embodiment modifies the cloud control and management system to perform the virtual machine migration method provided by this embodiment within the cloud control and management system. It should be understood that in such scenarios, the physical implementation of the control and management device in this embodiment can be a single server or a server cluster, etc., and this is not limited here. Of course, in other exemplary application scenarios, the physical server can also be a non-cloud server, for example, a private server in an enterprise's private computer room, etc., and the control and management device can accordingly be the device in that computer room used to manage the physical servers. It is worth noting that the above application scenarios are merely exemplary, and this embodiment does not limit the application scenarios.
[0042] Continuing with Figure 1, for ease of description, this embodiment uses the target virtual machine as an example to illustrate the virtual machine migration method. 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 was 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 their own local storage resources.
[0043] On this basis, referring to FIG2 , the virtual machine migration method provided in this embodiment may include:
[0044] Step 200: Allocate reserved resources for 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.
[0045] Step 201: While the target virtual machine is running on the migration source, trigger the copying of the local storage data corresponding to the target virtual machine on the migration source to the reserved resources;
[0046] Step 202: If the copy progress of the local storage data reaches a 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;
[0047] Step 203: Switch the target virtual machine to be bound to the reserved resources, and migrate the target virtual machine to the reserved resources.
[0048] 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. Moreover, a virtual machine can only be bound to a single specific 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 dispatch the work tasks on the virtual machine to, which may cause the virtual machine to fail. It is for this reason that in the existing migration solution, 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 the locally stored data can begin. As a result, the migration time of the locally stored data can only be within the migration cycle.
[0049] 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 for 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. This can ensure that the target virtual machine can operate 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 this part of the resources for the target virtual machine. Referring to 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, etc. Here, there is no limitation on the type of resources in the reserved resources.
[0050] Accordingly, through the resource reservation mechanism, the target virtual machine can obtain the right to occupy the reserved resources without migrating.
[0051] In step 200, the resource reservation mechanism is implemented by the control device in any specific manner. Without changing the original resource binding state of the target virtual machine, the control device can simply recognize that the target virtual machine is the resource occupier of the reserved resources. The implementation of the resource reservation mechanism will be described in detail later and will not be elaborated here.
[0052] 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.
[0053] Continuing with reference to FIG2 , in step 201, the local storage data corresponding to the target virtual machine in the migration source end may be copied to the reserved resources during the normal operation of the target virtual machine in the migration source end. It should be understood that the migration process of the target virtual machine has not yet started at this time, and the target virtual machine is still operating normally in the migration source end. That is, in step 201, the local storage data corresponding to the target virtual machine may be pre-copied to the reserved resources before the target virtual machine is migrated. 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. In this way, no matter how long the migration of the local storage data takes, it will not affect the downtime during the migration cycle.
[0054] In this embodiment, to ensure the accuracy of the pre-copy process, the control device can initiate a data pre-copy task to the migration source and specify the storage address corresponding to the reserved resource in the task. In this way, the migration source can execute the data pre-copy task in a bypass manner, accurately copying the local storage resources corresponding to the target virtual machine to the relevant storage location in the reserved resource. On the migration source, the target virtual machine is unaware of this data pre-copy task.
[0055] 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:
[0056] In the first round of copying, all local storage data can be copied to the reserved resources;
[0057] In a non-first round of copying, dirty page data generated by 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.
[0058] 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. Copy operations performed thereafter are described as non-first round copies.
[0059] In this optional implementation, the migration source 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, as the time for non-first rounds of copying becomes shorter, 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.
[0060] Considering that the pre-copy of locally stored data may not completely copy the locally stored data to the reserved resources, step 202 proposes setting a specified standard. When the local stored data copy progress reaches the specified standard, the migration source is notified to stop the data pre-copy task and control the target virtual machine to shut down. It will be understood that the number of copy rounds required by the migration source during the data pre-copy task depends on when the local stored data copy progress reaches the specified standard. In practice, manual control of the number of copy rounds is not required.
[0061] An exemplary designation 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 designation 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 designation standard can be determined based on the acceptable downtime of the task carried by the target virtual machine. For example, if the acceptable downtime of the task carried by 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 this embodiment is not limited to this.
[0062] Continuing to refer to Figure 2, after the target virtual machine is shut down, in step 202, the remaining local storage data corresponding to the target virtual machine can be triggered to be copied 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 end, after the target virtual machine is controlled to be shut down, all the dirty page data in the target virtual machine that has not been migrated will be stored in the local storage resources of the migration source end. This ensures that in step 202, after the target virtual machine is shut down, the remaining local storage data corresponding to the target virtual machine can be triggered to be copied to the reserved resources. Here, the remaining local storage data is the dirty page data that has not been migrated. In addition, the migration source end 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,
[0063] At this point, the complete migration of the target virtual machine's local storage data is complete. It's understandable that only the copying of the remaining locally stored data in step 202 consumes the target virtual machine's downtime, while the pre-copy process in step 201 does not consume any of the target virtual machine's downtime. Since the amount of remaining locally stored data is very small, and the target virtual machine is only shut down after confirming that the required migration time meets the downtime threshold tolerated by the tasks hosted on the target virtual machine, the target virtual machine's downtime will not exceed the aforementioned downtime threshold due to the remaining locally stored data.
[0064] During the downtime, in addition to continuing to copy the remaining locally stored data, referring to FIG2 , in step 203, the target virtual machine can be switched to be bound to the reserved resources and migrated to the reserved resources. It should be understood that there is no rigid order between copying the remaining locally stored data and migrating the target virtual machine; the two tasks can be performed simultaneously without affecting each other.
[0065] In step 203, the target virtual machine can be switched to be bound to the reserved resources. In this way, the target virtual machine will occupy the reserved resources in 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 for the local storage data can be migrated to the reserved resources. Here, a standard migration solution can be adopted to migrate the target virtual machine to the reserved resources. Among them, the standard migration solution 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 relevant information of other components in the target virtual machine except for 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.
[0066] At this point, the migration of the target virtual machine is completed, and the local storage data of the target virtual machine is also completely migrated to the migration destination.
[0067] After the migration is completed, the target virtual machine can be controlled to start up, and thereafter, 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.
[0068] An exemplary boot process may be:
[0069] After completing the migration, the control device can send a migration completion notification to the user client corresponding to the target virtual machine. Upon receiving the migration completion notification, the user client can initiate a startup request for the target virtual machine. Upon receiving this startup request, the control device can dispatch the startup request to the migration destination client corresponding to the target virtual machine. The startup request includes a description of the reserved resources, instructing the migration destination client to start the target virtual machine based on the reserved resources.
[0070] It should be understood that the resources bound to the target virtual machine have been switched to reserved resources. Therefore, after receiving a startup request for the target virtual machine, the control device can, in the process of scheduling the startup request, search for the target virtual machine's resource binding relationship according to the traditional protocol. In this way, the description of the reserved resources read from the resource binding relationship will be added to the startup request, and the description of the reserved resources will no longer be the description of the resources occupied by the target virtual machine on the migration source. Based on this, the migration destination can respond to the startup request and start the target virtual machine based on the reserved resources.
[0071] 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, which enables the target virtual machine to operate normally at the migration source end without being disturbed by the reserved resources, and to 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. Moreover, 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. Therefore, the downtime during the virtual machine migration process can be effectively reduced.
[0072] FIG3 is a flow chart of a method for migrating a virtual machine according to another exemplary embodiment of the present disclosure. Referring to FIG3 , the method may include:
[0073] Step 300: While keeping the target virtual machine bound to the resources currently occupied by it on the migration source, physical resources that match the specifications of the currently occupied resources are allocated from the migration destination as reserved resources for the target virtual machine.
[0074] Step 301: Configure an avatar ID for the target virtual machine;
[0075] Step 302: Establish a resource binding relationship between the clone identifier and the reserved resources to allocate the reserved resources to the target virtual machine;
[0076] Step 303: While the target virtual machine is running based on the currently occupied resources, copy the local storage data corresponding to the target virtual machine on the migration source end to the reserved resources;
[0077] 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;
[0078] Step 305: Switch the target virtual machine to be bound to the reserved resources, and migrate the target virtual machine to the reserved resources.
[0079] Among them, steps 303 to 305 can refer to the relevant descriptions in the above embodiments and will not be repeated here.
[0080] In this embodiment, an exemplary implementation of a resource reservation mechanism is provided based on steps 300 to 302. This exemplary implementation will be described in detail below.
[0081] In this exemplary implementation, the control device may maintain a resource binding relationship for each virtual machine, wherein the resource binding relationship records the virtual machine's identifier and description information of the resources 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 on the migration source, thereby maintaining the target virtual machine bound to the resources currently occupied by it on the migration source.
[0082] Under this premise, in step 300, the control device can demarcate physical resources from the migration destination that are compatible with the specifications of the resources currently occupied by the target virtual machine in the migration source end as reserved resources, and allocate the reserved resources to the target virtual machine. Among them, the specifications are compatible 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 can 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.
[0083] 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.
[0084] 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, thereby ensuring that the target virtual machine can operate normally at the migration source end. On the other hand, from the cognitive perspective of the control device, the reserved resources are in a definite 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.
[0085] 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 identity instead of the target virtual machine. That is, the clone identity can be used as an intermediate medium to indirectly realize the target virtual machine's right to occupy the reserved resources.
[0086] 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, there is no need to create a clone virtual machine for the target virtual machine, but only to 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 definitely occupied. 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 using the clone identifier as a medium without binding the target virtual machine to the reserved resources.
[0087] Following this exemplary implementation, in step 305 , the resource binding relationship between the clone identifier and the reserved resource can also be used to switch the target virtual machine to be bound to the reserved resource.
[0088] In an exemplary switching solution, the resource binding relationship between the target virtual machine and the resources currently occupied by it on the migration source side can be released; the corresponding clone identifier of the target virtual machine is searched; and within the resource binding relationship where the clone identifier is located, the clone identifier is replaced with the identifier of the target virtual machine, thereby switching the target virtual machine to be bound to the reserved resources. In this exemplary switching solution, the resource binding relationship between the clone identifier and the reserved resources is modified by replacing the clone identifier with the identifier of the target virtual machine, thereby changing the resource binding relationship to 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 on the migration source side is released.
[0089] 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.
[0090] Regardless of the switching scheme described above, the target virtual machine can ultimately be switched to be bound to the reserved resources, with the avatar identifier hidden. The target virtual machine can then be directly bound to the reserved resources, while the target virtual machine can be unbound from the resources currently occupied by the target virtual machine on the migration source.
[0091] 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 for the reserved resources, the reserved resources can be indirectly allocated to the target virtual machine based on the association relationship 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.
[0092] It should be understood that the implementation of the resource reservation mechanism shown in FIG3 is merely exemplary, and other implementations may be employed in this embodiment. For example, a blank clone virtual machine of the same specifications as the target virtual machine may be created on the migration destination, and the reserved resources may be occupied by the clone virtual machine. After the target virtual machine is shut down, the identity of the clone virtual machine may be modified to that of the target virtual machine to complete the resource binding switch. This will not be discussed in detail here.
[0093] 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 numbers such as 201, 202, etc. are only used to distinguish different operations, and the serial numbers themselves do not represent any execution order.
[0094] Referring to Figure 1 , the present disclosure may also provide a virtual machine management and control system, which may include a management and control device and multiple physical servers. The multiple physical servers may include a migration source for a target virtual machine and a migration destination determined for the target virtual machine. The target virtual machine may also be any virtual machine to be migrated. Furthermore, in this embodiment, the process for determining the migration destination for the target virtual machine is not limited; for example, a load balancing strategy may be employed to determine the migration destination for the target virtual machine.
[0095] 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, issue a data pre-copy task to the migration source end; if the copy progress of the locally stored data reaches a specified standard, control the target virtual machine to shut down; 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;
[0096] Accordingly, the migration source end in this embodiment can be 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.
[0097] 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 methods can also be used in this embodiment to implement migration of the target virtual machine.
[0098] For example, the control device can also issue a data pre-copy task to the migration destination. This allows the migration destination to proactively establish a data copy channel with the migration source and take the lead in completing the data pre-copy task. This is not limited to the migration source completing the data pre-copy task.
[0099] Alternatively, the control device can independently perform the data pre-copy task, with the migration source and destination acting as collaborators. In this case, the control device can first copy the local storage data corresponding to the target virtual machine on the migration source to the control device, and then copy this data to the reserved resources on the migration destination.
[0100] 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.
[0101] In addition, the specific technical details of 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 of the protection scope of the virtual machine management and control system in this disclosure.
[0102] Figure 4 is a structural diagram of a control device provided by another exemplary embodiment of the present disclosure. Referring to 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. Referring to Figure 4, the control device provided by this embodiment may be deployed in the control layer, and the control layer may be located between the virtual machine layer and the physical resource layer. Among them, the physical resource layer contains various physical resources on multiple physical servers, and the virtual machine layer contains multiple virtual machines. The control device in this embodiment can control the physical resources in the physical resource layer and the various virtual machines in the virtual machine layer through the various modules it contains.
[0103] 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.
[0104] In this embodiment, the resource reservation service module 40 may be 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 it in the migration source.
[0105] The local storage data migration module 41 may be configured to trigger, while the target virtual machine is running on the migration source end, copying the local storage data corresponding to the target virtual machine on the migration source end to the reserved resources; if the local storage data copy progress reaches a specified standard, the target virtual machine may be controlled to shut down, and then the remaining local storage data corresponding to the target virtual machine may be triggered to be copied to the reserved resources;
[0106] The virtual machine migration module 42 may be configured 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 target virtual machine downtime.
[0107] 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 configured to:
[0108] Delimiting, from the migration destination, physical resources that match the specifications of the currently occupied resources as the reserved resources;
[0109] Configuring a clone identifier for the target virtual machine;
[0110] A resource binding relationship is established between the avatar identifier and the reserved resource to allocate the reserved resource to the target virtual machine.
[0111] 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 configured to:
[0112] Release the resource binding relationship between the target virtual machine and the currently occupied resources;
[0113] Find the clone ID corresponding to the target virtual machine;
[0114] 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.
[0115] 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 configured to:
[0116] Find the clone ID corresponding to the target virtual machine;
[0117] Obtaining description information of the reserved resources from the binding relationship of the avatar identifier;
[0118] 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;
[0119] The resource binding relationship between the avatar identifier and the reserved resource is released.
[0120] Preferably, the clone identifier itself serves as a resource occupier, and the clone identifier is not used to refer to any virtual machine entity.
[0121] Figure 5 is a schematic diagram of the working logic of a control device provided in another exemplary embodiment of the present disclosure. Referring to Figure 5 , there is shown 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.
[0122] Referring to Figure 5, the party requesting virtual machine migration can submit a resource reservation request to the resource reservation service module 40. In response to the resource reservation request, the resource reservation service module 40 creates a resource reservation instance to allocate reserved resources from the migration destination to the target virtual machine. The resource reservation instance can be understood as metadata describing the resource binding relationship between the aforementioned avatar identifier and the reserved resources. Once the resource reservation instance is created, the reserved resources can be allocated to the target virtual machine.
[0123] Afterwards, the virtual machine migration demander can submit a local storage data pre-copy task request to the local storage data migration module 41. The local storage data migration module 41 can control the migration source end to pre-copy the local storage data corresponding to the target virtual machine to the reserved resources in the migration destination end during the operation of the target virtual machine.
[0124] In an exemplary pre-copy solution, the local storage data migration module 41 may be used to:
[0125] In the first round of copying, triggering the copying of all locally stored data to the reserved resources;
[0126] In a non-first round of copying, dirty page data generated by the target virtual machine during the last round of copying is determined; and updating of the dirty page data into the reserved resources is triggered.
[0127] Preferably, if the amount of dirty page data generated by the operation of the target virtual machine in the latest round of copying is less than a specified threshold, it is determined that the copy progress of the locally stored data reaches the specified standard.
[0128] After completing the pre-copy task, the local storage data migration module 41 can control the target virtual machine to shut down. The party requesting virtual machine migration 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. Referring to Figure 5, the virtual machine migration module 42 can be used to: during the shutdown of the target virtual machine, migrate other components of the target virtual machine except the local storage data to the reserved resources.
[0129] 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.
[0130] In an exemplary startup scheme, the virtual machine migration module 42 can send a migration completion notification to the user end corresponding to the target virtual machine (for example, the migration demander of the virtual machine shown in Figure 5); after receiving the startup request for the target virtual machine initiated by the user end, the startup request is scheduled to the migration destination end, and the startup 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.
[0131] 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 of the scope of protection of this disclosure.
[0132] FIG6 is a schematic structural diagram of a control device provided by another exemplary embodiment of the present disclosure. Referring to FIG6 , the control device may include: a memory 60 and a processor 61 .
[0133] The processor 61 is coupled to the memory 60 and is configured to execute the computer program in the memory 60 to:
[0134] Allocate reserved resources for 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;
[0135] 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;
[0136] If the copy progress of the locally stored data reaches a specified standard, the target virtual machine is controlled to be shut down, and the remaining locally stored data corresponding to the target virtual machine is triggered to be copied to the reserved resources;
[0137] The target virtual machine is switched to be bound to the reserved resource, and the target virtual machine is migrated to the reserved resource.
[0138] In an optional embodiment, when allocating reserved resources to the target virtual machine from the migration destination, the processor 61 may be configured to:
[0139] Delimiting, from the migration destination, physical resources that match the specifications of the currently occupied resources as the reserved resources;
[0140] Configuring a clone identifier for the target virtual machine;
[0141] A resource binding relationship is established between the avatar identifier and the reserved resource to allocate the reserved resource to the target virtual machine.
[0142] In an optional embodiment, when switching the target virtual machine to be bound to the reserved resource, the processor 61 may be configured to:
[0143] Release the resource binding relationship between the target virtual machine and the currently occupied resources;
[0144] Find the clone ID corresponding to the target virtual machine;
[0145] 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.
[0146] In an optional embodiment, when switching the target virtual machine to be bound to the reserved resource, the processor 61 may be configured to:
[0147] Find the clone ID corresponding to the target virtual machine;
[0148] Obtaining description information of the reserved resources from the binding relationship of the avatar identifier;
[0149] 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;
[0150] The resource binding relationship between the avatar identifier and the reserved resource is released.
[0151] In an optional embodiment, the clone identifier itself serves as the resource occupant, and the clone identifier is not used to refer to any virtual machine entity.
[0152] 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 configured to:
[0153] In the first round of copying, triggering the copying of all locally stored data to the reserved resources;
[0154] 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 into the reserved resources is triggered.
[0155] In an optional embodiment, the processor 61 may also be configured to:
[0156] 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 locally stored data meets the specified standard.
[0157] In an optional embodiment, when migrating the target virtual machine to the reserved resources, the processor 61 may be configured to:
[0158] During the shutdown of the target virtual machine, other components of the target virtual machine except for the local storage data are migrated to the reserved resources.
[0159] In an optional embodiment, after migrating the target virtual machine to the reserved resources, the processor 61 may further be configured to:
[0160] The target virtual machine is controlled to start, so that the target virtual machine continues to run based on the reserved resources.
[0161] In an optional embodiment, the processor 61, in the process of controlling the startup of the target virtual machine, may be configured to:
[0162] Send a migration completion notification to the user terminal corresponding to the target virtual machine; after receiving a startup request for the target virtual machine initiated by the user terminal, schedule the startup request to the migration destination terminal, wherein the startup 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.
[0163] Furthermore, as shown in Figure 6 , the control device further includes other components such as a communication component 62 and a power supply component 63. Figure 6 only schematically illustrates some components, which does not mean that the control device only includes the components shown in Figure 6 .
[0164] 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 of the scope of protection of this disclosure.
[0165] Accordingly, an embodiment of the present disclosure further provides a computer-readable storage medium storing a computer program, which, when executed, can implement the steps that can be executed by the control device in the above method embodiment.
[0166] Accordingly, an embodiment of the present disclosure further provides a computer program, which, when executed by a processor, implements the steps that can be executed by the control device in the above method embodiment.
[0167] The memory in FIG6 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, images, 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.
[0168] The communication component in Figure 6 above 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.
[0169] The power supply assembly in Figure 6 provides power to various components of the device in which the power supply assembly is located. The power supply assembly may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device in which the power supply assembly is located.
[0170] Those skilled in the art will appreciate that the embodiments of the present disclosure may be provided as methods, systems, or computer program products. Therefore, the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, the present disclosure may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0171] The present disclosure 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 disclosure. 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 produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device produce a device for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0172] These computer program instructions may also be stored in a computer-readable memory that can direct 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 a product including an instruction device that implements the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0173] 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, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0174] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.
[0175] 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 disclosure 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 relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0176] The foregoing is merely an embodiment of the present disclosure and is not intended to limit the present disclosure. Various modifications and variations are possible for those skilled in the art. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present disclosure shall be included within the scope of protection of the present disclosure.
Claims
1. A method for migrating a virtual machine, comprising: 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, wherein: 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, wherein: 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, wherein: 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 any one of claims 1 to 4, wherein: 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, wherein: 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 any one of claims 1 to 6, wherein: Migrating the target virtual machine to the reserved resources includes: During the shutdown of the target virtual machine, migrate other components of the target virtual machine except the local storage data to the reserved resources.
8. The method according to any one of claims 1 to 7, wherein: 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, wherein: 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, comprising: 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 management and control device, comprising a memory and a 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, comprising 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; 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, which, when executed by one or more processors, causes the one or more processors to execute the virtual machine migration method according to any one of claims 1 to 9.
14. A computer program, which, when executed by a processor, implements the steps of the 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