WO2014082459A1 - 实现虚拟机热迁移的方法、装置及系统 - Google Patents
实现虚拟机热迁移的方法、装置及系统 Download PDFInfo
- Publication number
- WO2014082459A1 WO2014082459A1 PCT/CN2013/079570 CN2013079570W WO2014082459A1 WO 2014082459 A1 WO2014082459 A1 WO 2014082459A1 CN 2013079570 W CN2013079570 W CN 2013079570W WO 2014082459 A1 WO2014082459 A1 WO 2014082459A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- virtual machine
- temporary data
- memory page
- management device
- migration
- Prior art date
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5083—Techniques for rebalancing the load in a distributed system
- G06F9/5088—Techniques for rebalancing the load in a distributed system involving task migration
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/0614—Improving the reliability of storage systems
- G06F3/0619—Improving the reliability of storage systems in relation to data integrity, e.g. data losses, bit errors
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0646—Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
- G06F3/0647—Migration mechanisms
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0646—Horizontal data movement in storage systems, i.e. moving data in between storage devices or systems
- G06F3/065—Replication mechanisms
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0668—Interfaces specially adapted for storage systems adopting a particular infrastructure
- G06F3/0671—In-line storage system
- G06F3/0683—Plurality of storage devices
- G06F3/0685—Hybrid storage combining heterogeneous device types, e.g. hierarchical storage, hybrid arrays
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/48—Program initiating; Program switching, e.g. by interrupt
- G06F9/4806—Task transfer initiation or dispatching
- G06F9/4843—Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
- G06F9/485—Task life-cycle, e.g. stopping, restarting, resuming execution
- G06F9/4856—Task life-cycle, e.g. stopping, restarting, resuming execution resumption being on a different machine, e.g. task migration, virtual machine migration
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
- G06F2009/4557—Distribution of virtual machine instances; Migration and load balancing
Definitions
- Embodiments of the present invention relate to virtualized computer systems and, more particularly, to methods, apparatus, and systems for implementing virtual machine hot migration.
- Virtual machine technology is being widely used in the field of information technology and is infiltrating into the field of communication.
- the hot migration technology is a major technical highlight of virtual machines. It enables virtual machines to migrate between two physical machines, and the migration process has little impact on business processing.
- the existing virtual machine hot migration technology uses a pre-copy method. The method first copies all the memory pages of the virtual machine from the source physical machine to the target physical machine, and monitors all the memory pages during the copying process, marking the pages that were changed during the copying process as dirty pages; After all the memory is copied, the generated dirty pages are copied. It should be noted that some memory pages may be changed during the dirty page copying process.
- the changed memory pages also need to be marked as Dirty pages, so that the next dirty page can be copied from the source physical machine to the target physical machine.
- the embodiment of the invention provides a method, a device and a system for implementing virtual machine hot migration, so as to save system resources during the hot migration of the virtual machine.
- an embodiment of the present invention provides a method for implementing virtual machine hot migration, the method comprising: determining, by a source virtual machine migration management device on a source physical machine, a non-temporary data memory page of a virtual machine on the source physical machine; The non-temporary data memory page is copied from the source physical machine to the target physical machine; the dirty page generated during the copying process of the non-temporary data memory page is cyclically copied from the source physical machine to the target physical machine until unreplicated The ratio of the number of dirty pages to the number of non-temporary data memory pages is lower than a preset value; when the ratio of the number of unreplicated dirty pages to the number of non-temporary data memory pages is lower than the preset value, Perform a migration to the virtual machine.
- the performing the migration to the virtual machine includes: stopping the running of the virtual machine; the dirty page that is not copied, and a temporary data memory page on the virtual machine, Copying from the source physical machine to the target physical machine; sending, to the target virtual machine migration management device on the target physical machine, first indication information, where the first indication information is used to indicate that the target virtual machine migration management device is on the target physical machine Restore the virtual machine.
- the performing the migration to the virtual machine includes:: by using a migration pre-notification interface, notifying the virtual machine to stop running the temporary data process; acquiring the pre-notification interface through the migration When the virtual machine notification stops responding successfully, the virtual machine is stopped, and the stop success response is used to indicate that the virtual machine stops running the temporary data process successfully; the unreplicated dirty page is copied from the source physical machine to the target a physical machine sends a first indication information to the target virtual machine migration management device on the target physical machine, where the first indication information is used to indicate the target virtual machine migration management The device restores the virtual machine on the target physical machine.
- the method further includes: sending, to the target virtual machine migration management device, second indication information, where the second indication information is used to indicate The target virtual machine migration management device notifies the virtual machine to restart the temporary data process that is stopped by the migration completion notification interface.
- the temporary data memory page includes: obtaining, by the temporary data process memory page registration interface, information of the temporary data memory page notified by the virtual machine; determining, according to the information of the temporary data memory page, the memory page except the temporary data on the virtual machine
- the memory page is a non-temporary data memory page.
- an embodiment of the present invention provides a method for implementing virtual machine hot migration, the method comprising: determining, by a virtual machine on a source physical machine, a temporary data memory page of a virtual machine; and using a temporary data process memory page registration interface, The information of the temporary data memory page notifies the source virtual machine migration management device on the source physical machine, so that the source virtual machine migration management device determines the non-temporary data memory page of the virtual machine according to the information of the temporary data memory page, and The non-temporary data memory page is copied during the hot migration of the virtual machine from the source physical machine to the target physical machine.
- the method further The method includes: obtaining, by using a migration pre-notification interface, a notification of stopping the running temporary data process notified by the source virtual machine migration management device; stopping the running temporary data process according to the notification of stopping the running temporary data process; stopping the running of the temporary data process successfully Notifying the source virtual machine migration management device of the stop success response by the migration pre-notification interface, so that the source virtual machine migration management device stops running the virtual machine according to the stop success response, and indicates the target virtual on the target physical machine
- the machine migration management device restores the virtual machine on the target physical machine.
- the method further includes: when the virtual machine is restored by the target virtual machine migration management device, the virtual machine obtains a notification of restarting the temporary data process notified by the target virtual machine migration management device by using the migration completion notification interface; according to the restarting The notification of the temporary data process restarts the temporary data process that was stopped.
- the determining the temporary data memory page includes: obtaining an application notification by using a temporary data process registration interface The information of the temporary data process; according to the information of the temporary data process, determine that the memory page occupied by the temporary data process is a temporary data memory page.
- the determining the temporary data memory page includes: determining a temporary data dedicated memory block; determining the All memory pages in the temporary data private memory block are temporary data memory pages; the method further includes: obtaining a type of the process notified by the application by creating a process interface, the type of the process includes a temporary data process or a persistent data process; When the type of a process is a temporary data process, the temporary data process is allocated a memory page in the temporary data private memory block.
- an embodiment of the present invention provides a virtual machine migration management apparatus, where the virtual machine migration management apparatus includes: a determining module, configured to determine a non-temporary data memory page of a virtual machine on the source physical machine; Copying the non-temporary data memory page determined by the determining module from the source physical machine to the target physical machine, and copying the dirty page generated during the copying process of the non-temporary data memory page from the source physical machine to the target physical
- the ratio of the number of dirty pages that are not copied to the number of non-temporary data memory pages is lower than a preset value; the migration module, the number of dirty pages that are not copied in the copy module, and the non-temporary data memory
- the migration of the virtual machine is performed when the ratio of the number of pages is lower than the preset value.
- the migration module includes: a first stop running unit, configured to stop running the virtual machine; and a first copy unit, configured to stop running in the first stop running unit After the virtual machine, the remaining dirty pages generated during the copying process of the non-temporary data memory page and the temporary data memory pages on the virtual machine are copied from the source physical machine to the target physical machine; a sending unit, configured to send first indication information to the target virtual machine migration management device on the target physical machine after the first copy unit copies the unreplicated dirty page and the temporary data memory page on the virtual machine, where The first indication information is used to indicate that the target virtual machine migration management device restores the virtual machine on the target physical machine.
- the migrating module includes: a first notification unit, configured to notify the virtual machine to stop running the temporary data process by using a migration pre-notification interface; Obtaining a stop success response of the virtual machine notification by using the migration pre-notification interface, the stop success response is used to indicate that the virtual machine stops running the temporary data process according to the notification of the first notification unit; and the second stop operation unit uses Stopping the running of the virtual machine when the first obtaining unit obtains the stop success response of the virtual machine notification; and the second copying unit is configured to: after the second stopping unit stops running the virtual machine, the second acquiring unit is not copied The dirty page is copied from the source physical machine to the target physical machine; the second sending unit is configured to, after the second copy unit copies the unreplicated dirty page from the source physical machine to the target physical machine, The target virtual machine migration management device on the target physical machine sends first indication information, where the first indication information is used to indicate the Standard virtual machine migration management apparatus to restore the virtual machine on the target physical
- the virtual machine migration management device further includes: a sending module, configured to send a second indication to the target virtual machine migration management device The second indication information is used to indicate that the target virtual machine migration management device notifies the virtual machine to restart the temporary data process that is stopped by the migration completion notification interface.
- the determining module includes: Obtaining, by the temporary data process memory page registration interface, the information of the temporary data memory page notified by the virtual machine; determining, configured to determine, according to the information of the temporary data memory page acquired by the acquiring unit, the virtual machine The memory page outside the temporary data memory page is a non-temporary data memory page.
- an embodiment of the present invention provides a virtual machine, where the virtual machine includes: a determining module, a temporary data memory page for determining the virtual machine; a notification module, configured to notify the source virtual machine migration management device on the source physical machine by using the temporary data process memory page registration interface, and the information of the temporary data memory page determined by the determining module So that the source virtual machine migration management device determines the non-temporary data memory page of the virtual machine according to the information of the temporary data memory page and copies the non-temporary during the migration of the virtual machine from the source physical machine to the target physical machine.
- Data memory page where the virtual machine includes: a determining module, a temporary data memory page for determining the virtual machine; a notification module, configured to notify the source virtual machine migration management device on the source physical machine by using the temporary data process memory page registration interface, and the information of the temporary data memory page determined by the determining module So that the source virtual machine migration management device determines the non-temporary data memory page of the virtual machine according to the information of the temporary data memory page and
- the virtual machine further includes: a first acquiring module, configured to notify the information of the temporary data memory page by the notification module by using a temporary data process memory page registration interface After the source virtual machine migration management device on the source physical machine, the notification of the stop running temporary data process notified by the source virtual machine migration management device is obtained by using the migration pre-notification interface; and the running module is configured to be acquired according to the first acquisition module.
- the notification of stopping the running of the temporary data process stops the running of the temporary data process; the notification module is further configured to notify the source virtual by stopping the successful response through the migration pre-notification interface when the stop running module stops running the temporary data process
- the device migration management device so that the source virtual machine migration management device stops running the virtual machine according to the stop success response, and instructs the target virtual machine migration management device on the target physical machine to restore the virtual machine on the target physical machine.
- the virtual machine further includes: a second obtaining module, configured to: when the virtual machine is restored by the target virtual machine migration management device And obtaining, by using the migration completion notification interface, a notification of restarting the temporary data process notified by the target virtual machine migration management device; and a startup module, configured to restart according to the notification of the restart temporary data process acquired by the second acquisition module Stop the temporary data process running.
- a second obtaining module configured to: when the virtual machine is restored by the target virtual machine migration management device And obtaining, by using the migration completion notification interface, a notification of restarting the temporary data process notified by the target virtual machine migration management device
- a startup module configured to restart according to the notification of the restart temporary data process acquired by the second acquisition module Stop the temporary data process running.
- the determining module includes: an acquiring unit, configured to register an interface by using a temporary data process, Acquiring information of the temporary data process of the application notification; determining unit, configured to determine, according to the information of the temporary data process acquired by the obtaining unit, that the memory page occupied by the temporary data process is a temporary data memory page.
- the determining module is specifically configured to determine a temporary data dedicated memory block, and determine the temporary data.
- All the memory pages in the dedicated memory block are temporary data memory pages;
- the virtual machine further includes: a third obtaining module, configured to acquire, by creating a process interface, a type of a process notified by the application, the type of the process includes a temporary data process or a persistent data process; an allocation module, configured to allocate a memory page in the temporary data private memory block to the temporary data process when the type of the process acquired by the third obtaining module is a temporary data process.
- an embodiment of the present invention provides a system for implementing virtual machine hot migration, where the system includes any one of the first to fourth possible virtual machine migration management devices of the third aspect or the third aspect.
- a method, device, and system for implementing virtual machine hot migration can not copy temporary data memory in a cyclic copy process of dirty pages by classifying processes and memory pages in a multi-process system. Pages only copy non-temporary data memory pages, which reduces the time spent on hot-migrating virtual machines, reduces system resources such as system CPU and network bandwidth caused by temporary data changes, saves system resources, and improves user experience.
- FIG. 5 is a schematic flowchart diagram of a method for implementing virtual machine hot migration according to another embodiment of the present invention.
- FIG. 6 is another schematic flowchart of a method for implementing virtual machine hot migration according to another embodiment of the present invention.
- FIG. ⁇ is still another flow diagram of a method for implementing virtual machine hot migration according to another embodiment of the present invention.
- FIG. 8 is still another schematic flow chart of a method for implementing virtual machine hot migration according to another embodiment of the present invention.
- FIG. 9 is still another flow diagram of a method for implementing virtual machine hot migration according to another embodiment of the present invention.
- FIG. 10 is a schematic block diagram of a virtual machine migration management apparatus according to an embodiment of the present invention.
- FIG. 11 is a schematic block diagram of a migration module of a virtual machine migration management apparatus according to an embodiment of the present invention.
- FIG. 12 is another schematic block diagram of a migration module of a virtual machine migration management apparatus according to an embodiment of the present invention.
- FIG. 13 is another schematic block diagram of a virtual machine migration management apparatus according to an embodiment of the present invention.
- Figure 14 is a schematic block diagram of a determining module of a virtual machine migration management apparatus according to an embodiment of the present invention.
- Figure 15 is a schematic block diagram of a virtual machine in accordance with an embodiment of the present invention.
- 16 is another schematic block diagram of a virtual machine in accordance with an embodiment of the present invention.
- FIG. 17 is still another schematic block diagram of a virtual machine according to an embodiment of the present invention.
- FIG. 18 is a schematic block diagram of a determining module of a virtual machine according to an embodiment of the present invention.
- FIG. 19 is still another schematic block diagram of a virtual machine according to an embodiment of the present invention.
- FIG. 20 is a schematic block diagram of a system for implementing virtual machine hot migration in accordance with an embodiment of the present invention.
- FIG. 21 is a schematic block diagram of a virtual machine migration management apparatus according to another embodiment of the present invention.
- FIG. 22 is another schematic block diagram of a virtual machine migration management apparatus according to another embodiment of the present invention.
- 23 is a schematic block diagram of a virtual machine in accordance with another embodiment of the present invention.
- FIG. 24 is a schematic block diagram of a system for implementing virtual machine hot migration according to another embodiment of the present invention.
- the technical solutions of the embodiments of the present invention can be applied to various virtual machine systems, for example: a virtual machine system based on vSphere software, a virtual machine based on a kernel (K Virtual Machine, called "KVM”), based on Xen software. Virtual machine system, etc. It should also be understood that the technical solution of the embodiments of the present invention can be applied to various virtualized computer systems, including a virtualized personal computer (Personal Computer, referred to as "PC”), a virtualized computer cluster system, and a virtualized Large computer systems or various virtualized supercomputers (Supercomputer).
- PC Personal Computer
- Supercomputer virtualized supercomputers
- FIG. 1A is a system architecture diagram of implementing virtual machine hot migration according to an embodiment of the present invention.
- the application on the source physical machine divides the process into a temporary data process and a persistent data process, and notifies the virtual machine on the source physical machine, and the virtual machine on the source physical machine determines the temporary data memory page occupied by the temporary data process and Persist the non-temporary data memory page occupied by the data process, and notify the source virtual machine migration management device on the source physical machine of the classification of the memory page, so that the source virtual machine migration management device migrates the virtual machine from the source physical machine to the target When using a physical machine, you can take different replication policies for temporary data memory pages and non-temporary data memory pages.
- the source physical machine and the target physical machine shown in FIG. 1A may include a supercomputer, a mainframe, a medium-sized machine, a minicomputer, a micro-machine or other various capable virtual machines.
- the physical device is not limited by the present invention.
- the application in the embodiment of the present invention may be various applications, and the source virtual machine migration management device and the target virtual machine migration management device may be implemented by dedicated hardware or by software, and the present invention is This is not limited.
- an embodiment of the present invention provides a method 100 for implementing virtual machine hot migration, which may be performed by a source virtual machine migration management device on a source physical machine.
- the method 100 includes:
- the source virtual machine migration management device on the source physical machine determines a non-temporary data memory page of the virtual machine on the source physical machine.
- the dirty page generated in the process of copying the non-temporary data memory page is cyclically copied from the source physical machine to the target physical machine, until the number of dirty pages that are not copied and the number of non-temporary data memory pages Ratio is lower than the preset value;
- S140 Perform a migration on the virtual machine when a ratio of the number of unreplicated dirty pages to the number of the non-temporary data memory pages is lower than the preset value.
- the method for implementing virtual machine hot migration in the embodiment of the present invention can not copy the temporary data memory page but only the non-temporary data during the cyclic copy process of the dirty page by classifying the process and the memory page in the multi-process system.
- the memory page reduces the time spent on virtual machine hot migration, reduces the waste of system resources such as system CPU and network bandwidth caused by temporary data changes, saves system resources, and improves user experience.
- an application in a multi-process system may divide a process into a temporary data process and a persistent data process according to functions and features of the process, where the temporary data process only generates temporary data, such as a temporary data buffer.
- Data, temporary variables, etc., persistent data processes are processes that can produce persistent data.
- the process generally generates data during the running process.
- the data can be temporary data or persistent data.
- the generated data can have both temporary data and persistent data.
- the application can determine whether the process generates persistent data after the process is created, and A process that only generates temporary data without generating persistent data is determined to be a temporary data process, and a process that can generate persistent data is determined to be a persistent data process.
- the application determines that the process is a temporary data process
- the information of the temporary data process can be notified to the virtual machine through the temporary data process registration interface.
- the application may also determine whether the process is a temporary data process when the process is created, and notify the virtual machine that the process is a temporary data process or a persistent data process by creating a process interface, so that the temporary data is registered on the virtual machine. process.
- the application may only notify the virtual machine of the temporary data process, and the virtual machine will default the process that is not notified to the persistent data process; optionally, the application may also notify the virtual machine of the temporary data process and the persistent data process.
- the embodiment of the invention is not limited thereto.
- the parameter of the temporary data process of the application notification virtual machine may be process information of the temporary data process, and the process information includes but is not limited to the process number of the temporary data process.
- the virtual machine can monitor the memory page occupied by the temporary data process, and the memory page occupied by the temporary data process or the dedicated memory block allocated by the virtual machine for the temporary data process is preset.
- the memory page is marked as a temporary data process memory page. Therefore, in the embodiment of the present invention, the memory page of the virtual machine can be divided into a non-temporary data memory page and a temporary data memory page, wherein the non-temporary data memory page is a memory page occupied by the persistent data process.
- the information of the temporary data memory page can be notified to the source virtual machine migration management device, so that the source virtual machine migration management device does not copy the temporary data memory page when the dirty page is cyclically copied.
- the source virtual machine migration management device determines a non-temporary data memory page on the virtual machine, including:
- the information of the temporary data memory page may include but is not limited to the number of the temporary data memory page and The number of temporary data memory pages.
- the source virtual machine migration management device may determine the temporary data memory page according to the information of the temporary data memory page, and determine that the memory page on the virtual machine except the temporary data memory page is a non-temporary data memory page, but the implementation of the present invention The example is not limited to this.
- the temporary data process memory page registration interface in the embodiment of the present invention may be used by the virtual machine to notify the virtual machine migration management device of the information of the temporary data memory page. It should be understood that the temporary data process memory page registration interface in the embodiment of the present invention is only a name of the interface having the above function, and optionally, the interface may also take other names, and the interface should be determined by its intrinsic function, instead of The name of the interface should be used as a definition of the interface in the embodiment of the present invention.
- the virtual machine may store information of the temporary data memory page, and dynamically notify the source virtual machine migration management device of the information of the temporary data memory page. Specifically, when the temporary data memory page occupied by the temporary data process is increased or decreased, the virtual machine may notify the source virtual machine migration management device only the information of the temporary data memory page that is increased or decreased, or may be based on the increased or decreased temporary.
- the information of the data memory page adjusts the information of the stored temporary data memory page, and notifies the source virtual machine migration management device of the information of the adjusted temporary data memory page, and the embodiment of the present invention is not limited thereto.
- the virtual machine may also pre-allocate a temporary data dedicated memory block of a certain capacity for the temporary data process. Specifically, the virtual machine may allocate a smaller capacity memory block as a temporary data dedicated memory block according to actual needs, and allocate a memory page of the temporary data dedicated memory block to the temporary data process. When the remaining memory of the temporary data dedicated memory block is lower than the required memory of the temporary data memory, the virtual machine selects a new memory block of a certain capacity and adds the new memory block to the temporary data dedicated memory block. In this way, the virtual machine can dynamically allocate memory blocks for temporary data processes, which is convenient and efficient.
- the virtual machine only needs to notify the source virtual machine migration management device of the information of all the memory pages in the initial temporary data memory block, and notify the source virtual machine of the change of the memory block when the temporary data memory block changes.
- the management device notifies the source virtual machine migration management device when the memory occupied by the temporary data process changes, thereby saving system overhead and facilitating management
- embodiments of the present invention are not limited thereto.
- the temporary data memory page can be bypassed during the first replication and the dirty copy of the dirty page.
- the (by-pass) function bypasses temporary data memory pages and only copies non-temporary data memory pages.
- the source virtual machine migration management device performs the first copy of the memory page on the virtual machine, and only copies the non-temporary data memory page during the first copying process, and will not be modified during the copying process. Temporary data memory pages are marked as dirty pages.
- the source virtual machine migration management apparatus executes S130, that is, performs a cyclic copy process of the dirty page, and the number of dirty pages that are not copied by the source virtual machine migration management apparatus and the number of the non-temporary data memory pages When the ratio is not lower than the preset value, the unreplicated dirty page is copied from the source physical machine to the target physical machine.
- the source virtual machine migration management device first copies the dirty page generated in the process of copying the non-temporary data memory page for the first time, and marks the memory page changed during the dirty page copying process as a dirty page. After each round of dirty page copying, the dirty pages generated during the previous round of dirty page copying are copied until the ratio of the number of dirty pages generated during the previous round of dirty page copying to the total number of non-temporary data memory pages. When it is lower than the preset value, the cyclic copy process of the dirty page is ended.
- the preset value may be a fixed value, but the embodiment of the present invention is not limited thereto.
- S140 the source virtual machine migration management device can stop running the virtual machine and copy the unreplicated dirty pages and temporary data memory pages during the loop replication process. Therefore, optionally, as shown in FIG. 3, S140 includes:
- S143a Send the first indication information to the target virtual machine migration management device on the target physical machine.
- the first indication information is used to indicate that the target virtual machine migration management device restores the virtual machine on the target physical machine.
- the source virtual machine migration management device stops running the virtual machine, and after the virtual machine stops running, the dirty page that is not copied, that is, the dirty page generated during the last copying process of the dirty copy of the dirty page, And the temporary data memory page is copied from the source physical machine to the target physical machine, after the copying process is completed, the source virtual machine migration management device sends the first indication information to the target virtual machine migration management device located on the target physical machine, so that the target The virtual machine migration management device restores the virtual machine on the target physical machine.
- restoring the virtual machine on the target physical machine refers to starting the virtual machine on the target physical machine, and restoring the state of the virtual machine to a state when it is stopped running on the source physical machine.
- the method for implementing virtual machine hot migration in the embodiment of the present invention can not copy the temporary data memory page but only the non-temporary data during the cyclic copy process of the dirty page by classifying the process and the memory page in the multi-process system.
- the memory page reduces the time spent on hot-migrating virtual machines, reduces the waste of system resources such as system CPU and network bandwidth caused by temporary data changes, saves system resources, and improves user experience.
- S140 includes:
- S141b notify the virtual machine to stop running the temporary data process by using the migration pre-notification interface
- S142b when the stop success response of the virtual machine notification is obtained through the migration pre-notification interface, stop running the virtual machine, and the stop successful response is used for Indicates that the virtual machine stopped running the temporary data process successfully
- S144b sending, to the target virtual machine migration management device on the target physical machine, first indication information, where the first indication information is used to indicate that the target virtual machine migration management device is restored on the target physical machine The virtual machine.
- the source virtual machine migration management device may notify the virtual machine to stop running the temporary data process, and stop running the virtual machine when the virtual machine stops successfully responding to indicate that the virtual machine successfully stops running the temporary data process.
- the memory page occupied by the temporary data process is released, and the source virtual machine migration management device can copy only the remaining dirty pages without copying the temporary data memory. Page, this can effectively reduce the number of copied memory pages, shorten the time required for replication, and further reduce the system CPU and network bandwidth consumption, improving the user experience.
- the migration pre-notification interface in the embodiment of the present invention may be used by the virtual machine migration management apparatus to notify the virtual machine of the stop running temporary data process, and may be used by the virtual machine to notify the virtual machine migration management apparatus of the stop success response.
- the migration pre-notification interface in the embodiment of the present invention is only a name of an interface having the above function, and optionally, the interface may also take other names, and the interface should be determined by its intrinsic function, and should not be The name of the interface is defined as the interface in the embodiment of the present invention. It should also be understood that, in the embodiment of the present invention, A notifies B through an interface that A sends a message to B through the interface, or A calls the interface, but the embodiment of the present invention is not limited thereto.
- the source virtual machine migration management device may also instruct the target virtual machine migration management device to restart the temporary data process stopped on the source physical machine on the target physical machine after the virtual machine is restored, thereby facilitating the user to continue using. Therefore, optionally, the method 100 further includes:
- the source virtual machine migration management device may send the first indication information and the second indication information to the target virtual machine migration management device at the same time, and the virtual machine migration management device may also send the second indication information after sending the first indication information, therefore, S150 may be performed simultaneously with S144b, or may be performed after S144, and embodiments of the present invention are not limited thereto.
- the target virtual machine migration management device may notify the virtual machine to restart the temporary data process on the target physical machine, or notify the virtual machine to restart the application of the temporary data process and notify the application to restart the temporary data process, but the present invention The embodiment is not limited to this.
- the migration completion notification interface in the embodiment of the present invention may be used by the virtual machine migration management apparatus to notify the virtual machine to restart the temporary data process that is stopped on the target physical machine. It should be understood that the migration completion notification interface in the embodiment of the present invention is only a name of an interface having the above function. Optionally, the interface may also take other names, and the interface should be determined by its intrinsic function, and should not be The name of the interface is defined as the interface in the embodiment of the present invention.
- the method for implementing virtual machine hot migration in the embodiment of the present invention can not copy the temporary data memory page but only the non-temporary data during the cyclic copy process of the dirty page by classifying the process and the memory page in the multi-process system.
- the memory page reduces the time spent on hot-migrating virtual machines, reduces the waste of system resources such as system CPU and network bandwidth caused by temporary data changes, saves system resources, and improves user experience.
- the method 200 can be performed by a virtual machine. As shown in FIG. 5, the method 200 includes:
- the virtual machine on the source physical machine determines a temporary data memory page of the virtual machine.
- S220 notify, by the temporary data process memory page registration interface, the information of the temporary data memory page to the source virtual machine migration management device on the source physical machine, so that the source virtual machine migration management device determines the virtual according to the information of the temporary data memory page.
- the virtual machine on the source physical machine determines the temporary data memory page, and notifies the source virtual machine migration tube located on the source physical machine through the temporary data process memory page registration interface.
- the device, the source virtual machine migration management device determines the temporary data memory page and the non-temporary data memory page on the virtual machine according to the information of the temporary data memory page, and processes the cyclic copy of the memory page and the dirty page for the first time Only the non-temporary data memory pages are copied in the middle without copying the temporary data memory pages.
- the method for implementing virtual machine hot migration in the embodiment of the present invention can not copy the temporary data memory page but only the non-temporary data during the cyclic copy process of the dirty page by classifying the process and the memory page in the multi-process system.
- the memory page reduces the time spent on hot-migrating virtual machines, reduces the waste of system resources such as system CPU and network bandwidth caused by temporary data changes, saves system resources, and improves user experience.
- the virtual machine may obtain the information of the temporary process of the application notification through the temporary data process registration interface.
- S210 includes:
- S211a Obtain information of the temporary data process notified by the application through the temporary data process registration interface; S212a, according to the information of the temporary data process, determine that the memory page occupied by the temporary data process is a temporary data memory page.
- the application may determine whether the process is a temporary data process after the process is created. When the process is a temporary data process, the information of the temporary data process is notified to the virtual machine through the temporary data process registration interface.
- the temporary data process registration interface in the embodiment of the present invention may be used by an application on the virtual machine to notify the virtual machine migration management apparatus of the information of the temporary data process. It should be understood that the temporary data process registration interface in the embodiment of the present invention is only a name of an interface having the above function. Optionally, the interface may also take other names, and the interface should be determined by its intrinsic function, and should not be The name of the interface is defined as the interface in the embodiment of the present invention.
- S210 includes:
- the method 200 further includes:
- the virtual machine may pre-allocate a temporary data dedicated memory block of a certain capacity for the temporary data process, and select the memory allocated to the temporary data process in the temporary data dedicated memory block.
- the virtual machine determines whether the process is a temporary data process when the process is created, and notifies the virtual machine that the process is a temporary data process or a persistent data process by creating a process registration interface, but the embodiment of the present invention is not limited thereto.
- the method 200 further includes:
- S260 stopping the running of the temporary data process according to the notification of stopping the running temporary data process
- S270 when the running of the temporary data process is stopped, the migration pre-notification interface notifies the source virtual machine migration management apparatus of the stop success response, so that The source virtual machine migration management device stops running the virtual machine according to the stop success response and instructs the target virtual machine migration management device on the target physical machine to restore the virtual machine on the target physical machine.
- the source virtual machine migration management device can copy only the remaining dirty pages without copying the temporary data memory page. It can effectively reduce the number of copied memory pages, shorten the time required for replication, and further reduce the consumption of system CPU and network bandwidth, improving the user experience.
- the method 200 further includes:
- the completion notification interface acquires a notification of the restart temporary data process notified by the target virtual machine migration management device
- S290 Restart the temporary data process that is stopped according to the notification of restarting the temporary data process.
- the method for implementing virtual machine hot migration in the embodiment of the present invention can not copy the temporary data memory page but only the non-temporary data during the cyclic copy process of the dirty page by classifying the process and the memory page in the multi-process system.
- the memory page reduces the time spent on hot-migrating virtual machines, reduces the waste of system resources such as system CPU and network bandwidth caused by temporary data changes, saves system resources, and improves user experience.
- a method for hot-migrating a virtual machine according to an embodiment of the present invention is described in detail above with reference to FIG. 1 to FIG. 9.
- a virtual machine migration management apparatus and a virtual machine according to an embodiment of the present invention will be described in detail with reference to FIG. 10 to FIG. .
- FIG. 10 is a schematic block diagram of a virtual machine migration management apparatus 300 according to an embodiment of the present invention. As shown in FIG. 10, the virtual machine migration management apparatus 300 includes:
- a determining module 310 configured to determine a non-temporary data memory page of the virtual machine on the source physical machine; and a copying module 320, configured to copy the non-temporary data memory page determined by the determining module 310 from the source physical machine to the target physical machine, And copying the dirty page generated during the copying of the non-temporary data memory page from the source physical machine to the target physical machine until the ratio of the number of dirty pages that are not copied to the number of non-temporary data memory pages is low At a preset value;
- the migration module 330 is configured to perform migration on the virtual machine when the ratio of the number of dirty pages that are not copied by the replication module 320 to the number of non-temporary data memory pages is lower than the preset value.
- the virtual machine migration management apparatus of the embodiment of the present invention passes the process in the multi-process system.
- Classification with memory pages which can copy non-temporary data memory pages and copy non-temporary data memory pages during cyclic copying of dirty pages, thereby reducing the time required for hot migration of virtual machines and reducing the system caused by temporary data changes.
- the waste of system resources such as CPU and network bandwidth saves system resources and improves user experience.
- the virtual machine migration management device can stop the virtual machine and copy the temporary data memory page.
- the migration module 330 includes:
- a first stop running unit 331a configured to stop running the virtual machine
- the first copy unit 332a is configured to: after the first stop running unit 331a stops running the virtual machine, copy the unreplicated dirty page and the temporary data memory page on the virtual machine from the source physical machine to the Target physical machine;
- the first sending unit 333a is configured to send, after the first copy unit 332a copies the unreplicated dirty page and the temporary data memory page on the virtual machine, to the target virtual machine migration management device on the target physical machine
- the indication information is used to indicate that the target virtual machine migration management device restores the virtual machine on the target physical machine.
- the virtual machine migration management device may stop running the temporary data process before stopping the running of the virtual machine, and the temporary data memory page does not have to be copied after the virtual machine is stopped. Therefore, optionally, as another embodiment, as shown in the figure As shown in FIG. 12, the migration module 330 includes:
- a first notification unit 331b configured to notify the virtual machine to stop running the temporary data process by using a migration pre-notification interface
- the first obtaining unit 332b is configured to obtain, by using the migration pre-notification interface, a stop success response of the virtual machine notification, where the stop success response is used to indicate that the virtual machine stops running the temporary data process according to the notification of the first notification unit 331b;
- the second stop running unit 333b is configured to stop running the virtual machine when the first obtaining unit 332b obtains the stop success response notified by the virtual machine;
- a second copy unit 334b configured to: when the second stop unit 333b stops running the virtual machine, Copying the unreplicated dirty page from the source physical machine to the target physical machine;
- the second sending unit 335b is configured to send, after the second copy unit 334b, the unreplicated dirty page from the source physical machine to the target physical machine, to the target virtual machine migration management device on the target physical machine
- An indication information is used to indicate that the target virtual machine migration management device restores the virtual machine on the target physical machine
- the virtual machine migration management apparatus 300 further includes: a sending module 340, configured to send, to the target virtual machine migration management apparatus, second indication information, where the second The indication information is used to indicate that the target virtual machine migration management device notifies the virtual machine to restart the temporary data process that is stopped by the migration completion notification interface.
- a sending module 340 configured to send, to the target virtual machine migration management apparatus, second indication information, where the second The indication information is used to indicate that the target virtual machine migration management device notifies the virtual machine to restart the temporary data process that is stopped by the migration completion notification interface.
- the determining module 310 includes: an obtaining unit 311, configured to acquire, by using a temporary data process memory page registration interface, information of a temporary data memory page notified by the virtual machine;
- the determining unit 312 is configured to determine, according to the information of the temporary data memory page acquired by the obtaining unit 311, that the memory page on the virtual machine except the temporary data memory page is a non-temporary data memory page.
- the virtual machine migration management apparatus 300 may correspond to the source virtual machine migration management apparatus in the embodiment of the present invention, and the above and other operations of the respective modules in the virtual machine migration management apparatus 300 and/or In order to realize the corresponding processes of the respective methods in FIG. 1 to FIG. 4, the functions are not described here.
- the virtual machine migration management apparatus of the embodiment of the present invention can not copy the temporary data memory page but only the non-temporary data memory page during the cyclic copy process of the dirty page by classifying the process and the memory page in the multi-process system. Therefore, the time consumption of the hot migration virtual machine is reduced, the system resources such as the system CPU and the network bandwidth caused by the temporary data change are reduced, the system resources are saved, and the user experience is improved.
- FIG. 15 is a schematic block diagram of a virtual machine 400 on a source physical machine according to an embodiment of the present invention. It should be noted that the virtual machine can also be applied to a target physical machine. This is not limited. As shown in FIG. 15, the virtual machine 400 includes:
- a determining module 410 configured to determine a temporary data memory page of the virtual machine on the source physical machine
- the notification module 420 configured to notify the source of the temporary data memory page determined by the determining module 410 by the temporary data process memory page registration interface a source virtual machine migration management device on the physical machine, so that the source virtual machine migration management device determines a non-temporary data memory page of the virtual machine according to the information of the temporary data memory page and thermally migrates the virtual machine from the source physical machine to The non-temporary data memory page is copied during the target physical machine.
- the virtual machine in the embodiment of the present invention can reduce the temporary data memory page and copy only the non-temporary data memory page during the cyclic copy process of the dirty page by classifying the process and the memory page in the multi-process system, thereby reducing
- the time required to hot-migrate virtual machines reduces the waste of system resources such as system CPU and network bandwidth caused by changes in temporary data, saving system resources and improving user experience.
- the virtual machine 400 further includes: a first obtaining module 430, configured to: in the notification module 420, the temporary data memory by using a temporary data process memory page registration interface After the information of the page is notified to the source virtual machine migration management device on the source physical machine, the notification of the stop running temporary data process notified by the source virtual machine migration management device is obtained by using the migration pre-notification interface;
- Stopping the running module 440 configured to stop running the temporary data process according to the notification of the stop running temporary data process acquired by the first obtaining module 430;
- the notification module 420 is further configured to notify the source virtual machine migration management device of the source virtual machine migration management device by using the migration pre-notification interface when the stop operation module 440 stops running the temporary data process. Stopping the virtual machine according to the stop success response and instructing the target virtual machine migration management device on the target physical machine to restore the virtual machine on the target physical machine.
- the virtual machine 400 further includes: a second obtaining module 450, configured to notify the migration completion when the virtual machine is restored by the target virtual machine migration management device. Interface, obtain the restart temporary notification of the target virtual machine migration management device notification Notification of the data process;
- the startup module 460 is configured to restart the temporary data process that is stopped according to the notification of the restart temporary data process acquired by the second obtaining module 450.
- the application may notify the virtual machine of the temporary data process through the temporary data process registration interface after the process is created. Therefore, as another embodiment, as shown in FIG. 18, the determining module 410 includes: a capturing unit 411, Information for obtaining a temporary data process of an application notification through a temporary data process registration interface;
- the determining unit 412 is configured to determine, according to the information of the temporary data process acquired by the obtaining unit 411, that the memory page occupied by the temporary data process is a temporary data memory page.
- the determining module 410 is specifically configured to determine a temporary data-specific memory block and determine that all memory pages in the temporary data-specific memory block are temporary data memory pages;
- the application can notify the virtual machine through the creation process interface when the process is created, and the virtual machine allocates corresponding memory for the temporary data process. Therefore, as shown in FIG. 19, the virtual machine 400 further includes:
- the third obtaining module 470 is configured to obtain, by creating a process interface, a type of a process notified by the application, where the type of the process includes a temporary data process or a persistent data process;
- the allocating module 480 is configured to allocate a memory page in the temporary data dedicated memory block for the temporary data process when the type of the process acquired by the third obtaining module 470 is a temporary data process.
- the above and other operations and/or functions of the respective modules in the virtual machine 400 are respectively omitted in order to implement the respective processes of the respective methods in FIGS. 5 to 9.
- FIG. 20 is a schematic block diagram of a system 500 for implementing virtual machine hot migration according to an embodiment of the present invention.
- the system for implementing virtual machine hot migration may be a source physical machine or a target physical machine in the foregoing methods and apparatus descriptions, or The system is not limited to the source physical machine or the target physical machine. As shown in FIG.
- the system 500 includes: a virtual machine migration management device 510 and a virtual machine 520, where the virtual machine
- the migration management device 510 may be any of the virtual machine migration management devices described in FIGS. 10 through 14, which may be any of the virtual machines described in FIGS. 15 through 19.
- the system for implementing virtual machine hot migration in the embodiment of the present invention can not copy the temporary data memory page but only the non-temporary data during the cyclic copy process of the dirty page by classifying the process and the memory page in the multi-process system.
- the memory page reduces the time spent on hot-migrating virtual machines, reduces the waste of system resources such as system CPU and network bandwidth caused by temporary data changes, saves system resources, and improves user experience.
- FIG. 21 is a schematic block diagram of a virtual machine migration management apparatus 600 according to an embodiment of the present invention.
- the virtual machine migration management apparatus 600 includes a storage unit 610, and a processor 620, such as a CPU, for executing instructions stored in the memory 610.
- a processor 620 such as a CPU
- the processor 620 is specifically configured to determine a non-temporary data memory page of the virtual machine on the source physical machine, and copy the non-temporary data memory page from the source physical machine to the target physical machine, and the non-temporary data memory
- the dirty page generated during the copying process of the page is cyclically copied from the source physical machine to the target physical machine until the ratio of the number of undiscovered dirty pages to the number of non-temporary data memory pages is lower than a preset value, and When the ratio of the number of unreplicated dirty pages to the number of non-temporary data memory pages is lower than the preset value, the virtual machine is migrated.
- the virtual machine migration management apparatus of the embodiment of the present invention can not copy the temporary data memory page but only the non-temporary data memory page during the cyclic copy process of the dirty page by classifying the process and the memory page in the multi-process system. , thereby reducing the time spent on hot-migrating virtual machines, reducing the waste of system resources such as system CPU and network bandwidth caused by temporary data changes, saving system resources and improving The user experience.
- the processor 620 is further configured to stop running the virtual machine, and copy the unreplicated dirty page and the temporary data memory page on the virtual machine from the source physical machine. Go to the target physical machine;
- the virtual machine migration management apparatus 600 further includes:
- the transmitter 630 is configured to send the first indication information to the target virtual machine migration management device on the target physical machine, where the first indication information is used to indicate that the target virtual machine migration management device recovers the virtual machine on the target physical machine.
- the processor 620 is further configured to notify the virtual machine to stop running the temporary data process by using a migration pre-notification interface, and obtain, by using the migration pre-notification interface, the virtual machine notification to indicate the The virtual machine stops running the temporary data process, successfully stops the successful response, and when the stop successful response to the virtual machine notification is obtained, stops the virtual machine, and copies the unreplicated dirty page from the source physical machine to the virtual machine Target physical machine;
- the transmitter 630 is further configured to send first indication information to the target virtual machine migration management device on the target physical machine after the virtual machine is stopped running, where the first indication information is used to indicate that the target virtual machine migration management device is in the The virtual machine is restored on the target physical machine.
- the transmitter 630 is further configured to send the second indication information to the target virtual machine migration management device, where the second indication information is used to indicate that the target virtual machine migration management device passes the migration completion notification.
- the interface notifies the virtual machine to restart the temporary data process that was stopped.
- the processor 620 is further configured to obtain, by using a temporary data process memory page registration interface, information about a temporary data memory page notified by the virtual machine, and determine, according to the information of the temporary data memory page.
- a memory page on a virtual machine other than the temporary data memory page is a non-temporary data memory page.
- the virtual machine migration management apparatus 600 may correspond to the source virtual machine migration management apparatus in the embodiment of the present invention, and each module in the virtual machine migration management apparatus 600.
- the above and other operations and/or functions are respectively implemented in order to implement the respective processes of the respective methods in FIGS. 1 to 4, and are not described herein again.
- the virtual machine migration management apparatus of the embodiment of the present invention can not copy the temporary data memory page but only the non-temporary data memory page during the cyclic copy process of the dirty page by classifying the process and the memory page in the multi-process system. Therefore, the time consumption of the hot migration virtual machine is reduced, the system resources such as the system CPU and the network bandwidth caused by the temporary data change are reduced, the system resources are saved, and the user experience is improved.
- FIG. 23 shows a schematic block diagram of a virtual machine 700 in accordance with an embodiment of the present invention.
- the virtual machine 700 includes a memory 710 and a processor 720 for executing instructions stored by the memory 710.
- the processor 720 is specifically configured to determine a temporary data memory page of the virtual machine on the source physical machine, and notify the source virtual machine migration on the source physical machine by using the temporary data process memory page registration interface. Administering the device, so that the source virtual machine migration management device determines the non-temporary data memory page of the virtual machine according to the information of the temporary data memory page and replicates during the hot migration of the virtual machine from the source physical machine to the target physical machine The non-temporary data memory page.
- the processor 720 is further configured to acquire, by using the migration pre-notification interface, a notification that the source virtual machine migration management device notifies the stop running temporary data process, and according to the stop running the temporary data process Notifying that the temporary data process is stopped, and when the temporary data process is stopped, the migration pre-notification interface notifies the source virtual machine migration management device of the stop success response, so that the source virtual machine migration management device succeeds according to the stop Responding to stopping the virtual machine and instructing the target virtual machine migration management device on the target physical machine to recover the virtual machine on the target physical machine.
- the processor 720 is further configured to: when the virtual machine is restored by the target virtual machine migration management device, acquire, by using the migration completion notification interface, a restart temporary that is notified by the target virtual machine migration management device. The notification of the data process, and according to the notification of restarting the temporary data process, restart the temporary data process that was stopped.
- the processor 720 is further configured to: obtain, by using a temporary data process registration interface, information about a temporary data process notified by the application, and determine, according to the information of the temporary data process, the memory occupied by the temporary data process.
- the page is a temporary data memory page.
- the processor 720 is further configured to determine a temporary data-specific memory block and determine that all memory pages in the temporary data-specific memory block are temporary data memory pages, and obtain the application by creating a process interface.
- the type of the notified process, the type of the process includes a temporary data process or a persistent data process, and when the type of the process is a temporary data process, the temporary data process is allocated a memory page in the temporary data private memory block.
- the virtual machine 700 may correspond to the virtual machine in the embodiment of the present invention, and the above and other operations and/or functions of the respective modules in the virtual machine 700 are respectively implemented in FIG. 5 to FIG. 9 .
- the corresponding process of each method, for the sake of cleaning, will not be repeated here.
- the virtual machine in the embodiment of the present invention can reduce the temporary data memory page and copy only the non-temporary data memory page during the cyclic copy process of the dirty page by classifying the process and the memory page in the multi-process system, thereby reducing
- the time required to hot-migrate virtual machines reduces the waste of system resources such as system CPU and network bandwidth caused by changes in temporary data, saving system resources and improving user experience.
- FIG. 24 is a schematic block diagram of a system 800 for implementing virtual machine hot migration according to an embodiment of the present invention.
- the system for implementing virtual machine hot migration may be a source physical machine or a target physical machine in the foregoing methods and apparatus descriptions, or The system is not limited to the source physical machine or the target physical machine.
- the system 800 includes: a virtual machine migration management device 810 and a virtual machine 820, where the virtual machine
- the migration management device 810 may be any of the virtual machine migration management devices described in FIGS. 21 to 22, which may be the virtual machine described in FIG.
- the system for implementing virtual machine hot migration in the embodiment of the present invention can not copy the temporary data memory page but only the non-temporary data during the cyclic copy process of the dirty page by classifying the process and the memory page in the multi-process system.
- Memory pages which reduce the time spent on hot-migrating virtual machines, reduce the waste of system resources such as system CPU and network bandwidth caused by temporary data changes, and save system resources. Improve the user experience.
- the disclosed systems, devices, and methods may be implemented in other ways.
- the device embodiments described above are merely illustrative.
- the division of the unit is only a logical function division.
- there may be another division manner for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored, or not executed.
- the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, or an electrical, mechanical or other form of connection.
- the components displayed by the unit may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units.
- each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
- the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
- the integrated unit if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium.
- the technical solution of the present invention contributes in essence or to the prior art, or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium.
- a number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present invention.
- the foregoing storage medium includes: a USB flash drive, a mobile hard disk, a read-only memory (a "ROM” called a “ROM”), a random access memory (a random access memory (a "RAM”), a disk or A variety of media such as optical discs that can store program code.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Human Computer Interaction (AREA)
- Computer Security & Cryptography (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Memory System Of A Hierarchy Structure (AREA)
Abstract
本发明公开一种实现虚拟机热迁移的方法、装置及系统。该方法包括:源物理机上的源虚拟机迁移管理装置确定该源物理机上的虚拟机的非临时数据内存页;将该非临时数据内存页从该源物理机复制到目标物理机;将该非临时数据内存页的复制过程中产生的脏页从该源物理机循环复制到该目标物理机,直到未被复制的脏页的数目与该非临时数据内存页的数目之比低于预设值;在该未被复制的脏页的数目与该非临时数据内存页的数目之比低于该预设值时,对该虚拟机实施迁移。本发明实施例提供的方法,通过对多进程系统中的进程和内存页进行分类,能够在脏页的循环复制过程中不复制临时数据内存页,从而降低系统CPU和网络带宽的浪费,提高用户体验。
Description
实现虚拟机热迁移的方法、 装置及系统 本申请要求于 2012 年 11 月 30 日提交中国专利局、 申请号为 201210504276.4、 发明名称为"实现虚拟机热迁移的方法、 装置及系统"的中国 专利申请的优先权, 其全部内容通过引用结合在本申请中。 技术领域
本发明实施例涉及虚拟化的计算机系统, 并且更具体地, 涉及实现虚拟机 热迁移的方法、 装置及系统。
背景技术
虚拟机技术正在大量应用于信息技术领域中, 并正在向通信领域渗透。 热 迁移技术是虚拟机的一大技术亮点, 它能够让虚拟机在两台物理机间进行迁 移, 而该迁移过程对业务处理的影响很小。 现有的虚拟机的热迁移技术, 使用 的是预拷贝方法。 该方法首先将虚拟机的所有内存页从源物理机复制到目标物 理机, 并且在这次复制过程中对所有内存页进行监控, 将在复制过程中被改动 的页标记为脏页; 在完成一次内存的全部复制后, 再对产生的脏页进行复制, 需要注意的是, 在脏页复制的过程中, 有些内存页也有可能被改动, 这时, 这 些改动的内存页也需要被标记为脏页, 以便下一次脏页复制的时候能把这些脏 页从源物理机复制到目标物理机。 这样不断循环地把脏页复制到目标机, 直到 脏页比例低于预设值(比如 5% )后, 对虚拟机实施迁移, 即停止运行虚拟机, 并把未被复制的脏页一次性从源物理机复制到目标物理机后, 并在目标物理机 上恢复虚拟机。
然而, 在脏页的循环复制过程中, 只要内存页的一个字节被改动, 也会被 标记为脏页, 这会造成系统中大量临时数据的变化都被循环复制到目标物理 机, 从而造成热迁移虚拟机的耗时较长, 且极大地浪费系统的 CPU处理资源
和网络带宽等资源, 且据测算, 该浪费超过 90%。 因此, 如何减少由于系统中 大量临时数据的变化而造成的脏页循环复制的次数以及在每次循环复制过程 中所复制的脏页数目, 从而降低由虚拟机热迁移造成的系统资源的浪费, 是虚 拟机热迁移技术亟待解决的问题。
发明内容
本发明实施例提供了一种实现虚拟机热迁移的方法、 装置及系统, 以便能 够在虚拟机热迁移的过程中, 节省系统资源。
第一方面, 本发明实施例提供了一种实现虚拟机热迁移的方法, 该方法包 括: 源物理机上的源虚拟机迁移管理装置确定该源物理机上的虚拟机的非临时 数据内存页; 将该非临时数据内存页从该源物理机复制到目标物理机; 将该非 临时数据内存页的复制过程中产生的脏页从该源物理机循环复制到该目标物 理机, 直到未被复制的脏页的数目与该非临时数据内存页的数目之比低于预设 值; 在该未被复制的脏页的数目与该非临时数据内存页的数目之比低于该预设 值时, 对该虚拟机实施迁移。
结合第一方面, 在第一种可能的实现方式中, 该对该虚拟机实施迁移, 包 括: 停止运行该虚拟机; 将该未被复制的脏页以及该虚拟机上的临时数据内存 页, 从该源物理机复制到该目标物理机; 向该目标物理机上的目标虚拟机迁移 管理装置发送第一指示信息, 该第一指示信息用于指示该目标虚拟机迁移管理 装置在该目标物理机上恢复该虚拟机。
结合第一方面, 在第二种可能的实现方式中, 该对该虚拟机实施迁移, 包 括: 通过迁移预通知接口, 通知该虚拟机停止运行临时数据进程; 在通过该迁 移预通知接口获取到该虚拟机通知的停止成功响应时, 停止运行该虚拟机, 该 停止成功响应用于指示该虚拟机停止运行临时数据进程成功; 将该未被复制的 脏页从该源物理机复制到该目标物理机; 向该目标物理机上的目标虚拟机迁移 管理装置发送第一指示信息, 该第一指示信息用于指示该目标虚拟机迁移管理
装置在该目标物理机上恢复该虚拟机。
结合第一方面的第二种可能的实现方式, 在第三种可能的实现方式中, 该 方法还包括: 向该目标虚拟机迁移管理装置发送第二指示信息, 该第二指示信 息用于指示该目标虚拟机迁移管理装置通过迁移完毕通知接口通知该虚拟机 重新启动被停止运行的该临时数据进程。
结合第一方面或第一方面的第一种至第三种可能的实现方式中的任一种 可能的实现方式, 在第四种可能的实现方式中, 该确定源物理机上的虚拟机的 非临时数据内存页, 包括: 通过临时数据进程内存页注册接口获取该虚拟机通 知的临时数据内存页的信息; 根据该临时数据内存页的信息, 确定该虚拟机上 的除该临时数据内存页外的内存页为非临时数据内存页。
第二方面, 本发明实施例提供了一种实现虚拟机热迁移的方法, 该方法包 括: 源物理机上的虚拟机确定虚拟机的临时数据内存页; 通过临时数据进程内 存页注册接口, 将该临时数据内存页的信息通知该源物理机上的源虚拟机迁移 管理装置, 以便该源虚拟机迁移管理装置根据该临时数据内存页的信息确定该 虚拟机的非临时数据内存页, 并在将该虚拟机从该源物理机热迁移到目标物理 机的过程中复制该非临时数据内存页。
结合第二方面, 在第一种可能的实现方式中, 在该通过临时数据进程内存 页注册接口将该临时数据内存页的信息通知该源物理机上的源虚拟机迁移管 理装置之后, 该方法还包括: 通过迁移预通知接口, 获取该源虚拟机迁移管理 装置通知的停止运行临时数据进程的通知; 根据该停止运行临时数据进程的通 知, 停止运行临时数据进程; 在停止运行该临时数据进程成功时, 通过该迁移 预通知接口, 将停止成功响应通知该源虚拟机迁移管理装置, 以便该源虚拟机 迁移管理装置根据该停止成功响应停止运行该虚拟机, 并指示该目标物理机上 的目标虚拟机迁移管理装置在该目标物理机上恢复该虚拟机。
结合第二方面的第一种可能的实现方式, 在第二种可能的实现方式中, 该
方法还包括: 在该虚拟机被该目标虚拟机迁移管理装置恢复时, 该虚拟机通过 迁移完毕通知接口, 获取该目标虚拟机迁移管理装置通知的重新启动临时数据 进程的通知; 根据该重新启动临时数据进程的通知, 重新启动被停止运行的该 临时数据进程。
结合第二方面或结合第二方面的第一种或第二种可能的实现方式, 在第三 种可能的实现方式中, 该确定临时数据内存页, 包括: 通过临时数据进程注册 接口获取应用通知的临时数据进程的信息; 根据该临时数据进程的信息, 确定 该临时数据进程占用的内存页为临时数据内存页。
结合第二方面或结合第二方面的第一种或第二种可能的实现方式, 在第四 种可能的实现方式中, 该确定临时数据内存页, 包括: 确定临时数据专用内存 块; 确定该临时数据专用内存块中的所有内存页为临时数据内存页; 该方法还 包括: 通过创建进程接口获取该应用通知的进程的类型, 该进程的类型包括临 时数据进程或持久化数据进程; 当该进程的类型为临时数据进程时, 为该临时 数据进程分配该临时数据专用内存块中的内存页。
第三方面, 本发明实施例提供了一种虚拟机迁移管理装置, 该虚拟机迁移 管理装置包括:确定模块,用于确定源物理机上的虚拟机的非临时数据内存页; 复制模块, 用于将该确定模块确定的该非临时数据内存页从该源物理机复制到 目标物理机, 以及将该非临时数据内存页的复制过程中产生的脏页从该源物理 机循环复制到该目标物理机, 直到未被复制的脏页的数目与该非临时数据内存 页的数目之比低于预设值; 迁移模块, 用于在该复制模块未复制的脏页的数目 与该非临时数据内存页的数目之比低于该预设值时, 对该虚拟机实施迁移。
结合第三方面, 在第一种可能的实现方式中, 该迁移模块包括: 第一停止 运行单元, 用于停止运行该虚拟机; 第一复制单元, 用于在该第一停止运行单 元停止运行该虚拟机后, 将该非临时数据内存页的复制过程中产生的剩余脏页 以及该虚拟机上的临时数据内存页, 从该源物理机复制到该目标物理机; 第一
发送单元, 用于在该第一复制单元复制该未被复制的脏页以及该虚拟机上的临 时数据内存页之后, 向该目标物理机上的目标虚拟机迁移管理装置发送第一指 示信息, 该第一指示信息用于指示该目标虚拟机迁移管理装置在该目标物理机 上恢复该虚拟机。
结合第三方面, 在第二种可能的实现方式中, 该迁移模块, 包括: 第一通 知单元, 用于通过迁移预通知接口, 通知该虚拟机停止运行临时数据进程; 第 一获取单元,用于通过该迁移预通知接口,获取该虚拟机通知的停止成功响应, 该停止成功响应用于指示该虚拟机根据该第一通知单元的通知停止运行临时 数据进程成功; 第二停止运行单元, 用于在该第一获取单元获取到该虚拟机通 知的停止成功响应时, 停止运行该虚拟机; 第二复制单元, 用于在该第二停止 单元停止运行该虚拟机后, 将该未被复制的脏页从该源物理机复制到该目标物 理机; 第二发送单元, 用于在该第二复制单元将该未被复制的脏页从该源物理 机复制到该目标物理机之后, 向该目标物理机上的目标虚拟机迁移管理装置发 送第一指示信息, 该第一指示信息用于指示该目标虚拟机迁移管理装置在该目 标物理机上恢复该虚拟机。
结合第三方面的第二种可能的实现方式, 在第三种可能的实现方式中, 该 虚拟机迁移管理装置, 还包括: 发送模块, 用于向该目标虚拟机迁移管理装置 发送第二指示信息, 该第二指示信息用于指示该目标虚拟机迁移管理装置通过 迁移完毕通知接口通知该虚拟机重新启动被停止运行的该临时数据进程。
结合第三方面或第三方面的第一种至第三种可能的实现方式中的任一种 可能的实现方式, 在第四种可能的实现方式中, 该确定模块, 包括: 获取单元, 用于通过临时数据进程内存页注册接口, 获取该虚拟机通知的临时数据内存页 的信息; 确定单元, 用于根据该获取单元获取的该临时数据内存页的信息, 确 定该虚拟机上的除该临时数据内存页外的内存页为非临时数据内存页。
第四方面, 本发明实施例提供了一种虚拟机, 该虚拟机包括: 确定模块,
用于确定该虚拟机的临时数据内存页; 通知模块, 用于通过临时数据进程内存 页注册接口, 将该确定模块确定的该临时数据内存页的信息通知源物理机上的 源虚拟机迁移管理装置, 以便该源虚拟机迁移管理装置根据该临时数据内存页 的信息确定该虚拟机的非临时数据内存页并在将该虚拟机从该源物理机迁移 到目标物理机的过程中复制该非临时数据内存页。
结合第四方面, 在第一种可能的实现方式中, 该虚拟机还包括: 第一获取 模块, 用于在该通知模块通过临时数据进程内存页注册接口将该临时数据内存 页的信息通知该源物理机上的源虚拟机迁移管理装置之后, 通过迁移预通知接 口, 获取该源虚拟机迁移管理装置通知的停止运行临时数据进程的通知; 停止 运行模块, 用于根据该第一获取模块获取的该停止运行临时数据进程的通知, 停止运行临时数据进程; 该通知模块还用于在该停止运行模块停止运行该临时 数据进程成功时, 通过该迁移预通知接口, 将停止成功响应通知该源虚拟机迁 移管理装置, 以便该源虚拟机迁移管理装置根据该停止成功响应停止运行该虚 拟机, 并指示该目标物理机上的目标虚拟机迁移管理装置在该目标物理机上恢 复该虚拟机。
结合第四方面的第一种可能的实现方式, 在第二种可能的实现方式中, 该 虚拟机还包括: 第二获取模块, 用于在该虚拟机被该目标虚拟机迁移管理装置 恢复时, 通过迁移完毕通知接口, 获取该目标虚拟机迁移管理装置通知的重新 启动临时数据进程的通知; 启动模块, 用于根据该第二获取模块获取的该重新 启动临时数据进程的通知, 重新启动被停止运行的该临时数据进程。
结合第四方面或结合第四方面的第一种或第二种可能的实现方式, 在第三 种可能的实现方式中, 该确定模块, 包括: 获取单元, 用于通过临时数据进程 注册接口, 获取应用通知的临时数据进程的信息; 确定单元, 用于根据该获取 单元获取的该临时数据进程的信息, 确定该临时数据进程占用的内存页为临时 数据内存页。
结合第四方面或结合第四方面的第一种或第二种可能的实现方式, 在第四 种可能的实现方式中, 该确定模块具体用于确定临时数据专用内存块, 以及确 定该临时数据专用内存块中的所有内存页为临时数据内存页; 该虚拟机还包 括: 第三获取模块, 用于通过创建进程接口, 获取该应用通知的进程的类型, 该进程的类型包括临时数据进程或持久化数据进程; 分配模块, 用于当该第三 获取模块获取的该进程的类型为临时数据进程时, 为该临时数据进程分配该临 时数据专用内存块中的内存页。
第五方面, 本发明实施例提供了一种实现虚拟机热迁移的系统, 该系统包 括第三方面或第三方面的第一种至第四种可能的虚拟机迁移管理装置中的任 一种可能的虚拟机迁移管理装置, 以及第四方面或第四方面的第一种至第四种 可能的虚拟机中的任一种可能的虚拟机。
基于上述技术方案, 本发明实施例的实现虚拟机热迁移的方法、 装置及系 统, 通过对多进程系统中的进程和内存页进行分类, 能够在脏页的循环复制过 程中不复制临时数据内存页而只复制非临时数据内存页, 从而减少热迁移虚拟 机的耗时, 降低由临时数据的变化而造成的系统 CPU和网络带宽等系统资源 的浪费, 节省了系统资源, 提高了用户体验。
附图说明
为了更清楚地说明本发明实施例的技术方案, 下面将对本发明实施例或现 有技术描述中所需要使用的附图作筒单地介绍, 显而易见地, 下面所描述的附 图仅仅是本发明的一些实施例, 对于本领域普通技术人员来讲, 在不付出创造 性劳动的前提下, 还可以根据这些附图获得其他的附图。
图 5是根据本发明另一实施例的实现虚拟机热迁移的方法的流程示意图。 图 6是根据本发明另一实施例的实现虚拟机热迁移的方法的另一流程示意 图。
图 Ί是根据本发明另一实施例的实现虚拟机热迁移的方法的再一流程示意 图。
图 8是根据本发明另一实施例的实现虚拟机热迁移的方法的再一流程示意 图。
图 9是根据本发明另一实施例的实现虚拟机热迁移的方法的再一流程示意 图。
图 10是根据本发明实施例的虚拟机迁移管理装置的示意性框图。
图 11 是根据本发明实施例的虚拟机迁移管理装置的迁移模块的示意性框 图。
图 12是根据本发明实施例的虚拟机迁移管理装置的迁移模块的另一示意 性框图。
图 13是根据本发明实施例的虚拟机迁移管理装置的另一示意性框图。 图 14是根据本发明实施例的虚拟机迁移管理装置的确定模块的示意性框 图。
图 15是根据本发明实施例的虚拟机的示意性框图。
图 16是根据本发明实施例的虚拟机的另一示意性框图。
图 17是根据本发明实施例的虚拟机的再一示意性框图。
图 18是根据本发明实施例的虚拟机的确定模块的示意性框图。
图 19是根据本发明实施例的虚拟机的再一示意性框图。
图 20是根据本发明实施例的实现虚拟机热迁移的系统的示意性框图。 图 21是根据本发明另一实施例的虚拟机迁移管理装置的示意性框图。
图 22是根据本发明另一实施例的虚拟机迁移管理装置的另一示意性框图。 图 23是根据本发明另一实施例的虚拟机的示意性框图。
图 24是根据本发明另一实施例的实现虚拟机热迁移的系统的示意性框图。
具体实施方式
下面将结合本发明实施例中的附图, 对本发明实施例中的技术方案进行清 楚、 完整地描述, 显然, 所描述的实施例是本发明的一部分实施例, 而不是全 部实施例。 基于本发明中的实施例, 本领域普通技术人员在没有做出创造性劳 动的前提下所获得的所有其他实施例, 都应属于本发明保护的范围。
应理解, 本发明实施例的技术方案可以应用于各种虚拟机系统, 例如: 基 于 vSphere软件的虚拟机系统, 基于内核的虚拟机( K Virtual Machine , 筒称为 "KVM" ) 、 基于 Xen软件的虚拟机系统等。 还应理解, 本发明实施例的技 术方案可以应用于各种虚拟化的计算机系统, 包括虚拟化的个人计算机 ( Personal Computer, 筒称为 "PC" ) 、 虚拟化的计算机集群系统、 虚拟化的 大型计算机系统或各种虚拟化的超级计算机 ( Supercomputer )等。
图 1 A是根据本发明实施例的实现虚拟机热迁移的系统架构图。 其中, 源 物理机上的应用将进程分为临时数据进程和持久化数据进程, 并将此分类通知 源物理机上的虚拟机, 该源物理机上的虚拟机确定临时数据进程占用的临时数 据内存页和持久化数据进程占用的非临时数据内存页, 并将该内存页的分类通 知源物理机上的源虚拟机迁移管理装置, 这样, 源虚拟机迁移管理装置在将虚 拟机从源物理机迁移到目标物理机时, 可以对临时数据内存页和非临时数据内 存页采取不同的复制策略。
其中, 需要说明的是, 作为示例而非限定, 图 1A中所示的源物理机以及 目标物理机可以包括巨型机、 大型机、 中型机、 小型机、 微型机或其他各种能 够运行虚拟机的物理设备, 本发明并不对此进行限定。
此外, 需要说明的是, 本发明实施例中的应用可以是各种应用程序, 源虚 拟机迁移管理装置以及目标虚拟机迁移管理装置可以由专门的硬件实现, 也可 以由软件实现, 本发明并不对此进行限定。
基于图 1A所示的系统架构图, 本发明实施例提供了一种实现虚拟机热迁 移的方法 100, 该方法 100可以由源物理机上的源虚拟机迁移管理装置执行。 如图 1B所示, 该方法 100包括:
S110, 源物理机上的源虚拟机迁移管理装置确定该源物理机上的虚拟机的 非临时数据内存页;
S120, 将该非临时数据内存页从该源物理机复制到目标物理机;
S 130 , 将该非临时数据内存页的复制过程中产生的脏页从该源物理机循环 复制到该目标物理机, 直到未被复制的脏页的数目与该非临时数据内存页的数 目之比低于预设值;
S140, 在该未被复制的脏页的数目与该非临时数据内存页的数目之比低于 该预设值时, 对该虚拟机实施迁移。
因此, 本发明实施例的实现虚拟机热迁移的方法, 通过对多进程系统中的 进程和内存页进行分类, 能够在脏页的循环复制过程中不复制临时数据内存页 而只复制非临时数据内存页, 从而减少虚拟机热迁移的耗时, 降低由临时数据 的变化而造成的系统 CPU和网络带宽等系统资源的浪费, 节省了系统资源, 提高了用户体验。
在本发明实施例中, 多进程系统中的应用可以根据进程的功能和特征, 将 进程分为临时数据进程和持久化数据进程, 其中, 临时数据进程只产生临时数 据, 例如临时数据緩冲区的数据、 临时变量等, 持久化数据进程是可以产生持 久化数据的进程。 进程在运行的过程中一般都会产生数据, 这些数据可以是临 时数据, 也可以是持久化数据, 当然这些产生的数据中还可以既有临时数据又 有持久化数据。 应用可以在创建进程后判断该进程是否产生持久化数据, 并将
只产生临时数据而不产生持久化数据的进程确定为临时数据进程, 以及将可以 产生持久化数据的进程确定为持久化数据进程。 当应用确定进程为临时数据进 程时, 可以将该临时数据进程的信息通过临时数据进程注册接口通知虚拟机。 可选地, 应用也可以在创建进程时判断该进程是否为临时数据进程, 并通过创 建进程接口通知虚拟机该进程为临时数据进程或持久化数据进程, 以使得在虚 拟机上注册该临时数据进程。具体地,应用可以只将临时数据进程通知虚拟机, 而虚拟机将没有被通知的进程默认为持久化数据进程; 可选地, 应用也可以将 临时数据进程和持久化数据进程均通知虚拟机, 本发明实施例不限于此。 应用 通知虚拟机的该临时数据进程的参数可以是该临时数据进程的进程信息, 该进 程信息包括但不限于该临时数据进程的进程编号。
当临时数据进程在虚拟机上注册后, 虚拟机可以监控该临时数据进程占用 的内存页, 并将该临时数据进程占用的内存页或虚拟机预先设置的为临时数据 进程分配的专用内存块中的内存页标记为临时数据进程内存页。 因此, 在本发 明实施例中, 虚拟机的内存页可分为非临时数据内存页和临时数据内存页, 其 中, 非临时数据内存页是持久化数据进程占用的内存页。 虚拟机在确定了临时 数据内存页之后, 可以将临时数据内存页的信息通知源虚拟机迁移管理装置, 从而使得源虚拟机迁移管理装置在对脏页进行循环复制时不复制临时数据内 存页。
可选地, 如图 2所示, 在本发明实施例中, S110, 源虚拟机迁移管理装置 确定虚拟机上的非临时数据内存页, 包括:
5111 , 通过临时数据进程内存页注册接口获取该虚拟机通知的临时数据内 存页的信息;
5112, 根据该临时数据内存页的信息, 确定该虚拟机上的除该临时数据内 存页外的内存页为非临时数据内存页。
其中, 临时数据内存页的信息可以包括但不限于临时数据内存页的编号和
临时数据内存页的数量。 源虚拟机迁移管理装置根据该临时数据内存页的信 息, 可以确定该临时数据内存页, 并确定虚拟机上的除该临时数据内存页外的 内存页为非临时数据内存页, 但本发明实施例不限于此。
本发明实施例中的临时数据进程内存页注册接口可以被虚拟机用于向虚 拟机迁移管理装置通知临时数据内存页的信息。 应理解, 本发明实施例中的临 时数据进程内存页注册接口只是具有上述功能的接口的一个名称, 可选地, 该 接口还可以取其它的名称, 该接口应以其内在功能确定, 而不应将该接口的名 称作为对本发明实施例中的该接口的限定。
可选地, 在本发明实施例中, 虚拟机可以存储临时数据内存页的信息, 并 将该临时数据内存页的信息动态地通知源虚拟机迁移管理装置。 具体地, 在临 时数据进程占用的临时数据内存页增加或减少时, 虚拟机可以只将增加或减少 的临时数据内存页的信息通知源虚拟机迁移管理装置, 也可以根据该增加或减 少的临时数据内存页的信息调整存储的临时数据内存页的信息, 并将调整之后 的临时数据内存页的信息通知源虚拟机迁移管理装置, 本发明实施例不限于 此。
可选地, 作为另一实施例, 虚拟机也可以为临时数据进程预先分配一定容 量的临时数据专用内存块。 具体地, 虚拟机可以根据实际需求分配较小容量的 内存块为临时数据专用内存块, 并将该临时数据专用内存块的内存页分配给临 时数据进程。 当该临时数据专用内存块的剩余内存低于临时数据内存的所需内 存时, 虚拟机选取一定容量的新的内存块并将该新的内存块添加到临时数据专 用内存块中。 这样虚拟机可以动态地为临时数据进程分配内存块, 既方便又可 有效地利用内存。 此时, 虚拟机只需要将初始的该临时数据内存块中的所有内 存页的信息通知源虚拟机迁移管理装置, 以及在该临时数据内存块发生变化时 将内存块的变化通知源虚拟机迁移管理装置, 而无需在临时数据进程占用的内 存发生变化时均通知源虚拟机迁移管理装置, 从而节约系统开销并且方便管
理, 但本发明实施例不限于此。
源虚拟机迁移管理装置在确定了临时数据内存页和非临时数据内存页后, 在第一次复制和脏页的循环复制过程中可以对临时数据内存页实施旁路
( by-pass )功能, 即绕过临时数据内存页而只复制非临时数据内存页。 在 S120 中, 源虚拟机迁移管理装置对虚拟机上的内存页进行第一次复制, 并且在第一 次复制过程中只复制非临时数据内存页, 并将在该复制过程中被改动的非临时 数据内存页标记为脏页。 在第一次复制完成后, 源虚拟机迁移管理装置执行 S130, 即执行脏页的循环复制过程, 源虚拟机迁移管理装置在未被复制的脏页 数目与该非临时数据内存页的数目之比不低于预设值时, 将该未被复制的脏页 从源物理机复制到目标物理机。
具体地, 源虚拟机迁移管理装置首先复制在第一次复制非临时数据内存页 的过程中产生的脏页, 并且将在这次脏页复制过程中被改动的内存页标记为脏 页, 在此后每轮的脏页复制过程中均复制上一轮脏页复制过程中产生的脏页, 直到上一轮脏页复制过程中产生的脏页数目与非临时数据内存页的总数目之 比低于预设值时, 结束该脏页的循环复制过程。 需要说明的是, 当将脏页从源 物理机被复制到目标物理机后, 需要将源物理机上的被复制的脏页标记为非脏 页, 以避免在下一轮脏页复制的时候再次被复制。 其中, 该预设值可以为固定 值, 但本发明实施例不限于此。
在 S140 中, 该源虚拟机迁移管理装置可以停止运行虚拟机, 并对循环复 制过程中的未被复制的脏页和临时数据内存页进行复制。 因此, 可选地, 如图 3所示, S140, 包括:
S141a, 停止运行该虚拟机;
S 142a , 将该未被复制的脏页以及该虚拟机上的临时数据内存页, 从该源 物理机复制到该目标物理机;
S143a, 向该目标物理机上的目标虚拟机迁移管理装置发送第一指示信息,
该第一指示信息用于指示该目标虚拟机迁移管理装置在该目标物理机上恢复 该虚拟机。
其中, 源虚拟机迁移管理装置停止运行该虚拟机, 并在该虚拟机停止运行 后, 将该未被复制的脏页, 即在脏页的循环复制的最后一次复制过程中产生的 脏页, 以及临时数据内存页从源物理机复制到目标物理机, 在该复制过程完成 后, 源虚拟机迁移管理装置向位于目标物理机上的目标虚拟机迁移管理装置发 送第一指示信息, 以使得该目标虚拟机迁移管理装置在目标物理机上恢复该虚 拟机。其中,在目标物理机上恢复该虚拟机是指在目标物理机上启动该虚拟机, 并且将该虚拟机的状态恢复到其在源物理机上被停止运行时的状态。
因此, 本发明实施例的实现虚拟机热迁移的方法, 通过对多进程系统中的 进程和内存页进行分类, 能够在脏页的循环复制过程中不复制临时数据内存页 而只复制非临时数据内存页, 从而减少热迁移虚拟机的耗时, 降低由临时数据 的变化而造成的系统 CPU和网络带宽等系统资源的浪费, 节省了系统资源, 提高了用户体验。
可选地, 源虚拟机迁移管理装置也可以在停止虚拟机之前通知该虚拟机停 止运行临时数据进程, 以使得临时数据进程占用的临时数据内存页被释放, 从 而可以在虚拟机停止运行后只复制剩余脏页而不复制临时数据内存页。 因此, 可选地, 作为另一实施例, 如图 4所示, S140, 包括:
S141b, 通过迁移预通知接口通知该虚拟机停止运行临时数据进程; S142b, 在通过该迁移预通知接口获取到该虚拟机通知的停止成功响应时, 停止运行该虚拟机, 该停止成功响应用于指示该虚拟机停止运行临时数据进程 成功;
S143b, 将该未被复制的脏页从该源物理机复制到该目标物理机;
S144b, 向该目标物理机上的目标虚拟机迁移管理装置发送第一指示信息, 该第一指示信息用于指示该目标虚拟机迁移管理装置在该目标物理机上恢复
该虚拟机。
其中, 源虚拟机迁移管理装置可以通知虚拟机停止运行临时数据进程, 并 在得到虚拟机的停止成功响应指示该虚拟机成功停止运行临时数据进程时, 停 止运行该虚拟机。 此时, 由于虚拟机在被停止运行之前已经停止运行了临时数 据进程, 因此该临时数据进程占用的内存页被释放, 源虚拟机迁移管理装置可 以只复制剩余的脏页而不复制临时数据内存页, 这样可以有效地减少复制的内 存页的数量, 缩短复制所需时间, 并进一步地降低系统 CPU和网络带宽的消 耗, 提高了用户体验。
本发明实施例中的迁移预通知接口可以被虚拟机迁移管理装置用于将停 止运行临时数据进程通知虚拟机, 以及可以被虚拟机用于将停止成功响应通知 虚拟机迁移管理装置。 应理解, 本发明实施例中的迁移预通知接口只是具有上 述功能的接口的一个名称, 可选地, 该接口还可以取其它的名称, 该接口应以 其内在功能确定, 而不应将该接口的名称作为对本发明实施例中的该接口的限 定。还应理解, 在本发明实施例中, A通过某一接口通知 B是指 A通过该接口 向 B发送一个信息, 或 A调用该接口, 但本发明实施例不限于此。
可选地, 源虚拟机迁移管理装置也可以指示目标虚拟机迁移管理装置在虚 拟机被恢复后, 在目标物理机上重新启动在源物理机上被停止运行的临时数据 进程, 从而方便用户继续使用。 因此, 可选地, 该方法 100还包括:
S150, 向该目标虚拟机迁移管理装置发送第二指示信息, 该第二指示信息 用于指示该目标虚拟机迁移管理装置通过迁移完毕通知接口通知该虚拟机重 新启动被停止运行的该临时数据进程。
其中, 源虚拟机迁移管理装置可以同时向目标虚拟机迁移管理装置发送第 一指示信息和第二指示信息, 虚拟机迁移管理装置也可以在发送第一指示信息 后发送第二指示信息, 因此, S150可以和 S144b同时执行, 也可以在 S144之 后执行, 本发明实施例不限于此。
可选地, 该目标虚拟机迁移管理装置可以通知虚拟机在目标物理机上重启 该临时数据进程, 也可以通知虚拟机重启该临时数据进程的应用并通知该应用 重启该临时数据进程, 但本发明实施例不限于此。
本发明实施例中的迁移完毕通知接口可以被虚拟机迁移管理装置用于通 知该虚拟机在该目标物理机上重新启动被停止运行的临时数据进程。 应理解, 本发明实施例中的迁移完毕通知接口只是具有上述功能的接口的一个名称, 可 选地, 该接口还可以取其它的名称, 该接口应以其内在功能确定, 而不应将该 接口的名称作为对本发明实施例中的该接口的限定。
因此, 本发明实施例的实现虚拟机热迁移的方法, 通过对多进程系统中的 进程和内存页进行分类, 能够在脏页的循环复制过程中不复制临时数据内存页 而只复制非临时数据内存页, 从而减少热迁移虚拟机的耗时, 降低由临时数据 的变化而造成的系统 CPU和网络带宽等系统资源的浪费, 节省了系统资源, 提高了用户体验。
上文中结合图 1至图 4, 从源虚拟机迁移管理装置的角度详细描述了根据 本发明实施例的实现虚拟机热迁移的方法, 下面将结合图 5至图 8, 从虚拟机
该方法 200可以由虚拟机执行。 如图 5所示, 该方法 200包括:
S210, 源物理机上的虚拟机确定虚拟机的临时数据内存页;
S220, 通过临时数据进程内存页注册接口将该临时数据内存页的信息通知 该源物理机上的源虚拟机迁移管理装置, 以便该源虚拟机迁移管理装置根据该 临时数据内存页的信息确定该虚拟机的非临时数据内存页并在将该虚拟机从 该源物理机热迁移到目标物理机的过程中复制该非临时数据内存页。
源物理机上的虚拟机确定临时数据内存页, 并通过临时数据进程内存页注 册接口将该临时数据内存页的信息通知位于该源物理机上的源虚拟机迁移管
理装置, 该源虚拟机迁移管理装置根据该临时数据内存页的信息确定虚拟机上 的临时数据内存页和非临时数据内存页, 并在第一次复制内存页以及脏页的循 环复制的过程中均只复制该非临时数据内存页而不复制临时数据内存页。
因此, 本发明实施例的实现虚拟机热迁移的方法, 通过对多进程系统中的 进程和内存页进行分类, 能够在脏页的循环复制过程中不复制临时数据内存页 而只复制非临时数据内存页, 从而减少热迁移虚拟机的耗时, 降低由临时数据 的变化而造成的系统 CPU和网络带宽等系统资源的浪费, 节省了系统资源, 提高了用户体验。
可选地, 虚拟机可以通过临时数据进程注册接口获取应用通知的临时进程 的信息, 如图 6所示, 在本发明实施例中, S210包括:
S211a, 通过临时数据进程注册接口获取应用通知的临时数据进程的信息; S212a, 根据该临时数据进程的信息, 确定该临时数据进程占用的内存页 为临时数据内存页。
其中, 应用可以在创建进程后判断该进程是否为临时数据进程, 当该进程 为临时数据进程时, 将该临时数据进程的信息通过临时数据进程注册接口通知 虚拟机。
本发明实施例中的临时数据进程注册接口可以被虚拟机上的应用用于将 临时数据进程的信息通知虚拟机迁移管理装置。 应理解, 本发明实施例中的临 时数据进程注册接口只是具有上述功能的接口的一个名称, 可选地, 该接口还 可以取其它的名称, 该接口应以其内在功能确定, 而不应将该接口的名称作为 对本发明实施例中的该接口的限定。
可选地, 虚拟机也可以预设专用内存块供临时数据进程使用, 因此, 可选 地, 作为另一实施例, S210包括:
S211b, 确定临时数据专用内存块;
S212b, 确定该临时数据专用内存块中的所有内存页为临时数据内存页;
相应地, 如图 7所示, 该方法 200还包括:
S230, 通过创建进程接口获取该应用通知的进程的类型, 该进程的类型包 括临时数据进程或持久化数据进程;
S240, 当该进程的类型为临时数据进程时, 为该临时数据进程分配该临时 数据专用内存块中的内存页。
其中, 虚拟机可以为临时数据进程预先分配一定容量的临时数据专用内存 块, 并在该临时数据专用内存块中选取内存分配给临时数据进程。
可选地, 虚拟机在创建进程时判断该进程是否为临时数据进程, 并通过创 建进程注册接口通知虚拟机该进程为临时数据进程或持久化数据进程, 但本发 明实施例不限于此。
可选地, 如图 8所示, 在本发明实施例中, 在 S220之后, 该方法 200还 包括:
S250, 通过迁移预通知接口, 获取该源虚拟机迁移管理装置通知的停止运 行临时数据进程的通知;
S260, 根据该停止运行临时数据进程的通知, 停止运行临时数据进程; S270, 在停止运行该临时数据进程成功时, 通过该迁移预通知接口将停止 成功响应通知该源虚拟机迁移管理装置, 以便该源虚拟机迁移管理装置根据该 停止成功响应停止运行该虚拟机并指示该目标物理机上的目标虚拟机迁移管 理装置在该目标物理机上恢复该虚拟机。
由于虚拟机在被停止运行之前已经停止运行了临时数据进程, 因此该临时 数据进程占用的内存页被释放, 源虚拟机迁移管理装置可以只复制剩余的脏页 而不复制临时数据内存页, 这样可以有效地减少复制的内存页的数量, 缩短复 制所需时间, 并进一步地降低系统 CPU和网络带宽的消耗, 提高了用户体验。
可选地, 如图 9所示, 在本发明实施例中, 该方法 200还包括:
S280, 在该虚拟机被该目标虚拟机迁移管理装置恢复时, 该虚拟机通过迁
移完毕通知接口获取该目标虚拟机迁移管理装置通知的重新启动临时数据进 程的通知;
S290, 根据该重新启动临时数据进程的通知, 重新启动被停止运行的临时 数据进程。
因此, 本发明实施例的实现虚拟机热迁移的方法, 通过对多进程系统中的 进程和内存页进行分类, 能够在脏页的循环复制过程中不复制临时数据内存页 而只复制非临时数据内存页, 从而减少热迁移虚拟机的耗时, 降低由临时数据 的变化而造成的系统 CPU和网络带宽等系统资源的浪费, 节省了系统资源, 提高了用户体验。
应理解, 上述各实施例中的各种接口还可以取其它的名称, 这些接口应以 其内在功能确定, 而不应将这些接口的名称作为对本发明实施例中的这些接口 的限定。
上文中结合图 1至图 9, 详细描述了根据本发明实施例的热迁移虚拟机的 方法, 下面将结合图 10至图 13 , 详细描述根据本发明实施例的虚拟机迁移管 理装置和虚拟机。
图 10是根据本发明实施例的虚拟机迁移管理装置 300的示意性框图。 如 图 10所示, 该虚拟机迁移管理装置 300包括:
确定模块 310, 用于确定源物理机上的虚拟机的非临时数据内存页; 复制模块 320, 用于将该确定模块 310确定的该非临时数据内存页从该源 物理机复制到目标物理机, 以及将该非临时数据内存页的复制过程中产生的脏 页从该源物理机循环复制到该目标物理机, 直到未被复制的脏页的数目与该非 临时数据内存页的数目之比低于预设值;
迁移模块 330, 用于在该复制模块 320未复制的脏页的数目与该非临时数 据内存页的数目之比低于该预设值时, 对该虚拟机实施迁移。
因此, 本发明实施例的虚拟机迁移管理装置, 通过对多进程系统中的进程
和内存页进行分类, 能够在脏页的循环复制过程中不复制临时数据内存页而只 复制非临时数据内存页, 从而减少热迁移虚拟机的耗时, 降低由临时数据的变 化而造成的系统 CPU和网络带宽等系统资源的浪费, 节省了系统资源, 提高 了用户体验。
可选地, 虚拟机迁移管理装置可以停止虚拟机并复制临时数据内存页, 如 图 11所示, 该迁移模块 330, 包括:
第一停止运行单元 331a, 用于停止运行该虚拟机;
第一复制单元 332a, 用于在该第一停止运行单元 331a停止运行该虚拟机 后, 将该未被复制的脏页以及该虚拟机上的临时数据内存页, 从该源物理机复 制到该目标物理机;
第一发送单元 333a, 用于在该第一复制单元 332a复制该未被复制的脏页 以及该虚拟机上的临时数据内存页之后, 向该目标物理机上的目标虚拟机迁移 管理装置发送第一指示信息, 该第一指示信息用于指示该目标虚拟机迁移管理 装置在该目标物理机上恢复该虚拟机。
可选地, 虚拟机迁移管理装置也可以在停止运行虚拟机之前停止运行临时 数据进程, 而在停止虚拟机后不必复制临时数据内存页, 因此, 可选地, 作为 另一实施例, 如图 12所示, 该迁移模块 330, 包括:
第一通知单元 331b,用于通过迁移预通知接口通知该虚拟机停止运行临时 数据进程;
第一获取单元 332b,用于通过该迁移预通知接口获取该虚拟机通知的停止 成功响应, 该停止成功响应用于指示该虚拟机根据该第一通知单元 331b 的通 知停止运行临时数据进程成功;
第二停止运行单元 333b, 用于在该第一获取单元 332b获取到该虚拟机通 知的的停止成功响应时, 停止运行该虚拟机;
第二复制单元 334b, 用于在该第二停止单元 333b停止运行该虚拟机时,
将该未被复制的脏页从该源物理机复制到该目标物理机;
第二发送单元 335b, 用于在该第二复制单元 334b将该未被复制的脏页从 该源物理机复制到该目标物理机之后, 向该目标物理机上的目标虚拟机迁移管 理装置发送第一指示信息, 该第一指示信息用于指示该目标虚拟机迁移管理装 置在该目标物理机上恢复该虚拟机
可选地, 作为另一实施例, 如图 13所示, 该虚拟机迁移管理装置 300, 还 包括: 发送模块 340, 用于向该目标虚拟机迁移管理装置发送第二指示信息, 该第二指示信息用于指示该目标虚拟机迁移管理装置通过迁移完毕通知接口 通知该虚拟机重新启动被停止运行的该临时数据进程。
可选地, 作为另一实施例, 如图 14所示, 该确定模块 310, 包括: 获取单元 311 , 用于通过临时数据进程内存页注册接口获取该虚拟机通知 的临时数据内存页的信息;
确定单元 312,用于根据该获取单元 311获取的该临时数据内存页的信息, 确定该虚拟机上的除该临时数据内存页外的内存页为非临时数据内存页。
应理解, 根据本发明实施例的虚拟机迁移管理装置 300可对应于本发明实 施例中的源虚拟机迁移管理装置, 并且虚拟机迁移管理装置 300中的各个模块 的上述和其它操作和 /或功能分别为了实现图 1 至图 4 中的各个方法的相应流 程, 为了筒洁, 在此不再赘述。
因此, 本发明实施例的虚拟机迁移管理装置, 通过对多进程系统中的进程 和内存页进行分类, 能够在脏页的循环复制过程中不复制临时数据内存页而只 复制非临时数据内存页, 从而减少热迁移虚拟机的耗时, 降低由临时数据的变 化而造成的系统 CPU和网络带宽等系统资源的浪费, 节省了系统资源, 提高 了用户体验。
图 15示出了根据本发明实施例的虚拟机 400的示意性框图, 该虚拟机位 于源物理机上, 需要说明的是, 该虚拟机也可以应用于目标物理机上, 本发明
并不对此进行限定。 如图 15所示, 该虚拟机 400包括:
确定模块 410, 用于确定源物理机上的虚拟机的临时数据内存页; 通知模块 420, 用于通过临时数据进程内存页注册接口将该确定模块 410 确定的该临时数据内存页的信息通知该源物理机上的源虚拟机迁移管理装置, 以便该源虚拟机迁移管理装置根据该临时数据内存页的信息确定该虚拟机的 非临时数据内存页并在将该虚拟机从该源物理机热迁移到目标物理机的过程 中复制该非临时数据内存页。
因此, 本发明实施例的虚拟机, 通过对多进程系统中的进程和内存页进行 分类, 能够在脏页的循环复制过程中不复制临时数据内存页而只复制非临时数 据内存页, 从而减少热迁移虚拟机的耗时, 降低由临时数据的变化而造成的系 统 CPU和网络带宽等系统资源的浪费, 节省了系统资源, 提高了用户体验。
可选地, 如图 16所示, 在本发明实施例中, 该虚拟机 400还包括: 第一获取模块 430, 用于在该通知模块 420通过临时数据进程内存页注册 接口将该临时数据内存页的信息通知该源物理机上的源虚拟机迁移管理装置 之后, 通过迁移预通知接口获取该源虚拟机迁移管理装置通知的停止运行临时 数据进程的通知;
停止运行模块 440, 用于根据该第一获取模块 430获取的该停止运行临时 数据进程的通知, 停止运行临时数据进程;
该通知模块 420还用于在该停止运行模块 440停止运行该临时数据进程成 功时,通过该迁移预通知接口,将停止成功响应通知该源虚拟机迁移管理装置, 以便该源虚拟机迁移管理装置根据该停止成功响应停止运行该虚拟机并指示 该目标物理机上的目标虚拟机迁移管理装置在该目标物理机上恢复该虚拟机。
可选地, 作为另一实施例, 如图 17所示, 该虚拟机 400还包括: 第二获取模块 450,用于在该虚拟机被该目标虚拟机迁移管理装置恢复时, 通过迁移完毕通知接口, 获取该目标虚拟机迁移管理装置通知的重新启动临时
数据进程的通知;
启动模块 460, 用于根据该第二获取模块 450获取的该重新启动临时数据 进程的通知, 重新启动被停止运行的该临时数据进程。
可选地, 应用可以在创建进程后将临时数据进程通过临时数据进程注册接 口通知虚拟机, 因此,作为另一实施例, 如图 18所示, 该确定模块 410, 包括: 菝取单元 411 , 用于通过临时数据进程注册接口获取应用通知的临时数据 进程的信息;
确定单元 412, 用于根据该获取单元 411获取的该临时数据进程的信息, 确定该临时数据进程占用的内存页为临时数据内存页。
可选地, 作为另一实施例, 该确定模块 410具体用于确定临时数据专用内 存块以及确定该临时数据专用内存块中的所有内存页为临时数据内存页;
应用可以在创建进程时将临时数据进程通过创建进程接口通知虚拟机, 而 虚拟机为该临时数据进程分配相应的内存, 因此, 如图 19所示, 该虚拟机 400 还包括:
第三获取模块 470 ,用于通过创建进程接口获取该应用通知的进程的类型, 该进程的类型包括临时数据进程或持久化数据进程;
分配模块 480, 用于当该第三获取模块 470获取的该进程的类型为临时数 据进程时, 为该临时数据进程分配该临时数据专用内存块中的内存页。 机,并且虚拟机 400中的各个模块的上述和其它操作和 /或功能分别为了实现图 5至图 9中的各个方法的相应流程, 为了筒洁, 在此不再赘述。
因此, 本发明实施例的虚拟机, 通过对多进程系统中的进程和内存页进行 分类, 能够在脏页的循环复制过程中不复制临时数据内存页而只复制非临时数 据内存页, 从而减少热迁移虚拟机的耗时, 降低由临时数据的变化而造成的系 统 CPU和网络带宽等系统资源的浪费, 节省了系统资源, 提高了用户体验。
图 20是根据本发明实施例的实现虚拟机热迁移的系统 500的示意性框图, 该实现虚拟机热迁移的系统可以是上述各方法和装置描述中的源物理机或目 标物理机, 也可以是源物理机或目标物理机之外的其它系统, 本发明实施例对 此不作限定, 如图 20所示, 该系统 500包括: 虚拟机迁移管理装置 510和虚 拟机 520, 其中, 该虚拟机迁移管理装置 510可以是图 10至图 14描述的任一 种虚拟机迁移管理装置, 该虚拟机 520可以是图 15至图 19描述的任一种虚拟 机。
因此, 本发明实施例的实现虚拟机热迁移的系统, 通过对多进程系统中的 进程和内存页进行分类, 能够在脏页的循环复制过程中不复制临时数据内存页 而只复制非临时数据内存页, 从而减少热迁移虚拟机的耗时, 降低由临时数据 的变化而造成的系统 CPU和网络带宽等系统资源的浪费, 节省了系统资源, 提高了用户体验。
图 21是根据本发明实施例的虚拟机迁移管理装置 600的示意性框图。 如 图 21所示, 该虚拟机迁移管理装置 600包括储存器 610, 和处理器 620, 例如 CPU, 该处理器 620用于执行存储器 610存储的指令。 具体地, 该处理器 620 具体用于确定源物理机上的虚拟机的非临时数据内存页, 并将该非临时数据内 存页从该源物理机复制到目标物理机, 以及将该非临时数据内存页的复制过程 中产生的脏页从该源物理机循环复制到该目标物理机, 直到未被复制的脏页的 数目与该非临时数据内存页的数目之比低于预设值, 以及在该未被复制的脏页 的数目与该非临时数据内存页的数目之比低于该预设值时, 对该虚拟机实施迁 移。
因此, 本发明实施例的虚拟机迁移管理装置, 通过对多进程系统中的进程 和内存页进行分类, 能够在脏页的循环复制过程中不复制临时数据内存页而只 复制非临时数据内存页, 从而减少热迁移虚拟机的耗时, 降低由临时数据的变 化而造成的系统 CPU和网络带宽等系统资源的浪费, 节省了系统资源, 提高
了用户体验。
可选地, 在本发明实施例中, 该处理器 620还用于停止运行该虚拟机, 并 将该未被复制的脏页以及该虚拟机上的临时数据内存页, 从该源物理机复制到 该目标物理机;
相对应地, 如图 22所示, 该虚拟机迁移管理装置 600还包括:
发送器 630, 用于向该目标物理机上的目标虚拟机迁移管理装置发送第一 指示信息, 该第一指示信息用于指示该目标虚拟机迁移管理装置在该目标物理 机上恢复该虚拟机。
可选地, 作为另一实施例, 该处理器 620还用于通过迁移预通知接口, 通 知该虚拟机停止运行临时数据进程, 并通过该迁移预通知接口获取该虚拟机通 知的用于指示该虚拟机停止运行临时数据进程成功的停止成功响应, 以及当获 取到该虚拟机通知的停止成功响应时, 停止运行该虚拟机, 并将该未被复制的 脏页从该源物理机复制到该目标物理机;
该发送器 630还用于在停止运行该虚拟机之后, 向该目标物理机上的目标 虚拟机迁移管理装置发送第一指示信息, 该第一指示信息用于指示该目标虚拟 机迁移管理装置在该目标物理机上恢复该虚拟机。
可选地, 作为另一实施例, 该发送器 630还用于向该目标虚拟机迁移管理 装置发送第二指示信息, 该第二指示信息用于指示该目标虚拟机迁移管理装置 通过迁移完毕通知接口通知该虚拟机重新启动被停止运行的该临时数据进程。
可选地, 作为另一实施例, 该处理器 620还用于通过临时数据进程内存页 注册接口获取该虚拟机通知的临时数据内存页的信息,并根据该临时数据内存 页的信息, 确定该虚拟机上的除该临时数据内存页外的内存页为非临时数据内 存页。
应理解, 根据本发明实施例的虚拟机迁移管理装置 600可对应于本发明实 施例中的源虚拟机迁移管理装置, 并且虚拟机迁移管理装置 600中的各个模块
的上述和其它操作和 /或功能分别为了实现图 1 至图 4 中的各个方法的相应流 程, 为了筒洁, 在此不再赘述。
因此, 本发明实施例的虚拟机迁移管理装置, 通过对多进程系统中的进程 和内存页进行分类, 能够在脏页的循环复制过程中不复制临时数据内存页而只 复制非临时数据内存页, 从而减少热迁移虚拟机的耗时, 降低由临时数据的变 化而造成的系统 CPU和网络带宽等系统资源的浪费, 节省了系统资源, 提高 了用户体验。
图 23示出了根据本发明实施例的虚拟机 700的示意性框图。如图 23所示, 该虚拟机 700包括存储器 710和处理器 720,该处理器 720用于执行存储器 710 存储的指令。 具体地, 该处理器 720具体用于确定源物理机上的虚拟机的临时 数据内存页, 并通过临时数据进程内存页注册接口将该临时数据内存页的信息 通知该源物理机上的源虚拟机迁移管理装置, 以便该源虚拟机迁移管理装置根 据该临时数据内存页的信息确定该虚拟机的非临时数据内存页并在将该虚拟 机从该源物理机热迁移到目标物理机的过程中复制该非临时数据内存页。
可选地, 在本发明实施例中, 该处理器 720还用于通过迁移预通知接口获 取该源虚拟机迁移管理装置通知的停止运行临时数据进程的通知, 并根据该停 止运行临时数据进程的通知, 停止运行临时数据进程, 以及在停止运行该临时 数据进程成功时, 通过该迁移预通知接口将停止成功响应通知该源虚拟机迁移 管理装置, 以便该源虚拟机迁移管理装置根据该停止成功响应停止运行该虚拟 机并指示该目标物理机上的目标虚拟机迁移管理装置在该目标物理机上恢复 该虚拟机。
可选地, 作为另一实施例, 该处理器 720还用于在该虚拟机被该目标虚拟 机迁移管理装置恢复时, 通过迁移完毕通知接口获取该目标虚拟机迁移管理装 置通知的重新启动临时数据进程的通知, 并 4艮据该重新启动临时数据进程的通 知, 重新启动被停止运行的临时数据进程。
可选地, 作为另一实施例, 该处理器 720还用于通过临时数据进程注册接 口获取应用通知的临时数据进程的信息, 并根据该临时数据进程的信息, 确定 该临时数据进程占用的内存页为临时数据内存页。
可选地, 作为另一实施例, 该处理器 720还用于确定临时数据专用内存块 以及确定该临时数据专用内存块中的所有内存页为临时数据内存页, 并通过创 建进程接口获取该应用通知的进程的类型, 该进程的类型包括临时数据进程或 持久化数据进程, 以及当该进程的类型为临时数据进程时, 为该临时数据进程 分配该临时数据专用内存块中的内存页。
应理解, 根据本发明实施例的虚拟机 700可对应于本发明实施例中的虚拟 机,并且虚拟机 700中的各个模块的上述和其它操作和 /或功能分别为了实现图 5至图 9中的各个方法的相应流程, 为了筒洁, 在此不再赘述。
因此, 本发明实施例的虚拟机, 通过对多进程系统中的进程和内存页进行 分类, 能够在脏页的循环复制过程中不复制临时数据内存页而只复制非临时数 据内存页, 从而减少热迁移虚拟机的耗时, 降低由临时数据的变化而造成的系 统 CPU和网络带宽等系统资源的浪费, 节省了系统资源, 提高了用户体验。
图 24是根据本发明实施例的实现虚拟机热迁移的系统 800的示意性框图, 该实现虚拟机热迁移的系统可以是上述各方法和装置描述中的源物理机或目 标物理机, 也可以是源物理机或目标物理机之外的其它系统, 本发明实施例对 此不作限定, 如图 24所示, 该系统 800包括: 虚拟机迁移管理装置 810和虚 拟机 820, 其中, 该虚拟机迁移管理装置 810可以是图 21至图 22描述的任一 种虚拟机迁移管理装置, 该虚拟机 820可以是图 23描述的虚拟机。
因此, 本发明实施例的实现虚拟机热迁移的系统, 通过对多进程系统中的 进程和内存页进行分类, 能够在脏页的循环复制过程中不复制临时数据内存页 而只复制非临时数据内存页, 从而减少热迁移虚拟机的耗时, 降低由临时数据 的变化而造成的系统 CPU和网络带宽等系统资源的浪费, 节省了系统资源,
提高了用户体验。
应理解, 上述各实施例中的各种接口还可以取其它的名称, 这些接口应以 其内在功能确定, 而不应将这些接口的名称作为对本发明实施例中的这些接口 的限定。
本领域普通技术人员可以意识到, 结合本文中所公开的实施例中描述的各 方法步骤和单元, 能够以电子硬件、 计算机软件或者二者的结合来实现, 为了 清楚地说明硬件和软件的可互换性, 在上述说明中已经按照功能一般性地描述 了各实施例的步骤及组成。 这些功能究竟以硬件还是软件方式来执行, 取决于 技术方案的特定应用和设计约束条件。 本领域普通技术人员可以对每个特定的 应用来使用不同方法来实现所描述的功能, 但是这种实现不应认为超出本发明 的范围。
所属领域的技术人员可以清楚地了解到, 为了描述的方便和筒洁, 上述描 述的系统、 装置和单元的具体工作过程, 可以参考前述方法实施例中的对应过 程, 在此不再赘述。
在本申请所提供的几个实施例中, 应该理解到, 所揭露的系统、 装置和方 法, 可以通过其它的方式实现。 例如, 以上所描述的装置实施例仅仅是示意性 的, 例如, 所述单元的划分, 仅仅为一种逻辑功能划分, 实际实现时可以有另 外的划分方式, 例如多个单元或组件可以结合或者可以集成到另一个系统, 或 一些特征可以忽略, 或不执行。 另外, 所显示或讨论的相互之间的耦合或直接 耦合或通信连接可以是通过一些接口、 装置或单元的间接耦合或通信连接, 也 可以是电的, 机械的或其它的形式连接。 单元显示的部件可以是或者也可以不是物理单元, 即可以位于一个地方, 或者 也可以分布到多个网络单元上。 可以根据实际的需要选择其中的部分或者全部 单元来实现本发明实施例方案的目的。
另外, 在本发明各个实施例中的各功能单元可以集成在一个处理单元中, 也可以是各个单元单独物理存在, 也可以是两个或两个以上单元集成在一个单 元中。 上述集成的单元既可以采用硬件的形式实现, 也可以采用软件功能单元 的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售 或使用时, 可以存储在一个计算机可读取存储介质中。 基于这样的理解, 本发 明的技术方案本质上或者说对现有技术做出贡献的部分, 或者该技术方案的全 部或部分可以以软件产品的形式体现出来, 该计算机软件产品存储在一个存储 介质中, 包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器, 或者网络设备等)执行本发明各个实施例所述方法的全部或部分步骤。 而前述 的存储介质包括: U盘、 移动硬盘、 只读存储器(Read-Only Memory, 筒称为 " ROM" )、 随机存取存储器(Random Access Memory, 筒称为 " RAM" )、 磁碟或者光盘等各种可以存储程序代码的介质。
以上所述, 仅为本发明的具体实施方式, 但本发明的保护范围并不局限于 此, 任何熟悉本技术领域的技术人员在本发明揭露的技术范围内, 可轻易想到 各种等效的修改或替换, 这些修改或替换都应涵盖在本发明的保护范围之内。 因此, 本发明的保护范围应以权利要求的保护范围为准。
Claims
1. 一种实现虚拟机热迁移的方法, 其特征在于, 包括:
源物理机上的源虚拟机迁移管理装置确定所述源物理机上的虚拟机的非 临时数据内存页;
将所述非临时数据内存页从所述源物理机复制到目标物理机;
将所述非临时数据内存页的复制过程中产生的脏页从所述源物理机循环 复制到所述目标物理机, 直到未被复制的脏页的数目与所述非临时数据内存页 的数目之比低于预设值;
在所述未被复制的脏页的数目与所述非临时数据内存页的数目之比低于 所述预设值时, 对所述虚拟机实施迁移。
2. 根据权利要求 1 所述的方法, 其特征在于, 所述对所述虚拟机实施迁 移, 包括:
停止运行所述虚拟机;
将所述未被复制的脏页以及所述虚拟机上的临时数据内存页, 从所述源物 理机复制到所述目标物理机;
向所述目标物理机上的目标虚拟机迁移管理装置发送第一指示信息, 所述 第一指示信息用于指示所述目标虚拟机迁移管理装置在所述目标物理机上恢 复所述虚拟机。
3. 根据权利要求 1 所述的方法, 其特征在于, 所述对所述虚拟机实施迁 移, 包括:
通过迁移预通知接口, 通知所述虚拟机停止运行临时数据进程; 在通过所述迁移预通知接口获取到所述虚拟机通知的停止成功响应时, 停 止运行所述虚拟机, 所述停止成功响应用于指示所述虚拟机停止运行临时数据 进程成功;
将所述未被复制的脏页从所述源物理机复制到所述目标物理机;
向所述目标物理机上的目标虚拟机迁移管理装置发送第一指示信息, 所述 第一指示信息用于指示所述目标虚拟机迁移管理装置在所述目标物理机上恢 复所述虚拟机。
4. 根据权利要求 3所述的方法, 其特征在于, 所述方法还包括: 向所述目标虚拟机迁移管理装置发送第二指示信息, 所述第二指示信息用 于指示所述目标虚拟机迁移管理装置通过迁移完毕通知接口通知所述虚拟机 重新启动被停止运行的所述临时数据进程。
5. 根据权利要求 1-4中任一项所述的方法, 其特征在于, 所述确定源物理 机上的虚拟机的非临时数据内存页, 包括:
通过临时数据进程内存页注册接口, 获取所述虚拟机通知的临时数据内存 页的信息;
根据所述临时数据内存页的信息, 确定所述虚拟机上的除所述临时数据内 存页外的内存页为非临时数据内存页。
6. 一种实现虚拟机热迁移的方法, 其特征在于, 包括:
源物理机上的虚拟机确定虚拟机的临时数据内存页;
通过临时数据进程内存页注册接口, 将所述临时数据内存页的信息通知所 述源物理机上的源虚拟机迁移管理装置, 以便所述源虚拟机迁移管理装置根据 所述临时数据内存页的信息确定所述虚拟机的非临时数据内存页, 并在将所述 虚拟机从所述源物理机热迁移到目标物理机的过程中复制所述非临时数据内 存页。
7. 根据权利要求 6所述的方法, 其特征在于, 在所述通过临时数据进程 内存页注册接口将所述临时数据内存页的信息通知所述源物理机上的源虚拟 机迁移管理装置之后, 所述方法还包括:
通过迁移预通知接口, 获取所述源虚拟机迁移管理装置通知的停止运行临 时数据进程的通知;
根据所述停止运行临时数据进程的通知, 停止运行临时数据进程; 在停止运行所述临时数据进程成功时, 通过所述迁移预通知接口, 将停止 成功响应通知所述源虚拟机迁移管理装置, 以便所述源虚拟机迁移管理装置根 据所述停止成功响应停止运行所述虚拟机, 并指示所述目标物理机上的目标虚 拟机迁移管理装置在所述目标物理机上恢复所述虚拟机。
8. 根据权利要求 7所述的方法, 其特征在于, 所述方法还包括: 在所述虚拟机被所述目标虚拟机迁移管理装置恢复时, 所述虚拟机通过迁 移完毕通知接口, 获取所述目标虚拟机迁移管理装置通知的重新启动临时数据 进程的通知;
根据所述重新启动临时数据进程的通知, 重新启动被停止运行的所述临时 数据进程。
9. 根据权利要求 6-8中任一项所述的方法, 其特征在于, 所述确定临时数 据内存页, 包括:
通过临时数据进程注册接口, 获取应用通知的临时数据进程的信息; 根据所述临时数据进程的信息, 确定所述临时数据进程占用的内存页为临 时数据内存页。
10. 根据权利要求 6-8中任一项所述的方法, 其特征在于, 所述确定临时 数据内存页, 包括:
确定临时数据专用内存块;
确定所述临时数据专用内存块中的所有内存页为临时数据内存页; 所述方法还包括:
通过创建进程接口, 获取所述应用通知的进程的类型, 所述进程的类型包 括临时数据进程或持久化数据进程;
当所述进程的类型为临时数据进程时, 为所述临时数据进程分配所述临时 数据专用内存块中的内存页。
11. 一种虚拟机迁移管理装置, 其特征在于, 包括:
确定模块, 用于确定源物理机上的虚拟机的非临时数据内存页; 复制模块, 用于将所述确定模块确定的所述非临时数据内存页从所述源物 理机复制到目标物理机, 以及将所述非临时数据内存页的复制过程中产生的脏 页从所述源物理机循环复制到所述目标物理机, 直到未被复制的脏页的数目与 所述非临时数据内存页的数目之比低于预设值;
迁移模块, 用于在所述复制模块未复制的脏页的数目与所述非临时数据内 存页的数目之比低于所述预设值时, 对所述虚拟机实施迁移。
12. 根据权利要求 11 所述的虚拟机迁移管理装置, 其特征在于, 所述迁 移模块, 包括:
第一停止运行单元, 用于停止运行所述虚拟机;
第一复制单元, 用于在所述第一停止运行单元停止运行所述虚拟机后, 将 所述未被复制的脏页以及所述虚拟机上的临时数据内存页, 从所述源物理机复 制到所述目标物理机;
第一发送单元, 用于在所述第一复制单元复制所述未被复制的脏页以及所 述虚拟机上的临时数据内存页之后, 向所述目标物理机上的目标虚拟机迁移管 理装置发送第一指示信息, 所述第一指示信息用于指示所述目标虚拟机迁移管 理装置在所述目标物理机上恢复所述虚拟机。
13. 根据权利要求 11 所述的虚拟机迁移管理装置, 其特征在于, 所述迁 移模块, 包括:
第一通知单元, 用于通过迁移预通知接口, 通知所述虚拟机停止运行临时 数据进程;
第一获取单元, 用于通过所述迁移预通知接口, 获取所述虚拟机通知的停 止成功响应, 所述停止成功响应用于指示所述虚拟机根据所述第一通知单元的 通知停止运行临时数据进程成功;
第二停止运行单元, 用于在所述第一获取单元获取到所述虚拟机通知的停 止成功响应时, 停止运行所述虚拟机;
第二复制单元, 用于在所述第二停止单元停止运行所述虚拟机后, 将所述 未被复制的脏页从所述源物理机复制到所述目标物理机;
第二发送单元, 用于在所述第二复制单元将所述未被复制的脏页从所述源 物理机复制到所述目标物理机之后, 向所述目标物理机上的目标虚拟机迁移管 理装置发送第一指示信息, 所述第一指示信息用于指示所述目标虚拟机迁移管 理装置在所述目标物理机上恢复所述虚拟机。
14. 根据权利要求 13 所述的虚拟机迁移管理装置, 其特征在于, 所述虚 拟机迁移管理装置, 还包括:
发送模块, 用于向所述目标虚拟机迁移管理装置发送第二指示信息, 所述 第二指示信息用于指示所述目标虚拟机迁移管理装置通过迁移完毕通知接口 通知所述虚拟机重新启动被停止运行的所述临时数据进程。
15. 根据权利要求 11-14中任一项所述的虚拟机迁移管理装置, 其特征在 于, 所述确定模块, 包括:
获取单元, 用于通过临时数据进程内存页注册接口, 获取所述虚拟机通知 的临时数据内存页的信息;
确定单元, 用于根据所述获取单元获取的所述临时数据内存页的信息, 确 定所述虚拟机上的除所述临时数据内存页外的内存页为非临时数据内存页。
16. 一种虚拟机, 其特征在于, 包括:
确定模块, 用于确定所述虚拟机的临时数据内存页;
通知模块, 用于通过临时数据进程内存页注册接口, 将所述确定模块确定 的所述临时数据内存页的信息通知源物理机上的源虚拟机迁移管理装置, 以便 所述源虚拟机迁移管理装置根据所述临时数据内存页的信息确定所述虚拟机
的过程中复制所述非临时数据内存页。
17. 根据权利要求 16所述的虚拟机, 其特征在于, 所述虚拟机还包括: 第一获取模块, 用于在所述通知模块通过临时数据进程内存页注册接口将 所述临时数据内存页的信息通知所述源物理机上的源虚拟机迁移管理装置之 后, 通过迁移预通知接口, 获取所述源虚拟机迁移管理装置通知的停止运行临 时数据进程的通知;
停止运行模块, 用于根据所述第一获取模块获取的所述停止运行临时数据 进程的通知, 停止运行临时数据进程;
所述通知模块还用于在所述停止运行模块停止运行所述临时数据进程成 功时, 通过所述迁移预通知接口, 将停止成功响应通知所述源虚拟机迁移管理 装置, 以便所述源虚拟机迁移管理装置根据所述停止成功响应停止运行所述虚 拟机, 并指示所述目标物理机上的目标虚拟机迁移管理装置在所述目标物理机 上恢复所述虚拟机。
18. 根据权利要求 17所述的虚拟机, 其特征在于, 所述虚拟机还包括: 第二获取模块, 用于在所述虚拟机被所述目标虚拟机迁移管理装置恢复 时, 通过迁移完毕通知接口, 获取所述目标虚拟机迁移管理装置通知的重新启 动临时数据进程的通知;
启动模块, 用于根据所述第二获取模块获取的所述重新启动临时数据进程 的通知, 重新启动被停止运行的所述临时数据进程。
19. 根据权利要求 16-18中任一项所述的虚拟机, 其特征在于, 所述确定 模块, 包括:
获取单元, 用于通过临时数据进程注册接口, 获取应用通知的临时数据进 程的信息;
确定单元, 用于根据所述获取单元获取的所述临时数据进程的信息, 确定 所述临时数据进程占用的内存页为临时数据内存页。
20. 根据权利要求 16-18中任一项所述的虚拟机, 其特征在于, 所述确定 模块具体用于确定临时数据专用内存块, 以及确定所述临时数据专用内存块中 的所有内存页为临时数据内存页;
所述虚拟机还包括:
第三获取模块,用于通过创建进程接口,获取所述应用通知的进程的类型, 所述进程的类型包括临时数据进程或持久化数据进程;
分配模块, 用于当所述第三获取模块获取的所述进程的类型为临时数据进 程时, 为所述临时数据进程分配所述临时数据专用内存块中的内存页。
21.—种实现虚拟机热迁移的系统, 包括如权利要求 11-15中任一项所述的 虚拟机迁移管理装置, 以及如权利要求 16-20中任一项所述的虚拟机。
Priority Applications (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
EP13858092.3A EP2916217B1 (en) | 2012-11-30 | 2013-07-18 | Method, apparatus, and system for implementing hot migration of virtual machine |
JP2015544320A JP5965552B2 (ja) | 2012-11-30 | 2013-07-18 | バーチャルマシーンのホットマイグレーションを実現する方法、装置及びシステム |
US14/724,367 US9672075B2 (en) | 2012-11-30 | 2015-05-28 | Method, apparatus, and system for implementing hot migration of virtual machine |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201210504276.4A CN103049308B (zh) | 2012-11-30 | 2012-11-30 | 实现虚拟机热迁移的方法、装置及系统 |
CN201210504276.4 | 2012-11-30 |
Related Child Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
US14/724,367 Continuation US9672075B2 (en) | 2012-11-30 | 2015-05-28 | Method, apparatus, and system for implementing hot migration of virtual machine |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2014082459A1 true WO2014082459A1 (zh) | 2014-06-05 |
Family
ID=48061958
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2013/079570 WO2014082459A1 (zh) | 2012-11-30 | 2013-07-18 | 实现虚拟机热迁移的方法、装置及系统 |
Country Status (5)
Country | Link |
---|---|
US (1) | US9672075B2 (zh) |
EP (1) | EP2916217B1 (zh) |
JP (1) | JP5965552B2 (zh) |
CN (1) | CN103049308B (zh) |
WO (1) | WO2014082459A1 (zh) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104243203A (zh) * | 2014-08-28 | 2014-12-24 | 深圳市深信服电子科技有限公司 | 虚拟机传输接口状态切换方法和系统 |
CN110134490A (zh) * | 2018-02-08 | 2019-08-16 | 中兴通讯股份有限公司 | 虚拟机动态迁移方法、设备及存储介质 |
CN111381933A (zh) * | 2020-03-07 | 2020-07-07 | 北京工业大学 | 一种Docker热迁移实现方法 |
CN112433812A (zh) * | 2020-11-19 | 2021-03-02 | 北京浪潮数据技术有限公司 | 一种虚拟机跨集群迁移方法、系统、设备及计算机介质 |
CN115048183A (zh) * | 2022-06-10 | 2022-09-13 | 曙光信息产业股份有限公司 | 一种虚拟机热迁移方法、装置、电子设备及存储介质 |
Families Citing this family (31)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103309625B (zh) * | 2013-05-29 | 2016-06-08 | 华为技术有限公司 | 一种基于自适应存储热迁移的方法和系统 |
JP6160253B2 (ja) * | 2013-05-30 | 2017-07-12 | 富士通株式会社 | 仮想機械管理装置、仮想機械管理方法及び情報処理システム |
CN103353850B (zh) * | 2013-06-13 | 2017-02-22 | 华为技术有限公司 | 虚拟机热迁移内存处理方法、装置和系统 |
US9436751B1 (en) * | 2013-12-18 | 2016-09-06 | Google Inc. | System and method for live migration of guest |
CN103744725B (zh) * | 2013-12-24 | 2017-01-25 | 杭州华为数字技术有限公司 | 一种虚拟机管理方法及装置 |
CN103955399B (zh) * | 2014-04-30 | 2017-06-20 | 华为技术有限公司 | 一种虚拟机迁移方法和装置及物理主机 |
US10296452B2 (en) * | 2015-05-11 | 2019-05-21 | SK Hynix Inc. | Data separation by delaying hot block garbage collection |
CN105138394A (zh) * | 2015-09-21 | 2015-12-09 | 上海爱数软件有限公司 | 一种热迁移kvm虚拟机的方法及系统 |
DE112015007188T5 (de) * | 2015-12-18 | 2018-09-13 | Intel Corporation | Batch-Migration virtueller Maschinen während des aktiven Bertriebs |
US10133593B1 (en) | 2016-03-31 | 2018-11-20 | Amazon Technologies, Inc. | Virtual machine migration |
US10127066B1 (en) | 2016-03-31 | 2018-11-13 | Amazon Technologies, Inc. | Server synchronization using continuous block migration in provider network environments |
CN107465626A (zh) * | 2016-06-03 | 2017-12-12 | 阿里巴巴集团控股有限公司 | 一种虚拟机热迁移方法及装置 |
US9880872B2 (en) * | 2016-06-10 | 2018-01-30 | GoogleLLC | Post-copy based live virtual machines migration via speculative execution and pre-paging |
CN108121589A (zh) * | 2016-11-30 | 2018-06-05 | 中标软件有限公司 | 一种虚拟机的在线迁移自动收敛的方法 |
WO2018176359A1 (en) * | 2017-03-31 | 2018-10-04 | Intel Corporation | Techniques to decrease live migration time for virtual machine |
CN107479944B (zh) * | 2017-07-20 | 2021-11-30 | 上海交通大学 | 混合云模式下的虚拟机内存自适应热迁移调度方法及系统 |
CN109426547B (zh) * | 2017-09-04 | 2022-05-17 | 华为技术有限公司 | 一种虚拟机的热迁移方法、装置和系统 |
CN107832145B (zh) * | 2017-10-24 | 2021-08-06 | 中安云科科技发展(山东)有限公司 | 一种基于虚拟机的系统资源释放方法 |
US10956197B2 (en) * | 2017-12-13 | 2021-03-23 | Citrix Systems, Inc. | Virtual machine with an emulator manager for migration of synchronized streams of state data |
US10754822B1 (en) * | 2018-04-18 | 2020-08-25 | Palantir Technologies Inc. | Systems and methods for ontology migration |
JP7125601B2 (ja) * | 2018-07-23 | 2022-08-25 | 富士通株式会社 | ライブマイグレーション制御プログラム及びライブマイグレーション制御方法 |
JP7197783B2 (ja) * | 2019-01-11 | 2022-12-28 | 富士通株式会社 | 情報処理システム、管理装置および管理プログラム |
CN110058970B (zh) * | 2019-04-22 | 2022-10-18 | 重庆邮电大学 | 一种灾难风险模型下的双虚拟机准同步撤离方法 |
CN112416507B (zh) * | 2019-08-22 | 2024-06-11 | 华为技术有限公司 | 一种虚拟机迁移方法以及设备 |
CN111176781A (zh) * | 2019-08-23 | 2020-05-19 | 腾讯科技(深圳)有限公司 | 虚拟机热迁移方法、装置、存储介质与电子设备 |
CN110990133B (zh) * | 2019-11-15 | 2022-11-04 | 杭州未名信科科技有限公司 | 边缘计算服务迁移方法、装置、电子设备及介质 |
US11561821B1 (en) * | 2020-05-07 | 2023-01-24 | Amazon Technologies, Inc. | Controlling placement of virtualized resources based on desirability index for host pools |
CN112291345B (zh) * | 2020-10-29 | 2023-03-24 | 上海市共进通信技术有限公司 | 物理机间进行进程迁移过程中保持socket不中断状态的方法 |
CN113626142B (zh) * | 2021-07-14 | 2024-04-05 | 麒麟软件有限公司 | 一种虚拟时统卡热迁移方法 |
US20230359533A1 (en) * | 2022-05-05 | 2023-11-09 | Google Llc | User Triggered Virtual Machine Cloning for Recovery/Availability/Scaling |
CN118502885B (zh) * | 2024-07-15 | 2024-10-15 | 济南浪潮数据技术有限公司 | 一种热迁移方法、设备、程序产品及介质 |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101101562A (zh) * | 2007-07-10 | 2008-01-09 | 北京大学 | 一种虚拟机的外存在线迁移方法 |
US20090228629A1 (en) * | 2008-03-07 | 2009-09-10 | Alexander Gebhart | Migration Of Applications From Physical Machines to Virtual Machines |
CN102081552A (zh) * | 2009-12-01 | 2011-06-01 | 华为技术有限公司 | 一种物理机到虚拟机的在线迁移方法、装置和系统 |
CN102103524A (zh) * | 2010-12-23 | 2011-06-22 | 北京航空航天大学 | 一种面向内存冗余的虚拟机迁移装置及其方法 |
CN102314378A (zh) * | 2010-06-29 | 2012-01-11 | 微软公司 | 使用共享存储来迁移虚拟机的技术 |
CN102662723A (zh) * | 2012-02-28 | 2012-09-12 | 北京邮电大学 | 一种基于停机时间阈值的虚拟机内存迁移方法 |
Family Cites Families (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US8806480B2 (en) * | 2007-06-29 | 2014-08-12 | Microsoft Corporation | Virtual machine smart migration |
US8694990B2 (en) * | 2007-08-27 | 2014-04-08 | International Business Machines Corporation | Utilizing system configuration information to determine a data migration order |
US20120030306A1 (en) | 2009-04-28 | 2012-02-02 | Nobuharu Kami | Rapid movement system for virtual devices in a computing system, management device, and method and program therefor |
US8386731B2 (en) * | 2009-09-14 | 2013-02-26 | Vmware, Inc. | Method and system for optimizing live migration of persistent data of virtual machine using disk I/O heuristics |
US8370560B2 (en) * | 2009-11-16 | 2013-02-05 | International Business Machines Corporation | Symmetric live migration of virtual machines |
US8468288B2 (en) * | 2009-12-10 | 2013-06-18 | International Business Machines Corporation | Method for efficient guest operating system (OS) migration over a network |
US9110702B2 (en) * | 2010-06-02 | 2015-08-18 | Microsoft Technology Licensing, Llc | Virtual machine migration techniques |
US8990531B2 (en) * | 2010-07-12 | 2015-03-24 | Vmware, Inc. | Multiple time granularity support for online classification of memory pages based on activity level |
JP5614226B2 (ja) * | 2010-10-15 | 2014-10-29 | 富士通株式会社 | 仮想マシン制御装置、仮想マシン制御プログラムおよび仮想マシン制御方法 |
CN102681913A (zh) * | 2011-12-21 | 2012-09-19 | 中兴通讯股份有限公司 | 一种虚拟机到虚拟机热迁移的方法及装置 |
US9092318B2 (en) * | 2012-02-06 | 2015-07-28 | Vmware, Inc. | Method of allocating referenced memory pages from a free list |
US9197489B1 (en) * | 2012-03-30 | 2015-11-24 | Amazon Technologies, Inc. | Live migration of virtual machines in a hybrid network environment |
US9110704B2 (en) * | 2012-05-31 | 2015-08-18 | Red Hat Israel, Ltd. | Pre-warming of multiple destinations for fast live migration |
US9483414B2 (en) * | 2013-11-25 | 2016-11-01 | Red Hat Israel, Ltd. | Ordered memory pages transmission in virtual machine live migration |
-
2012
- 2012-11-30 CN CN201210504276.4A patent/CN103049308B/zh active Active
-
2013
- 2013-07-18 EP EP13858092.3A patent/EP2916217B1/en active Active
- 2013-07-18 WO PCT/CN2013/079570 patent/WO2014082459A1/zh active Application Filing
- 2013-07-18 JP JP2015544320A patent/JP5965552B2/ja active Active
-
2015
- 2015-05-28 US US14/724,367 patent/US9672075B2/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101101562A (zh) * | 2007-07-10 | 2008-01-09 | 北京大学 | 一种虚拟机的外存在线迁移方法 |
US20090228629A1 (en) * | 2008-03-07 | 2009-09-10 | Alexander Gebhart | Migration Of Applications From Physical Machines to Virtual Machines |
CN102081552A (zh) * | 2009-12-01 | 2011-06-01 | 华为技术有限公司 | 一种物理机到虚拟机的在线迁移方法、装置和系统 |
CN102314378A (zh) * | 2010-06-29 | 2012-01-11 | 微软公司 | 使用共享存储来迁移虚拟机的技术 |
CN102103524A (zh) * | 2010-12-23 | 2011-06-22 | 北京航空航天大学 | 一种面向内存冗余的虚拟机迁移装置及其方法 |
CN102662723A (zh) * | 2012-02-28 | 2012-09-12 | 北京邮电大学 | 一种基于停机时间阈值的虚拟机内存迁移方法 |
Non-Patent Citations (1)
Title |
---|
See also references of EP2916217A4 * |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104243203A (zh) * | 2014-08-28 | 2014-12-24 | 深圳市深信服电子科技有限公司 | 虚拟机传输接口状态切换方法和系统 |
CN110134490A (zh) * | 2018-02-08 | 2019-08-16 | 中兴通讯股份有限公司 | 虚拟机动态迁移方法、设备及存储介质 |
CN110134490B (zh) * | 2018-02-08 | 2023-12-29 | 中兴通讯股份有限公司 | 虚拟机动态迁移方法、设备及存储介质 |
CN111381933A (zh) * | 2020-03-07 | 2020-07-07 | 北京工业大学 | 一种Docker热迁移实现方法 |
CN111381933B (zh) * | 2020-03-07 | 2023-09-22 | 北京工业大学 | 一种Docker热迁移实现方法 |
CN112433812A (zh) * | 2020-11-19 | 2021-03-02 | 北京浪潮数据技术有限公司 | 一种虚拟机跨集群迁移方法、系统、设备及计算机介质 |
CN115048183A (zh) * | 2022-06-10 | 2022-09-13 | 曙光信息产业股份有限公司 | 一种虚拟机热迁移方法、装置、电子设备及存储介质 |
Also Published As
Publication number | Publication date |
---|---|
EP2916217B1 (en) | 2020-09-30 |
CN103049308B (zh) | 2016-01-20 |
EP2916217A4 (en) | 2016-02-17 |
EP2916217A1 (en) | 2015-09-09 |
JP5965552B2 (ja) | 2016-08-10 |
US9672075B2 (en) | 2017-06-06 |
US20150261581A1 (en) | 2015-09-17 |
JP2015535636A (ja) | 2015-12-14 |
CN103049308A (zh) | 2013-04-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2014082459A1 (zh) | 实现虚拟机热迁移的方法、装置及系统 | |
US9823877B2 (en) | Virtual machine backup from storage snapshot | |
US8307363B2 (en) | Virtual machine system, restarting method of virtual machine and system | |
CN102594849B (zh) | 数据备份、恢复方法、虚拟机快照删除、回滚方法及装置 | |
EP2955637B1 (en) | Method, system and apparatus for generating snapshot | |
WO2016121830A1 (ja) | 仮想ネットワークファンクション管理装置、システム、ヒーリング方法及びプログラム | |
WO2021018267A1 (zh) | 虚拟机热迁移方法和通信设备 | |
CN110704161B (zh) | 虚拟机创建方法、装置及计算机设备 | |
WO2012149844A1 (zh) | 一种虚拟机内存快照生成和恢复方法、装置及系统 | |
WO2017181830A1 (zh) | 一种服务器同步扩容的方法、装置及存储介质 | |
WO2012058917A1 (zh) | 虚拟机存储空间管理方法、系统及物理主机 | |
JP2012221321A (ja) | フォールトトレラント計算機システム、フォールトトレラント計算機システムの制御方法、及びフォールトトレラント計算機システムの制御プログラム | |
JP6123626B2 (ja) | 処理再開方法、処理再開プログラムおよび情報処理システム | |
CN108763405A (zh) | 一种业务数据迁移方法、装置、系统及可读存储介质 | |
US10725980B2 (en) | Highly available cluster agent for backup and restore operations | |
CN116185720A (zh) | 基于vSAN超融合虚拟化平台的虚拟机备份及恢复的方法 | |
JP2010218481A (ja) | 高信頼性計算機システムおよびその構成方法 | |
CN106775846B (zh) | 用于物理服务器的在线迁移的方法及装置 | |
JP6879960B2 (ja) | バックアップ制御方法及びシステム | |
CN106897118A (zh) | 一种虚拟机内存快照创建方法及系统 | |
CN116302337A (zh) | 虚拟机迁移方法、设备及存储介质 | |
JP5867630B2 (ja) | マルチコアプロセッサシステム、マルチコアプロセッサシステムの制御方法、およびマルチコアプロセッサシステムの制御プログラム | |
JP5101445B2 (ja) | 画像処理装置、画像処理方法、画像処理システム | |
JP6007532B2 (ja) | 仮想化システム、仮想化サーバ、マイグレーション方法、マイグレーションプログラム | |
Girish | Efficient virtual machine memory transfer in datacenter with optimal downtime |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 13858092 Country of ref document: EP Kind code of ref document: A1 |
|
ENP | Entry into the national phase |
Ref document number: 2015544320 Country of ref document: JP Kind code of ref document: A |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
WWE | Wipo information: entry into national phase |
Ref document number: 2013858092 Country of ref document: EP |