CN109960564B - Virtual machine migration method - Google Patents

Virtual machine migration method Download PDF

Info

Publication number
CN109960564B
CN109960564B CN201711415858.4A CN201711415858A CN109960564B CN 109960564 B CN109960564 B CN 109960564B CN 201711415858 A CN201711415858 A CN 201711415858A CN 109960564 B CN109960564 B CN 109960564B
Authority
CN
China
Prior art keywords
migration
task
current
value
migration task
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201711415858.4A
Other languages
Chinese (zh)
Other versions
CN109960564A (en
Inventor
马炳洋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Shengxiao Cloud Computing Technology Co ltd
Original Assignee
Shanghai Shengxiao Cloud Computing Technology 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 Shanghai Shengxiao Cloud Computing Technology Co ltd filed Critical Shanghai Shengxiao Cloud Computing Technology Co ltd
Priority to CN201711415858.4A priority Critical patent/CN109960564B/en
Publication of CN109960564A publication Critical patent/CN109960564A/en
Application granted granted Critical
Publication of CN109960564B publication Critical patent/CN109960564B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • 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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Hardware Redundancy (AREA)

Abstract

The invention relates to a virtual machine migration method, which comprises the following steps: sequencing all migration tasks sent by the front end in a positive sequence according to a time sequence and storing the migration tasks in a database table A, wherein the state of the migration tasks is set to be a waiting state; searching a database table A according to the migrated source IP and the migrated destination IP, and judging whether the current source IP or the current destination IP belongs to the IP under migration; if the IP belongs to the IP in the migration, the new migration task is not issued to the virtual layer command execution agent for processing; if not, further operation is executed. The invention effectively manages the migration process of the virtual machine, shortens the migration time of the virtual machine and ensures that physical resources are efficiently and reasonably utilized.

Description

Virtual machine migration method
Technical Field
The present invention relates to a method for managing a virtual machine, and more particularly, to a method for migrating a virtual machine.
Background
The virtual machine technology is a common computer storage technology, but due to the need of subsequently upgrading a physical machine, a virtual machine which is already on the physical machine must be migrated to another machine first, and then the corresponding physical machine must be upgraded.
Meanwhile, because the virtual machine migration belongs to time-consuming operation (the larger the data volume of a system disk is, the longer the time is), the existing operation is to control and issue a single physical machine by using a Central Controller (CC), but an Agent (Agent execution Agent) can only process one virtual machine migration task, the migration tasks sent by other front ends are always waiting in a task queue, and the front end displays that the migration tasks are in the process of migration.
Disclosure of Invention
In order to solve the above problem, the present invention provides a method for migrating a virtual machine, including: sequencing all migration tasks sent by the front end in a positive sequence according to a time sequence and storing the migration tasks in a database table A, wherein the state of the migration tasks is set to be a waiting state; searching a database table A according to the migrated source IP and the destination IP, and judging whether each IP (Internet Protocol) or the destination IP of the current source IP belongs to the IP in the process of migration; if the IP belongs to the IP in the migration, the new migration task is not issued to the AE processing; if not, the following operations are executed:
judging whether the current operand values of the migrated source machine and the migrated destination machine are greater than 0; if not, the resource is considered to be insufficient, and the operation is returned;
if the value of the source machine is greater than 0, subtracting 1 from the value of the target machine respectively, then judging whether the value of the target machine is less than 1, if the value of the target machine is less than 1, then the migration task is also arranged in a task queue and is not issued to AE processing; if the value of the target machine is not less than 1, subtracting 1 from the value of the target machine, and then issuing a task to AE processing;
the migration task may time out: polling the migration task according to set time; if (current time-migration start time)/1000 > = migration duration of the migration task, then the migration task has timed out; otherwise, the polling is continued.
Polling confirms that the migration task is overtime, the CC sends a query of the state of the current migration task to the AE, and if the current migration task is still processed, the CC returns; otherwise, the CC sends a termination command to the AE, the AE terminates the current migration task, the CC carries out corresponding rollback operation to finish the current migration task, and the collocation is failure processing.
The technical scheme of the invention has the following beneficial effects:
the virtual machine migration process is effectively managed, the migration time of the virtual machine is shortened, and physical resources are efficiently and reasonably utilized.
Drawings
FIG. 1 is a flow chart of a method of virtual machine migration of the present invention.
Detailed Description
The present invention will be further explained with reference to the drawings and specific examples, which are only used to illustrate the technical solutions of the present invention and not to limit the protection scope of the present invention.
As shown in fig. 1, the present invention provides a method for migrating a virtual machine, including: sequencing all migration tasks sent by the front end in a positive sequence according to a time sequence and storing the migration tasks in a database table A, wherein the state of the migration tasks is set to be a waiting state; searching a database table A according to the migrated source IP and the migrated destination IP, and judging whether the current source IP or the current destination IP belongs to the IP under migration; if the IP belongs to the IP in the migration, the new migration task is not issued to the AE processing; if not, the following operations are executed:
judging whether the current operand values of the migrated source machine and the migrated destination machine are greater than 0; if not, the resource is considered to be insufficient, and the operation is returned;
if the value of the source machine is greater than 0, subtracting 1 from the value of the target machine respectively, then judging whether the value of the target machine is less than 1, if the value of the target machine is less than 1, then the migration task is also arranged in a task queue and is not issued to AE processing; if the value of the target machine is not less than 1, subtracting 1 from the value of the target machine, and then issuing a task to AE processing;
the migration task may time out: polling the migration task according to set time; if (current time-migration start time)/1000 > = migration duration of the migration task, then the migration task has timed out; otherwise, the polling is continued.
Polling confirms that the migration task is overtime, the CC sends a query of the state of the current migration task to the AE, and if the current migration task is still processed, the CC returns; otherwise, the CC sends a termination command to the AE, the AE terminates the current migration task, the CC carries out corresponding rollback operation, the current migration task is ended, and the collocation is failure processing.

Claims (3)

1. A method of virtual machine migration, comprising:
sequencing all migration tasks sent by a front end in a positive sequence according to a time sequence and storing the migration tasks in a database table A, wherein the state of the migration tasks is set to be a waiting state;
searching the database table A according to the migrated source IP and destination IP, and judging whether the source IP or the destination IP belongs to the IP under migration;
judging that the IP belongs to the IP in the migration, and not issuing a new migration task to a virtual layer command execution agent for processing;
and if not, executing the operation:
judging whether the current operand values of the migrated source machine and the migrated destination machine are greater than 0;
judging that the value is not greater than 0, and returning to the operation;
if the value is greater than 0, the source machine value and the target machine value are subtracted by 1,
continuing to judge whether the target machine value is smaller than 1, and judging that the target machine value is smaller than 1, wherein the migration task is also arranged in a task queue and cannot be issued to the virtual layer command execution agent processing; and the target machine value is not less than 1, the target machine value is subtracted by 1, and a task is issued to the virtual layer command to execute proxy processing.
2. The method for migrating the virtual machine according to claim 1, wherein the timeout processing of the migration task is: polling the migration task according to set time; (current time-migration start time)/1000 > = migration duration of the migration task, determining that the migration task has timed out; otherwise, polling is continued.
3. The method according to claim 2, wherein said polling confirms that said migration task has timed out, the central controller sends a query of the status of the current migration task to the virtual layer command execution agent, determines that said current migration task is still being processed, and said central controller returns; otherwise, the central controller sends a termination command to the virtual layer command execution agent, the virtual layer command execution agent terminates the current migration task, the central controller performs corresponding rollback operation, ends the current migration task, and collocates failure processing.
CN201711415858.4A 2017-12-22 2017-12-22 Virtual machine migration method Active CN109960564B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711415858.4A CN109960564B (en) 2017-12-22 2017-12-22 Virtual machine migration method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711415858.4A CN109960564B (en) 2017-12-22 2017-12-22 Virtual machine migration method

Publications (2)

Publication Number Publication Date
CN109960564A CN109960564A (en) 2019-07-02
CN109960564B true CN109960564B (en) 2023-04-11

Family

ID=67020487

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711415858.4A Active CN109960564B (en) 2017-12-22 2017-12-22 Virtual machine migration method

Country Status (1)

Country Link
CN (1) CN109960564B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111104206B (en) * 2019-12-25 2023-09-01 曙光信息产业(北京)有限公司 Virtual machine storage migration method and device and computer equipment

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103631633A (en) * 2012-08-20 2014-03-12 中国电信股份有限公司 Virtual machine total-system online migration method, device and system

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102446115B (en) * 2012-01-09 2014-06-18 浙江大学 Dynamic deployment method for virtual machines
CN103810016B (en) * 2012-11-09 2017-07-07 北京华胜天成科技股份有限公司 Realize method, device and the group system of virtual machine (vm) migration
US9268583B2 (en) * 2013-02-25 2016-02-23 Red Hat Israel, Ltd. Migration of virtual machines with shared memory
CN105677441B (en) * 2014-11-21 2019-07-09 华为技术有限公司 Virtual machine migration method, virtual facility manager and coordinator
CN104750542B (en) * 2015-04-22 2018-01-16 成都睿峰科技有限公司 A kind of data migration method based on cloud platform
CN105430049B (en) * 2015-10-29 2018-05-18 西安交通大学 A kind of virtual streaming media cluster collaboration moving method based on DCN

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103631633A (en) * 2012-08-20 2014-03-12 中国电信股份有限公司 Virtual machine total-system online migration method, device and system

Also Published As

Publication number Publication date
CN109960564A (en) 2019-07-02

Similar Documents

Publication Publication Date Title
US9977689B2 (en) Dynamic scaling of management infrastructure in virtual environments
EP2344953B1 (en) Provisioning virtual resources using name resolution
CN103294533B (en) task flow control method and system
KR102072726B1 (en) Systems and methods for supporting inline delegation of middle-tier transaction logs to database
CN104461744A (en) Resource allocation method and device
CN110806933B (en) Batch task processing method, device, equipment and storage medium
CN110247984B (en) Service processing method, device and storage medium
US9003094B2 (en) Optimistic interrupt affinity for devices
CN107704310B (en) Method, device and equipment for realizing container cluster management
CN102567074A (en) USB (universal serial bus) device redirecting method facing virtual machines
CN106648832B (en) Device and method for improving resource utilization rate of virtual machine
CN111897638A (en) Distributed task scheduling method and system
CN109474467B (en) Network automation management method and device, storage medium and electronic equipment
US20130054861A1 (en) Pessimistic interrupt affinity for devices
CN104932933A (en) Spin lock acquisition method and apparatus
JP2016091555A (en) Data staging management system
CN109960564B (en) Virtual machine migration method
US8977752B2 (en) Event-based dynamic resource provisioning
CN109766131B (en) System and method for realizing intelligent automatic software upgrading based on multithreading technology
US9924002B1 (en) Managing stateless processes
US8689222B2 (en) Controlling priority of multi-threaded hardware resources by system calls
CN108287762B (en) Distributed computing interactive mode use resource optimization method and computer equipment
EP2530590A1 (en) Object pipeline-based virtual infrastructure management
CN111752682A (en) Network port resource management method and device, electronic equipment and storage medium
CN108614732B (en) Method for quickly mapping hardware equipment of operating system under dynamic foreground of Loongson platform

Legal Events

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