CN107643939A - A kind of method and system for distributing virtual machine - Google Patents
A kind of method and system for distributing virtual machine Download PDFInfo
- Publication number
- CN107643939A CN107643939A CN201710826276.9A CN201710826276A CN107643939A CN 107643939 A CN107643939 A CN 107643939A CN 201710826276 A CN201710826276 A CN 201710826276A CN 107643939 A CN107643939 A CN 107643939A
- Authority
- CN
- China
- Prior art keywords
- host
- virtual machine
- newly
- built
- threshold
- 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
Links
Abstract
A kind of method for distributing virtual machine, specifically includes following steps:Selection target host;The newly-built virtual machine under target host machine;Judge whether the quantity of newly-built virtual machine meets to require, if do not met, continue newly-built virtual machine, until meeting to require.Also include a kind of system for distributing virtual machine.The pressure of high capacity main frame in Virtual Cluster is reduced, improves the performance of virtual machine;The main frame of unnecessary start in Virtual Cluster is reduced, reduces the power consumption of cluster.
Description
Technical field
The present invention relates to virtual machine migration technology field, specifically a kind of method and system for distributing virtual machine.
Background technology
Virtual machine migration policies can be all designed in general virtualization system, ensure whole cluster in the process of running
Load balancing, but in Mass production virtual machine, do not process typically, the resource of one host of centralized distribution or every
Mean allocation on individual host.One host resource of centralized distribution may cause the host resource utilization to be far above other
Host, and each host resource utilization is inconsistent, mean allocation may cause host resource unbalanced.This side
Although case is simple directly, the former can take the resource of the host, lead in the case where virtual machine needs stock number larger
Cause the utilization of resources of the host to be far above other hosts, cause the decline of virtual machine performance, in addition host it is stuck or
Generate virtual machine failure;The latter distributes a small amount of virtual machine in host zero load, and host all runs in the case of low-load, made
Into unnecessary power consumption.
The content of the invention
There is hydraulic performance decline to solve current virtual machine, and the problem of waste of energy, the invention provides one kind to distribute
The method and system of virtual machine.
The technical scheme adopted by the invention to solve the technical problem is that:A kind of method for distributing virtual machine, is specifically included
Following steps:
Selection target host;
The newly-built virtual machine under target host machine;
Judge whether the quantity of newly-built virtual machine meets to require, if do not met, continue newly-built virtual machine, until full
Foot requires.
Further, also high threshold and Low threshold need to be provided with each host before selection target host;
High threshold represents host load too high, is not required to again newly-built virtual machine, and Low threshold represents host load too low, it is proposed that virtual machine
Move out.
Further, the method for selection target host specifically includes:Calculate remaining stock number in virtual cluster;
The host in cluster is ranked up according to the surplus of resource;
Exclusion is higher than high threshold and the host less than Low threshold;
The host that surplus resources are minimum in remaining host is selected as target host machine.
Further, the method for calculating remaining stock number in virtual cluster specifically includes:Will by Hypervisor
The hardware resource virtualization of host;
Hardware resource required for setting each virtual machine when creating virtual machine;
Hypervisor calculates the still remaining resource of host after the completion of multiple virtual machine creatings.
Further, the method for selection target host also includes:When the load of all hosts be above high threshold or
During less than Low threshold, selection load is less than the host of Low threshold as target host machine.
Further, the method for newly-built virtual machine specifically includes:It is big using the hardware resource needed for Hypervisor settings
It is small, newly-built virtual machine.
Further, whether the quantity of the newly-built virtual machine meets that requirement is specially:The newly-built virtual machine of real-time judge
Whether quantity meets the quantity of the default virtual machine that need to be built.
A kind of system for distributing virtual machine, using described method, including host selecting module, for selection target place
Main frame;With,
Computing module, for calculating the remaining hardware resource of host;With,
Virtual machine establishes module, for establishing virtual machine under target host machine;With,
Judge module, finished for judging whether virtual machine is established.
Further, in addition to setup module, for the threshold value for setting host to load, including high threshold and Low threshold.
Further, the standard of host selecting module selection host is:Place in high threshold and Low threshold section
Selection of chiller loads high host;Host selection outside high threshold and Low threshold section loads low host;
Judge module judges that virtual machine establishes the standard finished and is:The quantity of newly-built virtual machine, which meets to preset, need to build virtual machine
Quantity.
What the above content of the invention provided is only the statement of the embodiment of the present invention, rather than invention is in itself.
The effect provided in the content of the invention is only the effect of embodiment, rather than whole effects that invention is all, above-mentioned
A technical scheme in technical scheme has the following advantages that or beneficial effect:
By resources occupation rate sequence host, high and low two threshold values are set for the resource occupation of the host in cluster, it is low
Threshold value represents host load too low, it is proposed that virtual machine is moved out, host dormancy, reduces waste of energy;High threshold represents host
Machine load too high, it is not recommended that increase virtual machine newly again.The present invention can be that cluster independently selects the optimal host position of virtual machine, subtract
Cluster resource load caused by few incorrect resource allocation when initialization it is uneven and afterwards caused by virtual machine (vm) migration, coordination
The load of different hosts machine in cluster, maintains efficient resource utilization.
The pressure of high capacity main frame in Virtual Cluster is reduced, improves the performance of virtual machine;It is unnecessary in Virtual Cluster to reduce
The main frame of start, reduce the power consumption of cluster.
Brief description of the drawings
Accompanying drawing described herein is used for providing that the present invention is explained further, and forms the part of the application, this hair
Bright schematic description and description is used to explain the present invention, does not form inappropriate limitation of the present invention.In the accompanying drawings:
Fig. 1 is the method flow schematic diagram of the embodiment of the present invention one;
Fig. 2 is the method flow schematic diagram of the embodiment of the present invention two;
Fig. 3 is the system module connection diagram of the embodiment of the present invention.
Embodiment
In order to the technical characterstic of clear explanation this programme, below by embodiment, and its accompanying drawing is combined, to this
Invention is described in detail.Following disclosure provides many different embodiments or example is used for realizing the different knots of the present invention
Structure.In order to simplify disclosure of the invention, hereinafter the part and setting of specific examples are described.In addition, the present invention can be with
Repeat reference numerals and/or letter in different examples.This repetition is that for purposes of simplicity and clarity, itself is not indicated
Relation between various embodiments are discussed and/or set.It should be noted that part illustrated in the accompanying drawings is not necessarily to scale
Draw.Present invention omits the description to known assemblies and treatment technology and process to avoid being unnecessarily limiting the present invention.
As shown in figure 1, a kind of method for distributing virtual machine, specifically includes following steps:
Step 1) is provided with high threshold and Low threshold;High threshold represents host load too high, is not required to again newly-built virtual machine,
Low threshold represents host load too low, it is proposed that virtual machine is moved out.
Step 2) calculates remaining stock number in virtual cluster.
Step 3) is ranked up according to the surplus of resource to the host in cluster.
Step 4) excludes to be higher than high threshold and the host less than Low threshold.
The minimum host of surplus resources is as target host machine in the remaining host of step 5) selection.
Hardware resource size of the step 6) needed for using Hypervisor settings, newly-built virtual machine.
Step 7) judges whether the quantity of newly-built virtual machine meets to require, if do not met, continues newly-built virtual machine,
Until meet to require.
As shown in Fig. 2 a kind of method for distributing virtual machine, can also be:
Step a) is provided with high threshold and Low threshold;High threshold represents host load too high, is not required to again newly-built virtual machine,
Low threshold represents host load too low, it is proposed that virtual machine is moved out.
Step b) calculates remaining stock number in virtual cluster.
Step c) is ranked up according to the surplus of resource to the host in cluster.
Step d) be not below high threshold, higher than the host of Low threshold in the case of select host in surplus resources
Most hosts is as target host machine.
Hardware resource sizes of the step e) needed for using Hypervisor settings, newly-built virtual machine
Step f) judges whether the quantity of newly-built virtual machine meets to require, if do not met, continues newly-built virtual machine,
Until meet to require.
The mode for calculating remaining stock number in virtual cluster specifically includes:
The hardware resource of host is virtualized by Hypervisor.
Hardware resource required for setting each virtual machine when creating virtual machine.
Hypervisor calculates the still remaining resource of host after the completion of multiple virtual machine creatings.
Whether the quantity of newly-built virtual machine meets that requirement is specially:It is pre- whether the quantity of the newly-built virtual machine of real-time judge meets
If the quantity for the virtual machine that need to be built.
As shown in figure 3, a kind of system for distributing virtual machine, including host selecting module, for selection target host;
With computing module, for calculating the remaining hardware resource of host;With virtual machine establishes module, under target host machine
Establish virtual machine;With judge module, finished for judging whether virtual machine is established.
Also include setup module, for the threshold value for setting host to load, including high threshold and Low threshold.
Host selecting module selection host standard be:Host selection in high threshold and Low threshold section is negative
Carry high host;Host selection outside high threshold and Low threshold section loads low host;
Judge module judges that virtual machine establishes the standard finished and is:The quantity of newly-built virtual machine, which meets to preset, need to build virtual machine
Quantity.
Simply the preferred embodiment of the present invention described above, for those skilled in the art,
Without departing from the principles of the invention, some improvements and modifications can also be made, these improvements and modifications are also regarded as this hair
Bright protection domain.
Claims (10)
1. a kind of method for distributing virtual machine, it is characterized in that, specifically include following steps:
Selection target host;
The newly-built virtual machine under target host machine;
Judge whether the quantity of newly-built virtual machine meets to require, if do not met, continue newly-built virtual machine, until meeting to want
Ask.
2. the method according to claim 11, it is characterized in that, need to also be on each host before selection target host
It is provided with high threshold and Low threshold;High threshold represents host load too high, is not required to again newly-built virtual machine, and Low threshold represents host
Machine load too low, it is proposed that virtual machine is moved out.
3. according to the method for claim 2, it is characterized in that, the method for selection target host specifically includes:Calculate virtual
Change remaining stock number in cluster;
The host in cluster is ranked up according to the surplus of resource;
Exclusion is higher than high threshold and the host less than Low threshold;
The host that surplus resources are minimum in remaining host is selected as target host machine.
4. according to the method for claim 3, it is characterized in that, the method for calculating remaining stock number in virtual cluster is specific
Including:The hardware resource of host is virtualized by Hypervisor;
Hardware resource required for setting each virtual machine when creating virtual machine;
Hypervisor calculates the still remaining resource of host after the completion of multiple virtual machine creatings.
5. according to the method for claim 2, it is characterized in that, the method for selection target host also includes:As all hosts
The load of machine is above high threshold or during less than Low threshold, selection load less than Low threshold host as target host machine.
6. according to the method for claim 1, it is characterized in that, the method for newly-built virtual machine specifically includes:Utilize
Hardware resource size needed for Hypervisor settings, newly-built virtual machine.
7. according to the method for claim 1, it is characterized in that, whether the quantity of the newly-built virtual machine meets that requirement is specific
For:Whether the quantity of the newly-built virtual machine of real-time judge meets the quantity of the default virtual machine that need to be built.
8. a kind of system for distributing virtual machine, using the method described in claim 1-7 any one, it is characterized in that, including place
Selection of chiller module, for selection target host;With,
Computing module, for calculating the remaining hardware resource of host;With,
Virtual machine establishes module, for establishing virtual machine under target host machine;With,
Judge module, finished for judging whether virtual machine is established.
9. system according to claim 8, it is characterized in that, in addition to setup module, for the threshold for setting host to load
Value, including high threshold and Low threshold.
10. system according to claim 9, it is characterized in that, the standard of host selecting module selection host is:In height
Host selection in threshold value and Low threshold section loads high host;Host choosing outside high threshold and Low threshold section
Select and load low host;
Judge module judges that virtual machine establishes the standard finished and is:The quantity of newly-built virtual machine meets the default number that need to build virtual machine
Amount.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710826276.9A CN107643939A (en) | 2017-09-14 | 2017-09-14 | A kind of method and system for distributing virtual machine |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710826276.9A CN107643939A (en) | 2017-09-14 | 2017-09-14 | A kind of method and system for distributing virtual machine |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107643939A true CN107643939A (en) | 2018-01-30 |
Family
ID=61110348
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710826276.9A Pending CN107643939A (en) | 2017-09-14 | 2017-09-14 | A kind of method and system for distributing virtual machine |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107643939A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114185676A (en) * | 2021-12-06 | 2022-03-15 | 深圳威科软件科技有限公司 | Server distribution method, device, electronic equipment and computer readable storage medium |
Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101449258A (en) * | 2006-05-18 | 2009-06-03 | 微软公司 | Deploying virtual machine to host based on workload characterizations |
CN102236582A (en) * | 2011-07-15 | 2011-11-09 | 浙江大学 | Method for balanced distribution of virtualization cluster load in a plurality of physical machines |
CN102469126A (en) * | 2010-11-10 | 2012-05-23 | ***通信集团公司 | Application scheduling system, method thereof and related device |
US8364802B1 (en) * | 2008-09-23 | 2013-01-29 | Gogrid, LLC | System and method for monitoring a grid of hosting resources in order to facilitate management of the hosting resources |
CN102929701A (en) * | 2012-10-17 | 2013-02-13 | 北京搜狐新媒体信息技术有限公司 | Scheduling method and device for batched virtual machines |
US20140181809A1 (en) * | 2012-12-21 | 2014-06-26 | Red Hat Israel, Ltd. | Creating multiple rules for a device to allow concurrent access to the device by different virtual machines |
CN104657215A (en) * | 2013-11-19 | 2015-05-27 | 南京鼎盟科技有限公司 | Virtualization energy-saving system in Cloud computing |
CN105843670A (en) * | 2016-03-22 | 2016-08-10 | 浙江大学 | Cloud platform based virtual cluster deployment and integration method |
CN105912406A (en) * | 2016-05-05 | 2016-08-31 | 中国人民解放军国防科学技术大学 | Low-energy independent task scheduling and resource configuration method |
CN106020937A (en) * | 2016-07-07 | 2016-10-12 | 腾讯科技(深圳)有限公司 | Method, device and system for creating virtual machine |
CN106445631A (en) * | 2016-08-26 | 2017-02-22 | 华为技术有限公司 | Method and system for arranging virtual machine, and physical server |
-
2017
- 2017-09-14 CN CN201710826276.9A patent/CN107643939A/en active Pending
Patent Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101449258A (en) * | 2006-05-18 | 2009-06-03 | 微软公司 | Deploying virtual machine to host based on workload characterizations |
US8364802B1 (en) * | 2008-09-23 | 2013-01-29 | Gogrid, LLC | System and method for monitoring a grid of hosting resources in order to facilitate management of the hosting resources |
CN102469126A (en) * | 2010-11-10 | 2012-05-23 | ***通信集团公司 | Application scheduling system, method thereof and related device |
CN102236582A (en) * | 2011-07-15 | 2011-11-09 | 浙江大学 | Method for balanced distribution of virtualization cluster load in a plurality of physical machines |
CN102929701A (en) * | 2012-10-17 | 2013-02-13 | 北京搜狐新媒体信息技术有限公司 | Scheduling method and device for batched virtual machines |
US20140181809A1 (en) * | 2012-12-21 | 2014-06-26 | Red Hat Israel, Ltd. | Creating multiple rules for a device to allow concurrent access to the device by different virtual machines |
CN104657215A (en) * | 2013-11-19 | 2015-05-27 | 南京鼎盟科技有限公司 | Virtualization energy-saving system in Cloud computing |
CN105843670A (en) * | 2016-03-22 | 2016-08-10 | 浙江大学 | Cloud platform based virtual cluster deployment and integration method |
CN105912406A (en) * | 2016-05-05 | 2016-08-31 | 中国人民解放军国防科学技术大学 | Low-energy independent task scheduling and resource configuration method |
CN106020937A (en) * | 2016-07-07 | 2016-10-12 | 腾讯科技(深圳)有限公司 | Method, device and system for creating virtual machine |
CN106445631A (en) * | 2016-08-26 | 2017-02-22 | 华为技术有限公司 | Method and system for arranging virtual machine, and physical server |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114185676A (en) * | 2021-12-06 | 2022-03-15 | 深圳威科软件科技有限公司 | Server distribution method, device, electronic equipment and computer readable storage medium |
CN114185676B (en) * | 2021-12-06 | 2022-12-16 | 深圳威科软件科技有限公司 | Server distribution method, device, electronic equipment and computer readable storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103823714B (en) | Virtualization-based method and device for adjusting QoS (quality of service) of node memory of NUMA (non uniform memory access architecture) | |
CN104142860A (en) | Resource adjusting method and device of application service system | |
CN104866379B (en) | A kind of multi-core processor dispatching method, device and terminal | |
JP2015518997A5 (en) | ||
CN103179048B (en) | Main frame qos policy transform method and the system of cloud data center | |
TWI693548B (en) | Device and method for dynamically adjusting task loading for multi-core processor | |
KR20110036172A (en) | Apparatus and method for managing virtual processing unit | |
CN105022662B (en) | A kind of distributed task scheduling distribution method | |
Razali et al. | Virtual machine migration implementation in load balancing for cloud computing | |
WO2022001086A1 (en) | Efficient gpu resource allocation optimization method and system | |
CN109766171B (en) | Task processing method, device, equipment and storage medium | |
CN105260230A (en) | Resource scheduling method for data center virtual machine based on segmented service level agreement | |
CN106445636B (en) | A kind of dynamic resource scheduling algorithm under PAAS platform | |
CN104991825B (en) | A kind of excessive distribution of Hypervisor resource and dynamic adjusting method and system based on Load-aware | |
CN103970256B (en) | Energy saving method and system based on memory compaction and CPU dynamic frequency modulation | |
CN106598559A (en) | Rapid deployment method and system of cloud platform | |
CN114356543A (en) | Kubernetes-based multi-tenant machine learning task resource scheduling method | |
CN107643939A (en) | A kind of method and system for distributing virtual machine | |
CN104881316A (en) | Virtual machine transferring method and device | |
CN112559122A (en) | Virtualization instance management and control method and system based on electric power special security and protection equipment | |
CN102609316A (en) | Management system and management method of network computing resource | |
CN108429784B (en) | Energy efficiency priority cloud resource allocation and scheduling method | |
CN106407013A (en) | Resource dynamic dispatching method, apparatus and system, and resource dispatching server | |
CN107203256B (en) | Energy-saving distribution method and device under network function virtualization scene | |
CN105519075A (en) | Resource scheduling method and apparatus |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20180130 |