CN107577518A - A kind of virtual machine deployment method and device - Google Patents
A kind of virtual machine deployment method and device Download PDFInfo
- Publication number
- CN107577518A CN107577518A CN201710826022.7A CN201710826022A CN107577518A CN 107577518 A CN107577518 A CN 107577518A CN 201710826022 A CN201710826022 A CN 201710826022A CN 107577518 A CN107577518 A CN 107577518A
- Authority
- CN
- China
- Prior art keywords
- virtual machine
- main frame
- migration
- type
- establishment
- 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.)
- Granted
Links
Abstract
The invention discloses a kind of virtual machine deployment method and device, including:According to the OS Type of virtual machine to be created, determine to be currently running the main frame with the OS Type identical virtual machine of virtual machine to be created in cluster;Virtual machine to be created is created on the main frame determined.Pass through the embodiment of the present invention, due to having more identical pages between the virtual machine of same operation system type, therefore by the virtual machine creating of same operation system type on same main frame, realize has more identical pages on same main frame, it is achieved thereby that more pages are merged.
Description
Technical field
The present invention relates to virtualization technology, espespecially a kind of virtual machine deployment method and device.
Background technology
With the development of virtualization technology, the deployment of virtual machine is more and more.How in phase under virtualized environment
More virtual machines are run to save user cost on main frame with configuration, it has also become very important problem.In correlation technique
In, using internal memory same page merge (Kernel SamePage Merging, KSM) technology save internal memory, specifically, main frame it is interior
Nuclear receptor co repressor inspection be currently running in process and compare the page of process, if it find that have page be it is identical, will
Identical page merges into a page, so that two or more processes share a page, saves main frame
The use of upper internal memory, it is achieved thereby that running more virtual machines on the main frame similarly configured.
In virtualization system, due to virtual machine and a process, all internal memories of virtual machine are all process applications
Internal memory, therefore internal memory same page can be merged and be applied in virtualization system to reduce usage amount of the virtual machine to internal memory.But
In practical application, because identical page is seldom between the different virtual machine in a main frame, that is to say, that have seldom interior
Page merging is deposited, result in the effect and unobvious that internal memory on main frame is saved using internal memory same page folding.
The content of the invention
In order to solve the above-mentioned technical problem, the invention provides a kind of virtual machine deployment method and device, can realize
There are more identical pages to merge on same main frame.
In order to reach the object of the invention, the invention provides a kind of virtual machine deployment method, including:
According to the OS Type of virtual machine to be created, determine to be currently running in cluster and virtual machine to be created
The main frame of OS Type identical virtual machine;
Virtual machine to be created is created on the main frame determined.
Further, if the quantity of the main frame determined is multiple, before establishment virtual machine to be created,
Also include:
The first rule according to pre-setting is selected for creating the void to be created in the main frame determined
The main frame of plan machine.
Further, if operation and the OS Type of the virtual machine to be created are not present in the cluster
The main frame of virtual machine, in addition to:
Selected according in main frame of the Second Rule pre-set in the cluster for creating the void to be created
The main frame of plan machine.
Further, in addition to:
After the virtual machine of the establishment is restarted, if being currently running in the virtual machine of the establishment and the cluster and institute
The virtual machine for stating the OS Type of the virtual machine of establishment is run on different main frames, then by the virtual machine of the establishment and institute
State be currently running in cluster with it is same in the virtual machine (vm) migration of the OS Type of the virtual machine of the establishment to the cluster
On one main frame.
Further, it is described that virtual machine with the establishment will be currently running in the virtual machine of the establishment and the cluster
OS Type virtual machine (vm) migration to the cluster in same main frame on, including:
According to the main frame for the virtual machine for being currently running the establishment and it is currently running the operation with the virtual machine of the establishment
The main frame of the virtual machine of system type, it is determined that will be currently running and the establishment in the virtual machine of the establishment and the cluster
Two or more migration paths on the virtual machine (vm) migration of the OS Type of virtual machine to same main frame;
It is determined that two or more migration paths in select migration path;
According to the migration path of selection, will be currently running and the establishment in the virtual machine of the establishment and the cluster
On same main frame in the virtual machine (vm) migration of the OS Type of virtual machine to the cluster.
Further, it is described it is determined that two or more migration paths in select migration path, including:
For each migration path of the determination, virtual machine (vm) migration when being migrated according to the migration path is calculated
Number;
Select the minimum migration path of virtual machine (vm) migration number.
Further, it is described it is determined that two or more migration paths in select migration path, including:
For each migration path of the determination, it is determined that carrying out what is created described in migration back loading according to the migration path
Virtual machine and being currently running is born with total virtual machine of the main frame of the virtual machine of the OS Type of the virtual machine of the establishment
Carrying capacity;
Select the minimum migration path of total virtual machine load capacity of main frame.
Further, it is currently running in the determination cluster empty with the OS Type identical of virtual machine to be created
The main frame of plan machine, including:
The each void being currently running on the main frame in the cluster is read from the virtual machine configuration information of database purchase
The OS Type of plan machine;
If read the OS Type for the virtual machine being currently running and the operating system of the virtual machine to be created
Type is identical, it is determined that the main frame of the virtual machine being currently running.
The invention provides a kind of deploying virtual machine device, including:
Determining module, for the OS Type according to virtual machine to be created, determine to be currently running and treat in cluster
The main frame of the OS Type identical virtual machine of the virtual machine of establishment;
Creation module, for creating virtual machine to be created on the main frame determined.
Further, if the quantity of the main frame determined is multiple, in addition to:
First choice module, for being selected to be used to create in the main frame determined according to the first rule pre-set
Build the main frame of the virtual machine to be created.
Further, if operation and the OS Type of the virtual machine to be created are not present in the cluster
The main frame of virtual machine, in addition to:
Second selecting module, for selecting to be used to create according in main frame in the cluster of the Second Rule that pre-sets
Build the main frame of the virtual machine to be created.
Further, in addition to:
Transferring module, after restarting in the virtual machine of the establishment, if the virtual machine of the establishment and the cluster
Inside it is currently running and is run from the virtual machine of the OS Type of the virtual machine of the establishment on different main frames, then by the wound
It is currently running in the virtual machine and the cluster built and is arrived with the virtual machine (vm) migration of the OS Type of the virtual machine of the establishment
On same main frame in the cluster.
Further, the transferring module includes:
First determining unit, for the main frame according to the virtual machine for being currently running the establishment and it is currently running and the wound
The main frame of the virtual machine of the OS Type for the virtual machine built, it is determined that by the virtual machine of the establishment and the cluster
Operation and two or more on the virtual machine (vm) migration to same main frame of the OS Type of the virtual machine of the establishment
Migration path;
Second determining unit, for it is determined that two or more migration paths in select migration path;
Migration units, for the migration path according to selection, will it transported in the virtual machine of the establishment and the cluster
On same main frame in the virtual machine (vm) migration to the cluster of the OS Type of row and the virtual machine of the establishment.
Further, second determining unit is specifically used for,
For each migration path of the determination, virtual machine (vm) migration when being migrated according to the migration path is calculated
Number;
Select the minimum migration path of virtual machine (vm) migration number.
Further, second determining unit is specifically used for,
For each migration path of the determination, it is determined that carrying out what is created described in migration back loading according to the migration path
Virtual machine and being currently running is born with total virtual machine of the main frame of the virtual machine of the OS Type of the virtual machine of the establishment
Carrying capacity;
Select the minimum migration path of total virtual machine load capacity of main frame.
Further, the determining module includes:
Reading unit, for being read from the virtual machine configuration information of database purchase on the main frame in the cluster
The OS Type of each virtual machine of operation;
3rd determining unit, if for read the OS Type of the virtual machine being currently running with it is described to be created
The OS Type of virtual machine is identical, it is determined that the main frame of the virtual machine being currently running.
The present invention comprises at least the OS Type according to virtual machine to be created, determines to be currently running and treat in cluster
The main frame of the OS Type identical virtual machine of the virtual machine of establishment;Created on the main frame determined to be created virtual
Machine.From the embodiment of the present invention, due to having more identical pages between the virtual machine of same operation system type, because
This by the virtual machine creating of same operation system type on same main frame, realize have on same main frame it is more identical
Page merge, it will be apparent that the internal memory on main frame is saved, it is achieved thereby that being run more on the main frame similarly configured
More virtual machines.
Other features and advantages of the present invention will be illustrated in the following description, also, partly becomes from specification
Obtain it is clear that or being understood by implementing the present invention.The purpose of the present invention and other advantages can be by specification, rights
Specifically noted structure is realized and obtained in claim and accompanying drawing.
Brief description of the drawings
Accompanying drawing is used for providing further understanding technical solution of the present invention, and a part for constitution instruction, with this
The embodiment of application is used to explain technical scheme together, does not form the limitation to technical solution of the present invention.
Fig. 1 is a kind of schematic flow sheet of virtual machine deployment method provided in an embodiment of the present invention;
Fig. 2 is a kind of structural representation of deploying virtual machine device provided in an embodiment of the present invention;
Fig. 3 is the structural representation of another deploying virtual machine device provided in an embodiment of the present invention.
Embodiment
For the object, technical solutions and advantages of the present invention are more clearly understood, below in conjunction with accompanying drawing to the present invention
Embodiment be described in detail.It should be noted that in the case where not conflicting, in the embodiment and embodiment in the application
Feature can mutually be combined.
Can be in the computer system of such as one group computer executable instructions the flow of accompanying drawing illustrates the step of
Perform.Also, although logical order is shown in flow charts, in some cases, can be with suitable different from herein
Sequence performs shown or described step.
The embodiment of the present invention provides a kind of virtual machine deployment method, as shown in figure 1, the virtual machine deployment method includes:
Step 101, the OS Type according to virtual machine to be created, determine to be currently running in cluster with it is to be created
The main frame of the OS Type identical virtual machine of virtual machine.
Wherein, OS Type includes:Windows operating system, (SuSE) Linux OS, Unix operating systems and MAC
Operating system, the OS Type of virtual machine to be created are inputted from user.Due to the virtual machine ability being currently running
The internal memory of main frame is taken, it is thus determined that being currently running in cluster virtual with the OS Type identical of virtual machine to be created
The main frame of machine.For example, there are tri- main frames of A, B and C in cluster, the virtual of Windows operating system is currently running on A main frames
Machine, the virtual machine of (SuSE) Linux OS is currently running on B main frames, the virtual of Unix operating systems is currently running on C main frames
Machine, when the OS Type of virtual machine to be created is Windows operating system, it is determined that be currently running in cluster
The A main frames of the virtual machine of Windows operating system.
Step 102, virtual machine to be created is created on the main frame determined.
By by virtual machine creating to be created on the main frame determined, so by the virtual of same operation system type
Machine is run on the same host, also allows for having more identical pages on the host, can be by more identicals
Page merging is deposited, the internal memory of main frame is saved, so as to create more virtual machines on main frame.The realization for creating virtual machine can
Realized in a manner of using in correlation technique, implement the protection domain being not intended to limit the present invention, repeat no more here.
Further, on the basis of Fig. 1 corresponds to embodiment, if it is determined that the quantity of the main frame gone out is multiple, step 101
Afterwards and before step 102, in addition to:
The first rule that step 103, basis are pre-set is selected in the main frame determined for creating void to be created
The main frame of plan machine.
Specifically, the first rule pre-set includes:Chosen at random in the main frame determined a main frame or
The minimum main frame of total virtual machine load capacity is selected in the main frame determined.
Further, on the basis of Fig. 1 corresponds to embodiment, if operation and virtual machine to be created are not present in cluster
OS Type virtual machine main frame, in addition to:
The Second Rule that step 104, basis are pre-set is selected for creating void to be created in the main frame in cluster
The main frame of plan machine.
Specifically, the Second Rule pre-set includes:Chosen at random in the main frame determined a main frame or
The minimum main frame of total virtual machine load capacity is selected in the main frame determined.First rule and Second Rule can be with identical, can also
Differ.
In addition, if it is determined that total virtual machine load capacity of the main frame for creating virtual machine to be created reached this
The maximum load value of main frame, it can not be currently running on the main frame of virtual machine at one and create virtual machine to be created.For example, collection
There are tri- main frames of A, B and C in group, the virtual machine of Windows operating system is currently running on A main frames, is currently running on B main frames
The virtual machine of (SuSE) Linux OS, off-duty virtual machine on C main frames, the total virtual machine load capacity being currently running on A main frames is
The maximum load value of A main frames is reached, that is to say, that virtual machine can not be added on A main frames, in the case, if to be created
The OS Type of virtual machine is Windows operating system, and the virtual machine can be created on C main frames.
Further, on the basis of Fig. 1 corresponds to embodiment, after step 102, in addition to:
Step 105, after the virtual machine of establishment is restarted, if create virtual machine and cluster in be currently running with create
The virtual machine of the OS Type of virtual machine is run on different main frames, then will be currently running in the virtual machine and cluster of establishment
With on the same main frame in the virtual machine (vm) migration to cluster of the OS Type of the virtual machine of establishment.
After having created virtual machine on one host, virtual machine can be run on the host, if restarting to virtual machine, meeting
Strategy according to pre-setting distributes for virtual machine again waits the main frame for running the virtual machine, after thus restarting to virtual machine,
The main frame of operation virtual machine can change, and the main frame for creating virtual machine is used for before being not necessarily, that is to say, that restarting void
The situation that the virtual machine of same operation system type is run on different main frames occurs after plan machine.For example, there are A, B in cluster
With tri- main frames of C, virtual machine is created on A main frames, now virtual machine is run on A main frames, if virtual machine is restarted, virtually
Chance is run on B main frames or C main frames.Above it can be seen that the virtual machine of same operation system type is transported on different main frames
OK, can be by the same main frame in the two virtual machine (vm) migrations to cluster if the two virtual machines are run on different main frames
Upper operation, to keep running the virtual machine of same operation system type on the same host.
Further, step 105 includes:
Step 1051, basis are currently running the main frame of the virtual machine of establishment and are currently running the operation of the virtual machine with creating
The main frame of the virtual machine of system type, it is determined that the operation for the virtual machine with creating being currently running in the virtual machine and cluster of establishment
Two or more migration paths on the virtual machine (vm) migration of system type to same main frame.
It is determined that it is currently running the main frame of the virtual machine of establishment and is currently running the OS Type of the virtual machine with creating
Virtual machine main frame, determined that migration path after determining main frame, the migration path includes:The virtual machine (vm) migration of establishment is arrived
It is currently running on the main frame of the virtual machine of the OS Type of the virtual machine with creating and will be currently running virtual with establishment
The virtual machine (vm) migration of the OS Type of machine is on the virtual machine of establishment.In other words it is currently running the master of the virtual machine of establishment
Machine and the quantity of main frame of virtual machine of OS Type for being currently running the virtual machine with creating have several, just there is several move
Move path.
For example, there is tri- main frames of A, B and C in cluster, virtual machine to be created is L virtual machines, is currently running and establishment
The virtual machine of the OS Type of virtual machine is M virtual machines and N virtual machines, and M virtual machines and N virtual machines are all transported on B main frames
OK, when creating L virtual machines, select to create virtual machine on B main frames.After creating L virtual machines on B main frames, if having restarted L
Virtual machine, L virtual machines are run on A main frames.Running situation now is that L virtual machines are run on A main frames, M virtual machines and N
Virtual machine is run on B main frames, and migration path has two kinds, the first migration path be by L virtual machine (vm) migrations to B main frames, this
L virtual machines, M virtual machines and N virtual machines are run on sample B main frames;Second of migration path is by M virtual machines and N virtual machine (vm) migrations
Onto A main frames, L virtual machines, M virtual machines and N virtual machines are run so on A main frames.
Step 1052, it is determined that two or more migration paths in select migration path.
Step 1053, the migration path according to selection, the void with creating will be currently running in the virtual machine and cluster of establishment
On same main frame in the virtual machine (vm) migration of the OS Type of plan machine to cluster.
Further, two kinds of embodiments carry out implementation steps 1052.
Mode one, step 1052 includes:
For each migration path of determination, virtual machine (vm) migration number when being migrated according to the migration path is calculated;
Select the minimum migration path of virtual machine (vm) migration number.
After determining migration path, for every migration path, the virtual machine of establishment and the void with establishment being currently running
It is known that whether the OS Type identical virtual machine of plan machine, which migrates, calculates the quantity for the virtual machine for participating in migration, should
The quantity for participating in the virtual machine of migration is exactly the virtual machine (vm) migration number of the migration path.
For example, migration path has two kinds, the first migration path is such B main frames by L virtual machine (vm) migrations to B main frames
Upper operation L virtual machines, M virtual machines and N virtual machines;Second of migration path is by M virtual machines and N virtual machine (vm) migrations to A main frames
On, L virtual machines, M virtual machines and N virtual machines are run so on A main frames.In both the above migration path, according to the first
, it is necessary to which a virtual machine (L virtual machines) is moved on B main frames when migration path is migrated, i.e., enter according to the migration path
Virtual machine (vm) migration number during row migration is 1 time;When being migrated according to second of migration path, it is necessary to by two virtual machine (M
Virtual machine and N virtual machines) move on A main frames, i.e., virtual machine (vm) migration number when being migrated according to the migration path is 2
It is secondary.Being analyzed more than to draw, carried out according to the migration path (i.e. the first migration path) that virtual machine (vm) migration number is 1 time
Migration, so as to reduce migration workload, improve transport efficiency.
Mode two, step 1052 includes:
For each migration path of determination, it is determined that according to the migration path carry out migrate back loading create virtual machine with
And it is currently running total virtual machine load capacity of the main frame of the virtual machine of the OS Type of the virtual machine with creating;Select main frame
The minimum migration path of total virtual machine load capacity.
For example, migration path has two kinds, the first migration path is such B main frames by L virtual machine (vm) migrations to B main frames
Upper operation L virtual machines, M virtual machines and N virtual machines;Second of migration path is by M virtual machines and N virtual machine (vm) migrations to A main frames
On, L virtual machines, M virtual machines and N virtual machines are run so on A main frames.In the first migration path, if according to the migration
After Path Migration, total virtual machine load capacity of the main frame of load L virtual machines, M virtual machines and N virtual machines is 6, is moved at second
Move in path, if after being migrated according to the migration path, total virtual machine of the main frame of load L virtual machines, M virtual machines and N virtual machines
Load capacity is 4.Being analyzed more than to draw, select total virtual machine load capacity for 4 migration path (i.e. second migration
Path) migrated, so that the load of each main frame is more balanced.
Both the above mode can also be combined to select path to be migrated.
For example, in mode one, after virtual machine (vm) migration number when being migrated according to each migration path is calculated,
If the quantity of the minimum migration path of virtual machine (vm) migration number is two or more, move that number is minimum to be moved moving virtual machine
Move and a migration path selected in path, wherein after being migrated according to the migration path of selection, load the virtual machine of establishment with
And it is currently running minimum with total virtual machine load capacity of the main frame of the virtual machine of the OS Type of the virtual machine of establishment.
For another example in mode two, when selecting migration path, if the migration road that total virtual machine load capacity of main frame is minimum
The quantity in footpath is two or more, for each migration path, calculates the virtual machine of establishment and is currently running and creates
Virtual machine (vm) migration number when the virtual machine (vm) migration of the OS Type for the virtual machine built is on same main frame, select virtual machine
Migrate the minimum migration path of number.
Further, on the basis of Fig. 1 corresponds to embodiment, step 101 includes:
The each virtual machine being currently running on the main frame in cluster is read from the virtual machine configuration information of database purchase
OS Type;If read the operation system of the OS Type and virtual machine to be created of the virtual machine being currently running
Type of uniting is identical, it is determined that the main frame of the virtual machine being currently running.
Although virtual machine creating, on main frame, the virtual machine of the OS Type of the virtual machine including the establishment is matched somebody with somebody
Confidence breath is stored in database, and the database is stored onto virtual management platform.Specifically, scan database
The virtual machine configuration information of middle storage, to read the operation system for each virtual machine being currently running from the virtual machine configuration information
System type, if reading the operating system class of the OS Type and virtual machine to be created of a virtual machine being currently running
Type is identical, then the main frame of the virtual machine being currently running is the main frame for being used to create virtual machine to be created of above-mentioned determination.
The main body for performing the virtual machine deployment method of any of the above is virtual management platform.
The virtual machine deployment method that the embodiment of the present invention is provided, according to the OS Type of virtual machine to be created,
Determine to be currently running the main frame with the OS Type identical virtual machine of virtual machine to be created in cluster;What is determined
Virtual machine to be created is created on main frame.From the embodiment of the present invention, due between the virtual machine of same operation system type
Realized with more identical pages, therefore by the virtual machine creating of same operation system type on same main frame
There are more identical pages to merge on same main frame, it will be apparent that the internal memory on main frame is saved, it is achieved thereby that
More virtual machines are run on the main frame similarly configured.
The embodiment of the present invention provides a kind of deploying virtual machine device, as shown in Fig. 2 the deploying virtual machine device 2 includes:
Determining module 21, for the OS Type according to virtual machine to be created, determine to be currently running in cluster with
The main frame of the OS Type identical virtual machine of virtual machine to be created.
Creation module 22, for creating virtual machine to be created on the main frame determined.
Further, on the basis of Fig. 2 corresponds to embodiment, if it is determined that the quantity of the main frame gone out is multiple, the present invention
Another deploying virtual machine device is provided, as shown in figure 3, the deploying virtual machine device 2 also includes:
First choice module 23, for being selected to be used to create in the main frame determined according to the first rule pre-set
The main frame of virtual machine to be created.
Further, if operation and the virtual machine of the OS Type of virtual machine to be created are not present in cluster
Main frame, as shown in figure 3, deploying virtual machine device 2 also includes:
Second selecting module 24, for selecting to be used to create according in main frame in cluster of the Second Rule that pre-sets
The main frame of virtual machine to be created.
Further, as shown in figure 3, deploying virtual machine device 2 also includes:
Transferring module 25, after restarting in the virtual machine of establishment, if being currently running in the virtual machine and cluster that create
Run from the virtual machine of the OS Type of the virtual machine of establishment on different main frames, then by the virtual machine and cluster of establishment
It is currently running on the same main frame in the virtual machine (vm) migration to cluster of the OS Type of the virtual machine with creating.
Further, as shown in figure 3, transferring module 25 includes:
First determining unit 251, for the main frame according to the virtual machine for being currently running establishment and it is currently running and establishment
The main frame of the virtual machine of the OS Type of virtual machine, it is determined that will be currently running in the virtual machine and cluster of establishment and establishment
Two or more migration paths on the virtual machine (vm) migration of the OS Type of virtual machine to same main frame.
Second determining unit 252, for it is determined that two or more migration paths in select migration path.
Migration units 253, for the migration path according to selection, it will be currently running and create in the virtual machine and cluster of establishment
On same main frame in the virtual machine (vm) migration of the OS Type for the virtual machine built to cluster.
Further, the second determining unit 252 is specifically used for,
For each migration path of determination, virtual machine (vm) migration number when being migrated according to the migration path is calculated;
Select the minimum migration path of virtual machine (vm) migration number.
Further, the second determining unit 252 is specifically used for,
For each migration path of determination, it is determined that according to the migration path carry out migrate back loading create virtual machine with
And it is currently running total virtual machine load capacity of the main frame of the virtual machine of the OS Type of the virtual machine with creating;Select main frame
The minimum migration path of total virtual machine load capacity.
Further, as shown in figure 3, determining module 21 includes:
Reading unit 211, for being read from the virtual machine configuration information of database purchase on the main frame in cluster
The OS Type of each virtual machine of operation.
3rd determining unit 212, if for read the OS Type of the virtual machine being currently running with it is to be created
The OS Type of virtual machine is identical, it is determined that the main frame of the virtual machine being currently running.
In actual applications, determining module 21, creation module 22, first choice module 23, the second selecting module 24 and move
Shifting formwork block 25 can be by the CPU in deploying virtual machine device 2, microprocessor (Micro Processor Unit, MPU), numeral
Signal processor (Digital Signal Processor, DSP) or field programmable gate array (Field Programmable
Gate Array, FPGA) etc. realize.
The deploying virtual machine device that the embodiment of the present invention is provided, according to the OS Type of virtual machine to be created,
Determine to be currently running the main frame with the OS Type identical virtual machine of virtual machine to be created in cluster;What is determined
Virtual machine to be created is created on main frame.From the embodiment of the present invention, due between the virtual machine of same operation system type
Realized with more identical pages, therefore by the virtual machine creating of same operation system type on same main frame
There are more identical pages to merge on same main frame, it will be apparent that the internal memory on main frame is saved, it is achieved thereby that
More virtual machines are run on the main frame similarly configured.
The embodiment of the present invention provides another deploying virtual machine device, and the deploying virtual machine device includes memory, processing
Device and storage are realized on a memory and the computer program that can run on a processor, during computing device computer program
The step of include:
According to the OS Type of virtual machine to be created, determine to be currently running in cluster and virtual machine to be created
The main frame of OS Type identical virtual machine;
Virtual machine to be created is created on the main frame determined.
Further, if it is determined that the quantity of the main frame gone out is realized to be multiple, during above-mentioned computing device computer program
The step of also include:
The first rule according to pre-setting selects the master for creating virtual machine to be created in the main frame determined
Machine.
Further, if operation and the virtual machine of the OS Type of virtual machine to be created are not present in cluster
Main frame, the step of realizing during above-mentioned computing device computer program, also include:
According to the master selected in main frame of the Second Rule pre-set in cluster for creating virtual machine to be created
Machine.
Further, the step of being realized during above-mentioned computing device computer program also includes:
After the virtual machine of establishment is restarted, if being currently running in the virtual machine and cluster that create and the virtual machine of establishment
The virtual machine of OS Type is run on different main frames, then will be currently running in the virtual machine and cluster of establishment and establishment
On same main frame in the virtual machine (vm) migration of the OS Type of virtual machine to cluster.
Further, the step of being realized during above-mentioned computing device computer program specifically includes:
According to the main frame for the virtual machine for being currently running establishment and it is currently running the OS Type with the virtual machine of establishment
Virtual machine main frame, it is determined that will be currently running in the virtual machine and cluster of establishment with create virtual machine OS Type
Virtual machine (vm) migration to same main frame on two or more migration paths;
It is determined that two or more migration paths in select migration path;
According to the migration path of selection, the operation of the virtual machine with creating will be currently running in the virtual machine and cluster of establishment
On same main frame in the virtual machine (vm) migration of system type to cluster.
Further, the step of being realized during above-mentioned computing device computer program specifically includes:
For each migration path of determination, virtual machine (vm) migration number when being migrated according to the migration path is calculated;
Select the minimum migration path of virtual machine (vm) migration number.
Further, the step of being realized during above-mentioned computing device computer program specifically includes:
For each migration path of determination, it is determined that according to the migration path carry out migrate back loading create virtual machine with
And it is currently running total virtual machine load capacity of the main frame of the virtual machine of the OS Type of the virtual machine with creating;
Select the minimum migration path of total virtual machine load capacity of main frame.
Further, the step of being realized during above-mentioned computing device computer program specifically includes:
The each virtual machine being currently running on the main frame in cluster is read from the virtual machine configuration information of database purchase
OS Type;
If read the OS Type of the OS Type and virtual machine to be created of the virtual machine being currently running
It is identical, it is determined that the main frame of the virtual machine being currently running.
Although disclosed herein embodiment as above, described content be only readily appreciate the present invention and use
Embodiment, it is not limited to the present invention.Technical staff in any art of the present invention, taken off not departing from the present invention
On the premise of the spirit and scope of dew, any modification and change, but the present invention can be carried out in the form and details of implementation
Scope of patent protection, still should be subject to the scope of the claims as defined in the appended claims.
Claims (16)
- A kind of 1. virtual machine deployment method, it is characterised in that including:According to the OS Type of virtual machine to be created, determine to be currently running the operation with virtual machine to be created in cluster The main frame of system type identical virtual machine;Virtual machine to be created is created on the main frame determined.
- 2. virtual machine deployment method according to claim 1, it is characterised in that if the quantity of the main frame determined To be multiple, before establishment virtual machine to be created, in addition to:The first rule according to pre-setting is selected for creating the virtual machine to be created in the main frame determined Main frame.
- 3. virtual machine deployment method according to claim 1, it is characterised in that if the cluster in be not present operation with The main frame of the virtual machine of the OS Type of the virtual machine to be created, in addition to:Selected according in main frame of the Second Rule pre-set in the cluster for creating the virtual machine to be created Main frame.
- 4. virtual machine deployment method according to claim 1, it is characterised in that also include:After the virtual machine of the establishment is restarted, if being currently running in the virtual machine of the establishment and the cluster and the wound The virtual machine of the OS Type for the virtual machine built is run on different main frames, then by the virtual machine of the establishment and the collection It is currently running and the same master in the virtual machine (vm) migration of the OS Type of the virtual machine of the establishment to the cluster in group On machine.
- 5. virtual machine deployment method according to claim 4, it is characterised in that described by the virtual machine of the establishment and institute State be currently running in cluster with it is same in the virtual machine (vm) migration of the OS Type of the virtual machine of the establishment to the cluster On one main frame, including:According to the main frame for the virtual machine for being currently running the establishment and it is currently running the operating system with the virtual machine of the establishment The main frame of the virtual machine of type, it is determined that virtual with the establishment by being currently running in the virtual machine of the establishment and the cluster Two or more migration paths on the virtual machine (vm) migration of the OS Type of machine to same main frame;It is determined that two or more migration paths in select migration path;It is virtual with the establishment by being currently running in the virtual machine of the establishment and the cluster according to the migration path of selection On same main frame in the virtual machine (vm) migration of the OS Type of machine to the cluster.
- 6. virtual machine deployment method according to claim 5, it is characterised in that it is described it is determined that two or more Migration path is selected in migration path, including:For each migration path of the determination, virtual machine (vm) migration number when being migrated according to the migration path is calculated;Select the minimum migration path of virtual machine (vm) migration number.
- 7. virtual machine deployment method according to claim 5, it is characterised in that it is described it is determined that two or more Migration path is selected in migration path, including:For each migration path of the determination, it is determined that according to the migration path create described in migration back loading virtual Machine and it is currently running total virtual machine load capacity with the main frame of the virtual machine of the OS Type of the virtual machine of the establishment;Select the minimum migration path of total virtual machine load capacity of main frame.
- 8. virtual machine deployment method according to any one of claim 1 to 7, it is characterised in that in the determination cluster The main frame with the OS Type identical virtual machine of virtual machine to be created is currently running, including:The each virtual machine being currently running on the main frame in the cluster is read from the virtual machine configuration information of database purchase OS Type;If read the OS Type for the virtual machine being currently running and the OS Type of the virtual machine to be created It is identical, it is determined that the main frame of the virtual machine being currently running.
- A kind of 9. deploying virtual machine device, it is characterised in that including:Determining module, for the OS Type according to virtual machine to be created, determine to be currently running in cluster with it is to be created Virtual machine OS Type identical virtual machine main frame;Creation module, for creating virtual machine to be created on the main frame determined.
- 10. deploying virtual machine device according to claim 9, it is characterised in that if the number of the main frame determined Measure to be multiple, in addition to:First choice module, for being selected to be used to create institute in the main frame determined according to the first rule pre-set State the main frame of virtual machine to be created.
- 11. deploying virtual machine device according to claim 9, it is characterised in that if operation is not present in the cluster With the main frame of the virtual machine of the OS Type of the virtual machine to be created, in addition to:Second selecting module, for selecting to be used to create institute according in main frame in the cluster of the Second Rule that pre-sets State the main frame of virtual machine to be created.
- 12. deploying virtual machine device according to claim 9, it is characterised in that also include:Transferring module, after restarting in the virtual machine of the establishment, if in the virtual machine of the establishment and the cluster just Run in operation from the virtual machine of the OS Type of the virtual machine of the establishment on different main frames, then by the establishment It is currently running in virtual machine and the cluster with the virtual machine (vm) migration of the OS Type of the virtual machine of the establishment described in On same main frame in cluster.
- 13. deploying virtual machine device according to claim 12, it is characterised in that the transferring module includes:First determining unit, for the main frame according to the virtual machine for being currently running the establishment and it is currently running and the establishment The main frame of the virtual machine of the OS Type of virtual machine, it is determined that will be currently running in the virtual machine of the establishment and the cluster With two or more migrations on the virtual machine (vm) migration to same main frame of the OS Type of the virtual machine of the establishment Path;Second determining unit, for it is determined that two or more migration paths in select migration path;Migration units, for the migration path according to selection, will be currently running in the virtual machine of the establishment and the cluster with On same main frame in the virtual machine (vm) migration of the OS Type of the virtual machine of the establishment to the cluster.
- 14. deploying virtual machine device according to claim 13, it is characterised in that second determining unit is specifically used In,For each migration path of the determination, virtual machine (vm) migration number when being migrated according to the migration path is calculated;Select the minimum migration path of virtual machine (vm) migration number.
- 15. deploying virtual machine device according to claim 13, it is characterised in that second determining unit is specifically used In,For each migration path of the determination, it is determined that according to the migration path create described in migration back loading virtual Machine and it is currently running total virtual machine load capacity with the main frame of the virtual machine of the OS Type of the virtual machine of the establishment;Select the minimum migration path of total virtual machine load capacity of main frame.
- 16. the deploying virtual machine device according to any one of claim 9 to 15, it is characterised in that the determining module Including:Reading unit, it is currently running for being read from the virtual machine configuration information of database purchase on the main frame in the cluster Each virtual machine OS Type;3rd determining unit, if for read the OS Type of the virtual machine being currently running with it is described to be created virtual The OS Type of machine is identical, it is determined that the main frame of the virtual machine being currently running.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710826022.7A CN107577518B (en) | 2017-09-14 | 2017-09-14 | Virtual machine deployment method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710826022.7A CN107577518B (en) | 2017-09-14 | 2017-09-14 | Virtual machine deployment method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107577518A true CN107577518A (en) | 2018-01-12 |
CN107577518B CN107577518B (en) | 2021-05-04 |
Family
ID=61035884
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710826022.7A Active CN107577518B (en) | 2017-09-14 | 2017-09-14 | Virtual machine deployment method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107577518B (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109062666A (en) * | 2018-07-27 | 2018-12-21 | 浪潮电子信息产业股份有限公司 | A kind of cluster virtual machine management method and relevant apparatus |
CN109271257A (en) * | 2018-10-11 | 2019-01-25 | 郑州云海信息技术有限公司 | A kind of method and apparatus of virtual machine (vm) migration deployment |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103729254A (en) * | 2013-12-31 | 2014-04-16 | 国网山东省电力公司 | Virtual server Virtual CPU resource monitoring and dynamic allocation method |
CN104035822A (en) * | 2014-05-28 | 2014-09-10 | 中国科学院计算技术研究所 | Low-cost efficient internal storage redundancy removing method and system |
CN104156255A (en) * | 2014-07-31 | 2014-11-19 | 华为技术有限公司 | Virtual machine migration method, virtual machine migration device and source physical host |
US9274823B1 (en) * | 2014-12-24 | 2016-03-01 | Parallels IP Holdings GmbH | Thin hypervisor for native execution of unsafe code |
US20160314008A1 (en) * | 2013-12-31 | 2016-10-27 | Huawei Technologies Co., Ltd. | Method for implementing gpu virtualization and related apparatus, and system |
CN106155933A (en) * | 2016-07-06 | 2016-11-23 | 乾云众创(北京)信息科技研究院有限公司 | A kind of virutal machine memory sharing method combined based on KSM and Pass through |
CN106462442A (en) * | 2014-07-24 | 2017-02-22 | 谷歌公司 | System and method of loading virtual machines |
-
2017
- 2017-09-14 CN CN201710826022.7A patent/CN107577518B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103729254A (en) * | 2013-12-31 | 2014-04-16 | 国网山东省电力公司 | Virtual server Virtual CPU resource monitoring and dynamic allocation method |
US20160314008A1 (en) * | 2013-12-31 | 2016-10-27 | Huawei Technologies Co., Ltd. | Method for implementing gpu virtualization and related apparatus, and system |
CN104035822A (en) * | 2014-05-28 | 2014-09-10 | 中国科学院计算技术研究所 | Low-cost efficient internal storage redundancy removing method and system |
CN106462442A (en) * | 2014-07-24 | 2017-02-22 | 谷歌公司 | System and method of loading virtual machines |
CN104156255A (en) * | 2014-07-31 | 2014-11-19 | 华为技术有限公司 | Virtual machine migration method, virtual machine migration device and source physical host |
US9274823B1 (en) * | 2014-12-24 | 2016-03-01 | Parallels IP Holdings GmbH | Thin hypervisor for native execution of unsafe code |
CN106155933A (en) * | 2016-07-06 | 2016-11-23 | 乾云众创(北京)信息科技研究院有限公司 | A kind of virutal machine memory sharing method combined based on KSM and Pass through |
Non-Patent Citations (2)
Title |
---|
ZONGYIMIN: "使用ksm调整kvm虚拟机主机性能", 《CSDN》 * |
姚政: "云计算平台虚拟机簇部署算法研究", 《中国优秀硕士学位论文全文数据库信息科技辑》 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109062666A (en) * | 2018-07-27 | 2018-12-21 | 浪潮电子信息产业股份有限公司 | A kind of cluster virtual machine management method and relevant apparatus |
CN109271257A (en) * | 2018-10-11 | 2019-01-25 | 郑州云海信息技术有限公司 | A kind of method and apparatus of virtual machine (vm) migration deployment |
Also Published As
Publication number | Publication date |
---|---|
CN107577518B (en) | 2021-05-04 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105164644B (en) | Hook frame | |
US9811369B2 (en) | Method and system for physical computer system virtualization | |
KR101971389B1 (en) | Federation-based memory management | |
US9201676B2 (en) | Reducing or suspending transfer rate of virtual machine migration when dirtying rate exceeds a convergence threshold | |
US7882326B2 (en) | Live migration of a logical partition | |
US9459902B2 (en) | Memory duplication by destination host in virtual machine live migration | |
CN107450933A (en) | A kind of software continuous integrated approach and system | |
US9727274B2 (en) | Cloning live virtual machines | |
US11194569B2 (en) | Method, electronic device and medium for upgrading a hyper-converged infrastructure node | |
CN109669772B (en) | Parallel execution method and equipment of computational graph | |
US9454400B2 (en) | Memory duplication by origin host in virtual machine live migration | |
US20120254885A1 (en) | Running a plurality of instances of an application | |
CN107608757A (en) | A kind of isolation processing method and relevant device based on container | |
CN107729149A (en) | A kind of virtual machine migration method and device | |
Garbervetsky et al. | Toward full elasticity in distributed static analysis: The case of callgraph analysis | |
CN107577518A (en) | A kind of virtual machine deployment method and device | |
CN107113231B (en) | Offloading graphics-based computing to a backend device | |
US11474848B2 (en) | Fail-safe post copy migration of virtual machines | |
CN111782353A (en) | Method and device for migrating from public cloud to private cloud | |
CN111787045A (en) | Migration method and device from private cloud to public cloud | |
US11599456B2 (en) | Automated validation of a rest application programming interface | |
US10503659B2 (en) | Post-copy VM migration speedup using free page hinting | |
CN104268089B (en) | The method, apparatus and system of a kind of information updating | |
Di et al. | High-performance migration tool for live container in a workflow | |
López-Huguet et al. | Vertical elasticity on marathon and chronos mesos frameworks |
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 |