CN108255570B - Virtual machine migration method, device and system between heterogeneous virtual machine monitor platforms - Google Patents

Virtual machine migration method, device and system between heterogeneous virtual machine monitor platforms Download PDF

Info

Publication number
CN108255570B
CN108255570B CN201611237531.8A CN201611237531A CN108255570B CN 108255570 B CN108255570 B CN 108255570B CN 201611237531 A CN201611237531 A CN 201611237531A CN 108255570 B CN108255570 B CN 108255570B
Authority
CN
China
Prior art keywords
target
original
format
hypervisor platform
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201611237531.8A
Other languages
Chinese (zh)
Other versions
CN108255570A (en
Inventor
林强敏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201611237531.8A priority Critical patent/CN108255570B/en
Publication of CN108255570A publication Critical patent/CN108255570A/en
Application granted granted Critical
Publication of CN108255570B publication Critical patent/CN108255570B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/4557Distribution of virtual machine instances; Migration and load balancing

Abstract

The embodiment of the invention provides a method, a device and a system for migrating virtual machines among heterogeneous virtual machine monitor platforms, which relate to the field of virtualization and comprise the following steps: the method comprises the steps that an original Hypervisor platform obtains original description information of a running virtual machine VM; the original Hypervisor platform sends original description information to a target Hypervisor platform; the target Hypervisor platform receives original description information sent by an original Hypervisor platform; the target Hypervisor platform acquires target format information; the target Hypervisor platform modifies the original description information according to the target format information to obtain target description information of the VM in the target Hypervisor platform; and the target Hypervisor platform rebuilds the VM according to the target description information. The problem that in the prior art, when the VM is migrated between heterogeneous Hypervisor platforms, the VM needs to be offline, namely, the service needs to be interrupted is solved; the effect of keeping the VM online and avoiding service interruption in the VM migration process is achieved.

Description

Virtual machine migration method, device and system between heterogeneous virtual machine monitor platforms
Technical Field
The embodiment of the invention relates to the technical field of virtualization, in particular to a method, a device and a system for virtual machine migration between heterogeneous virtual machine monitor platforms.
Background
With the development of virtualization technology, heterogeneous Hypervisor (virtual machine monitor) platforms appear on the market. In order to ensure that when a new Hypervisor platform is used, a service deployed on an original Hypervisor platform is not affected, a Virtual Machine (VM) on the original Hypervisor platform needs to be migrated. The formats of the representation information used for representing the VM in the heterogeneous Hypervisor platforms are different.
An existing VM migration method between heterogeneous Hypervisor platforms comprises the following steps: the method comprises the steps that an original Hypervisor platform shuts down a running VM to obtain an image file and an XML (Extensible Markup Language) file corresponding to the VM; converting the image file into an image file corresponding to a target Hypervisor platform according to the format requirement of the target Hypervisor platform on the image file, unloading the VM drive of the original Hypervisor platform in the converted image file, and implanting the VM drive of the VM in the target Hypervisor platform; converting the XML file into an XML file corresponding to the target Hypervisor platform according to the format requirement of the target Hypervisor platform on the XML file; sending the obtained image file and the XML file to a target Hypervisor platform; and the target Hypervisor platform rebuilds the VM according to the received image file and the XML.
In the process of implementing the invention, the inventor finds that the process has at least the following problems: when migrating a VM, the original platform needs to shut down the VM, and only after the migration is completed, the VM can be created in the target Hypervisor platform, so in the prior art, the VM is in a shutdown state during the migration process, that is, a service is interrupted.
Disclosure of Invention
In order to solve the problem in the prior art that a VM shutdown service is interrupted during a VM migration process, embodiments of the present invention provide a VM migration method, apparatus, and system between heterogeneous Hypervisor platforms, where the technical scheme is as follows:
in a first aspect, a method for VM migration between heterogeneous hypervisors is provided, where the method includes:
the method comprises the steps that an original Hypervisor platform obtains original description information of a VM in the original Hypervisor platform, and sends the original description information to a target Hypervisor platform; the original description information comprises original representation information used for representing the VM in the memory of the original Hypervisor platform. The target Hypervisor platform and the original Hypervisor platform are heterogeneous platforms, that is, a target format of the representation information for representing the VM in the memory of the target Hypervisor platform is different from an original format of the representation information for representing the VM in the memory of the original Hypervisor platform.
Correspondingly, the target Hypervisor platform receives the original description information sent by the original Hypervisor platform, and modifies the original description information according to the pre-acquired target format information to obtain target description information; and rebuilding the VM according to the target description information. The object format information includes an object format.
Acquiring original description information of an original Hypervisor platform in the process of running a VM in the original Hypervisor platform, wherein the original description information comprises original representation information of the VM in an internal memory of the original Hypervisor platform; sending original description information to a target Hypervisor platform, enabling the target Hypervisor platform to modify the received original description information according to the target format information, obtaining target description information, and reconstructing a VM according to the target description information; the target format information comprises a target format of the VM in a memory of a target Hypervisor platform; the problem that in the prior art, when the VM is migrated between heterogeneous Hypervisor platforms, the VM needs to be offline, namely, the service needs to be interrupted is solved; the effect of keeping the VM online in the VM migration process to avoid service interruption and further realizing smooth evolution among different platforms is achieved.
Optionally, the step of modifying the original description information by the target Hypervisor platform to obtain the target description information may be implemented as:
and the target Hypervisor platform converts the original representation information according to the target format and obtains the target representation information. The target description information comprises target representation information which jointly form target description information.
Optionally, in a second possible implementation manner, the step of converting the original representation information by the target Hypervisor platform to obtain the target representation information may include:
the target Hypervisor platform generates a target data structure according to the target format;
and the target Hypervisor platform writes the original representation information into a target data structure according to the difference between the original format and the target format to obtain the target representation information.
Optionally, in a third possible implementation manner, in the process of converting the original representation information by the target Hypervisor platform, if a target field is included in the original format of the original representation information, the target field is set to be invalid in the process of modifying the original representation information, and the target field is a field that is included in the original format of the original representation information but is not included in the target format of the target representation information.
Optionally, in a fourth possible implementation manner, the obtaining, by the original Hypervisor platform, original description information of the running virtual machine VM includes:
the method comprises the steps that an original Hypervisor platform obtains an original format of a VM in an internal memory of the original Hypervisor platform;
the original Hypervisor platform performs binary analysis on the VM information in the memory according to the original format and the VMCS technology supported by the virtual machine communication, and obtains an analysis result;
the original Hypervisor platform takes the analysis result as original representation information.
In a fifth possible implementation manner, the acquiring, by the original Hypervisor platform, original description information of the running virtual machine VM further includes:
the original Hypervisor platform acquires an original extensible markup language (XML) file and an original image file of the VM in the original Hypervisor platform, and at this time, the original description information further includes the original XML file and the original image file.
In a sixth possible implementation manner, when the original description information further includes an original XML file and an original image file of the VM in the original Hypervisor platform;
the step that the target Hypervisor platform modifies the original description information according to the target format information to obtain the target description information of the VM in the target Hypervisor platform further comprises the following steps:
the target Hypervisor platform acquires a target XML file corresponding to the target Hypervisor platform according to the file format of the XML file in the target format information and the original XML file;
the target Hypervisor platform acquires a target image file corresponding to the target Hypervisor platform according to the file format of the image file in the target format information and the original image file; the target description information also includes a target XML file and a target image file.
In a second aspect, a VM migration method between heterogeneous Hypervisor platforms is provided, where the method is used in an original Hypervisor platform, and the method includes a step related to an original Hypervisor platform side in the method of the first aspect.
In a third aspect, a VM migration method between heterogeneous Hypervisor platforms is provided, where the method is used in a target Hypervisor platform, and the method includes a step related to a target Hypervisor platform side in the method of the first aspect.
In a fourth aspect, a VM migration apparatus between heterogeneous Hypervisor platforms is provided, where the apparatus is used in an original Hypervisor platform to implement the functions of the second aspect. The functions can be realized by hardware, and the functions can also be realized by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the above-described functions.
In a fifth aspect, a VM migration apparatus between heterogeneous Hypervisor platforms is provided, where the apparatus is used in an original Hypervisor platform, and is configured to implement the function described in the third aspect. The functions can be realized by hardware, and the functions can also be realized by executing corresponding software by hardware. The hardware or software includes one or more modules corresponding to the above-described functions.
In a sixth aspect, a VM migration system between heterogeneous Hypervisor platforms is provided, where the system includes an original Hypervisor platform and a target Hypervisor platform. Wherein the original Hypervisor platform comprises the apparatus of the fourth aspect and the target Hypervisor platform comprises the apparatus of the fifth aspect.
These and other aspects of the invention are apparent from and will be elucidated with reference to the embodiments described hereinafter.
Drawings
FIG. 1 is a schematic diagram of an implementation environment in which various embodiments of the present invention are implemented.
Fig. 2 is a flowchart of a method for VM migration between heterogeneous Hypervisor platforms according to an embodiment of the present invention.
Fig. 3 is a schematic diagram of an original Agent generating original representation information according to an embodiment of the present invention.
Fig. 4 is a schematic structural diagram of a VM migration apparatus between heterogeneous Hypervisor platforms according to an embodiment of the present invention.
Fig. 5 is a schematic structural diagram of a VM migration apparatus between heterogeneous Hypervisor platforms according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention.
Referring to fig. 1, a schematic diagram of an implementation environment provided by various embodiments of the invention is shown. As shown in FIG. 1, the execution environment 100 includes an original Hypervisor platform 110, a target Hypervisor platform 120, and VMs 130 running on the original Hypervisor platform 110 that require migration to the target Hypervisor platform 120.
The Hypervisor platform is a computer system running on a host machine for providing a running environment and running resources for VMs. The host refers to a physically existing computer for bearing each virtual machine, and the operating resources provided by the Hypervisor platform for the VMs include instances, memories, and the like. Typically, the original Hypervisor platform 110 and the target Hypervisor platform 120 run in different hosts, which is not limited.
In the following embodiments, the original Hypervisor platform 110 refers to a platform where the VM130 is located before the migration, the target Hypervisor platform 120 refers to a platform where the VM130 is located after the migration, and the original Hypervisor platform 110 may communicate with the target Hypervisor platform 120. In actual implementation, multiple VMs may be running in both the original Hypervisor platform 110 and the target Hypervisor platform 120, only the VM130 that needs to be migrated is shown for example, and other VMs are not shown.
In various embodiments described below, the original Hypervisor platform 110 and the target Hypervisor platform 120 are heterogeneous platforms, that is, the original format of the original representation information of the VM130 in the memory of the original Hypervisor platform 110 is generally different from the target format of the representation information in the memory of the target Hypervisor platform 120. In addition, the format of the XML file of the VM130 in the original Hypervisor platform 110 may or may not be the same as the format of the XML file in the target Hypervisor platform 120, and similarly, the format of the image file in the original Hypervisor platform 110 may or may not be the same as the format of the image file in the target Hypervisor platform.
For example, the original Hypervisor platform 110 may be a platform in an XEN (open source code Virtual Machine monitor) virtualization environment, and the target Hypervisor platform 120 may be a platform in a KVM (Kernel-based Virtual Machine) virtualization environment. For another example, the original Hypervisor platform 110 may be a platform in a KVM virtualization environment, and the target Hypervisor platform 120 may be a platform in a Vmware virtualization environment. The embodiment does not limit the specific implementation of the original Hypervisor platform 110 and the target Hypervisor platform 120.
In various embodiments described below, as shown in fig. 1, an original Agent111 (Agent) may be deployed in the original Hypervisor platform 110, and a target Agent121 may be deployed in the target Hypervisor platform 120. The original Hypervisor platform 110 performs operations of information acquisition and sending the acquired information to the target Agent121 through the original Agent111, and similarly, the target Hypervisor platform 120 receives operations such as information sent by the original Agent111 and VM reconstruction through the target Agent121, which is not limited herein.
In practical implementation, the original Agent111 and the target Agent121 may be program code deployed in a Hypervisor platform, which is not limited thereto.
The VM130 refers to a VM running on the original Hypervisor platform 110 that needs to be migrated to the target Hypervisor platform 120. Traffic may be carried in VM 130.
Referring to fig. 2, a flowchart of a method for VM migration between heterogeneous Hypervisor platforms according to an embodiment of the present invention is shown, where the VM migration method is used in the implementation environment shown in fig. 1 for example. As shown in fig. 2, the VM migration method includes:
in step 201, the original Hypervisor platform obtains the original description information of the running VM.
Multiple VMs can run in the original Hypervisor platform, and the original Hypervisor platform can acquire original description information of the VM to be migrated through an original Agent in the original Hypervisor platform. The original description information comprises original representation information of the VM in an internal memory of the original Hypervisor platform.
Optionally, this step may include the steps of:
first, the original Hypervisor platform obtains the original format of the VM in the memory of the original Hypervisor platform.
Optionally, the original Hypervisor platform may obtain, through the original Agent, an original format of the VM in the memory of the original Hypervisor platform.
The native format may include, among other things, a definition of a data structure for VM-related information presented in the native Hypervisor platform. Optionally, the original format may include fields contained in the data structure and a location to which each field corresponds. For example, the original format includes a VMCS, and the VMCS includes Guest _ cr (register) 0, Guest _ cr3, Guest _ cr4, Guest _ es _ base (Extra Segment register), Guest _ cs _ base (Code Segment register), Guest _ ss _ base (Stack Segment register), and Guest _ ds _ base (Data Segment register) fields as examples, and the corresponding positions of each field are position 1, position 2, position 3, position 4, position 5, position 6, and position 7, respectively.
Secondly, the original Hypervisor platform performs binary analysis on the information of the VMs in the memory according to the original format and a VMCS (Virtual Machine Communication Support) technology, and obtains an analysis result.
After the primitive Agent acquires the primitive format, the primitive Agent may perform binary model analysis on information related to the VM in the memory according to the primitive format and in combination with the definition of the VMCS in VT (Virtualization Technology), and obtain an analysis result.
Optionally, the original Agent may simulate to generate a data structure of an original VCPU (Virtual Central Processing Unit), an original EPT (Extended Page Tables) data structure, and an original VMCS data structure, and write VM-related information in the memory into the data structure according to an original format. Alternatively, the raw Agent may implement the definition of the above data structure fields in combination with VT hardware-assisted standardization. For example, taking the ES in the VMCS as an example, GUEST _ ES _ select is 0x 00000800.
For example, referring to FIG. 3, the original Agent abstracts the hardware 31 that the original Hypervisor platform presents to the VM into what is shown in the data structure 32. Fig. 3 is only an example of a part of hardware, and in actual implementation, the original Hypervisor platform may also present more or less hardware, which is not limited to this; in addition, fig. 3 only takes the abstract contents as examples, and in actual implementation, more or less contents may be included, which is not limited herein.
Thirdly, the original Hypervisor platform takes the analysis result as original representation information.
After that, the original Agent can use the original XML file, the original image file and the original representation information as the original description information of the VM in the original Hypervisor platform.
In actual implementation, the original Hypervisor platform may further obtain an original XML file and an original image file of the VM in the original Hypervisor platform, and the original XML file and the original image file are also used as original description information, which is not limited herein. The XML file is a configuration file configured for the VM, and the image file is a template for creating the VM.
Step 202, the original Hypervisor platform sends the original description information to the target Hypervisor platform.
The original Hypervisor platform can send original description information to a target Agent in the target Hypervisor platform through the original Agent.
In step 203, the target Hypervisor platform receives the original description information sent by the original Hypervisor platform.
Correspondingly, the target Agent receives the original description information sent by the original Agent.
Step 204, the target Hypervisor platform obtains target format information, where the target format information includes a file format of an XML file corresponding to the target Hypervisor platform, a file format of an image file, and a target format.
This step is similar to step 201, except that in this step, the target Agent obtains the target format. The target format is the format of the VM in the memory of the target Hypervisor platform. The object format includes various fields in the data structure and the corresponding location of each field.
Optionally, the object format information may further include a file format of an XML file of the VM and a file format of an image file when the VM is created in the object Hypervisor platform.
Step 205, the target Hypervisor platform obtains the target XML file corresponding to the target Hypervisor platform according to the file format of the XML file in the target format information and the original XML file.
Optionally, the target Hypervisor platform may detect whether a file format of the XML file in the target format information is consistent with a file format of the XML file in the original description information; if the XML files are consistent with the target XML file, the original XML files in the original description information are directly determined to be the target XML files corresponding to the target Hypervisor platform; and if the detection result is inconsistent, converting the original XML file into a file supported by the file format of the XML file in the target format information, and taking the conversion result as the target XML file corresponding to the target Hypervisor platform.
For example, the original Hypervisor platform is a platform in an XEN virtualization environment, the target Hypervisor platform is a platform in a KVM virtualization environment, and the target Hypervisor platform may convert, by the target Agent, an XML file in a VHD (Virtual Hard Disk) format in the XEN to an XML file in a QCOW2(QEMU Copy-On-Write) format On the KVM, which is not limited.
And step 206, the target Hypervisor platform acquires the target image file corresponding to the target Hypervisor platform according to the file format of the image file in the target format information and the original image file.
Optionally, the target Hypervisor platform may detect whether a file format of the image file in the target format information is consistent with a file format of the image file in the original description information; if the two images are consistent, directly determining the original image file in the original description information as a target image file corresponding to the target Hypervisor platform; and if the detection result is inconsistent, converting the original image file into a file supported by the file format of the image file in the target format information, and taking the conversion result as the target image file corresponding to the target Hypervisor platform.
Optionally, when the original description information does not include the original XML file and the original image file, step 205 and step 206 may also be excluded in the method, which is not described herein again.
And step 207, converting the original representation information by the target Hypervisor platform according to the target format, and obtaining the target representation information.
Optionally, this step may include the steps of:
first, the target Hypervisor platform generates a target data structure according to a target format.
The target Agent in the target Hypervisor platform can simulate the data structure of the VCPU, the EPT data structure and the VMCS data structure corresponding to the VM according to the target format.
In this embodiment, the target data structure includes the above several data structures for example, optionally, the target data structure may further include other data structures, and this embodiment does not limit this.
Secondly, the target Hypervisor platform writes the original representation information into a target data structure according to the difference between the original format and the target format to obtain the target representation information.
And then, the target Hypervisor platform can write the original representation information into the target data structure through the target Agent according to the difference between the original format and the target format, and the target data structure with the written data is used as the target content information.
The difference between the original format and the target format includes the difference of the corresponding positions of the same fields and the difference of the contained fields.
When the difference between the original format and the target format includes a difference between positions corresponding to the same field, the step may include: the target Agent can write the content in the original VCPU into the target VCPU according to the position of each field in the VCPU in the target format, and similarly, write the content in the original EPT into the target EPT according to the position of each field in the EPT in the target format, and write the content in the original VMCS into the target VMCS according to the position of each field in the target format.
For example, given Guest _ es _ base in the VMCS as an example, Guest _ es _ base is at location 4 in the original VMCS and at location 44 in the target VMCS, so the target Agent can write the contents of Guest _ es _ base in the original VMCS to location 44 of the target VMCS. Optionally, referring to the following table, the target Hypervisor platform may copy the content of each piece of information to the corresponding location of the piece of information in the target Hypervisor platform.
Figure BDA0001195644950000091
Figure BDA0001195644950000101
However, the difference between the original format and the target format includes the difference of the included fields, and if the target field is included in the original format of the original representation information, the target field is set to be invalid in the process of modifying the original representation information. The target field is a field which is included in the original format of the original representation information but not included in the target format of the target representation information.
For example, if the Guest _ cs _ base field is included in the original VMCS and the Guest _ cs _ base field is not included in the target VMCS field, the target Agent may set the content of the Guest _ cs _ base field in the original VMCS to be invalid in the modification process, which is not limited herein.
And step 208, the target Hypervisor platform rebuilds the VM according to the target description information.
Thereafter, the target Agent can rebuild the VM in the target Hypervisor platform according to the target description information. Alternatively, the target Agent may start a VM on the target Hypervisor platform and load the target description information for running access of the VM.
Optionally, after the target Hypervisor platform successfully rebuilds the VM, the target Hypervisor platform may send migration success information to the original Hypervisor platform. Optionally, the target Hypervisor platform may send the migration success information to the original Agent in the original Hypervisor platform through the target Agent.
In summary, in the VM migration method between heterogeneous Hypervisor platforms provided in this embodiment, in the process of running a VM in an original Hypervisor platform, original description information of the original Hypervisor platform is obtained, where the original description information includes original representation information of the VM in an internal memory of the original Hypervisor platform; sending original description information to a target Hypervisor platform, enabling the target Hypervisor platform to modify the received original description information according to the target format information, obtaining target description information, and reconstructing a VM according to the target description information; the target format information comprises a target format of the VM in a memory of a target Hypervisor platform; the problem that in the prior art, when the VM is migrated between heterogeneous Hypervisor platforms, the VM needs to be offline, namely, the service needs to be interrupted is solved; the effect of keeping the VM online in the VM migration process to avoid service interruption and further realizing smooth evolution among different platforms is achieved.
Meanwhile, through online migration of the VM among the heterogeneous platforms, the problem that in the prior art, due to the fact that formats of representation information of the VM in different platforms are different, when a new virtualization platform is introduced, the design in the existing virtualization platform needs to be overturned, and new platform capacity needs to be rebuilt and constructed is solved.
In the above embodiment, the step related to the original Hypervisor platform side may be separately implemented as a VM migration method of the original Hypervisor platform side, and the step related to the target Hypervisor platform side may be separately implemented as a VM migration method of the target Hypervisor platform side, which is not described herein again.
Referring to fig. 4, a schematic structural diagram of a VM migration apparatus between heterogeneous Hypervisor platforms according to an embodiment of the present invention is shown, where the apparatus is used in an original Hypervisor platform for example. As shown in fig. 4, the VM migration apparatus between heterogeneous hypervisors may include: an acquisition unit 410 and a transmission unit 420.
An obtaining unit 410, configured to perform step 201 described above.
A sending unit 420, configured to execute step 202.
In summary, in the VM migration apparatus between heterogeneous Hypervisor platforms provided in this embodiment, in the process that a VM runs in an original Hypervisor platform, original description information of the original Hypervisor platform is obtained, where the original description information includes original representation information of the VM in an internal memory of the original Hypervisor platform; sending original description information to a target Hypervisor platform, enabling the target Hypervisor platform to modify the received original description information according to the target format information, obtaining target description information, and reconstructing a VM according to the target description information; the target format information comprises a target format of the VM in a memory of a target Hypervisor platform; the problem that in the prior art, when the VM is migrated between heterogeneous Hypervisor platforms, the VM needs to be offline, namely, the service needs to be interrupted is solved; the effect of keeping the VM online in the VM migration process to avoid service interruption and further realizing smooth evolution among different platforms is achieved.
Referring to fig. 5, a schematic structural diagram of a VM migration apparatus between heterogeneous Hypervisor platforms according to an embodiment of the present invention is shown, where the apparatus is used in a target Hypervisor platform for example. As shown in fig. 5, the VM migration apparatus between heterogeneous hypervisors may include: a receiving unit 510, an obtaining unit 520, a modifying unit 530 and a reconstructing unit 540.
A receiving unit 510, configured to perform step 203.
An obtaining unit 520, configured to perform step 204.
A modifying unit 530, configured to perform steps 205 to 207.
A reconstruction unit 540, configured to perform the step 208.
In summary, in the VM migration apparatus between heterogeneous hypervisors provided in this embodiment, the original description information of the VM sent by the original Hypervisor platform is received, the received original description information is modified according to the target format information, the target description information is obtained, and the VM is reconstructed according to the target description information; the original description information comprises original representation information of the VM in an internal memory of an original Hypervisor platform, and the target format information comprises a target format of the VM in an internal memory of a target Hypervisor platform; the problem that in the prior art, when the VM is migrated between heterogeneous Hypervisor platforms, the VM needs to be offline, namely, the service needs to be interrupted is solved; the effect of keeping the VM online in the VM migration process to avoid service interruption and further realizing smooth evolution among different platforms is achieved.
An embodiment of the present invention further provides a VM migration system between heterogeneous Hypervisor platforms, where the system includes an original Hypervisor platform and a target Hypervisor platform. Wherein the content of the first and second substances,
the original Hypervisor platform includes a VM migration apparatus between heterogeneous Hypervisor platforms shown in fig. 4;
the target Hypervisor platform includes a VM migration apparatus between heterogeneous Hypervisor platforms shown in fig. 5.
In summary, in the VM migration method between heterogeneous Hypervisor platforms provided in this embodiment, in the process of running a VM in an original Hypervisor platform, original description information of the original Hypervisor platform is obtained, where the original description information includes original representation information of the VM in an internal memory of the original Hypervisor platform; sending original description information to a target Hypervisor platform, enabling the target Hypervisor platform to modify the received original description information according to the target format information, obtaining target description information, and reconstructing a VM according to the target description information; the target format information comprises a target format of the VM in a memory of a target Hypervisor platform; the problem that in the prior art, when the VM is migrated between heterogeneous Hypervisor platforms, the VM needs to be offline, namely, the service needs to be interrupted is solved; the effect of keeping the VM online in the VM migration process to avoid service interruption and further realizing smooth evolution among different platforms is achieved.
Meanwhile, through online migration of the VM among the heterogeneous platforms, the problem that in the prior art, due to the fact that formats of representation information of the VM in different platforms are different, when a new virtualization platform is introduced, the design in the existing virtualization platform needs to be overturned, and new platform capacity needs to be rebuilt and constructed is solved.
It should be noted that, for simplicity of description, the above-mentioned method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the present invention is not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the invention. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required by the invention.
While the invention has been described in connection with various embodiments, other variations to the disclosed embodiments can be understood and effected by those skilled in the art in practicing the claimed invention, from a review of the drawings, the disclosure, and the appended claims. In the claims, the word "comprising" does not exclude other elements or steps, and the word "a" or "an" does not exclude a plurality. A single processor or other unit may fulfill the functions of several items recited in the claims. The mere fact that certain measures are recited in mutually different dependent claims does not indicate that a combination of these measures cannot be used to advantage.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, server (device), or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may 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, and the like) having computer-usable program code embodied therein. A computer program stored/distributed on a suitable medium supplied together with or as part of other hardware, may also take other distributed forms, such as via the Internet or other wired or wireless telecommunication systems.
The present invention has been described with reference to flowchart illustrations and/or block diagrams of methods, servers (apparatus) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may 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, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While the invention has been described in conjunction with specific features and embodiments thereof, it will be evident that various modifications and combinations can be made thereto without departing from the spirit and scope of the invention. Accordingly, the specification and figures are merely exemplary of the invention as defined in the appended claims and are intended to cover any and all modifications, variations, combinations, or equivalents within the scope of the invention. It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (18)

1. A method for virtual machine migration between heterogeneous virtual machine monitor platforms, the method comprising:
the method comprises the steps that an original Hypervisor platform obtains original description information of a running virtual machine VM, wherein the original description information comprises original representation information of the VM, which is used for representing the VM in an original extensible markup language (XML) file, an original image file and an internal memory of the original Hypervisor platform in the original Hypervisor platform;
the original Hypervisor platform sends the original description information to a target Hypervisor platform, wherein a target format for representing the representation information of the VM in an internal memory of the target Hypervisor platform is different from an original format for representing the representation information of the VM in the internal memory of the original Hypervisor platform;
the target Hypervisor platform receives the original description information sent by the original Hypervisor platform;
the target Hypervisor platform acquires target format information, wherein the target format information comprises a file format of an XML file corresponding to the target Hypervisor platform, a file format of an image file and the target format;
the target Hypervisor platform modifies the original description information according to the target format information to obtain target description information of the VM in the target Hypervisor platform;
and the target Hypervisor platform reconstructs the VM according to the target description information.
2. The method according to claim 1, wherein the modifying, by the target Hypervisor platform, the original description information according to the target format information to obtain the target description information of the VM in the target Hypervisor platform includes:
the target Hypervisor platform converts the original representation information according to the target format and obtains target representation information; the object description information includes the object representing information.
3. The method according to claim 2, wherein the converting the original representation information by the target Hypervisor platform according to the target format and obtaining target representation information comprises:
the target Hypervisor platform generates a target data structure according to the target format;
and the target Hypervisor platform writes the original representation information into the target data structure according to the difference between the original format and the target format to obtain the target representation information.
4. The method according to claim 2 or 3,
and if the original format of the original representation information comprises a target field, setting the target field as invalid in the process of modifying the original representation information, wherein the target field is a field which is included in the original format of the original representation information but is not included in the target format of the target representation information.
5. The method according to claim 1, wherein the obtaining of the original description information of the running virtual machine VM by the original Hypervisor platform comprises:
the original Hypervisor platform acquires the original format of the VM in an internal memory of the original Hypervisor platform;
the original Hypervisor platform performs binary analysis on the VM information in the memory according to the original format and a virtual machine communication support VMCS technology, and obtains an analysis result;
and the original Hypervisor platform takes the analysis result as the original representation information.
6. The method according to claim 5, wherein the original Hypervisor platform obtains original description information of the running virtual machine VM, further comprising:
the original Hypervisor platform acquires an original extensible markup language (XML) file and an original image file of the VM in the original Hypervisor platform, and the original description information further includes the original XML file and the original image file.
7. The method according to claim 1, wherein the target Hypervisor platform modifies the original description information according to the target format information to obtain target description information of the VM in the target Hypervisor platform, further comprising:
the target Hypervisor platform acquires a target XML file corresponding to the target Hypervisor platform according to the file format of the XML file in the target format information and the original XML file;
the target Hypervisor platform acquires a target image file corresponding to the target Hypervisor platform according to the file format of the image file in the target format information and the original image file; the target description information also comprises the target XML file and the target image file.
8. A virtual machine migration method between heterogeneous virtual machine monitor platforms is used in an original Hypervisor platform, and the method comprises the following steps:
acquiring original description information of a running Virtual Machine (VM), wherein the original description information comprises an original extensible markup language (XML) file, an original image file and original representation information of the VM in a memory of an original Hypervisor platform, wherein the VM is in the original Hypervisor platform;
sending the original description information to a target Hypervisor platform; the target Hypervisor platform modifies the original description information according to the obtained target format information to obtain target description information of the VM in the target Hypervisor platform, and the VM is reconstructed according to the target description information; the target format information includes a file format of an XML file corresponding to the target Hypervisor platform, a file format of an image file, and a target format in the memory of the target Hypervisor platform for representing the representation information of the VM, and the target format is different from an original format in the memory of the original Hypervisor platform for representing the representation information of the VM.
9. A virtual machine migration method between heterogeneous virtual machine monitor platforms is used in a target Hypervisor platform, and the method comprises the following steps:
receiving original description information of a running virtual machine VM sent by an original Hypervisor platform; the original description information comprises an original extensible markup language (XML) file, an original image file and original representation information of the VM in an internal memory of the original Hypervisor platform, wherein the VM is in the original XML file of the original Hypervisor platform; the target format of the representation information used for representing the VM in the memory of the target Hypervisor platform is different from the original format of the representation information used for representing the VM in the memory of the original Hypervisor platform;
acquiring target format information, wherein the target format information comprises a file format of an XML file corresponding to the target Hypervisor platform, a file format of an image file and the target format;
modifying the original description information according to the target format information to obtain target description information of the VM in the target Hypervisor platform;
and rebuilding the VM according to the target description information.
10. The method according to claim 9, wherein the modifying the original description information according to the target format information to obtain the target description information of the VM in the target Hypervisor platform includes:
converting the original representation information according to the target format to obtain target representation information; the object description information includes the object representing information.
11. The method of claim 10, wherein converting the original representation information according to the target format and obtaining target representation information comprises:
generating a target data structure according to the target format;
and writing the original representation information into the target data structure according to the difference between the original format and the target format to obtain the target representation information.
12. The method according to claim 10 or 11,
and if the original format of the original representation information comprises a target field, setting the target field as invalid in the process of modifying the original representation information, wherein the target field is a field which is included in the original format of the original representation information but is not included in the target format of the target representation information.
13. An apparatus for virtual machine migration between heterogeneous Hypervisor platforms, the apparatus comprising:
an obtaining unit, configured to obtain original description information of a running VM, where the original description information includes an original XML file of the VM in an original Hypervisor platform, an original image file, and original representation information of the VM in a memory of the original Hypervisor platform;
the sending unit is used for sending the original description information acquired by the acquiring unit to a target Hypervisor platform; the target Hypervisor platform modifies the original description information according to the obtained target format information to obtain target description information of the VM in the target Hypervisor platform, and the VM is reconstructed according to the target description information; the target format information includes a file format of an XML file corresponding to the target Hypervisor platform, a file format of an image file, and a target format in the memory of the target Hypervisor platform for representing the representation information of the VM, and the target format is different from an original format in the memory of the original Hypervisor platform for representing the representation information of the VM.
14. An apparatus for virtual machine migration between heterogeneous Hypervisor platforms, the apparatus comprising:
the system comprises a receiving unit, a processing unit and a processing unit, wherein the receiving unit is used for receiving original description information of a running virtual machine VM sent by an original Hypervisor platform; the original description information comprises an original extensible markup language (XML) file, an original image file and original representation information of the VM in an internal memory of the original Hypervisor platform, wherein the VM is in the original XML file of the original Hypervisor platform; the target format of the representation information used for representing the VM in the memory of the target Hypervisor platform is different from the original format of the representation information used for representing the VM in the memory of the original Hypervisor platform;
the system comprises an acquisition unit, a processing unit and a display unit, wherein the acquisition unit is used for acquiring target format information, and the target format information comprises a file format of an XML file corresponding to a target Hypervisor platform, a file format of an image file and the target format;
a modification unit, configured to modify the original description information according to the target format information acquired by the acquisition unit, so as to obtain target description information of the VM in the target Hypervisor platform;
and the rebuilding unit is used for rebuilding the VM according to the target description information modified by the modifying unit.
15. The apparatus of claim 14,
the modification unit is also used for converting the original representation information according to the target format and obtaining target representation information; the object description information includes the object representing information.
16. The apparatus of claim 15, wherein the modifying unit is further configured to:
generating a target data structure according to the target format;
and writing the original representation information into the target data structure according to the difference between the original format and the target format to obtain the target representation information.
17. The apparatus of claim 15 or 16,
the modifying unit is further configured to, when a target field is included in the original format of the original representation information, set the target field as invalid in a process of modifying the original representation information, where the target field is a field included in the original format of the original representation information but not included in the target format of the target representation information.
18. A virtual machine migration system between heterogeneous virtual machine monitor platforms is characterized in that the system comprises an original Hypervisor platform and a target Hypervisor platform;
the original Hypervisor platform comprises a virtual machine migration apparatus between heterogeneous virtual machine monitor platforms as claimed in claim 13;
the target Hypervisor platform comprises a virtual machine migration apparatus between heterogeneous Hypervisor platforms as claimed in any one of claims 14 to 17.
CN201611237531.8A 2016-12-28 2016-12-28 Virtual machine migration method, device and system between heterogeneous virtual machine monitor platforms Active CN108255570B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611237531.8A CN108255570B (en) 2016-12-28 2016-12-28 Virtual machine migration method, device and system between heterogeneous virtual machine monitor platforms

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611237531.8A CN108255570B (en) 2016-12-28 2016-12-28 Virtual machine migration method, device and system between heterogeneous virtual machine monitor platforms

Publications (2)

Publication Number Publication Date
CN108255570A CN108255570A (en) 2018-07-06
CN108255570B true CN108255570B (en) 2021-06-15

Family

ID=62719478

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611237531.8A Active CN108255570B (en) 2016-12-28 2016-12-28 Virtual machine migration method, device and system between heterogeneous virtual machine monitor platforms

Country Status (1)

Country Link
CN (1) CN108255570B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11231953B2 (en) 2019-08-21 2022-01-25 Red Hat, Inc. Minimizing downtime when importing virtual machines from other platforms
CN113553143B (en) * 2021-09-18 2022-01-07 云宏信息科技股份有限公司 Heterogeneous method of virtualized resource pool, readable storage medium and virtualization platform

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102521014A (en) * 2011-12-06 2012-06-27 北京航空航天大学 Deploying method and deploying device for virtual machine
CN105159760A (en) * 2014-05-27 2015-12-16 中国电信股份有限公司 Cloud resource migration method and unified cross-platform cloud resource migration capability open interface

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110126197A1 (en) * 2009-11-25 2011-05-26 Novell, Inc. System and method for controlling cloud and virtualized data centers in an intelligent workload management system
US9086892B2 (en) * 2010-11-23 2015-07-21 International Business Machines Corporation Direct migration of software images with streaming technique
KR101581531B1 (en) * 2014-02-28 2016-01-11 단국대학교 산학협력단 Method for live migration of virtual machine and apparatus therefor
CN103885830B (en) * 2014-04-16 2017-02-15 中国科学院软件研究所 Data processing method used in cross-data-center live migration process of virtual machine
CN105912389B (en) * 2016-04-06 2019-03-08 易云捷讯科技(北京)股份有限公司 The virtual machine (vm) migration system under mixing cloud environment is realized based on data virtualization
CN106201702A (en) * 2016-07-19 2016-12-07 浪潮(北京)电子信息产业有限公司 The method of virtual machine (vm) migration, system and cloud computing management platform

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102521014A (en) * 2011-12-06 2012-06-27 北京航空航天大学 Deploying method and deploying device for virtual machine
CN105159760A (en) * 2014-05-27 2015-12-16 中国电信股份有限公司 Cloud resource migration method and unified cross-platform cloud resource migration capability open interface

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
利用虚拟机动态迁移技术整合模拟和虚拟环境;杨子夜;《中国优秀硕士学位论文全文数据库信息科技辑》;20091215;第I138-940页 *

Also Published As

Publication number Publication date
CN108255570A (en) 2018-07-06

Similar Documents

Publication Publication Date Title
US10324748B2 (en) Augmented tracking of modified memory pages during live migration of virtual machines from/to host computers with graphics processors
US8464259B2 (en) Migrating virtual machines configured with direct access device drivers
US8635395B2 (en) Method of suspending and resuming virtual machines
US9842032B2 (en) Memory first live snapshot
US10216585B2 (en) Enabling disk image operations in conjunction with snapshot locking
US9164790B2 (en) Live virtual machine template creation
US9588793B2 (en) Creating new virtual machines based on post-boot virtual machine snapshots
US11487523B2 (en) Updating machine emulator
CN107209683B (en) Backup image restore
US20150067390A1 (en) Live snapshot of a virtual machine
US9804878B2 (en) Using a status indicator for a merge operation for writing data associated with a virtual machine
US10489250B2 (en) Backup validation of virtual desktop infrastructure system
CN108255570B (en) Virtual machine migration method, device and system between heterogeneous virtual machine monitor platforms
US9336216B2 (en) Command-based data migration
US10705865B2 (en) Disk resize of a virtual machine
US11256530B2 (en) Targeted page migration for guest virtual machine
US9740544B2 (en) Live snapshotting of multiple virtual disks in networked systems
US10503659B2 (en) Post-copy VM migration speedup using free page hinting
CN108108229B (en) Virtual host migration system, method, computer device and readable storage medium
US9436489B2 (en) Virtual machine data replication with shared resources
US9684529B2 (en) Firmware and metadata migration across hypervisors based on supported capabilities
US9058299B2 (en) Efficient copying between storage devices
US9104634B2 (en) Usage of snapshots prepared by a different host

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant