Virtual machine live migration method, device, equipment, storage medium and program product
By determining the compatible hardware resources and operating instruction set model of the target virtual machine, and selecting the target physical machine or physical machine cluster for hot migration of the virtual machine, the problem of low migration flexibility between virtualization platforms is solved, and efficient migration without special adaptation is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ALIBABA CLOUD COMPUTING CO LTD
- Filing Date
- 2024-12-12
- Publication Date
- 2026-06-12
AI Technical Summary
The flexibility of hot migration of virtual machines between different virtualization platforms is low, and the target virtualization platform may not be able to support the virtual machine well after hot migration.
By determining the virtual model of the target virtual machine's compatible hardware resource configuration and operating instruction set, the target physical machine or physical machine cluster is selected from multiple physical machines or physical machine clusters, and migration instructions are generated for hot migration, avoiding special adaptation.
It improves the flexibility of live migration of virtual machines between different virtualization platforms and reduces the need for specialized adaptation of the migration process.
Smart Images

Figure CN122195574A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of cloud computing, and in particular to a method, apparatus, device, storage medium, and program product for live migration of virtual machines. Background Technology
[0002] A virtualization platform can include multiple physical machines or clusters of physical machines, and multiple virtual machines can run on these physical machines or clusters. Based on actual work requirements, it is necessary to perform hot migration of virtual machines between different virtualization platforms.
[0003] In related technologies, due to the differences between different virtualization platforms, the hot migration process of virtual machines needs to be specially adapted in order to hot migrate virtual machines from the source virtualization platform to the target virtualization platform; and after hot migration, the target virtualization platform may not be able to support running virtual machines well.
[0004] As can be seen from the above, the related technologies have low flexibility in hot migration of virtual machines between different virtualization platforms. Summary of the Invention
[0005] This application provides a virtual machine hot migration method, apparatus, device, storage medium, and program product to solve the problem of low flexibility in hot migration of virtual machines between different virtualization platforms.
[0006] In a first aspect, embodiments of this application provide a virtual machine hot migration method, including:
[0007] Determine at least one target virtual model corresponding to the target virtual machine, wherein the at least one target virtual model is used to describe at least one hardware resource configuration compatible with the target virtual machine and / or the operating instruction set of the target virtual machine;
[0008] Based on the at least one target virtual model, a target physical machine or target physical machine cluster is determined from multiple physical machines or physical machine clusters;
[0009] The target virtual machine is hot-migrated to the target physical machine or the target physical machine cluster.
[0010] In one possible implementation, the at least one target virtual model is a target device model; based on the target device model, determining a target physical machine or target physical machine cluster from multiple physical machines or physical machine clusters includes:
[0011] Determine the device models corresponding to multiple virtualization platforms, wherein the virtualization platform is used to create one or more virtual machines through the corresponding physical machine or physical machine cluster;
[0012] The physical machine or physical machine cluster corresponding to the virtualization platform of the target device model in the corresponding device model is determined as the target physical machine or target physical machine cluster.
[0013] In one possible implementation, the physical machine or physical machine cluster corresponding to the virtualization platform that includes the target device model in the corresponding device model is identified as the target physical machine or target physical machine cluster, including:
[0014] If there are multiple candidate virtualization platforms, the target virtualization platform is determined from the multiple candidate virtualization platforms based on at least one of the dirty page rate, network latency, bandwidth and storage type of the multiple candidate virtualization platforms. The candidate virtualization platform is the virtualization platform whose corresponding device model includes the target device model.
[0015] Among the physical machines or physical machine clusters corresponding to the target virtualization platform, the physical machines or physical machine clusters that support the target device model are determined as the target physical machines or target physical machine clusters.
[0016] In one possible implementation, the at least one target virtual model is a target device model; based on the target device model, determining a target physical machine or target physical machine cluster from multiple physical machines or physical machine clusters includes:
[0017] Based on the correspondence between device models and physical machines, the physical machines corresponding to the target device model are determined as the target physical machines or target physical machine clusters; or,
[0018] Based on the correspondence between the device model and the physical machine cluster, the physical machine cluster corresponding to the target device model is determined as the target physical machine cluster.
[0019] In one possible implementation, the at least one target virtual model includes a target virtual device model and a target virtual processor model; based on the at least one target virtual model, determining a target physical machine or target physical machine cluster from multiple physical machines or physical machine clusters includes:
[0020] Based on the target device model and the target virtual processor model, the target physical machine or target physical machine cluster is determined from multiple physical machines or physical machine clusters.
[0021] In one possible implementation, determining the target physical machine or target physical machine cluster from multiple physical machines or physical machine clusters based on the target device model and the target virtual processor model includes:
[0022] The operation instruction sets and corresponding device models used by multiple virtualization platforms are determined. The virtualization platform is used to create one or more virtual machines through a corresponding physical machine or physical machine cluster. The instruction set configuration is used to describe the operation instruction sets used by the virtualization platform.
[0023] The virtualization platform that includes the target device model and the operation instruction set of the target virtual processor model is defined as the virtualization platform.
[0024] Among the physical machines or physical machine clusters corresponding to the target virtualization platform, the physical machines or physical machine clusters that support the operation instruction set corresponding to the target virtual processor model and the target device model are determined as the target physical machine or target physical machine cluster.
[0025] In one possible implementation, hot-migrating the target virtual machine to the target physical machine or target physical machine cluster includes:
[0026] Generate a migration instruction, which includes the identifier of the target physical machine or the identifier of the target physical machine cluster;
[0027] The migration command is sent to the source physical machine where the target virtual machine is located, so that the source physical machine responds to the migration command and hot migrates the target virtual machine to the target physical machine or the target physical machine cluster.
[0028] In one possible implementation, the method further includes:
[0029] Obtain processor operation instructions from multiple virtualization platforms;
[0030] From the intersection of processor operation instructions of the multiple virtualization platforms, at least one set of operation instructions is determined;
[0031] Generate at least one virtual processor model for the at least one set of operation instructions, wherein the virtual processor model corresponds one-to-one with the set of operation instructions;
[0032] The at least one set of operating instructions and the at least one virtual processor model are stored in the plurality of virtualization platforms, and the target virtual processor model corresponding to the target virtual machine is selected from the at least one virtual processor model.
[0033] In one possible implementation, the method further includes:
[0034] Obtain hardware resource configurations for multiple virtualization platforms;
[0035] At least one device model is generated based on the intersection of the hardware resource configurations of the multiple virtualization platforms;
[0036] The at least one device model is stored in the plurality of virtualization platforms, and the target device model corresponding to the target virtual machine is selected from the at least one device model.
[0037] In one possible implementation, the target device model describes at least one hardware resource configuration including at least one of the following: motherboard type, main bridge chip, network driver, storage driver, display driver, virtual input / output device, semi-virtualization driver type, and peripheral component interconnect / high-speed peripheral component interconnect protocol type.
[0038] Secondly, embodiments of this application provide a virtual machine hot migration apparatus, comprising: a first determining module, a second determining module, and a migration module, wherein,
[0039] The first determining module is used to determine at least one target virtual model corresponding to the target virtual machine, wherein the at least one target virtual model is used to describe at least one hardware resource configuration compatible with the target virtual machine and / or the operating instruction set of the target virtual machine;
[0040] The second determining module is used to determine a target physical machine or target physical machine cluster from multiple physical machines or physical machine clusters based on the at least one target virtual model;
[0041] The migration module is used to hot migrate the target virtual machine to the target physical machine or the target physical machine cluster.
[0042] In one possible implementation, the at least one target virtual model is a target device model; the second determining module is specifically used for:
[0043] Determine the device models corresponding to multiple virtualization platforms, wherein the virtualization platform is used to create one or more virtual machines through the corresponding physical machine or physical machine cluster;
[0044] The physical machine or physical machine cluster corresponding to the virtualization platform of the target device model in the corresponding device model is determined as the target physical machine or target physical machine cluster.
[0045] In one possible implementation, the second determining module is specifically used for:
[0046] If there are multiple candidate virtualization platforms, the target virtualization platform is determined from the multiple candidate virtualization platforms based on at least one of the dirty page rate, network latency, bandwidth and storage type of the multiple candidate virtualization platforms. The candidate virtualization platform is the virtualization platform whose corresponding device model includes the target device model.
[0047] Among the physical machines or physical machine clusters corresponding to the target virtualization platform, the physical machines or physical machine clusters that support the target device model are determined as the target physical machines or target physical machine clusters.
[0048] In one possible implementation, the at least one target virtual model is a target device model; the second determining module is specifically used for:
[0049] Based on the correspondence between device models and physical machines, the physical machines corresponding to the target device model are determined as the target physical machines or target physical machine clusters; or,
[0050] Based on the correspondence between the device model and the physical machine cluster, the physical machine cluster corresponding to the target device model is determined as the target physical machine cluster.
[0051] In one possible implementation, the at least one target virtual model includes a target virtual device model and a target virtual processor model; the second determining module is specifically used for:
[0052] Based on the target device model and the target virtual processor model, the target physical machine or target physical machine cluster is determined from multiple physical machines or physical machine clusters.
[0053] In one possible implementation, the second determining module is specifically used for:
[0054] The operation instruction sets and corresponding device models used by multiple virtualization platforms are determined. The virtualization platform is used to create one or more virtual machines through a corresponding physical machine or physical machine cluster. The instruction set configuration is used to describe the operation instruction sets used by the virtualization platform.
[0055] The virtualization platform that includes the target device model and the operation instruction set of the target virtual processor model is defined as the virtualization platform.
[0056] Among the physical machines or physical machine clusters corresponding to the target virtualization platform, the physical machines or physical machine clusters that support the operation instruction set corresponding to the target virtual processor model and the target device model are determined as the target physical machine or target physical machine cluster.
[0057] In one possible implementation, the migration module is specifically used for:
[0058] Generate a migration instruction, which includes the identifier of the target physical machine or the identifier of the target physical machine cluster;
[0059] The migration command is sent to the source physical machine where the target virtual machine is located, so that the source physical machine responds to the migration command and hot migrates the target virtual machine to the target physical machine or the target physical machine cluster.
[0060] In one possible implementation, the apparatus further includes: an acquisition module, a third determination module, a generation module, and a storage module, wherein,
[0061] The acquisition module is used to acquire processor operation instructions from multiple virtualization platforms;
[0062] The third determining module is used to determine at least one set of operation instructions from the intersection of the processor operation instructions of the multiple virtualization platforms.
[0063] The generation module is used to generate at least one virtual processor model for the at least one set of operation instructions, wherein the virtual processor model corresponds one-to-one with the set of operation instructions.
[0064] The storage module is used to store the at least one set of operating instructions and the at least one virtual processor model in the plurality of virtualization platforms, wherein the target virtual processor model corresponding to the target virtual machine is selected from the at least one virtual processor model.
[0065] In one possible implementation,
[0066] The acquisition module is also used to acquire the hardware resource configurations of multiple virtualization platforms;
[0067] The generation module is further configured to generate at least one device model based on the intersection of the hardware resource configurations of the multiple virtualization platforms.
[0068] The storage module is further configured to store the at least one device model in the plurality of virtualization platforms, wherein the target device model corresponding to the target virtual machine is selected from the at least one device model.
[0069] In one possible implementation, the target device model describes at least one hardware resource configuration including at least one of the following: motherboard type, main bridge chip, network driver, storage driver, display driver, virtual input / output device, semi-virtualization driver type, and peripheral component interconnect / high-speed peripheral component interconnect protocol type.
[0070] Thirdly, embodiments of this application provide an electronic device, including: a memory and a processor;
[0071] The memory stores computer-executed instructions;
[0072] The processor executes computer execution instructions stored in the memory, causing the processor to perform the method described in any of the first aspects.
[0073] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the method described in any of the first aspects.
[0074] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the method shown in any of the first aspects.
[0075] This application provides a method, apparatus, device, storage medium, and program product for hot migration of virtual machines. A management server can obtain at least one target virtual machine model corresponding to the target virtual machine, and based on the at least one target virtual machine model, determine the target physical machine or target physical machine cluster from multiple physical machines or physical machine clusters, thereby hot migrating the target virtual machine to the target physical machine or target physical machine cluster. Since at least one target virtual machine model can be used to describe at least one hardware resource configuration and / or the operating instruction set of the target virtual machine that is compatible with the target virtual machine, the target physical machine or target physical machine cluster determined based on the target virtual machine model can support at least one target virtual machine model, that is, support at least one hardware resource configuration and / or the operating instruction set of the target virtual machine that is compatible with the target virtual machine. Therefore, the target physical machine or target physical machine cluster is compatible with the target virtual machine, and the target virtual machine can be hot migrated to the target physical machine or target physical machine cluster without special adaptation to the hot migration process. The virtual machine hot migration method of this application improves the flexibility of hot migration of virtual machines between different virtualization platforms. Attached Figure Description
[0076] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0077] Figure 1 A schematic diagram illustrating an application scenario provided for an exemplary embodiment of this application;
[0078] Figure 2 A flowchart illustrating a virtual machine hot migration method provided as an exemplary embodiment of this application. Figure 1 ;
[0079] Figure 3 A flowchart illustrating a virtual machine hot migration method provided as an exemplary embodiment of this application. Figure 2 ;
[0080] Figure 4 A schematic diagram of a virtual machine hot migration method provided in this application embodiment. Figure 1 ;
[0081] Figure 5 A flowchart illustrating a virtual machine hot migration method provided as an exemplary embodiment of this application. Figure 3 ;
[0082] Figure 6 A schematic diagram of a virtual machine hot migration method provided as an exemplary embodiment of this application Figure 2 ;
[0083] Figure 7 A schematic diagram of a process for generating a virtual processor model provided for an exemplary embodiment of this application;
[0084] Figure 8 A schematic diagram of a process for generating a device model provided for an exemplary embodiment of this application;
[0085] Figure 9 A schematic diagram of a virtual machine hot migration device provided as an exemplary embodiment of this application;
[0086] Figure 10 A schematic diagram of another virtual machine hot migration device provided as an exemplary embodiment of this application;
[0087] Figure 11 This is a schematic diagram of the structure of an electronic device provided as an exemplary embodiment of this application. Detailed Implementation
[0088] 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, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with relevant laws, regulations and standards, and corresponding operation entry points are provided for users to choose to authorize or refuse.
[0089] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0090] Below, in conjunction with Figure 1 The application scenarios of this application will be explained.
[0091] Figure 1 This is a schematic diagram illustrating an application scenario provided for an exemplary embodiment of this application. Please refer to [link / reference]. Figure 1 This includes virtualization platform A and virtualization platform B.
[0092] A virtualization platform can include multiple physical machines. Each physical machine can run multiple virtual machines.
[0093] For example, virtualization platform A may include physical machines A1, A2, ...; among which, physical machine A1 may run virtual machines VM1 and VM2. Virtualization platform B may include physical machines B1, B2, ...; among which, physical machine B1 may run virtual machine VM3.
[0094] Based on actual work requirements, virtual machine VM1 can be hot-migrated from physical machine A1 in virtualization platform A to physical machine B1 in virtualization platform B.
[0095] In related technologies, due to the inherent differences between different virtualization platforms, the live migration process for virtual machines requires specialized adaptation to successfully migrate them from the source virtualization platform to the target virtualization platform. Furthermore, even after live migration, the target virtualization platform may not be well-compatible with the virtual machine. Therefore, it is evident that related technologies offer low flexibility in live migration of virtual machines between different virtualization platforms.
[0096] In this embodiment, the management server can determine the target physical machine or target physical machine cluster from multiple physical machines or physical machine clusters based on at least one target virtual model corresponding to the target virtual machine, and then hot-migrate the target virtual machine to the target physical machine or target physical machine cluster. Since at least one target virtual model can be used to describe at least one hardware resource configuration and / or the operating instruction set of the target virtual machine that is compatible with the target virtual machine, the target physical machine or target physical machine cluster determined based on at least one target virtual model can support at least one target virtual model, that is, support at least one hardware resource configuration and / or the operating instruction set of the target virtual machine that is compatible with the target virtual machine. Therefore, the target physical machine or target physical machine cluster is compatible with the target virtual machine, and the target virtual machine can be hot-migrated to the target physical machine or target physical machine cluster without special adaptation to the hot migration process. The virtual machine hot migration method of this application improves the flexibility of hot migration of virtual machines between different virtualization platforms.
[0097] The technical solutions shown in this application will now be described in detail through specific embodiments. It should be noted that the following embodiments may exist independently or in combination with each other; for identical or similar content, the description will not be repeated in different embodiments.
[0098] The execution entity in this application embodiment can be a management server or a virtual machine hot migration device installed in the management server. The virtual machine hot migration device can be implemented through software or a combination of software and hardware. The virtual machine hot migration device can be a processor in the management server. For ease of understanding, the following description uses a management server as the execution entity.
[0099] Figure 2 A flowchart illustrating a virtual machine hot migration method provided as an exemplary embodiment of this application. Figure 1 Please see. Figure 2 The method may include:
[0100] S201. Determine at least one target virtual model corresponding to the target virtual machine.
[0101] The target virtual machine can be any virtual machine running on the source virtualization platform.
[0102] At least one target virtual model may include a target device model and / or a target virtual processor model, wherein the target device model may be used to describe at least one hardware resource configuration compatible with the target virtual machine, and the target virtual processor model may be used to describe the operating instruction set of the target virtual machine. Therefore, at least one target virtual model may be used to describe at least one hardware resource configuration compatible with the target virtual machine and / or the operating instruction set of the target virtual machine.
[0103] For example, at least one hardware resource configuration described in the target device model may include at least one of the following: motherboard type, main bridge chip, network driver, storage driver, display driver, virtual input / output device, semi-virtualization driver type, and Peripheral Component Interconnect (PCI) / Peripheral Component Interconnect Express (PCIe) protocol type.
[0104] For example, at least one hardware resource configuration described in the target device model may include: motherboard type 1, main bridge chip HB1, network driver 1, storage driver 1, display driver 1, virtual input device VM Mouse1, virtual output device VM VGA, paravirtualization driver virtio legacy, and PCIe 3.0.
[0105] For any given device model, there is a corresponding identifier. For example, the identifier for device model DM1 can be DM1.
[0106] An instruction set may include multiple sets of processor operation instructions. Any set of processor operation instructions may include at least one processor operation instruction. For example, instruction set S1 may include three sets of processor instructions, namely instruction set 1, instruction set 2, and instruction set 3.
[0107] The target virtual machine can use multiple instructions from the operation instruction set described by the target virtual processor model. For example, if the target virtual processor model is VCPU model 1, used to describe operation instruction set S1, and if operation instruction set S1 includes instruction set 1, instruction set 2, and instruction set 3, and the target virtual machine is virtual machine VM1, then virtual machine VM1 can use any processor instruction from instruction set 1, instruction set 2, and instruction set 3.
[0108] Optionally, if at least one target virtual model includes a target device model and / or a target virtual processor model, the source physical machine where the target virtual machine resides can send the identifiers of the target device model and / or the target virtual processor model to the management server, so that the management server can determine the target device model based on the identifier of the target device model, and / or determine the target virtual processor model based on the identifier of the target virtual processor model.
[0109] For example, if at least one target virtual model includes a target device model and / or a target virtual processor model, and the target virtual processor model corresponding to virtual machine VM1 is VCPU model 1 and the target device model is device model DM1, then physical machine A1 can send the identifier VCPU1 of VCPU model 1 and / or the identifier DM1 of device model DM1 to the management server. The management server can determine that the target device model is device model DM1 based on the identifier DM1, and / or determine that the target virtual processor model is VCPU model 1 based on the identifier VCPU1.
[0110] S202. Based on at least one target virtual model, determine the target physical machine or target physical machine cluster from multiple physical machines or physical machine clusters.
[0111] For any physical machine or physical machine cluster, the physical machine or physical machine cluster can support at least one target virtual model.
[0112] For any physical machine cluster, the physical machine cluster may include at least one physical machine, and the configuration of the at least one physical machine may be the same.
[0113] If at least one target virtual model includes a target device model and / or a target virtual processor model, then the target physical machine can support the target device model and / or the target virtual processor model, that is, it can be compatible with at least one hardware resource configuration corresponding to the target device model and / or the operation instruction set described by the target virtual processor model; the target physical cluster can support the target device model and / or the target virtual processor model, that is, it can be compatible with at least one hardware resource configuration corresponding to the target device model and / or the operation instruction set described by the target virtual processor model.
[0114] The management server can select a physical machine that supports at least one target virtual model from among multiple physical machines as the target physical machine; or, it can select a physical machine cluster that supports at least one target virtual model from among multiple physical machine clusters as the target physical machine cluster.
[0115] For example, if at least one target virtual model is a target device model, and virtualization platform B includes 30 physical machines, the device models corresponding to these 30 physical machines can be as shown in Table 1:
[0116] Table 1
[0117] physical machine Corresponding equipment model Physical machine B1 Equipment Model DM1, Equipment Model DM2 Physical machine B2 Equipment Model DM1, Equipment Model DM2 Physical machine B3 Equipment Model DM2, Equipment Model DM3 Physical machine B4 Equipment Model DM2 Physical machine B5 Equipment Model DM1, Equipment Model DM2, Equipment Model DM3 …… …… Physical machine B30 Equipment Model DM4, Equipment Model DM5
[0118] If the target device model is device model DM1, since physical machines B1, B2, and B5 all support device model DM1, the management server can identify any one of physical machines B1, B2, and B5 as the target physical machine. For example, let's assume the management server can identify physical machine B2 as the target physical machine. Similarly, if the virtualization platform B includes multiple physical machine clusters, the target physical machine cluster can be identified in the same way.
[0119] S203. Hot-migrate the target virtual machine to the target physical machine or the target physical machine cluster.
[0120] The management server can hot-migrate target virtual machines to the target physical machine or target physical machine cluster from the source physical machine.
[0121] Optionally, the target virtual machine can be hot-migrated to the target physical machine or the target physical machine cluster by generating a migration command and sending the migration command to the source physical machine where the target virtual machine resides, so that the source physical machine responds to the migration command and hot-migrates the target virtual machine to the target physical machine or the target physical machine cluster.
[0122] Once the management server identifies the target physical machine or target physical machine cluster, it can generate migration instructions, which may include the identifier of the target physical machine or the identifier of the target physical cluster.
[0123] The management server can send migration instructions to the source physical machine where the target virtual machine resides in the source virtualization platform. The migration instructions can include the identifier of the target physical machine or the identifier of the target physical cluster. After receiving the migration instructions, the source physical machine can determine the identifier of the target physical machine in the migration instructions and hot-migrate the target virtual machine to the target physical machine indicated by the identifier; or it can determine the identifier of the target physical machine cluster in the migration instructions and hot-migrate the target virtual machine to the target physical machine cluster indicated by the identifier of the target physical machine cluster.
[0124] It should be noted that, for the target physical machine cluster, since at least one physical machine in the target physical machine cluster has the same configuration, once the target physical machine cluster is determined, the target virtual machine can be hot-migrated to any physical machine in the target physical machine cluster, so as to realize the hot migration of the target virtual machine to the target physical machine cluster.
[0125] For example, if the target virtual machine is virtual machine VM1, and the source physical machine where virtual machine VM1 resides is physical machine A1, and if the management server can determine that the target physical machine is physical machine B2, then the management server can send a migration command to physical machine A1. The migration command can include the identifier B2 of the target physical machine. After receiving the migration command, physical machine A1 can determine the identifier B2 of the target physical machine in the migration command and hot migrate virtual machine VM1 to the physical machine B2 indicated by identifier B2. Alternatively, if the management server determines that the target physical machine cluster is physical machine cluster 2, then the management server can send a migration command to physical machine A1. After receiving the migration command, physical machine A1 can hot migrate virtual machine VM1 to any physical machine in physical machine cluster 2.
[0126] In this embodiment, the management server can obtain at least one target virtual machine model corresponding to the target virtual machine, and determine the target physical machine or target physical machine cluster from multiple physical machines or physical machine clusters based on the at least one target virtual machine model. This allows for the hot migration of the target virtual machine to the target physical machine or target physical machine cluster. Since at least one target virtual machine model can be used to describe at least one hardware resource configuration and / or the operating instruction set of the target virtual machine that is compatible with it, the target physical machine or target physical machine cluster determined based on the target device model can support at least one target virtual machine model, i.e., support at least one hardware resource configuration and / or the operating instruction set of the target virtual machine that is compatible with it. Therefore, the target physical machine or target physical machine cluster is compatible with the target virtual machine, and the target virtual machine can be hot-migrated to the target physical machine or target physical machine cluster without special adaptation to the hot migration process. The virtual machine hot migration method of this application improves the flexibility of hot migration of virtual machines between different virtualization platforms.
[0127] Below, in Figure 2 Based on the illustrated embodiments, combined with Figure 3 Using at least one target virtual model as the target device model, the above-mentioned virtual machine hot migration method is described in detail; combined with Figure 5 The virtual machine hot migration method described above is explained in detail using at least one target virtual model, including a target device model and a target virtual processor model.
[0128] Figure 3 A flowchart illustrating a virtual machine hot migration method provided as an exemplary embodiment of this application. Figure 2 Please see. Figure 3 The method may include:
[0129] S301. Determine the target device model corresponding to the target virtual machine.
[0130] Optionally, if at least one target virtual model is a target device model, the source physical machine where the target virtual machine is located can send the identifier of the target device model to the management server so that the management server can determine the target device model based on the identifier of the target device model.
[0131] The target device model describes at least one hardware resource configuration, which may include at least one of the following: motherboard type, main bridge chip, network driver, storage driver, display driver, virtual input / output device, semi-virtualization driver type, and peripheral component interconnect / high-speed peripheral component interconnect protocol type.
[0132] For example, if the target virtual machine is virtual machine VM1, and the source physical machine where virtual machine VM1 resides is physical machine A1 in virtualization platform A, and if the target device model corresponding to virtual machine VM1 is device model DM1, then physical machine A1 can send the identifier DM1 of device model DM1 to the management server. The management server can determine that the target device model is device model DM1 based on the identifier DM1. The device model DM1 may describe at least one hardware resource configuration, including: main bridge chip HB1, storage controller SC2, storage driver 1, virtual input device VM Mouse1, and paravirtualization driver V1.
[0133] S302. Determine the device models corresponding to multiple virtualization platforms.
[0134] For any given virtualization platform, there can be multiple physical machines or clusters of multiple physical machines.
[0135] Virtualization platforms can be used to create one or more virtual machines from corresponding physical machines or clusters of physical machines.
[0136] For any virtualization platform, the management server can determine the device model corresponding to multiple physical machines in the virtualization platform, and thus determine the device model corresponding to the virtualization platform; or, the management server can determine the device model corresponding to multiple physical machine clusters in the virtualization platform, and thus determine the device model corresponding to the virtualization platform.
[0137] For example, if there are four virtualization platforms: virtualization platform B, virtualization platform C, virtualization platform D, and virtualization platform E, and if the device models corresponding to each physical machine in virtualization platform B are as shown in Table 1, then for virtualization platform B, the management server can determine that the device models corresponding to virtualization platform B include device model DM1, device model DM2, device model DM3, device model DM4, and device model DM5. Similarly, assume that the management server can determine the device models corresponding to virtualization platforms C, D, and E respectively. Assume that the device models corresponding to these five virtualization platforms are as shown in Table 2.
[0138] Table 2
[0139]
[0140] Optionally, the management server can also predetermine the device models corresponding to multiple virtualization platforms, generate the correspondence between multiple virtualization platforms and device models, and store the correspondence in a preset storage space. This way, each time this technical solution is executed, the device models corresponding to multiple virtualization platforms can be determined based on the correspondence, without having to determine the device models corresponding to multiple physical machines or physical machine clusters in the virtualization platform, and then determine the device models corresponding to the virtualization platform.
[0141] S303. The physical machine or physical machine cluster corresponding to the virtualization platform of the target device model in the corresponding device model is identified as the target physical machine or target physical machine cluster.
[0142] Optionally, the physical machine or physical machine cluster corresponding to the virtualization platform that includes the target device model in the corresponding device model can be determined as the target physical machine or target physical machine cluster in the following way: if there are multiple candidate virtualization platforms, the target virtualization platform is determined from the multiple candidate virtualization platforms based on at least one of the dirty page rate, network latency, bandwidth and storage type of the multiple candidate virtualization platforms; among the physical machines or physical machine clusters corresponding to the target virtualization platform, the physical machine or physical machine cluster that supports the target device model is determined as the target physical machine or target physical machine cluster.
[0143] The management server can determine at least one alternative virtualization platform from among multiple virtualization platforms based on the device models corresponding to those platforms. The alternative virtualization platform can be a virtualization platform whose corresponding device model includes the target device model.
[0144] Since the device model corresponding to the alternative virtualization platform includes the target device model, and the target device model can be used to describe at least one hardware resource configuration that the target virtual machine is compatible with, the alternative virtualization platform can support at least one hardware resource configuration that the target virtual machine is compatible with, that is, the alternative virtualization platform can support running the target virtual machine.
[0145] For example, if there are four virtualization platforms and their corresponding device models as shown in Table 2 above, and the target device model is device model DM1, then the management server can select virtualization platforms B, C, and D as candidate virtualization platforms. Virtualization platforms B, C, and D can all support running virtual machine VM1.
[0146] For any virtualization platform, its performance is affected by factors such as dirty page rate, network latency, bandwidth, and storage type.
[0147] Dirty page rate refers to the rate at which memory pages are modified during virtualization platform runtime. During hot migration, memory pages need to be copied to the target physical machine. A high dirty page rate means that a large number of memory pages are constantly being modified during migration, increasing the complexity and time of the migration. For example, a dirty page rate of 100 pages per second is possible.
[0148] Network latency refers to the time required for data packets to travel from the source physical machine to the destination physical machine. Higher network latency increases migration time, especially during the synchronization phase, and may lead to increased virtual machine pause times, thus affecting service continuity. For example, network latency can be as low as 10 ms (milliseconds).
[0149] Bandwidth refers to the amount of data a network can transmit per unit of time. Higher bandwidth can speed up data transmission, thereby reducing hot migration time. For example, bandwidth can be 100 Mbps (megabits per second).
[0150] Storage types can include local storage, network storage, and distributed storage.
[0151] For example, if there are three alternative virtualization platforms, namely virtualization platform B, virtualization platform C, and virtualization platform D, and the dirty page rate and network latency corresponding to these three alternative virtualization platforms are shown in Table 3:
[0152] Table 3
[0153] Alternative Virtualization Platforms Dirty page rate Network latency Virtualization Platform B 30 pages per second 10ms Virtualization Platform C 60 pages per second 50ms Virtualization Platform D 50 pages per second 20ms
[0154] The management server can then determine the target virtualization platform as virtualization platform B based on the dirty page rate and network latency of the three candidate virtualization platforms.
[0155] Since the target virtualization platform may include multiple physical machines or multiple physical machine clusters, and the device model corresponding to each physical machine may be different, or the device model corresponding to each physical machine cluster may be different, that is to say, the multiple physical machines or multiple physical machine clusters in the target virtualization platform may not all support the target device model. Therefore, after the management server determines the target virtualization platform, it can determine the physical machines or physical machine clusters that support the target device model as the target physical machines or target physical machine clusters.
[0156] For example, if the target virtualization platform is virtualization platform B, which includes 30 physical machines, and the device models corresponding to these 30 physical machines are shown in Table 1 above, and if the target device model is device model DM1, since physical machines B1, B2, and B5 all support device model DM1 among the 30 physical machines included in virtualization platform B, the management server can determine any one of physical machines B1, B2, and B5 as the target physical machine. Assume that the management server can determine the target physical machine as physical machine B2.
[0157] Optionally, the target physical machine or target physical machine cluster can be determined through steps S302 to S303, or the target physical machine or target physical cluster can be determined in the following ways: based on the correspondence between the device model and the physical machine, the physical machine corresponding to the target device model is determined as the target physical machine; or, based on the correspondence between the device model and the physical machine cluster, the physical machine cluster corresponding to the target device model is determined as the target physical machine cluster.
[0158] Optionally, the preset storage space may pre-store the correspondence between device models and physical machines, or the correspondence between device models and physical machine clusters.
[0159] The preset storage space can be located in the management server or the storage server. The management server can obtain the mapping between device models and physical machines from the preset storage space, or it can obtain the mapping between device models and physical machine clusters.
[0160] If the management server can obtain the correspondence between device models and physical machines, then the physical machine corresponding to the target device model can be identified as the target physical machine. For example, if there are four virtualization platforms: virtualization platform B, virtualization platform C, virtualization platform D, and virtualization platform E, where virtualization platform B corresponds to 30 physical machines, virtualization platform C to 10 physical machines, virtualization platform D to 20 physical machines, and virtualization platform E to 20 physical machines, then there are a total of 80 physical machines. If the management server can obtain the correspondence between device models and these 80 physical machines, and the target device model is device model DM1, then the management server can determine the target physical machine from among these 80 physical machines based on the correspondence between the device models and the 80 physical machines. The device model corresponding to the target physical machine includes the target device model. Similarly, determining the target physical machine cluster is done in the same way.
[0161] S304. Hot-migrate the target virtual machine to the target physical machine or the target physical machine cluster.
[0162] It should be noted that the specific execution process of step S304 can be found in step S203, and will not be repeated here.
[0163] Optionally, if at least one target virtual model is a target device model, when hot-migrating the target virtual machine from the source physical machine to the target physical machine, the identifier of the target device model can be carried so that after hot migration, the target physical machine can determine the target device model according to the identifier of the target device model, and configure at least one hardware resource configuration for the target virtual machine according to at least one hardware resource configuration described by the target device model, so as to run the target virtual machine normally.
[0164] For example, in response to a migration command, physical machine A1 hot-migrates virtual machine VM1 to physical machine B2, carrying the identifier of the target device model as DM1. After the hot migration, physical machine B2 can determine the target device model as device model DM1 based on the identifier DM1. If at least one hardware resource configuration described by device model DM1 includes: main bridge chip HB1, storage controller SC2, storage driver 1, virtual input device Mouse1, and paravirtualization driver V1, then physical machine B2 can configure virtual machine VM1 with at least one hardware resource configuration described by device model DM1.
[0165] It should be noted that, in Figure 3 The various processing steps (S301-S304) shown in the embodiments do not constitute a specific limitation on the virtual machine hot migration process. In other embodiments of this application, the virtual machine hot migration process may include more... Figure 3 The embodiments may include more or fewer steps. For example, a virtual machine hot migration process may include... Figure 3Some steps in the embodiments, or, Figure 3 Some steps in the embodiments can be replaced by steps with the same function, or Figure 3 Some steps in the embodiments can be broken down into multiple steps, etc.
[0166] In this embodiment, the management server can determine the target device model corresponding to the target virtual machine and the device models corresponding to multiple virtualization platforms. Then, it can identify the physical machine or physical machine cluster corresponding to the virtualization platform whose device model includes the target device model as the target physical machine or target physical machine cluster. The management server then performs a hot migration of the target virtual machine to the target physical machine or target physical machine cluster. Since the target device model can describe at least one hardware resource configuration compatible with the target virtual machine, the target physical machine or target physical machine cluster determined based on the target device model can support the target device model, i.e., support at least one hardware resource configuration compatible with the target virtual machine. Therefore, the target physical machine or target physical machine cluster is compatible with the target virtual machine, and the hot migration process of the target virtual machine can be hot-migrated to the target physical machine or target physical machine cluster without special adaptation. The virtual machine hot migration method of this application improves the flexibility of hot migration of virtual machines between different virtualization platforms.
[0167] Figure 4 A schematic diagram of a virtual machine hot migration method provided in this application embodiment. Figure 1 Please see. Figure 4 This includes: Virtualization Platform A, Virtualization Platform B, Virtualization Platform C, Virtualization Platform D, and Virtualization Platform E.
[0168] For any virtualization platform, at least one device model can be set up. For example, virtualization platform A can have device model DM1 and device model DM2; virtualization platform B can have device model DM1, device model DM2, device model DM3, device model DM4, and device model DM5; the device models set up in virtualization platform C and virtualization platform E can be as shown in Table 2.
[0169] For any virtualization platform, the virtualization platform may include at least one physical machine, wherein any physical machine may support at least one device model.
[0170] For example, virtualization platform A may include physical machine A1, physical machine A2, ..., where physical machine A1 can support device model DM1 and device model DM2, and physical machine A2 can support device model DM2; virtualization platform B may include physical machine B1, physical machine B2, ..., where physical machine B2 can support device model DM1 and device model DM2.
[0171] Any physical machine can run at least one virtual machine, and any virtual machine can correspond to a device model. A device model is used to describe at least one hardware resource configuration that the virtual machine is compatible with.
[0172] For example, physical machine A1 can run virtual machines VM1 and VM2. The device model corresponding to virtual machine VM1 is device model DM1. Device model DM1 describes at least one hardware resource configuration, which may include: main bridge chip HB1, storage controller SC2, storage driver 1, virtual input device Mouse1, and paravirtualization driver V1.
[0173] When performing a hot migration of a target virtual machine, the management server can determine the target virtualization platform from among multiple virtualization platforms based on the target device model corresponding to the target virtual machine, and then determine the target physical machine from among multiple physical machines corresponding to the target virtualization platform. The management server can then hot migrate the target virtual machine from the source physical machine in the source virtualization platform to the target physical machine. The target physical machine can support running the target virtual machine.
[0174] For example, if the target virtual machine is virtual machine VM1, and the target device model corresponding to virtual machine VM1 is device model DM1, and if the device models corresponding to virtualization platform B, virtualization platform C, virtualization platform D, and virtualization platform E are as shown in Table 2, then the management server can determine virtualization platform B, virtualization platform C, and virtualization platform D as candidate virtualization platforms based on device model DM1, and then determine virtualization platform B as the target virtualization platform from these three candidate virtualization platforms.
[0175] If virtualization platform B includes 30 physical machines, and the device models corresponding to each physical machine are shown in Table 1, then the management server can identify any one of physical machines B1, B2, and B5 as the target physical machine. Assume that the management server can identify physical machine B2 as the target physical machine.
[0176] The management server can send a migration command to physical machine A1. This command can include the identifier B2 of the target physical machine. Upon receiving the migration command, physical machine A1 can identify the identifier B2 from the command and then hot-migrate virtual machine VM1 to physical machine B2 as indicated by identifier B2. Physical machine B2 supports running virtual machine VM1.
[0177] In this embodiment, the management server can determine the target device model corresponding to the target virtual machine and the device models corresponding to multiple virtualization platforms. Then, it can identify the physical machine or physical machine cluster corresponding to the virtualization platform whose device model includes the target device model as the target physical machine or target physical machine cluster. The management server then performs a hot migration of the target virtual machine to the target physical machine or target physical machine cluster. Since the target device model can describe at least one hardware resource configuration compatible with the target virtual machine, the target physical machine or target physical machine cluster determined based on the target device model can support the target device model, i.e., support at least one hardware resource configuration compatible with the target virtual machine. Therefore, the target physical machine or target physical machine cluster is compatible with the target virtual machine, and the hot migration process of the target virtual machine can be hot-migrated to the target physical machine or target physical machine cluster without special adaptation. The virtual machine hot migration method of this application improves the flexibility of hot migration of virtual machines between different virtualization platforms.
[0178] Figure 5 A flowchart illustrating a virtual machine hot migration method provided as an exemplary embodiment of this application. Figure 3 Please see. Figure 5 The method may include:
[0179] S501. Determine the target device model and target virtual processor model corresponding to the target virtual machine.
[0180] A target virtual processor model can be used to describe the instruction set of a target virtual machine. The target virtual machine can use multiple processor instructions from the instruction set described by the target virtual processor model.
[0181] Optionally, the target virtual processor model can also be used to describe the cache information, clock frequency, etc., corresponding to the target virtual machine. The cache information may include cache size, cache type, etc. Cache types may include host cache, virtual machine cache, disk cache, CPU cache, network cache, and memory cache, etc.
[0182] Clock frequency refers to the clock frequency of the source physical machine where the target virtual machine resides.
[0183] For example, VCPU model 1 can also be used to describe virtual machine VM1 with a cache size of 2GB (gigabytes), a cache type of CPU cache, and a clock frequency of 3.5GHz (gigahertz).
[0184] Optionally, the source physical machine where the target virtual machine resides can send the identifier of the target device model and the identifier of the target virtual processor model to the management server, so that the management server can determine the target device model based on the identifier of the target device model and the target virtual processor model based on the identifier of the target virtual processor model.
[0185] For example, if the target virtual machine is VM1, the management server can determine that the target virtual processor model corresponding to VM1 is VCPU1.
[0186] For example, if the target virtual machine is virtual machine VM1, and the source physical machine where virtual machine VM1 resides is physical machine A1 in virtualization platform A, and if the target virtual processor model corresponding to virtual machine VM1 is VCPU model 1, and the target device model corresponding to virtual machine VM1 is device model DM1, then physical machine A1 can send the identifier VCPU1 of VCPU model 1 and the identifier DM1 of device model DM1 to the management server. The management server can determine that the target virtual processor model is VCPU model 1 based on the identifier VCPU1, and determine that the target device model is device model DM1 based on the identifier DM1.
[0187] S502. Determine the operating instruction sets and corresponding device models used by multiple virtualization platforms.
[0188] For any given virtualization platform, there can be multiple physical machines or clusters of physical machines. Since different physical machines or clusters of physical machines can support different sets of operating instructions and device models, the management server can determine the sets of operating instructions and device models corresponding to the multiple physical machines in the virtualization platform, and thus determine at least one set of operating instructions and at least one corresponding device model used by the virtualization platform. Alternatively, the management server can determine the sets of operating instructions and device models corresponding to the multiple physical clusters in the virtualization platform, and thus determine at least one set of operating instructions and at least one corresponding device model used by the virtualization platform.
[0189] It should be noted that for any given physical machine, the physical machine can support at least one set of operating instructions. On that physical machine, the virtual machine can choose any set of operating instructions to use based on actual needs.
[0190] For example, if physical machine B1 supports instruction set 1, instruction set 2, instruction set 3, and instruction set 4, and if operation instruction set S1 includes instruction set 1, instruction set 2, and instruction set 3, operation instruction set S2 includes instruction set 1 and instruction set 3, and operation instruction set S3 includes instruction set 1, instruction set 2, and instruction set 4, then physical machine B1 can support operation instruction sets S1, S2, and S3. On physical machine B1, any one of operation instruction sets S1, S2, and S3 can be selected for the virtual machine based on actual needs. The same applies to physical machine clusters.
[0191] For example, if there are four virtualization platforms, namely virtualization platform B, virtualization platform C, virtualization platform D, and virtualization platform E, the device models corresponding to each physical machine in virtualization platform B are shown in Table 1, and the operation instruction sets used by each physical machine in virtualization platform B are shown in Table 4.
[0192] Table 4
[0193]
[0194]
[0195] For virtualization platform B, the management server can determine that the operation instruction sets used by virtualization platform B include operation instruction sets S1, S2, S3, and S4, and the corresponding device models include device models DM1, DM2, DM3, DM4, and DM5. Similarly, assume that the management server can determine the operation instruction sets used by virtualization platforms C, D, and E, as well as their corresponding device models. Assume that the operation instruction sets used by these four virtualization platforms and their corresponding device models are as shown in Table 5.
[0196] Table 5
[0197]
[0198] Optionally, the management server can also predetermine the device models corresponding to multiple virtualization platforms and the virtual processor models corresponding to multiple virtualization platforms, generate the correspondence between virtualization platforms and device models, and the correspondence between virtualization platforms and virtual processor models, and store these two correspondences in a preset storage space. So that each time this technical solution is executed, the device models corresponding to multiple virtualization platforms can be determined according to the correspondence between virtualization platforms and device models, and the virtual processor models corresponding to multiple virtualization platforms can be determined according to the correspondence between virtualization platforms and virtual processor models, thereby determining the operation instruction set used by the virtualization platform.
[0199] Optionally, the preset storage space may pre-store the mapping relationships between virtualization platforms and device models, as well as the mapping relationships between virtualization platforms and virtual processor models. The preset storage space can be located in a management server or a storage server. The management server can obtain the mapping relationships between virtualization platforms and device models, and the mapping relationships between virtualization platforms and virtual processor models, from the preset storage space.
[0200] S503. The virtualization platform that includes the corresponding device model (including the target device model) and the operation instruction set (including the operation instruction set corresponding to the target virtual processor model) is determined as the target virtualization platform.
[0201] For example, if there are four virtualization platforms, namely virtualization platform B, virtualization platform C, virtualization platform D, and virtualization platform E, and the operation instruction sets and corresponding device models used by these four virtualization platforms are shown in Table 5, if the target device model is device model DM1, the target virtual processor model is VCPU model 1, and the operation instruction set is S1, then since virtualization platform C and virtualization platform B both support operation instruction set S1 and device model DM1, that is, virtualization platform C and virtualization platform B can both support running virtual machine VM1, the management server can determine virtualization platform C or virtualization platform B as the target virtualization platform.
[0202] S504. Among the physical machines or physical machine clusters corresponding to the target virtualization platform, the physical machines or physical machine clusters that support the operation instruction set corresponding to the target virtual processor model and the target device model are identified as the target physical machine or target physical machine cluster.
[0203] Since the target virtualization platform may include multiple physical machines or multiple physical machine clusters, each physical machine may support different operation instruction sets and device models, or each physical machine cluster may support different operation instruction sets and device models. In other words, multiple physical machines or multiple physical machine clusters in the target virtualization platform may not all support the operation instruction set corresponding to the target virtual processor model and the target device model. Therefore, after the management server determines the target virtualization platform, it can identify the physical machines or physical machine clusters that support the operation instruction set corresponding to the target virtual processor model and support the target device model as the target physical machines or target physical machine clusters.
[0204] For example, if the target virtualization platform is virtualization platform B, which includes 30 physical machines, and the management server determines the device models corresponding to these 30 physical machines as shown in Table 1 above, and the operation instruction sets used by these 30 physical machines as shown in Table 4 above, if the target device model is device model DM1, the target virtual processor model is VCPU model 1, and the corresponding operation instruction set is S1, then since physical machine B1 and physical machine B2 both support operation instruction set S1 and device model DM1 among the 30 physical machines included in virtualization platform B, the management server can determine physical machine B1 or physical machine B2 as the target physical machine. Assume that the management server can determine the target physical machine as physical machine B2.
[0205] Optionally, the target physical machine or target physical machine cluster can be determined through steps S502 to S504, or the target physical machine or target physical cluster can be determined in the following ways: based on the correspondence between the device model and the physical machine, and the correspondence between the virtual processor model and the physical machine, the physical machine corresponding to the target device model and the target virtual processor model is determined as the target physical machine; or, based on the correspondence between the device model and the physical machine cluster, and the correspondence between the virtual processor model and the physical machine cluster, the physical machine cluster corresponding to the target device model and the target virtual processor model is determined as the target physical machine cluster.
[0206] Optionally, the preset storage space may pre-store the correspondence between device models and physical machines, and the correspondence between virtual processor models and physical machines; or, the correspondence between device models and physical machine clusters, and the correspondence between virtual processor models and physical machine clusters.
[0207] The management server can obtain the correspondence between device models and physical machines, and the correspondence between virtual processor models and physical machines, in the preset storage space; or, the correspondence between device models and physical machine clusters, and the correspondence between virtual processor models and physical machine clusters.
[0208] If the management server can obtain the correspondence between device models and physical machines, and the correspondence between virtual processor models and physical machines, then the physical machine corresponding to the target device model and the target virtual processor model can be identified as the target physical machine. For example, if there are four virtualization platforms, namely virtualization platform B, virtualization platform C, virtualization platform D, and virtualization platform E, where virtualization platform B corresponds to 30 physical machines, virtualization platform C corresponds to 10 physical machines, virtualization platform D corresponds to 20 physical machines, and virtualization platform E corresponds to 20 physical machines, then there are a total of 80 physical machines. If the management server can obtain the correspondence between the device model and the 80 physical machines, and the correspondence between the virtual processor model and the 80 physical machines, and if the target device model is device model DM1 and the virtual processor model is VCPU model 1, then the management server can determine the physical machine that supports both device model DM1 and VCPU model 1 from among the 80 physical machines based on the correspondence between the device model and the 80 physical machines, and the correspondence between the virtual processor model and the 80 physical machines. The target physical machine's corresponding device model includes device model DM1, and its corresponding virtual processor model includes VCPU model 1. Similarly, determining the target physical machine cluster is done in the same way.
[0209] S505: Hot-migrate the target virtual machine to the target physical machine or the target physical machine cluster.
[0210] It should be noted that the specific execution process of step S504 can be found in step S203, and will not be repeated here.
[0211] Optionally, if at least one target virtual model includes a target device model and a target virtual processor model, when hot-migrating the target virtual machine from the source physical machine to the target physical machine, the identifiers of the target device model and the target virtual processor model can be carried. This allows the target physical machine to determine the target device model based on the identifier of the target device model after the hot migration, and to configure at least one hardware resource configuration for the target virtual machine based on at least one hardware resource configuration described by the target device model. It can also determine the target virtual processor model based on the identifier of the target virtual processor model, and to configure the operation instruction set for the target virtual machine based on the operation instruction set described by the target virtual processor model, so as to ensure the normal operation of the target virtual machine.
[0212] For example, in response to a migration command, physical machine A1 hot-migrates virtual machine VM1 to physical machine B2, carrying the identifier of the target device model as DM1 and the identifier of the target virtual processor model as VCPU1. After the hot migration, physical machine B2 can determine the target device model as device model DM1 based on the identifier DM1, and determine the target virtual processor model as VCPU model 1 based on the identifier VCPU1.
[0213] If the hardware resource configuration described by device model DM1 includes: motherboard type 1, main bridge chip HB1, network driver 1, storage driver 1, display driver 1, virtual input device VM Mouse1, virtual output device VM VGA, semi-virtualization driver virtio legacy, and PCIe 3.0, then physical machine B2 can configure virtual machine VM1 with the hardware resource configuration described by device model DM1.
[0214] If VCPU model 1 is used to describe operation instruction set S1, and operation instruction set S1 includes instruction group 1, instruction group 2 and instruction group 3, then physical machine B2 can configure operation instruction set S1 for virtual machine VM1 so that virtual machine VM1 can use any processor instruction in operation instruction set S1.
[0215] It should be noted that, in Figure 5 The various processing steps (S501-S505) shown in the embodiments do not constitute a specific limitation on the virtual machine hot migration process. In other embodiments of this application, the virtual machine hot migration process may include more... Figure 5 The embodiments may include more or fewer steps. For example, a virtual machine hot migration process may include... Figure 5 Some steps in the embodiments, or, Figure 5 Some steps in the embodiments can be replaced by steps with the same function, or Figure 5 Some steps in the embodiments can be broken down into multiple steps, etc.
[0216] In this embodiment, the management server can determine the target device model and target virtual processor model corresponding to the target virtual machine. The management server can determine the operation instruction sets and corresponding device models used by multiple virtualization platforms, and identify the virtualization platform whose corresponding device model includes the target device model and whose operation instruction set includes the operation instruction set corresponding to the target virtual processor model as the target virtualization platform. Then, within the physical machine or physical machine cluster corresponding to the target virtualization platform, the physical machine or physical machine cluster that supports the operation instruction set corresponding to the target virtual processor model and the target device model can be identified as the target physical machine or target physical machine cluster. Since the target device model can be used to describe at least one hardware resource configuration compatible with the target virtual machine, and the target virtual processor model is used to describe the operation instruction set of the target virtual machine, the target physical machine or target physical machine cluster determined based on the target device model and target virtual processor model can support both the target device model and the target virtual processor model, that is, support at least one hardware resource configuration compatible with the target virtual machine and the operation instruction set usable by the target virtual machine. Therefore, the target physical machine or target physical machine cluster is compatible with the target virtual machine, and the target virtual machine can be hot-migrated to the target physical machine or target physical machine cluster without special adaptation to the virtual machine's hot migration process. The virtual machine hot migration method of this application improves the flexibility of hot migration of virtual machines between different virtualization platforms.
[0217] Figure 6 A schematic diagram of a virtual machine hot migration method provided as an exemplary embodiment of this application Figure 2 Please see. Figure 6 This includes: a management server, virtualization platform A, virtualization platform B, and virtualization platform C.
[0218] For any virtualization platform, there can be at least one virtual processor model and at least one device model. Each virtual processor model has a corresponding instruction set.
[0219] For example, virtualization platform A can be configured with VCPU model 1, VCPU model 2, device model DM1, and device model DM2, where VCPU model 1 corresponds to operation instruction set S1 and VCPU model 2 corresponds to operation instruction set S2; virtualization platform B can be configured with VCPU model 1, VCPU model 2, VCPU model 3, device model DM1, device model DM2, device model DM3, device model DM4, and device model DM5, where VCPU model 1 corresponds to operation instruction set S1, VCPU model 2 corresponds to operation instruction set S2, and VCPU model 3 corresponds to operation instruction set S3; virtualization platform C can be configured with VCPU model 1, VCPU model 2, device model DM1, and device model DM3, where VCPU model 1 corresponds to operation instruction set S1 and VCPU model 2 corresponds to operation instruction set S2.
[0220] For any virtualization platform, the virtualization platform may include at least one physical machine, wherein any physical machine may support at least one virtual processor model and at least one device model.
[0221] For example, virtualization platform A may include physical machine A1, physical machine A2, ..., where physical machine A1 can support VCPU model 1, VCPU model 2, device model DM1 and device model DM2, and physical machine A2 can support VCPU model 2, device model DM1 and device model DM2.
[0222] Any physical machine can run at least one virtual machine, and any virtual machine can correspond to a virtual processor model and a device model. The virtual processor model is used to describe at least one hardware resource configuration that the virtual machine is compatible with, and the device model is used to describe at least one hardware resource configuration that the virtual machine is compatible with.
[0223] For example, physical machine A1 can run virtual machines VM1 and VM2. The virtual processor model corresponding to virtual machine VM1 is VCPU model 1, that is, virtual machine VM1 can use the operation instruction set S1. The device model corresponding to virtual machine VM1 is device model DM1. The hardware resource configuration described by device model DM1 may include: motherboard type 1, main bridge chip HB1, network driver 1, storage driver 1, display driver 1, virtual input device VM Mouse1, virtual output device VMVGA, paravirtualization driver virtio legacy, and PCIe 3.0.
[0224] The management server can determine the virtual processor model and device model corresponding to each physical machine in each virtualization platform, and store the identifiers of the virtual processor model and device model corresponding to each physical machine, such as... Figure 6 As shown in the image.
[0225] For example, if the management server determines in virtualization platform A that the virtual processor model corresponding to physical machine A1 includes VCPU model 1 and VCPU model 2, and the corresponding device model includes device model DM1 and device model DM2, then the management server can store the identifier VCPU1 of VCPU model 1, the identifier VCPU2 of VCPU model 2, the identifier DM1 of device model DM1, and the identifier DM2 of device model DM1 corresponding to physical machine A1.
[0226] When performing a hot migration of a target virtual machine, the management server can determine the target physical machine from among multiple physical machines corresponding to the target virtualization platform, based on the target virtual processor model and target device model corresponding to the target virtual machine. The management server can send migration commands to the source physical machine, enabling the source physical machine to hot migrate the target virtual machine to the target physical machine. The target physical machine can support the target virtual processor model and target device model, thus supporting the running of the target virtual machine.
[0227] For example, if the target virtual machine is virtual machine VM1, the target virtual processor model corresponding to virtual machine VM1 is VCPU model 1, and the target device model is device model DM1, and if at least one virtual processor model and at least one device model in virtualization platform A, virtualization platform B, and virtualization platform C are as follows: Figure 6 As shown, since virtualization platforms A, B, and C all support VCPU model 1 and device model DM1, virtual machine VM1 can be hot-migrated between virtualization platforms A, B, and C.
[0228] For example, the management server can send migration instruction 1 to physical machine A1, so that physical machine A1 can hot-migrate virtual machine VM1 to physical machine B2 of virtualization platform B according to migration instruction 1; the management server can also send migration instruction 2 to physical machine B2, so that physical machine B2 can hot-migrate virtual machine VM1 to physical machine C1 of virtualization platform C according to migration instruction 2; the management server can also send migration instruction 3 to physical machine A1, so that physical machine A1 can hot-migrate virtual machine VM1 to physical machine C1 of virtualization platform C according to migration instruction 3.
[0229] In this embodiment, the management server can determine the target device model corresponding to the target virtual machine and the target virtual processor model corresponding to the target virtual machine. Then, based on the target device model and the target virtual processor model, it can determine the target physical machine or target physical machine cluster from multiple physical machines or physical machine clusters. Since the target device model can be used to describe at least one hardware resource configuration compatible with the target virtual machine, and the target virtual processor model is used to describe the operating instruction set of the target virtual machine, the target physical machine or target physical machine cluster determined based on the target device model and the target virtual processor model can support both the target device model and the target virtual processor model. That is, it supports at least one hardware resource configuration compatible with the target virtual machine and the operating instruction set usable by the target virtual machine. Therefore, the target physical machine or target physical machine cluster is compatible with the target virtual machine, and the target virtual machine can be hot-migrated to the target physical machine or target physical machine cluster without special adaptation to the virtual machine hot migration process. The virtual machine hot migration method of this application improves the flexibility of hot migration of virtual machines between different virtualization platforms.
[0230] Figure 7 This is a schematic flowchart illustrating a process for generating a virtual processor model, provided as an exemplary embodiment of this application. Please refer to [link / reference]. Figure 7 The method may include:
[0231] S701: Obtain processor operation instructions from multiple virtualization platforms.
[0232] Optionally, the management server can obtain processor operation instructions from multiple virtualization platforms.
[0233] For example, if there are 5 virtualization platforms, namely virtualization platform A, virtualization platform B, virtualization platform C, virtualization platform D, and virtualization platform E, the processor operation instructions supported by each virtualization platform ("Y" represents supported, and "N" represents not supported) can be shown in Table 6:
[0234] Table 6
[0235]
[0236] S702. Determine at least one set of operation instructions from the intersection of processor operation instructions of multiple virtualization platforms.
[0237] Since the intersection of processor operation instructions from multiple virtualization platforms can include at least one instruction set, at least one operation instruction set can be generated based on at least one instruction set in the intersection.
[0238] For example, if the processor operation instructions of multiple virtualization platforms are as shown in Table 6, the management server can determine that the intersection of the processor operation instructions of these five virtualization platforms includes instruction group 1, instruction group 2, and instruction group 3. Based on these three instruction groups, three operation instruction sets can be generated. Operation instruction set 1 can include instruction group 1, instruction group 2, and instruction group 3; operation instruction set 2 can include instruction group 1 and instruction group 3; and operation instruction set 3 can include instruction group 2 and instruction group 3.
[0239] S703, Generate at least one virtual processor model for at least one set of operating instructions.
[0240] Optionally, since the virtual processor model is used to describe the operation instruction set, after generating at least one operation instruction set, a corresponding virtual processor model can be generated for each operation instruction set. There is a one-to-one correspondence between the virtual processor model and the operation instruction set; that is, the virtual processor model can be used to describe the corresponding operation instruction set.
[0241] For example, the management server can generate a corresponding virtual processor model called VCPU model 1 for operation instruction set 1, and VCPU model 1 can be used to describe operation instruction set 1; it can generate a corresponding virtual processor model called VCPU model 2 for operation instruction set 2, and VCPU model 2 can be used to describe operation instruction set 2; it can generate a corresponding virtual processor model called VCPU model 3 for operation instruction set 3, and VCPU model 3 can be used to describe operation instruction set 3.
[0242] S704. Store at least one operating instruction set and at least one virtual processor model in multiple virtualization platforms.
[0243] The management server can store multiple virtual processor models and the corresponding operation instruction set for each virtual processor model in any virtualization platform.
[0244] For example, the management server can store the following corresponding values in virtualization platforms A, B, C, D, and E: VCPU Model 1 - Operation Instruction Set 1, VCPU Model 2 - Operation Instruction Set 2, and VCPU Model 3 - Operation Instruction Set 3.
[0245] When creating a target virtual machine on any of multiple virtualization platforms, the source physical machine can, in response to the user's creation instruction for the target virtual machine, select a target virtual processor model for the target virtual machine from at least one virtual processor model. The creation instruction may include an identifier for the target virtual processor model to indicate the target virtual processor model.
[0246] For example, if a virtual machine VM1 is created on physical machine A1 of virtualization platform A, and the creation instruction for VM1 includes an identifier for the target virtual processor model as VCPU1, then physical machine A1 can respond to the creation instruction and, based on the identifier VCPU1, determine that the target virtual processor model corresponding to VM1 is VCPU model 1 among at least one virtual processor model. Since VCPU model 1 can be used to describe operation instruction set 1, the operation instruction set used by virtual machine VM1 is operation instruction set 1.
[0247] In this embodiment, the management server can acquire processor operation instructions from multiple virtualization platforms and determine at least one set of operation instructions from the intersection of these instructions. It then generates at least one virtual processor model for this set of instructions and stores both the instruction set and the virtual processor model across the multiple virtualization platforms. The target virtual processor model corresponding to the target virtual machine is selected from these at least one virtual processor model. Since the at least one set of operation instructions described by the at least one virtual processor model is determined from the intersection of processor operation instructions from multiple virtualization platforms, the at least one set of operation instructions can be used across multiple virtualization platforms. By selecting a target virtual processor model from these at least one virtual processor models, the operation instruction set used by the target virtual machine can be compatible with multiple virtualization platforms. Therefore, during hot migration of the target virtual machine, no special adaptation to the hot migration process is required to migrate the target virtual machine to a target physical machine or target physical machine cluster within the target virtualization platform, improving the flexibility of hot migration between different virtualization platforms.
[0248] Figure 8 This is a schematic flowchart illustrating a process for generating a device model, provided as an exemplary embodiment of this application. Please refer to... Figure 8 The method may include:
[0249] S801: Obtain hardware resource configurations for multiple virtualization platforms.
[0250] Optionally, the management server can obtain hardware resource configurations from multiple virtualization platforms.
[0251] For example, if there are 5 virtualization platforms, namely virtualization platform A, virtualization platform B, virtualization platform C, virtualization platform D, and virtualization platform E, and assume that the hardware resource configuration of each virtualization platform is as shown in Table 7:
[0252] Table 7
[0253]
[0254]
[0255] S802. Generate at least one device model based on the intersection of hardware resource configurations of multiple virtualization platforms.
[0256] Since the intersection of hardware resource configurations of multiple virtualization platforms can include at least one hardware resource configuration, at least one device model can be generated based on at least one hardware resource configuration in the intersection.
[0257] For example, if the hardware resource configurations of multiple virtualization platforms are as shown in Table 7, the management server can determine that the intersection of the hardware resource configurations of these 5 virtualization platforms includes motherboard type 1, main bridge chip HB1, network driver 1, storage driver 1, display driver 1, virtual input device VM Mouse1, virtual output device VM VGA, paravirtualization driver virtio legacy, and PCIe 3.0. Based on the 5 hardware resource configurations in this intersection, 3 device models can be generated. The hardware resource configuration corresponding to device model DM1 may include at least one of the following: motherboard type 1, main bridge chip HB1, network driver 1, storage driver 1, display driver 1, virtual input device VM Mouse1, virtual output device VM VGA, semi-virtualization driver virtio legacy, and PCIe 3.0; the hardware resource configuration corresponding to device model DM2 may include at least one of the following: main bridge chip HB1, virtual input device VM Mouse1, virtual output device VM VGA, semi-virtualization driver virtio legacy, and PCIe 3.0; the hardware resource configuration corresponding to device model DM3 may include at least one of the following: motherboard type 1, main bridge chip HB1, network driver 1, storage driver 1, display driver 1, semi-virtualization driver virtio legacy, and PCIe 3.0.
[0258] It should be noted that storage drivers have corresponding queue depths and queue numbers, and different queue depths and queue numbers can be configured for storage drivers in different device models. Here, queue depth refers to the number of parallel queues configured to handle input / output (I / O) requests; queue depth also refers to the maximum number of I / O requests that can be processed simultaneously in each queue.
[0259] For paravirtualization drivers, configuration options can include driver protocol, memory mapping space size, and number of interrupt vectors. Different configurations can be applied to paravirtualization drivers across different device models, meaning different versions of driver protocols, different sizes of memory mapping spaces, and different numbers of interrupt vectors can be configured for the paravirtualization driver.
[0260] Optionally, the device model may include standardized switches corresponding to different hardware resource configurations to control the hardware resource configurations used by the virtual machine.
[0261] S803, Store at least one device model across multiple virtualization platforms.
[0262] For example, the management server can store device model 1, device model 2, and device model 3 in virtualization platforms A, B, C, D, and E.
[0263] The target device model corresponding to the target virtual machine can be selected from at least one device model.
[0264] When creating a target virtual machine on any of multiple virtualization platforms, the source physical machine can respond to the user's creation command for the target virtual machine by obtaining the target virtual machine's configuration file. The configuration file may include an identifier for the target device model. The source physical machine can determine the identifier of the target device model from the configuration file, and based on that identifier, determine the target device model corresponding to the target virtual machine from at least one device model. Then, based on the target device model, it configures at least one hardware resource configuration for the target virtual machine.
[0265] For example, if a virtual machine VM1 is created on physical machine A1 of virtualization platform A, physical machine A1 can obtain the configuration file of virtual machine VM1 in response to the creation command for virtual machine VM1. If the configuration file includes an identifier of the target device model as DM1, physical machine A1 can determine the identifier DM1 of the target device model from the configuration file, and determine the target device model as device model DM1 based on the identifier DM1. If at least one hardware resource configuration corresponding to device model DM1 is as shown in the example above, then physical machine A1 can configure at least one hardware resource configuration for virtual machine VM1 based on device model DM1, namely: motherboard type type 1, main bridge chip HB1, network driver 1, storage driver 1, display driver, virtual input device VM Mouse1, virtual output device VM SVGA1, paravirtualization driver virtio legacy, and PCIe 3.0.
[0266] In this embodiment, the management server can obtain the hardware resource configurations of multiple virtualization platforms, generate at least one device model based on the intersection of the hardware resource configurations of the multiple virtualization platforms, and store the at least one device model in the multiple virtualization platforms. Since the at least one hardware resource configuration described by the at least one device model is determined in the intersection of the hardware resource configurations of the multiple virtualization platforms, the at least one device model can be used across multiple virtualization platforms. A target device model is selected for the target virtual machine from the at least one device model, so that the at least one hardware resource configuration used by the target virtual machine can be compatible with multiple virtualization platforms. Based on this, when hot-migrating the target virtual machine, no special adaptation of the virtual machine hot-migrating process is required to hot-migrate the target virtual machine to the target physical machine or target physical machine cluster in the target virtualization platform, improving the flexibility of hot-migrating virtual machines between different virtualization platforms.
[0267] Figure 9 This is a schematic diagram of a virtual machine hot migration device provided as an exemplary embodiment of this application. Please refer to... Figure 9 The virtual machine hot migration device 10 may include: a first determining module 11, a second determining module 12, and a migration module 13, wherein,
[0268] The first determining module 11 is used to determine at least one target virtual model corresponding to the target virtual machine, wherein the at least one target virtual model is used to describe at least one hardware resource configuration compatible with the target virtual machine and / or the operating instruction set of the target virtual machine;
[0269] The second determining module 12 is used to determine a target physical machine or target physical machine cluster from multiple physical machines or physical machine clusters based on the at least one target virtual model;
[0270] The migration module 13 is used to hot migrate the target virtual machine to the target physical machine or the target physical machine cluster.
[0271] The virtual machine hot migration device provided in this application embodiment can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar, and will not be described again here.
[0272] In one possible implementation, the second determining module 12 is specifically used for:
[0273] Determine the device models corresponding to multiple virtualization platforms, wherein the virtualization platform is used to create one or more virtual machines through the corresponding physical machine or physical machine cluster;
[0274] The physical machine or physical machine cluster corresponding to the virtualization platform of the target device model in the corresponding device model is determined as the target physical machine or target physical machine cluster.
[0275] In one possible implementation, the second determining module 12 is specifically used for:
[0276] If there are multiple candidate virtualization platforms, the target virtualization platform is determined from the multiple candidate virtualization platforms based on at least one of the dirty page rate, network latency, bandwidth and storage type of the multiple candidate virtualization platforms. The candidate virtualization platform is the virtualization platform whose corresponding device model includes the target device model.
[0277] Among the physical machines or physical machine clusters corresponding to the target virtualization platform, the physical machines or physical machine clusters that support the target device model are determined as the target physical machines or target physical machine clusters.
[0278] In one possible implementation, the at least one target virtual model is a target device model; the second determining module 12 is specifically used for:
[0279] Based on the correspondence between device models and physical machines, the physical machines corresponding to the target device model are determined as the target physical machines or the target physical machine cluster; or,
[0280] Based on the correspondence between the device model and the physical machine cluster, the physical machine cluster corresponding to the target device model is determined as the target physical machine cluster.
[0281] In one possible implementation, the at least one target virtual model includes a target virtual device model and a target virtual processor model; the second determining module 12 is specifically used for:
[0282] Based on the target device model and the target virtual processor model, the target physical machine or target physical machine cluster is determined from multiple physical machines or physical machine clusters.
[0283] In one possible implementation, the second determining module 12 is specifically used for:
[0284] The operation instruction sets and corresponding device models used by multiple virtualization platforms are determined. The virtualization platform is used to create one or more virtual machines through a corresponding physical machine or physical machine cluster. The instruction set configuration is used to describe the operation instruction sets used by the virtualization platform.
[0285] The virtualization platform that includes the target device model and the operation instruction set of the target virtual processor model is defined as the virtualization platform.
[0286] Among the physical machines or physical machine clusters corresponding to the target virtualization platform, the physical machines or physical machine clusters that support the operation instruction set corresponding to the target virtual processor model and the target device model are determined as the target physical machine or target physical machine cluster.
[0287] In one possible implementation, the migration module 13 is specifically used for:
[0288] Generate a migration instruction, which includes the identifier of the target physical machine or the identifier of the target physical machine cluster;
[0289] The migration command is sent to the source physical machine where the target virtual machine is located, so that the source physical machine responds to the migration command and hot migrates the target virtual machine to the target physical machine or the target physical machine cluster.
[0290] The virtual machine hot migration device provided in this application embodiment can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar, and will not be described again here.
[0291] Figure 10 A schematic diagram of another virtual machine hot migration apparatus provided as an exemplary embodiment of this application. Please refer to... Figure 10 ,exist Figure 9 Based on the illustrated embodiment, the virtual machine hot migration device 10 may further include: an acquisition module 14, a third determination module 15, a generation module 16, and a storage module 17, wherein,
[0292] The acquisition module 14 is used to acquire processor operation instructions from multiple virtualization platforms;
[0293] The third determining module 15 is used to determine at least one set of operation instructions from the intersection of the processor operation instructions of the plurality of virtualization platforms.
[0294] The generation module 16 is used to generate at least one virtual processor model for the at least one set of operation instructions, wherein the virtual processor model corresponds one-to-one with the set of operation instructions.
[0295] The storage module 17 is used to store the at least one operation instruction set and the at least one virtual processor model in the plurality of virtualization platforms, wherein the target virtual processor model corresponding to the target virtual machine is selected from the at least one virtual processor model.
[0296] In one possible implementation,
[0297] The acquisition module 14 is also used to acquire the hardware resource configurations of multiple virtualization platforms;
[0298] The generation module 16 is further configured to generate at least one device model based on the intersection of the hardware resource configurations of the multiple virtualization platforms.
[0299] The storage module 17 is further configured to store the at least one device model in the plurality of virtualization platforms, wherein the target device model corresponding to the target virtual machine is selected from the at least one device model.
[0300] In one possible implementation, the target device model describes at least one hardware resource configuration including at least one of the following: motherboard type, main bridge chip, network driver, storage driver, display driver, virtual input / output device, semi-virtualization driver type, and peripheral component interconnect / high-speed peripheral component interconnect protocol type.
[0301] The virtual machine hot migration device provided in this application embodiment can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar, and will not be described again here.
[0302] Figure 11 This is a schematic diagram of the structure of an electronic device provided for an exemplary embodiment of this application. Please refer to... Figure 11 The electronic device 20 may include a processor 21 and a memory 22. Exemplarily, the processor 21 and the memory 22 are interconnected via a bus 23.
[0303] The memory 22 stores computer-executed instructions;
[0304] The processor 21 executes the computer execution instructions stored in the memory 22, causing the processor 21 to perform the method as shown in the above method embodiment.
[0305] Figure 11 The electronic device may be the management server described in any of the above embodiments.
[0306] Accordingly, this application provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the method described in the above-described method embodiments.
[0307] Accordingly, embodiments of this application may also provide a computer program product, including a computer program, which, when executed by a processor, can implement the methods shown in the above-described method embodiments.
[0308] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0309] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0310] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0311] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0312] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0313] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0314] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0315] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0316] The above description is merely an embodiment of this application and is not intended to limit this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principle of this application should be included within the scope of the claims of this application.
Claims
1. A method for hot migration of virtual machines, characterized in that, include: Determine at least one target virtual model corresponding to the target virtual machine, wherein the at least one target virtual model is used to describe at least one hardware resource configuration compatible with the target virtual machine and / or the operating instruction set of the target virtual machine; Based on the at least one target virtual model, a target physical machine or target physical machine cluster is determined from multiple physical machines or physical machine clusters; The target virtual machine is hot-migrated to the target physical machine or the target physical machine cluster.
2. The method according to claim 1, characterized in that, The at least one target virtual model is a target device model; based on the target device model, determining the target physical machine or target physical machine cluster from multiple physical machines or physical machine clusters includes: Determine the device models corresponding to multiple virtualization platforms, wherein the virtualization platform is used to create one or more virtual machines through the corresponding physical machine or physical machine cluster; The physical machine or physical machine cluster corresponding to the virtualization platform of the target device model in the corresponding device model is determined as the target physical machine or target physical machine cluster.
3. The method according to claim 2, characterized in that, The physical machine or physical machine cluster corresponding to the virtualization platform of the target device model in the corresponding device model is identified as the target physical machine or target physical machine cluster, including: If there are multiple candidate virtualization platforms, the target virtualization platform is determined from the multiple candidate virtualization platforms based on at least one of the dirty page rate, network latency, bandwidth and storage type of the multiple candidate virtualization platforms. The candidate virtualization platform is the virtualization platform whose corresponding device model includes the target device model. Among the physical machines or physical machine clusters corresponding to the target virtualization platform, the physical machines or physical machine clusters that support the target device model are determined as the target physical machines or target physical machine clusters.
4. The method according to claim 1, characterized in that, The at least one target virtual model is a target device model; based on the target device model, determining the target physical machine or target physical machine cluster from multiple physical machines or physical machine clusters includes: Based on the correspondence between device models and physical machines, the physical machines corresponding to the target device model are determined as the target physical machines or the target physical machine cluster; or, Based on the correspondence between the device model and the physical machine cluster, the physical machine cluster corresponding to the target device model is determined as the target physical machine cluster.
5. The method according to claim 1, characterized in that, The at least one target virtual model includes a target virtual device model and a target virtual processor model; Based on the at least one target virtual model, determining the target physical machine or target physical machine cluster from multiple physical machines or physical machine clusters includes: Based on the target device model and the target virtual processor model, the target physical machine or target physical machine cluster is determined from multiple physical machines or physical machine clusters.
6. The method according to claim 5, characterized in that, Based on the target device model and the target virtual processor model, determining the target physical machine or target physical machine cluster from multiple physical machines or physical machine clusters includes: The operation instruction sets and corresponding device models used by multiple virtualization platforms are determined. The virtualization platform is used to create one or more virtual machines through a corresponding physical machine or physical machine cluster. The instruction set configuration is used to describe the operation instruction sets used by the virtualization platform. The virtualization platform that includes the target device model and the operation instruction set of the target virtual processor model is defined as the virtualization platform. Among the physical machines or physical machine clusters corresponding to the target virtualization platform, the physical machines or physical machine clusters that support the operation instruction set corresponding to the target virtual processor model and the target device model are determined as the target physical machine or target physical machine cluster.
7. The method according to any one of claims 1-6, characterized in that, Hot-migrating the target virtual machine to the target physical machine or target physical machine cluster includes: Generate a migration instruction, which includes the identifier of the target physical machine or the identifier of the target physical machine cluster; The migration command is sent to the source physical machine where the target virtual machine is located, so that the source physical machine responds to the migration command and hot migrates the target virtual machine to the target physical machine or the target physical machine cluster.
8. The method according to claim 1, characterized in that, The method further includes: Obtain processor operation instructions from multiple virtualization platforms; From the intersection of processor operation instructions of the multiple virtualization platforms, at least one set of operation instructions is determined; Generate at least one virtual processor model for the at least one set of operation instructions, wherein the virtual processor model corresponds one-to-one with the set of operation instructions; The at least one set of operating instructions and the at least one virtual processor model are stored in the plurality of virtualization platforms, wherein the target virtual processor model corresponding to the target virtual machine is selected from the at least one virtual processor model.
9. The method according to claim 1, characterized in that, The method further includes: Obtain hardware resource configurations for multiple virtualization platforms; At least one device model is generated based on the intersection of the hardware resource configurations of the multiple virtualization platforms; The at least one device model is stored in the plurality of virtualization platforms, and the target device model corresponding to the target virtual machine is selected from the at least one device model.
10. The method according to any one of claims 1-9, characterized in that, The target device model describes at least one hardware resource configuration including at least one of the following: motherboard type, main bridge chip, network driver, storage driver, display driver, virtual input / output device, semi-virtualization driver type, and peripheral component interconnect / high-speed peripheral component interconnect protocol type.
11. A virtual machine hot migration device, characterized in that, include: The system comprises a first determination module, a second determination module, and a migration module, wherein... The first determining module is used to determine at least one target virtual model corresponding to the target virtual machine, wherein the at least one target virtual model is used to describe at least one hardware resource configuration compatible with the target virtual machine and / or the operating instruction set of the target virtual machine; The second determining module is used to determine a target physical machine or target physical machine cluster from multiple physical machines or physical machine clusters based on the at least one target virtual model; The migration module is used to hot migrate the target virtual machine to the target physical machine or the target physical machine cluster.
12. An electronic device, characterized in that, include: At least one processor; as well as A memory that is communicatively connected to the at least one processor; The memory stores instructions executable by the at least one processor, which, when executed by the at least one processor, cause the electronic device to perform the method according to any one of claims 1-10.
13. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, implement the method as described in any one of claims 1-10.
14. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1-10.