CN105740041A - Virtual machine online migration method and device - Google Patents

Virtual machine online migration method and device Download PDF

Info

Publication number
CN105740041A
CN105740041A CN201610004675.2A CN201610004675A CN105740041A CN 105740041 A CN105740041 A CN 105740041A CN 201610004675 A CN201610004675 A CN 201610004675A CN 105740041 A CN105740041 A CN 105740041A
Authority
CN
China
Prior art keywords
virtual machine
memory
range
memory range
free
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201610004675.2A
Other languages
Chinese (zh)
Inventor
常利民
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hangzhou H3C Technologies Co Ltd
Original Assignee
Hangzhou H3C Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou H3C Technologies Co Ltd filed Critical Hangzhou H3C Technologies Co Ltd
Priority to CN201610004675.2A priority Critical patent/CN105740041A/en
Publication of CN105740041A publication Critical patent/CN105740041A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/485Task life-cycle, e.g. stopping, restarting, resuming execution
    • G06F9/4856Task life-cycle, e.g. stopping, restarting, resuming execution resumption being on a different machine, e.g. task migration, virtual machine migration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5016Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/4557Distribution of virtual machine instances; Migration and load balancing

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

The invention provides a virtual machine online migration method and device. The virtual machine online migration method comprises the steps of obtaining a memory range of idle memory of a virtual machine when online migration of the managed virtual machine is required; releasing the memory corresponding to the memory range; and migrating the virtual machine with the memory released from a source host to a target host, and distributing the memory corresponding to the memory range to the virtual machine at the target host again. Based on the same inventive concept, the invention also provides a virtual machine online migration device capable of shortening time taken for online migration of the virtual machine.

Description

A kind of online moving method of virtual machine and device
Technical field
The present invention relates to computing technique field, particularly to a kind of online moving method of virtual machine and device.
Background technology
Under virtualized environment, the online migration of virtual machine is one and is highly useful and common operation.By this technology, it is possible to achieve actively maintenance shut-downs, resource consolidation, reduction power consumption etc..
All internal memories that virtual machine is taken are needed to copy destination host to from source host when virtual machine migrates online, so the speed of copy determines migrates the time consumed.For common gigabit networking, its copying speed is about 100MB/S, if virtual machine is assigned with 8GB internal memory, then and the about 80 seconds internal memory time of copy.And while copy internal memory, still running because of virtual machine, therefore also need to repeatedly copy internal storage data, more extend migration time.
For this problem, proposing compress technique in existing realization, first the data to copy are moved to destination host again in source host compression, it is decompressed by destination host.But the harm that this technology is brought is: owing to compression is the action of a computation-intensive, consume very much CPU disposal ability.
Summary of the invention
In view of this, the application provides a kind of online moving method of virtual machine and device, with the problem solving the online migration time length of virtual machine.
For solving above-mentioned technical problem, the technical scheme of the application is achieved in that
A kind of online moving method of virtual machine, is applied on the management equipment of management virtual machine, and the method includes:
When needing the virtual machine of online migration management, obtain the memory range of the free memory of this virtual machine;And by internal memory release corresponding for this memory range;
Virtual machine after releasing memory is moved to destination host by source host, and internal memory corresponding for described memory range is reassigned to the described virtual machine being currently at destination host.
A kind of online moving apparatus of virtual machine, is applied on the management equipment of management virtual machine, and this device includes: acquiring unit, releasing unit, migration units and allocation units;
Described acquiring unit, for when needing the virtual machine of online migration management, obtaining the memory range of the free memory of this virtual machine;
Described releasing unit, for the internal memory release that the memory range that obtained by described acquiring unit is corresponding;
Described migration units, for being moved to destination host by the virtual machine after described releasing unit releasing memory by source host;
Described allocation units, the internal memory corresponding for the memory range that discharged by described releasing unit is reassigned to the described virtual machine being currently at destination host.
From technical scheme above, in the application before online migration virtual machine, obtain the memory range of the free memory of this virtual machine, when migrating this virtual machine, do not migrate the free memory that described memory range is corresponding, and when this virtual machine (vm) migration to destination host, internal memory corresponding for the memory range not migrated is returned to this virtual machine, it is possible to shorten the online time migrating virtual machine.
Accompanying drawing explanation
Fig. 1 is the online moving method schematic flow sheet of virtual machine in the embodiment of the present application one;
Fig. 2 is the online moving method schematic flow sheet of virtual machine in the embodiment of the present application two;
Fig. 3 is the apparatus structure schematic diagram being applied to technique scheme in the embodiment of the present application.
Detailed description of the invention
In order to make the purpose of the present invention, technical scheme and advantage clearly understand, develop simultaneously embodiment below in conjunction with accompanying drawing, technical scheme is described in detail.
The embodiment of the present application provides a kind of online moving method of virtual machine, is applied on the management equipment of management virtual machine.This management equipment runs Vmware, KVM, Xen, CAS, Hypervisor etc., is used for managing virtual machine.
In order to realize the online moving method of virtual machine that the application provides, the virtual machine in the embodiment of the present application need to possess the function of monitoring free memory, when implementing, it is possible to runs a monitoring programme on a virtual machine, to realize the function of monitoring free memory.
When implementing, in order to save the use of virutal machine memory, virtual machine does not need cycle or monitor in real time idle content, when management equipment notice monitoring, once monitors.
Embodiment one
It is the online moving method schematic flow sheet of virtual machine in the embodiment of the present application one referring to Fig. 1, Fig. 1.Concretely comprise the following steps:
Step 101, when needing the virtual machine of online migration management, management equipment obtains the memory range of the free memory of this virtual machine;And by internal memory release corresponding for this memory range.
In this step, management equipment obtains the memory range of the free memory of this virtual machine, implements and can be:
This management equipment notifies the free memory of this virtual machine monitoring self, and monitored results responds to this management equipment;
When virtual machine receives the notice of management monitoring of tools internal memory, carry out the monitoring of free memory;When monitoring free memory, the memory range of the free memory monitored is responded to management equipment.
Management equipment, when receiving the memory range of free memory of described virtual machine response, obtains the memory range of the free memory of this virtual machine.
In this step when obtaining the memory range of free memory of this virtual machine, described by before internal memory release corresponding for this memory range, described method may further include:
Management equipment determines whether described memory range is empty, if it is, described virtual machine is moved to destination host by source host;Otherwise, perform described by internal memory release corresponding for this memory range, and subsequent step.
When implementing, it is also possible to do not carry out this judgement, if free memory is empty, it is made directly the migration of virtual machine.
In general, it is that to meet this virtual machine the busiest to the internal memory of virtual machine distribution, namely when the size of the internal memory that CPU operation needs is in peak value, the internal memory required, has more free memory when business is in non-peak state, and this partial memory virtual machine internal system does not use, therefore, generally free range is not empty, and this partial memory is when migrating virtual machine, it is possible to do not migrate;If currently the memory range of the free memory of this virtual machine is empty, then can only be the same compared with realizing, all internal memories of this virtual machine are all migrated.
This step memory range successfully to obtain free memory, if failing to obtain the memory range of free memory, as do not received the free memory scope of virtual machine response in Preset Time, then directly migrates this virtual machine by existing realization.
Step 102, the virtual machine after releasing memory is moved to destination host by source host by this management equipment, and internal memory corresponding for described memory range is reassigned to the described virtual machine being currently at destination host.
Internal memory after release is no longer migrated by the virtual machine after releasing memory when migrating.After this virtual machine is migrated to destination host, also need the internal memory of release is returned to this virtual machine, to meet the use of the operating system in this virtual machine.
Embodiment two
The free memory of virtual machine is directly discharged by management equipment, owing to virtual machine does not know that management equipment releases its partial memory, may result in transition process, this virtual machine employs again d/d free memory, therefore, the embodiment of the present application is given as realize method, to solve this problem.
It is the online moving method schematic flow sheet of virtual machine in the embodiment of the present application two referring to Fig. 2, Fig. 2.Concretely comprise the following steps:
Step 201, when needing the virtual machine of online migration management, management equipment notifies self free memory of this virtual machine monitoring, and the memory range increase of the free memory for monitoring has distributed labelling.
When virtual machine receives the monitoring free memory that management equipment sends, and when the memory range of free memory is responded to the notice of management equipment, proceed by the monitoring of free memory;
When monitoring free memory, the memory range of this free memory is responded to management equipment, and the memory range increase of the free memory for monitoring has distributed labelling, make this virtual machine not in use by internal memory corresponding to described memory range.
Step 202, management equipment, when receiving the memory range of free memory of described virtual machine response, obtains the memory range of the free memory of this virtual machine;And by internal memory release corresponding for this memory range.
Step 203, the virtual machine after releasing memory is moved to destination host by source host by this management equipment, and internal memory corresponding for described memory range is reassigned to the described virtual machine being currently at destination host;Notify that the labelling of distribution increased for described memory range is deleted by described virtual machine.
Virtual machine receive management equipment send by increase for described memory range when distributing the notice that labelling is deleted, delete corresponding distribution labelling, make this virtual machine can continue to the internal memory using described memory range corresponding.
When implementing, in order to prevent virtual machine currently used Out of Memory when migrating, it is also possible to select the internal memory of preset value size not increase allocation identification in the free memory monitored.Concrete how labelling, is determined according to actual needs, is not limited as here.
By above-mentioned implementation, management equipment, when migrating virtual machine, does not migrate the not currently used internal memory of this virtual machine, only migrates actually used internal memory, and make virtual machine not use d/d memory range at transition process;Therefore, under the normal use not affecting virtual machine, the time migrated under identical network bandwidth can reduce.So shorten migration event, accelerate migration velocity, at same band, transportable greater number of virtual machine in the identical time.
Based on same inventive concept, the embodiment of the present application also proposes the device of a kind of online migration virtual machine, be applied on the management equipment of management virtual machine.It it is the apparatus structure schematic diagram being applied to technique scheme in the embodiment of the present application referring to Fig. 3, Fig. 3.This device includes: acquiring unit 301, releasing unit 302, migration units 303 and allocation units 304;
Acquiring unit 301, for when needing the virtual machine of online migration management, obtaining the memory range of the free memory of this virtual machine;
Releasing unit 302, for the internal memory release that the memory range that obtained by acquiring unit 301 is corresponding;
Migration units 303, for being moved to destination host by the virtual machine after releasing unit 302 releasing memory by source host;
Allocation units 304, for after this virtual machine is moved to destination host by source host by migration units 303, the internal memory that the memory range that discharged by releasing unit 302 is corresponding is reassigned to the described virtual machine being currently at destination host.
It is preferred that
Acquiring unit 301, specifically for when obtaining the memory range of free memory of this virtual machine, notifying the free memory of this virtual machine monitoring self, and monitored results respond to this management equipment;When receiving the memory range of free memory of described virtual machine response, obtain the memory range of the free memory of this virtual machine.
It is preferred that
Acquiring unit 301, when being further used for notifying self free memory of this virtual machine monitoring, notifies that the memory range increase that this virtual machine is the free memory monitored has distributed labelling, makes this virtual machine not in use by internal memory corresponding to described memory range;When internal memory corresponding for described memory range is reassigned to the described virtual machine being currently at destination host by allocation units 304, notify that the labelling of distribution increased for described memory range is deleted by described virtual machine, enable this virtual machine to use the internal memory that described memory range is corresponding.
It is preferred that
Releasing unit 302, is further used for when acquiring unit 301 obtains the memory range of the free memory of this virtual machine, it is determined that whether described memory range is empty, if it is, trigger migration units 303 by source host, described virtual machine is moved to destination host;Otherwise, by internal memory release corresponding for this memory range
The unit of above-described embodiment can be integrated in one, it is also possible to separates and disposes;A unit can be merged into, it is also possible to be further split into multiple subelement.
In sum, the application is by before online migration virtual machine, obtain the memory range of the free memory of this virtual machine, when migrating this virtual machine, do not migrate the free memory that described memory range is corresponding, and when this virtual machine (vm) migration to destination host, internal memory corresponding for the memory range not migrated is returned to this virtual machine, it is possible to shorten the online time migrating virtual machine.
The foregoing is only presently preferred embodiments of the present invention, not in order to limit the present invention, all within the spirit and principles in the present invention, any amendment of making, equivalent replacement, improvement etc., should be included within the scope of protection of the invention.

Claims (8)

1. the online moving method of virtual machine, is applied on the management equipment of management virtual machine, it is characterised in that the method includes:
When needing the virtual machine of online migration management, obtain the memory range of the free memory of this virtual machine;And by internal memory release corresponding for this memory range;
Virtual machine after releasing memory is moved to destination host by source host, and internal memory corresponding for described memory range is reassigned to the described virtual machine being currently at destination host.
2. method according to claim 1, it is characterised in that the memory range of the free memory of described this virtual machine of acquisition, including:
Notify the free memory of this virtual machine monitoring self, and monitored results is responded to this management equipment;
When receiving the memory range of free memory of described virtual machine response, obtain the memory range of the free memory of this virtual machine.
3. method according to claim 2, it is characterised in that
Described when notifying self free memory of this virtual machine monitoring, described method farther includes: notify that the memory range increase that this virtual machine is the free memory monitored has distributed labelling, makes this virtual machine not in use by internal memory corresponding to described memory range;
It is described when internal memory corresponding for described memory range is reassigned to the described virtual machine being currently at destination host, described method farther includes: notifies that the labelling of distribution increased for described memory range is deleted by described virtual machine, enables this virtual machine to use the internal memory that described memory range is corresponding.
4. the method according to claim 1-3 any one, it is characterised in that during the memory range of the free memory of described this virtual machine of acquisition, described by before internal memory release corresponding for this memory range, described method farther includes:
Determine whether described memory range is empty, if it is, described virtual machine is moved to destination host by source host;Otherwise, the described step by internal memory release corresponding for this memory range of execution is returned.
5. the online moving apparatus of virtual machine, is applied on the management equipment of management virtual machine, it is characterised in that this device includes: acquiring unit, releasing unit, migration units and allocation units;
Described acquiring unit, for when needing the virtual machine of online migration management, obtaining the memory range of the free memory of this virtual machine;
Described releasing unit, for the internal memory release that the memory range that obtained by described acquiring unit is corresponding;
Described migration units, for being moved to destination host by the virtual machine after described releasing unit releasing memory by source host;
Described allocation units, for after this virtual machine is moved to destination host by source host by described migration units, the internal memory that the memory range that discharged by described releasing unit is corresponding is reassigned to the described virtual machine being currently at destination host.
6. device according to claim 5, it is characterised in that
Described acquiring unit, specifically for when obtaining the memory range of free memory of this virtual machine, notifying the free memory of this virtual machine monitoring self, and monitored results respond to this management equipment;When receiving the memory range of free memory of described virtual machine response, obtain the memory range of the free memory of this virtual machine.
7. device according to claim 6, it is characterised in that
Described acquiring unit, when being further used for notifying self free memory of this virtual machine monitoring, notifies that the memory range increase that this virtual machine is the free memory monitored has distributed labelling, makes this virtual machine not in use by internal memory corresponding to described memory range;When internal memory corresponding for described memory range is reassigned to the described virtual machine being currently at destination host by described allocation units, notify that the labelling of distribution increased for described memory range is deleted by described virtual machine, enable this virtual machine to use the internal memory that described memory range is corresponding.
8. the device according to claim 5-7 any one, it is characterised in that
Described releasing unit, is further used for when described acquiring unit obtains the memory range of the free memory of this virtual machine, it is determined that whether described memory range is empty, if it is, trigger described migration units by source host, described virtual machine is moved to destination host;Otherwise, by internal memory release corresponding for this memory range.
CN201610004675.2A 2016-01-04 2016-01-04 Virtual machine online migration method and device Pending CN105740041A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610004675.2A CN105740041A (en) 2016-01-04 2016-01-04 Virtual machine online migration method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610004675.2A CN105740041A (en) 2016-01-04 2016-01-04 Virtual machine online migration method and device

Publications (1)

Publication Number Publication Date
CN105740041A true CN105740041A (en) 2016-07-06

Family

ID=56296393

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610004675.2A Pending CN105740041A (en) 2016-01-04 2016-01-04 Virtual machine online migration method and device

Country Status (1)

Country Link
CN (1) CN105740041A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108021442A (en) * 2016-11-03 2018-05-11 阿里巴巴集团控股有限公司 The system of release physical memory, device and method
CN109669771A (en) * 2018-12-20 2019-04-23 中国联合网络通信集团有限公司 Rely on environment change method and device
CN115904616A (en) * 2022-11-04 2023-04-04 北京天融信网络安全技术有限公司 Virtual machine live migration method, device, equipment and medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104268003A (en) * 2014-09-30 2015-01-07 南京理工大学 Memory state migration method applicable to dynamic migration of virtual machine

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104268003A (en) * 2014-09-30 2015-01-07 南京理工大学 Memory state migration method applicable to dynamic migration of virtual machine

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
魏勇: "Xen虚拟机内存实时迁移技术研究与实现", 《中国优秀硕士学位论文全文数据库》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108021442A (en) * 2016-11-03 2018-05-11 阿里巴巴集团控股有限公司 The system of release physical memory, device and method
CN109669771A (en) * 2018-12-20 2019-04-23 中国联合网络通信集团有限公司 Rely on environment change method and device
CN115904616A (en) * 2022-11-04 2023-04-04 北京天融信网络安全技术有限公司 Virtual machine live migration method, device, equipment and medium
CN115904616B (en) * 2022-11-04 2023-11-10 北京天融信网络安全技术有限公司 Virtual machine hot migration method, device, equipment and medium

Similar Documents

Publication Publication Date Title
Wang et al. Replayable execution optimized for page sharing for a managed runtime environment
US10884645B2 (en) Virtual machine hot migration method, host machine and storage medium
US8671403B2 (en) Pre-creating virtual machines in a grid environment
CN102972010B (en) Switch method, apparatus and system for virtual application dual-machine in cloud environment
KR101403416B1 (en) Method system for managing virtual machine storage space and physical host
US7844853B2 (en) Methods and apparatus for restoring a node state
CN105243321B (en) A kind of cipher machine, realization and working method based on container virtualization technology
CN102929769B (en) Virtual machine internal-data acquisition method based on agency service
CN103793278A (en) Automatic resource adjusting method on basis of operation and maintenance rules of virtual device
JP6032089B2 (en) Management program, apparatus and method
US20160154664A1 (en) Information processing system and method of controlling same
KR101585160B1 (en) Distributed Computing System providing stand-alone environment and controll method therefor
CN110018883A (en) A kind of virtual machine delet method, device, equipment and storage medium
Pi et al. Profiling distributed systems in lightweight virtualized environments with logs and resource metrics
CN112256397A (en) Virtual machine cross-platform migration method and system
CN105740041A (en) Virtual machine online migration method and device
WO2020192448A1 (en) Migration method and system of virtual machine
Yin et al. Live virtual machine migration with optimized three-stage memory copy
Svärd et al. The Noble Art of Live VM Migration-Principles and Performance of precopy, postcopy and hybrid migration of demanding workloads
WO2015180111A1 (en) Method, apparatus and device for managing system resource
CN104717269A (en) Method for monitoring and dispatching cloud public platform computer resources for location-based service
Sagana et al. Performance enhancement in live migration for cloud computing environments
CN113703913B (en) Equipment testing method and device
CN113326098B (en) Cloud management platform supporting KVM virtualization and container virtualization
Chen et al. A performance study of virtual machine migration vs. thread migration for grid systems

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 310052 Binjiang District Changhe Road, Zhejiang, China, No. 466, No.

Applicant after: Xinhua three Technology Co., Ltd.

Address before: 310052 Binjiang District Changhe Road, Zhejiang, China, No. 466, No.

Applicant before: Huasan Communication Technology Co., Ltd.

RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20160706