CN106502764B - A kind of method and device of Autonomic Migration Framework virtual machine - Google Patents

A kind of method and device of Autonomic Migration Framework virtual machine Download PDF

Info

Publication number
CN106502764B
CN106502764B CN201610949790.7A CN201610949790A CN106502764B CN 106502764 B CN106502764 B CN 106502764B CN 201610949790 A CN201610949790 A CN 201610949790A CN 106502764 B CN106502764 B CN 106502764B
Authority
CN
China
Prior art keywords
host
virtual machine
hardware resource
monitored
occupation value
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
CN201610949790.7A
Other languages
Chinese (zh)
Other versions
CN106502764A (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.)
Guangdong Inspur Smart Computing Technology Co Ltd
Original Assignee
Guangdong Inspur Big Data Research 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 Guangdong Inspur Big Data Research Co Ltd filed Critical Guangdong Inspur Big Data Research Co Ltd
Priority to CN201610949790.7A priority Critical patent/CN106502764B/en
Publication of CN106502764A publication Critical patent/CN106502764A/en
Application granted granted Critical
Publication of CN106502764B publication Critical patent/CN106502764B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3051Monitoring arrangements for monitoring the configuration of the computing system or of the computing system component, e.g. monitoring the presence of processing resources, peripherals, I/O links, software programs
    • 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)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Quality & Reliability (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The present invention provides a kind of method and devices of Autonomic Migration Framework virtual machine, this method comprises: be directed at least one monitored host, obtain the corresponding mobility threshold of each described monitored host;Obtain the corresponding target virtual machine of each described monitored host and destination host;The hardware resource of each monitored host is monitored, corresponding first hardware resource occupation value is obtained;Judge whether the first hardware resource occupation value is greater than the mobility threshold corresponding to the same monitored host;It is instructed if so, being formed and migrating the target virtual machine operated on the monitored host to the migration on the corresponding destination host, to be migrated to the target virtual machine.The device includes: acquiring unit, monitoring unit, judging unit and execution unit.This programme can reduce the cost safeguarded to virtual machine system.

Description

A kind of method and device of Autonomic Migration Framework virtual machine
Technical field
The present invention relates to field of computer technology, in particular to a kind of method and device of Autonomic Migration Framework virtual machine.
Background technique
Virtual machine is the virtual machine created on physical host, and physical host provides hardware supported for virtual machine, more A virtual machine shares the hardware resource of physical host, handles different business datums, to meet multiple users or multiple business Process demand.Since multiple virtual machines share the hardware resource of the same physical host, when void each on the same physical host When the hardware resources such as the quasi- occupied CPU of machine, memory are excessive, virtual machine can be made the case where Caton or even delay machine occur, verify shadow Ring the usage experience of user.
In order to avoid the case where Caton, delay machine occurs in virtual machine, when the CPU of physical host and the occupancy mistake of memory Gao Shi, on the virtual machine (vm) migration to other physical hosts for needing to run on the physical host, to guarantee that physical host can Hardware resource needed for remaining each virtual machine operates normally is provided.
Currently, the virtual machine migrated is generally selected by artificial mode when migrating to virtual machine, And it by way of manual operation will be on selected virtual machine (vm) migration to other physical hosts.
It is directed to the method migrated at present to virtual machine, it is virtual due to needing artificial selection to be migrated Machine, and need by way of manual operation by selected virtual machine (vm) migration to other physical hosts, whole process thinks dry Pre- degree is higher, leads to the higher cost safeguarded to virtual machine system.
Summary of the invention
The embodiment of the invention provides the method and device of Autonomic Migration Framework virtual machine, it can reduce and virtual machine system is carried out The cost of maintenance.
The embodiment of the invention provides a kind of methods of Autonomic Migration Framework virtual machine, comprising:
It is directed at least one monitored host, obtains the corresponding mobility threshold of each described monitored host;
Obtain the corresponding target virtual machine of each described monitored host and destination host;
The hardware resource of each monitored host is monitored, corresponding first hardware resource is obtained and occupies Value;
Judge whether the first hardware resource occupation value is greater than the migration threshold corresponding to the same monitored host Value;
The target virtual machine operated on the monitored host is migrated to the corresponding mesh if so, being formed The migration instruction on host is marked, to migrate to the target virtual machine.
Preferably,
The target virtual machine operated on the monitored host is migrated to the corresponding mesh in the formation After marking the migration instruction on host, further comprise:
The hardware resource of the destination host is detected, corresponding second hardware resource occupation value is obtained;
Judge whether the second hardware resource occupation value is less than the preset reception threshold value corresponding to the destination host;
If so, being instructed according to the migration, the target virtual machine is migrated to the destination host;
If not, the corresponding second hardware resource occupation value of each destination host is obtained, by the target virtual machine It migrates to the corresponding the smallest destination host of second hardware resource occupation value.
Preferably,
The first hardware resource occupation value includes: to account for corresponding to the CPU occupation value and/or memory of the monitored host With value.
Preferably,
The second hardware resource occupation value includes: the CPU occupation value and/or EMS memory occupation corresponding to the destination host Value.
Preferably,
It is described to obtain corresponding first hardware resource occupation value, comprising:
It is directed to each described monitored host, to the monitored host within each preset monitoring period Hardware resource is monitored in real time, using the average value of the hardware resource occupation value in the same monitoring period as described in The monitored corresponding first hardware resource occupation value of host.
Preferably,
It is described obtain the corresponding mobility threshold of each described monitored host after, further comprise:
By the corresponding mobility threshold storage of each described monitored host into preset migration strategy allocation list;
It is described obtain the corresponding target virtual machine of each described monitored host and destination host after, further wrap It includes:
By the corresponding target virtual machine of each described monitored host and destination host storage to preset migration letter It ceases in detailed configuration table.
Preferably,
After the corresponding first hardware resource occupation value of the acquisition, further comprise:
First hardware resource occupation value storage is reached into the migration information detailed configuration table, and in storage time The first hardware resource occupation value is deleted after to preset retention time.
The embodiment of the invention also provides a kind of devices of Autonomic Migration Framework virtual machine, comprising: acquiring unit, monitoring unit, Judging unit and execution unit;
The acquiring unit obtains each described monitored host pair for being directed at least one monitored host Answer mobility threshold;And obtain the corresponding target virtual machine of each described monitored host and destination host;
The monitoring unit is monitored for the hardware resource each monitored host, is obtained corresponding First hardware resource occupation value;
Whether the judging unit, the first hardware resource occupation value for judging that the monitoring unit is got are big In the mobility threshold corresponding to the same monitored host that the acquiring unit is got;
The execution unit, for the judging result according to the judging unit, if so, the quilt will be operated in by being formed The target virtual machine on monitoring host computer is migrated to the migration instruction on the corresponding destination host, with empty to the target Quasi- machine is migrated.
Preferably,
The execution unit is further used for detecting the hardware resource of the destination host, obtains corresponding the Two hardware resource occupation value;It is preset corresponding to the destination host to judge whether the second hardware resource occupation value is less than Receive threshold value;If so, being instructed according to the migration, the target virtual machine is migrated to the destination host;If not, The corresponding second hardware resource occupation value of each destination host is obtained, the target virtual machine is migrated to corresponding second firmly On the smallest destination host of part resource occupation value.
Preferably,
The monitoring unit, for being directed to each described monitored host, within each preset monitoring period The hardware resource of the monitored host is monitored in real time, hardware resource described in the same monitoring period is occupied The average value of value is as the corresponding first hardware resource occupation value of the monitored host.
Preferably,
The acquiring unit includes: that the first acquisition subelement and second obtain subelement;
Described first obtains subelement, for by the corresponding mobility threshold storage of each described monitored host to default Migration strategy allocation list in;
Described second obtains subelement, for by the corresponding target virtual machine of each described monitored host and target Host is stored into preset migration information detailed configuration table.
Preferably,
The monitoring unit is further used for storing the first hardware resource occupation value detailed to the migration information In allocation list, and the first hardware resource occupation value is deleted after storage time reaches preset retention time.
The embodiment of the invention provides a kind of method and device of Autonomic Migration Framework virtual machine, each monitored host is corresponding There are mobility threshold, target virtual machine and destination host, the hardware resource of monitored host is monitored, obtains corresponding first First hardware resource occupation value is compared, if the first hardware resource by hardware resource occupation value with corresponding mobility threshold Occupation value is greater than corresponding mobility threshold, is formed to migrate the target virtual machine run on the monitored host to this and be supervised The migration instruction on the corresponding destination host of host is controlled, the Autonomic Migration Framework for realizing target virtual machine is instructed according to the migration.Due to The transition condition and migration strategy for having preset virtual machine, can be right when the hardware resource occupation value of monitored host is larger Corresponding target virtual machine carries out Autonomic Migration Framework, and transition process is not necessarily to human intervention, human cost is saved, so as to reduce The cost that virtual machine system is safeguarded.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is the present invention Some embodiments for those of ordinary skill in the art without creative efforts, can also basis These attached drawings obtain other attached drawings.
Fig. 1 is a kind of method flow diagram of Autonomic Migration Framework virtual machine provided by one embodiment of the present invention;
Fig. 2 is the schematic diagram of equipment where a kind of device of Autonomic Migration Framework virtual machine provided by one embodiment of the present invention;
Fig. 3 is a kind of schematic device of Autonomic Migration Framework virtual machine provided by one embodiment of the present invention;
Fig. 4 is a kind of schematic diagram of acquiring unit provided by one embodiment of the present invention;
Fig. 5 is a kind of method flow diagram for Autonomic Migration Framework virtual machine that another embodiment of the present invention provides.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention In attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is A part of the embodiment of the present invention, instead of all the embodiments, based on the embodiments of the present invention, those of ordinary skill in the art Every other embodiment obtained without making creative work, shall fall within the protection scope of the present invention.
As shown in Figure 1, the embodiment of the invention provides a kind of method of Autonomic Migration Framework virtual machine, this method may include with Lower step:
Step 101: being directed at least one monitored host, obtain the corresponding migration threshold of each described monitored host Value;
Step 102: obtaining the corresponding target virtual machine of each described monitored host and destination host;
Step 103: the hardware resource of each monitored host being monitored, corresponding first hardware money is obtained Source occupation value;
Step 104: judging whether the first hardware resource occupation value is greater than the institute corresponding to the same monitored host Mobility threshold is stated, it is no to then follow the steps 103 if it is execution step 105;
Step 105: formation migrates the target virtual machine operated on the monitored host to corresponding described Migration instruction on destination host, to be migrated to the target virtual machine.
The embodiment of the invention provides a kind of method of Autonomic Migration Framework virtual machine, each monitored host is corresponding with migration Threshold value, target virtual machine and destination host are monitored the hardware resource of monitored host, obtain corresponding first hardware money First hardware resource occupation value is compared, if the first hardware resource occupation value by source occupation value with corresponding mobility threshold Greater than corresponding mobility threshold, target virtual machine that being formed will run on the monitored host migrate to the host that is monitored Migration instruction on corresponding destination host, the Autonomic Migration Framework for realizing target virtual machine is instructed according to the migration.Due to setting in advance The transition condition and migration strategy for having determined virtual machine, can be to corresponding when the hardware resource occupation value of monitored host is larger Target virtual machine carries out Autonomic Migration Framework, and transition process is not necessarily to human intervention, human cost is saved, so as to reduce to virtual The cost that machine system is safeguarded.
In an embodiment of the invention, when formed migration instruction after, can with the following steps are included:
It instructs the hardware resource of corresponding destination host to detect migration, obtains the destination host corresponding second firmly Part resource occupation value;
Judge whether the second hardware resource occupation value got is less than the reception threshold value of the preset destination host;
If so, being instructed according to migration, corresponding target virtual machine is instructed to migrate to the destination host migration;
If not, obtaining the corresponding second hardware resource occupation value of each destination host, migration is instructed into corresponding target On virtual machine (vm) migration to the corresponding the smallest destination host of second hardware resource occupation value.
Specifically,
If instructing the second hardware resource occupation value of corresponding destination host to be less than corresponding reception threshold value with migration, It is less to illustrate that the hardware resource of the destination host occupies, has the ability to receive the virtual machine run on other hosts, will correspondingly move It moves and corresponding target virtual machine is instructed to migrate to the destination host;
If being greater than or equal to corresponding reception threshold value with the second hardware resource occupation value of the destination host, illustrate the mesh The hardware resource occupancy for marking host is higher, can not provide hardware resource again for others virtual machines.Correspondingly, it obtains The corresponding second hardware resource occupation value of each destination host, according to the second hardware resource occupation value from the small sequence got to each A destination host is ranked up, and instructs corresponding target virtual machine to move to corresponding second hardware resource occupation value migration minimum A destination host on.
It is directed to any one monitored host, destination host corresponding with the host that is monitored is the monitored host The preferred migrating objects of upper run virtual machine, when the hardware resource occupation value of the host that is monitored is higher, preferentially by the quilt The target virtual machine run on monitoring host computer moves on corresponding destination host;But it is if opposite with the host that is monitored The hardware resource occupation value for the destination host answered is higher, then the target virtual machine run on the host that is monitored is moved to other On destination host.Pass through above-mentioned virtual machine (vm) migration mode, on the one hand, when the hardware resource occupation value of monitored host is higher When, the target virtual machine run thereon can be moved on destination host, guarantee that each virtual machine can on monitored host It operates normally;On the other hand, guarantee that there is the destination host for receiving target virtual machine enough hardware resources to supply original and newly connect The virtual machine received uses.In short, passing through above-mentioned virtual machine migration method, it is ensured that on monitored host and destination host The normal operation of run virtual machine improves the reliability of the method for the Autonomic Migration Framework virtual machine.
It should be noted that monitored host described in the embodiment of the present invention, on the one hand can be used as one and is monitored On the other hand object is also used as another or the corresponding destination host of multiple monitored hosts;Correspondingly, the present invention is real Destination host described in example is applied, on the one hand can be used as one or more monitored corresponding virtual machine (vm) migration purposes of host On the other hand ground is also used as monitored object.
In an embodiment of the invention, the first hardware resource occupation value includes the CPU occupation value of monitored host and interior Any one in occupation value or two are deposited, the second hardware resource occupation value also includes the CPU occupation value and memory of destination host Any one in occupation value or two.Correspondingly, mobility threshold is monitored when needing to migrate target virtual machine The corresponding CPU occupation value of host and/or EMS memory occupation value, hardware resource are cpu resource and/or memory source.
Specifically,
There is the case where Caton or delay machine in the excessively high virtual machine that will lead to of the CPU and EMS memory occupation of physical host, and CPU is accounted for Use value and EMS memory occupation value as the condition for judging whether to need to carry out virtual machine (vm) migration, can accurately determine to virtual machine into On the opportunity of row migration, guarantee the feasibility of the method for the Autonomic Migration Framework virtual machine.Specifically, according to CPU occupation value and memory When occupation value judges whether to need to carry out virtual machine (vm) migration, if in the CPU occupation value and EMS memory occupation value of monitored virtual machine There are one or two to be all larger than corresponding mobility threshold, then judges that the monitored host needs to carry out virtual machine (vm) migration.
In an embodiment of the invention, in the corresponding first hardware resource occupation value of the monitored host of acquisition, every The hardware resource of monitored host is monitored in real time in one preset monitoring period, by hardware in the same monitoring period The average value of resource occupation value is as the monitored corresponding first hardware resource occupation value of host.
Specifically,
The average value that one monitors the host hardware resource occupation value that is monitored in the period is corresponding as the host that is monitored The first hardware resource occupation value, the first hardware resource occupation value is obtained by way of average value, it is ensured that accessed The first hardware resource occupation value can embody the hardware resource occupancy situation of monitored host, thereby may be ensured that virtual machine The accuracy that migration demand is judged.For example, the default monitoring period is 30s, to monitored host within a monitoring period CPU and EMS memory occupation situation be monitored, according to monitored results calculate within the monitoring period be monitored host CPU occupation value Average value and EMS memory occupation value average value, by the average value of calculated CPU occupation value and the average value of EMS memory occupation value As the corresponding first hardware resource occupation value of the host that is monitored.
It in an embodiment of the invention, will be each after getting the corresponding mobility threshold of each monitored host The corresponding mobility threshold storage of a monitored host is into preset migration strategy allocation list;Getting each monitored host After corresponding target virtual machine and destination host, by each corresponding target virtual machine of the host that is monitored and destination host ruler It is very little into preset migration information detailed configuration table.
Specifically,
Each monitored host and each quilt for needing to be monitored can be determined by migration strategy allocation list The corresponding mobility threshold of monitoring host computer, can determine whether to be monitored on host to some according to migration strategy allocation list The virtual machine of operation is migrated;By migration information detailed configuration table, the target virtual machine migrated can be determined And the destination of migration.The related letter migrated by migration strategy allocation list to migration information detailed configuration table come storage virtual machine Breath, it is possible to reduce the capacity of each allocation list improves the speed to access to allocation list, guarantees rapidly to virtual Machine is migrated, and prevents from leading to virtual machine not in time due to virtual machine (vm) migration that there is a situation where delay machine generations.
It in an embodiment of the invention, can after getting the corresponding first hardware resource occupation value of monitored host It is stored with the first hardware resource occupation value that will acquire to migration information detailed configuration table, when the first hardware resource occupation value is deposited It stores up after the duration in migration information detailed configuration table reaches preset retention time, the first hardware resource occupation value is deleted.
Specifically, presetting retention time is 30min, detailed in migration information after getting the first hardware resource occupation value The first hardware resource occupation value 30min is stored in thin allocation list.If there is delay machine in the virtual machine run on monitored host Situation can analyze the occurrence cause of delay machine according to the first hardware resource stored in migration information detailed configuration table, Foundation is provided with the improvement to virtual machine migration policies, to improve the accuracy of the method for the Autonomic Migration Framework virtual machine.
As shown in Figure 2 and Figure 3, the embodiment of the invention provides a kind of devices of Autonomic Migration Framework virtual machine.Installation practice can Can also be realized by way of hardware or software and hardware combining by software realization.For hardware view, such as Fig. 2 institute Show, is a kind of hardware structure diagram of equipment where the device of Autonomic Migration Framework virtual machine provided in an embodiment of the present invention, in addition to Fig. 2 institute Except the processor, memory, network interface and the nonvolatile memory that show, the equipment in embodiment where device is usually also It may include other hardware, such as be responsible for the forwarding chip of processing message.Taking software implementation as an example, as shown in figure 3, as one Device on a logical meaning is to be referred to computer program corresponding in nonvolatile memory by the CPU of equipment where it It enables and is read into memory what operation was formed.The device of Autonomic Migration Framework virtual machine provided in this embodiment, comprising: acquiring unit 301, Monitoring unit 302, judging unit 303 and execution unit 304;
The acquiring unit 301 obtains each described monitored host for being directed at least one monitored host Corresponding mobility threshold;And obtain the corresponding target virtual machine of each described monitored host and destination host;
The monitoring unit 302 is monitored for the hardware resource each monitored host, is obtained and is corresponded to The first hardware resource occupation value;
The judging unit 303, the first hardware resource occupation value got for judging the monitoring unit 302 Whether the mobility threshold corresponding to the same monitored host that the acquiring unit 301 get is greater than;
The execution unit 304, for the judging result according to the judging unit 303, if so, being formed will operate in The target virtual machine on the monitored host is migrated to the migration instruction on the corresponding destination host, to described Target virtual machine is migrated.
In an embodiment of the invention, the execution unit 304 is further used for the hardware money to the destination host Source is detected, and corresponding second hardware resource occupation value is obtained;It is pre- to judge whether the second hardware resource occupation value is less than If the reception threshold value corresponding to the destination host;If so, being instructed according to the migration, the target virtual machine is migrated On to the destination host;If not, the corresponding second hardware resource occupation value of each destination host is obtained, by the mesh It marks on virtual machine (vm) migration to the corresponding the smallest destination host of second hardware resource occupation value.
In an embodiment of the invention, the monitoring unit 302, for being directed to each described monitored host, The hardware resource of the monitored host is monitored in real time within each preset monitoring period, by the same prison The average value of the hardware resource occupation value is accounted for as corresponding first hardware resource of the monitored host in the control period With value.
In an embodiment of the invention, as shown in figure 4, the acquiring unit 301 includes: the first acquisition subelement 3011 And second obtain subelement 3012;
Described first obtains subelement 3011, for arriving the corresponding mobility threshold storage of each described monitored host In preset migration strategy allocation list;
Described second obtains subelement 3012, for by the corresponding target virtual machine of each described monitored host and Destination host is stored into preset migration information detailed configuration table.
In an embodiment of the invention, the monitoring unit 302 is further used for occupying first hardware resource Value storage is hard by described first into the migration information detailed configuration table, and after storage time reaches preset retention time Part resource occupation value is deleted.
It should be noted that the contents such as information exchange, implementation procedure between each unit in above-mentioned apparatus, due to this Inventive method embodiment is based on same design, and for details, please refer to the description in the embodiment of the method for the present invention, no longer superfluous herein It states.
Below with reference to specific embodiment, the method for Autonomic Migration Framework virtual machine provided in an embodiment of the present invention is made to carry out one Step is described in detail, as shown in figure 5, this method may comprise steps of:
Step 501: obtaining each monitored corresponding mobility threshold of host, and the mobility threshold storage that will acquire is arrived In migration strategy allocation list.
In an embodiment of the invention, it is directed to each monitored host, obtaining this, monitored host is corresponding moves Threshold value is moved, mobility threshold is to need to carry out the critical CPU occupation value and EMS memory occupation value of virtual machine (vm) migration;Getting migration threshold After value, the corresponding relationship between each monitored host and mobility threshold is being recorded in preset migration strategy allocation list.
For example, a virtual machine system includes 3 monitored hosts altogether, the mobility threshold of monitored host 1 accounts for for CPU With value 80%, EMS memory occupation value 70%;The mobility threshold of monitored host 2 is CPU occupation value 80%;Monitored host 3 moves Shifting threshold value is EMS memory occupation value 80%;By the corresponding mobility threshold storage of three monitored hosts to preset migration strategy In allocation list.
Step 502: obtaining each monitored corresponding target virtual machine of host and destination host, and the mesh that will acquire Virtual machine and destination host storage are marked into migration information detailed configuration table.
In an embodiment of the invention, it is directed to each monitored host, obtains the monitored corresponding mesh of host Virtual machine and destination host are marked, wherein target virtual machine is the void being migrated away when the host hardware resource occupation that is monitored is excessively high Quasi- machine, destination host are the move target of target virtual machine;After getting target virtual machine and destination host, presetting Migration information detailed configuration table in record the corresponding relationship of each monitored host and target virtual machine and destination host.Its In, it can be other monitored hosts in addition to this is monitored host corresponding to the destination host of monitored host, it can also be with For other hosts except the host that is monitored unless each.
For example, the monitored corresponding target virtual machine of host 1 is virtual machine 1, corresponding destination host is destination host 1; The monitored corresponding target virtual machine of host 2 is virtual machine 2, and corresponding destination host is destination host 2;Monitored host 3 is right The target virtual machine answered is virtual machine 3, and corresponding destination host is destination host 3;Wherein destination host 3 and monitored host 1 For the same host.Above 3 monitored hosts and the corresponding relationship of target virtual machine and destination host are stored to setting in advance In fixed migration information detailed configuration table.
Step 503: each monitored host recorded in migration strategy allocation list being monitored in real time, is obtained corresponding First hardware resource occupation value.
In an embodiment of the invention, the monitored host of each recorded in migration strategy allocation list, root are directed to According to the monitoring period of default settings, the CPU occupation value of the monitored host of real-time monitoring and memory are accounted within the same monitoring period With value, after a monitoring end cycle, being averaged for the average value of CPU occupation value and EMS memory occupation value in the monitoring period is calculated Value, using the average value of calculated CPU occupation value and the average value of EMS memory occupation value as the first hardware of the host that is monitored Resource occupation value.
For example, the default monitoring period is 30s, monitored host 1, monitored host after a 30s, are being calculated separately 2 and CPU occupation value of the monitored host 3 within this 30s time average value and EMS memory occupation value average value, will be calculated Average value is respectively as the corresponding first hardware resource occupation value of 3 monitored hosts.Wherein, be monitored host 1 corresponding the One hardware resource occupation value is CPU occupation value 50%, EMS memory occupation value 40%;Monitored corresponding first hardware resource of host 2 Occupation value is CPU occupation value 90%, EMS memory occupation value 30%;The monitored corresponding first hardware resource occupation value of host 3 is CPU Occupation value 80%, EMS memory occupation value 80%.
Step 504: being directed to each monitored host, judge that corresponding first hardware resource of host that is monitored occupies Whether value is greater than corresponding mobility threshold, if so, step 505 is executed, it is no to then follow the steps 503.
In an embodiment of the invention, it is directed to each monitored host, this detected in step 503 is supervised The corresponding migration of the host that is monitored recorded in the corresponding first hardware resource occupation value of control host and migration strategy allocation list Threshold value is compared, if the first hardware resource occupation value is greater than mobility threshold, it is virtual to illustrate that the monitored host needs to carry out Machine migration, correspondingly executes step 505;If the first hardware resource occupation value is less than or equal to mobility threshold, illustrate that this is supervised Control host correspondingly executes step 503 without carrying out virtual machine (vm) migration.
For example, since the CPU occupation value in the corresponding first hardware resource occupation value of host 1 included that is monitored is 50%, EMS memory occupation value is 40%, and CPU occupation value is 80% in the monitored corresponding mobility threshold of host 1, is by EMS memory occupation value 70%, since two parameters that the first hardware resource occupation value includes are respectively less than corresponding parameter in mobility threshold, so judgement Monitored host 1 is directed to monitored host 1 and executes 503 without carrying out virtual machine (vm) migration;Accordingly, due to monitored host 2 The CPU occupation value for including in corresponding first hardware resource occupation value is greater than the CPU occupation value in corresponding mobility threshold included, Judge that monitored host 2 needs to carry out virtual machine (vm) migration, is directed to monitored host 2 and executes step 505;Due to the host that is monitored Two parameters for including in first hardware resource occupation value corresponding to 3 are all larger than corresponding parameter in corresponding mobility threshold, sentence Disconnected monitored host 3 needs to carry out virtual machine (vm) migration, executes step 505 for monitored host 3.
Step 505: according to the information stored in migration information detailed configuration table, forming corresponding migration instruction.
In an embodiment of the invention, when judging that a monitored host needs to carry out virtual machine (vm) migration, according to moving The monitored corresponding target virtual machine of host and destination host stored in information detailed configuration table is moved, is formed destination virtual Machine is migrated to the migration instruction of destination host.
For example, in migration information detailed configuration table, the corresponding virtual machine 2 of the host 2 that is monitored and destination host 2 are monitored The corresponding virtual machine 3 of host 3 and destination host 3;It is directed to monitored host 2, forms the virtual machine that will be run on monitored host 2 2 move to the migration instruction 1 on destination host 2;It is directed to monitored host 3, formation will run virtual on monitored host 3 Machine 3 moves to the instruction of the migration on destination host 32.
Step 506: being instructed according to migration, it is default to judge whether the second hardware resource occupation value of corresponding destination host is less than Reception threshold value, if so, execute step 507, it is no to then follow the steps 508.
In an embodiment of the invention, after forming migration instruction, the hard of corresponding destination host is instructed to migration Part resource is detected, obtain destination host the second hardware resource occupy to;The the second hardware resource occupation value that will acquire It is compared with preset reception threshold value, if the second hardware resource occupation value, which is less than, receives threshold value, illustrates that destination host can It receives migration and instructs corresponding target virtual machine, correspondingly execute step 507;If the second hardware resource occupation value is greater than or waits In receiving threshold value, illustrate that the remaining hardware resource of destination host can not support migration to instruct corresponding target virtual machine operation, nothing Method receives migration and instructs corresponding target virtual machine, correspondingly executes step 507.
For example, preset reception threshold value is that CPU occupation value and EMS memory occupation value are respectively less than 60%, migration instruction 1 is being formed When, the CPU occupation value and EMS memory occupation value of destination host 2 are 40%, since corresponding second hardware resource of destination host 2 accounts for It is less than with value and receives threshold value, is directed to migration instruction 1 and executes step 507;When forming migration instruction 2, the CPU of destination host 3 Occupation value and EMS memory occupation value are 80%, receive threshold value since the corresponding second hardware resource occupation value of destination host 3 is greater than, It is directed to migration instruction 2 and executes step 508.
Step 507: being instructed, target virtual machine is moved on destination host, and terminate current process according to migration.
In an embodiment of the invention, according to the target virtual machine and destination host recorded in migration instruction, by target It is run on virtual machine (vm) migration to destination host.
For example, it is enterprising that the virtual machine 2 operated on monitored host 2 is moved to destination host 2 according to migration instruction 1 Row uses.
Step 508: obtaining the second hardware resource occupation value of each destination host.
In an embodiment of the invention, the hardware resource of each destination host is detected, obtains each target The corresponding second hardware resource occupation value of host.Destination host described herein may include other monitored hosts.
For example, being detected by the hardware resource to other 2 destination hosts, the CPU for getting destination host 1 is occupied Value is 20%, and EMS memory occupation value is 35%;The CPU occupation value and EMS memory occupation value for getting destination host 2 are 40%.
Step 509: instructing corresponding target virtual machine to migrate migration the smallest to corresponding second hardware resource occupation value On one destination host.
In an embodiment of the invention, after getting the corresponding second hardware resource occupation value of each destination host, Each destination host is ranked up according to the sequence of the second hardware resource occupation value from small to large;By what is recorded in migration instruction Target virtual machine move to sequence first destination host on run.
For example, the sequence according to the second hardware resource occupation value from small to large, carries out destination host 1 and destination host 2 Sequence, destination host 1, which makes number one, to be set, and according to the record of migration instruction 2, the virtual machine 3 run on monitored host 3 is moved It moves on on destination host 1.
The method and device of Autonomic Migration Framework virtual machine provided in an embodiment of the present invention, at least has the following beneficial effects:
1, in the method and device of Autonomic Migration Framework virtual machine provided in an embodiment of the present invention, each monitored host pair Should there are mobility threshold, target virtual machine and destination host, the hardware resource of monitored host is monitored, obtain corresponding the First hardware resource occupation value is compared by one hardware resource occupation value with corresponding mobility threshold, if the first hardware provides Source occupation value is greater than corresponding mobility threshold, target virtual machine that being formed will run on the monitored host migrate to the quilt Migration instruction on the corresponding destination host of monitoring host computer, the Autonomic Migration Framework for realizing target virtual machine is instructed according to the migration.By It, can be with when the hardware resource occupation value of monitored host is larger in the transition condition and migration strategy that have preset virtual machine Autonomic Migration Framework is carried out to corresponding target virtual machine, transition process is not necessarily to human intervention, human cost is saved, so as to drop The low cost that virtual machine system is safeguarded.
2, in the method and device of Autonomic Migration Framework virtual machine provided in an embodiment of the present invention, if remembered in migration instruction It records the corresponding second hardware resource occupation value of destination host and is less than reception threshold value, directly moved target virtual machine according to migration instruction It moves on on destination host;If the corresponding second hardware resource occupation value of destination host recorded in migration instruction, which is greater than, receives threshold Value, then need to move to target virtual machine on other lesser destination hosts of the second hardware resource occupation value.On the one hand, work as quilt When the hardware resource occupation value of monitoring host computer is higher, the target virtual machine run thereon can be moved on destination host, be protected Demonstrate,proving each virtual machine on monitored host can operate normally;On the other hand, guarantee that the destination host for receiving target virtual machine has There are enough hardware resources for virtual machine operation that is original and newly receiving, guarantees to be run on monitored host and destination host The normal operation of virtual machine improves the reliability of the method for the Autonomic Migration Framework virtual machine.
3, in the method and device of Autonomic Migration Framework virtual machine provided in an embodiment of the present invention, the CPU of physical host and interior It deposits the excessively high virtual machine that will lead to of occupancy and the case where Caton or delay machine occurs, using CPU occupation value and EMS memory occupation value as judgement Whether need to carry out the condition of virtual machine (vm) migration, the opportunity migrated to virtual machine can be accurately determined, guarantees that this is automatic Migrate the feasibility of the method for virtual machine.
4, in the method and device of Autonomic Migration Framework virtual machine provided in an embodiment of the present invention, pass through migration strategy allocation list Carry out the relevant information of storage virtual machine migration with migration information detailed configuration table, it is possible to reduce the capacity of each allocation list mentions The speed that height accesses to allocation list guarantees rapidly to migrate virtual machine, prevent due to virtual machine (vm) migration not Leading to virtual machine in time, there is a situation where delay machine generations.
It should be noted that, in this document, such as first and second etc relational terms are used merely to an entity Or operation is distinguished with another entity or operation, is existed without necessarily requiring or implying between these entities or operation Any actual relationship or order.Moreover, the terms "include", "comprise" or its any other variant be intended to it is non- It is exclusive to include, so that the process, method, article or equipment for including a series of elements not only includes those elements, It but also including other elements that are not explicitly listed, or further include solid by this process, method, article or equipment Some elements.In the absence of more restrictions, the element limited by sentence " including a 〃 ", is not arranged Except there is also other identical factors in the process, method, article or apparatus that includes the element.
Those of ordinary skill in the art will appreciate that: realize that all or part of the steps of above method embodiment can pass through The relevant hardware of program instruction is completed, and program above-mentioned can store in computer-readable storage medium, the program When being executed, step including the steps of the foregoing method embodiments is executed;And storage medium above-mentioned includes: ROM, RAM, magnetic disk or light In the various media that can store program code such as disk.
Finally, it should be noted that the foregoing is merely presently preferred embodiments of the present invention, it is merely to illustrate skill of the invention Art scheme, is not intended to limit the scope of the present invention.Any modification for being made all within the spirits and principles of the present invention, Equivalent replacement, improvement etc., are included within the scope of protection of the present invention.

Claims (9)

1. a kind of method of Autonomic Migration Framework virtual machine characterized by comprising
It is directed at least one monitored host, obtains the corresponding mobility threshold of each described monitored host;
Obtain the corresponding target virtual machine of each described monitored host and destination host;
The hardware resource of each monitored host is monitored, corresponding first hardware resource occupation value is obtained;
Judge whether the first hardware resource occupation value is greater than the mobility threshold corresponding to the same monitored host;
The target virtual machine operated on the monitored host is migrated to the corresponding target master if so, being formed Migration instruction on machine, to be migrated to the target virtual machine;
The target virtual machine operated on the monitored host is migrated to the corresponding target master in the formation After migration instruction on machine, further comprise:
The hardware resource of the destination host is detected, corresponding second hardware resource occupation value is obtained;
Judge whether the second hardware resource occupation value is less than the preset reception threshold value corresponding to the destination host;
If so, being instructed according to the migration, the target virtual machine is migrated to the destination host;
If not, obtaining the corresponding second hardware resource occupation value of each destination host, the target virtual machine is migrated To the corresponding the smallest destination host of second hardware resource occupation value.
2. the method according to claim 1, wherein
The first hardware resource occupation value includes: the CPU occupation value and/or EMS memory occupation corresponding to the monitored host Value;
And/or
The second hardware resource occupation value includes: the CPU occupation value and/or EMS memory occupation value corresponding to the destination host.
3. the method according to claim 1, wherein
It is described to obtain corresponding first hardware resource occupation value, comprising:
It is directed to each described monitored host, to the hardware of the monitored host within each preset monitoring period Resource is monitored in real time, and the average value of the hardware resource occupation value in the same monitoring period is supervised as described Control the corresponding first hardware resource occupation value of host.
4. method according to any one of claims 1 to 3, which is characterized in that
It is described obtain the corresponding mobility threshold of each described monitored host after, further comprise:
By the corresponding mobility threshold storage of each described monitored host into preset migration strategy allocation list;
It is described obtain the corresponding target virtual machine of each described monitored host and destination host after, further comprise:
The corresponding target virtual machine of each described monitored host and destination host storage is detailed to preset migration information In thin allocation list.
5. according to the method described in claim 4, it is characterized in that,
After the corresponding first hardware resource occupation value of the acquisition, further comprise:
First hardware resource occupation value storage is reached pre- into the migration information detailed configuration table, and in storage time If retention time after by the first hardware resource occupation value delete.
6. a kind of device of the Autonomic Migration Framework virtual machine using any the method for claim 1-5, which is characterized in that packet It includes: acquiring unit, monitoring unit, judging unit and execution unit;
The acquiring unit obtains each described monitored host correspondence and moves for being directed at least one monitored host Move threshold value;And obtain the corresponding target virtual machine of each described monitored host and destination host;
The monitoring unit is monitored for the hardware resource each monitored host, obtains corresponding first Hardware resource occupation value;
Whether the judging unit, the first hardware resource occupation value for judging that the monitoring unit is got are greater than institute State the mobility threshold corresponding to the same monitored host that acquiring unit is got;
The execution unit, for the judging result according to the judging unit, if so, described be monitored will be operated in by being formed The target virtual machine on host is migrated to the migration instruction on the corresponding destination host, to the target virtual machine It is migrated.
7. device according to claim 6, which is characterized in that
The execution unit is further used for detecting the hardware resource of the destination host, and it is hard to obtain corresponding second Part resource occupation value;Judge whether the second hardware resource occupation value is less than the preset reception corresponding to the destination host Threshold value;If so, being instructed according to the migration, the target virtual machine is migrated to the destination host;If not, obtaining The corresponding second hardware resource occupation value of each destination host migrates the target virtual machine to corresponding second hardware money On the smallest destination host of source occupation value;
And/or
The monitoring unit, for being directed to each described monitored host, to institute within each preset monitoring period The hardware resource for stating monitored host is monitored in real time, by the hardware resource occupation value in the same monitoring period Average value is as the corresponding first hardware resource occupation value of the monitored host.
8. device according to claim 6 or 7, which is characterized in that
The acquiring unit includes: that the first acquisition subelement and second obtain subelement;
Described first obtains subelement, for moving the corresponding mobility threshold storage of each described monitored host to preset It moves in tactful allocation list;
Described second obtains subelement, for by the corresponding target virtual machine of each described monitored host and destination host It stores in preset migration information detailed configuration table.
9. device according to claim 8, which is characterized in that
The monitoring unit is further used for storing the first hardware resource occupation value to the migration information detailed configuration In table, and the first hardware resource occupation value is deleted after storage time reaches preset retention time.
CN201610949790.7A 2016-10-26 2016-10-26 A kind of method and device of Autonomic Migration Framework virtual machine Active CN106502764B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610949790.7A CN106502764B (en) 2016-10-26 2016-10-26 A kind of method and device of Autonomic Migration Framework virtual machine

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610949790.7A CN106502764B (en) 2016-10-26 2016-10-26 A kind of method and device of Autonomic Migration Framework virtual machine

Publications (2)

Publication Number Publication Date
CN106502764A CN106502764A (en) 2017-03-15
CN106502764B true CN106502764B (en) 2019-08-02

Family

ID=58322953

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610949790.7A Active CN106502764B (en) 2016-10-26 2016-10-26 A kind of method and device of Autonomic Migration Framework virtual machine

Country Status (1)

Country Link
CN (1) CN106502764B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101937357A (en) * 2009-07-01 2011-01-05 华为技术有限公司 Virtual machine migration decision-making method, device and system
CN102609314A (en) * 2012-01-18 2012-07-25 浪潮(北京)电子信息产业有限公司 Quantification management method and quantification management system for virtual machine
CN103605574A (en) * 2013-11-18 2014-02-26 浪潮(北京)电子信息产业有限公司 Virtual machine resource scheduling method and system for server clusters
CN103617070A (en) * 2013-11-27 2014-03-05 华为技术有限公司 Virtual machine migration method and device
CN103631633A (en) * 2012-08-20 2014-03-12 中国电信股份有限公司 Virtual machine total-system online migration method, device and system
CN103870341A (en) * 2014-03-12 2014-06-18 汉柏科技有限公司 Method and system of adjusting resources of virtual machine
CN104270416A (en) * 2014-09-12 2015-01-07 杭州华为数字技术有限公司 Load balancing control method and management node

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101937357A (en) * 2009-07-01 2011-01-05 华为技术有限公司 Virtual machine migration decision-making method, device and system
CN102609314A (en) * 2012-01-18 2012-07-25 浪潮(北京)电子信息产业有限公司 Quantification management method and quantification management system for virtual machine
CN103631633A (en) * 2012-08-20 2014-03-12 中国电信股份有限公司 Virtual machine total-system online migration method, device and system
CN103605574A (en) * 2013-11-18 2014-02-26 浪潮(北京)电子信息产业有限公司 Virtual machine resource scheduling method and system for server clusters
CN103617070A (en) * 2013-11-27 2014-03-05 华为技术有限公司 Virtual machine migration method and device
CN103870341A (en) * 2014-03-12 2014-06-18 汉柏科技有限公司 Method and system of adjusting resources of virtual machine
CN104270416A (en) * 2014-09-12 2015-01-07 杭州华为数字技术有限公司 Load balancing control method and management node

Also Published As

Publication number Publication date
CN106502764A (en) 2017-03-15

Similar Documents

Publication Publication Date Title
CN105740074B (en) A kind of virtual machine load-balancing method based on cloud computing
KR101814560B1 (en) Virtual machine migration management method, apparatus, and system
CN109428913B (en) Storage capacity expansion method and device
US20170315839A1 (en) Method and Device for Processing Virtual Machine Migration
CN106533723B (en) Virtual resource scheduling method, device and system
CN103631633B (en) Virtual machine total-system online migration method, device and system
EP3119034A1 (en) Fault handling method, device and system based on network function virtualization
CN106412917A (en) Network expansion method and device
CN106992887A (en) The implementation method of application example elastic telescopic based on container, apparatus and system
CN106161076B (en) Virtual network function extended method and device
CN107480015A (en) Load test approach, device, system, storage medium and pressure survey server
EP3477894B1 (en) Method and device for controlling virtualized broadband remote access server (vbras), and communication system
CN103853610A (en) Resource optimization method and resource optimization device
CN105306622B (en) A kind of cloud net fusion domain name analysis system and its DNS service method
CN105119993B (en) Virtual machine deployment method and device
CN107704212B (en) A kind of data processing method and device
CN108337110A (en) A kind of virtual resource management method and device, computer readable storage medium
CN107656807A (en) The automatic elastic telescopic method and device of a kind of virtual resource
CN104331601A (en) Method and device for optimizing game scenes
KR101591601B1 (en) Memory omtimized method and uesr device for performing the method
KR20170052441A (en) Centralized distributed systems and methods for managing operations
JP2009237859A (en) Virtual machine management system
CN106502764B (en) A kind of method and device of Autonomic Migration Framework virtual machine
KR101152315B1 (en) Method for virtuallizing a server for network video recorder
CN103810038A (en) Method and device for transferring virtual machine storage files in HA cluster

Legal Events

Date Code Title Description
C06 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