CN108574718A - A kind of cloud host creation method and device - Google Patents

A kind of cloud host creation method and device Download PDF

Info

Publication number
CN108574718A
CN108574718A CN201710256717.6A CN201710256717A CN108574718A CN 108574718 A CN108574718 A CN 108574718A CN 201710256717 A CN201710256717 A CN 201710256717A CN 108574718 A CN108574718 A CN 108574718A
Authority
CN
China
Prior art keywords
physical machine
cloud host
virtually
label
target
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
Application number
CN201710256717.6A
Other languages
Chinese (zh)
Other versions
CN108574718B (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.)
Beijing Kingsoft Cloud Network Technology Co Ltd
Beijing Kingsoft Cloud Technology Co Ltd
Original Assignee
Beijing Kingsoft Cloud Network Technology Co Ltd
Beijing Kingsoft Cloud Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Kingsoft Cloud Network Technology Co Ltd, Beijing Kingsoft Cloud Technology Co Ltd filed Critical Beijing Kingsoft Cloud Network Technology Co Ltd
Priority to CN201710256717.6A priority Critical patent/CN108574718B/en
Publication of CN108574718A publication Critical patent/CN108574718A/en
Application granted granted Critical
Publication of CN108574718B publication Critical patent/CN108574718B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/60Scheduling or organising the servicing of application requests, e.g. requests for application data transmissions using the analysis and optimisation of the required network resources
    • 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/45562Creating, deleting, cloning virtual machine instances

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Debugging And Monitoring (AREA)

Abstract

An embodiment of the present invention provides a kind of cloud host creation methods and device, this method to include:Receive the request to create for target cloud host;Judge whether to carry first in request to create virtually than label, the first virtual destination virtual ratio than label for determining the physical machine for creating target cloud host, and with the destination virtual than physical machine first virtually compare tag identifier with this;If carrying, judge whether with first virtually than at least first physical machine for tag identifier, and the quantity of the first physical machine medium cloud host is less than destination virtual ratio;If in the presence of the first physical machine is determined as target physical machine;If being not present, the first preset quantity platform is selected not create cloud host and be not determined as target physical machine by the empty physical machine virtually than tag identifier, is used in combination first virtually than the tag identifier target physical machine;Target cloud host is created on target physical machine.Cloud host can be quickly created in the physical machine for specifying virtual ratio using the embodiment of the present invention, reduce error.

Description

A kind of cloud host creation method and device
Technical field
The present invention relates to field of cloud computer technology, more particularly to a kind of cloud host creation method and device.
Background technology
In cloud computing technology, cloud host be by virtual machine technique simulated in a physical machine it is multiple it is similar solely The part of vertical host, they share the hardware resource of a physical machine.With the universal and commercialization of virtualization technology, increasingly More users needs to create cloud host in physical machine to improve the utilization rate of physical machine.
In practical application, many users have the requirement of the virtual ratio of specified physical machine when creating cloud host, that is, wish cloud Host creates in the virtual physical machine than less than or equal to some designated value, virtually than can be understood as preset a certain object The quantity of cloud host can be at most created in reason machine.For this demand, current way be will specify the physical machine of virtual ratio with The physical machine of public dispatch area is isolated, such as is made the physical machine Enable (available) of public dispatch area in advance, specified virtual ratio Physical machine Disable (unavailable).After backstage receives the request that user creates cloud host, if the user has specified virtual ratio, Then manual dispatching meets the physical machine of the virtual ratio to create cloud host;If the not specified virtual ratio of the user, the request Scheduler is sent to be scheduled.
That is, scheduler can only dispatch the physical machine of public dispatch area, cannot dispatch and specify virtually in the prior art The physical machine of ratio.Therefore, it if user specifies the virtual ratio of physical machine when creating cloud host, needs by manually from all specified Physical machine is selected to create cloud host in the physical machine of virtual ratio, however this mode is excessively cumbersome and error-prone.
Invention content
The embodiment of the present invention is designed to provide a kind of cloud host creation method and device, to realize quickly in specified void Cloud host is created in the physical machine of quasi- ratio, reduces error.Specific technical solution is as follows:
In order to achieve the above objectives, the embodiment of the invention discloses a kind of cloud host creation method, the method includes:
Receive the request to create for target cloud host;
Judge that first whether is carried in the request to create is virtually compared label, wherein described first is virtually used for than label Determine the destination virtual ratio for the physical machine for creating the target cloud host, and with the destination virtual than physical machine with this first Virtually compare tag identifier;
If carrying described first in the request to create virtually than label, judge whether with the described first virtual ratio At least first physical machine for tag identifier, wherein it is empty that the quantity of the first physical machine medium cloud host is less than the target Quasi- ratio;
If it is present at least first physical machine is determined as target physical machine;
If it does not exist, then the first preset quantity platform of selection does not create cloud host and not by virtually than the empty of tag identifier Reason machine is determined as target physical machine, is used in combination described first virtually than the tag identifier target physical machine;
According to the request to create of the target cloud host, the target cloud host is created on the target physical machine.
In order to achieve the above objectives, the embodiment of the invention also discloses a kind of cloud host creating device, described device includes:
Receiving module, for receiving the request to create for target cloud host;
First judgment module, for judging that whether carrying first in the request to create virtually compares label, wherein described One virtually is used to determine the destination virtual ratio for the physical machine for creating the target cloud host than label, and has the destination virtual ratio Physical machine first virtually compare tag identifier with this;If carrying, the second judgment module is triggered;
Second judgment module, for judging whether with described first virtually than at least one of tag identifier One physical machine, wherein the quantity of the first physical machine medium cloud host is less than the destination virtual ratio;If it is present triggering First determining module;If it does not exist, then the second determining module of triggering;
First determining module, at least first physical machine to be determined as target physical machine;Triggering wound Model block;
Second determining module, for selecting the first preset quantity platform not create cloud host and not by virtually than label mark The empty physical machine of knowledge is determined as target physical machine, is used in combination described first virtually than the tag identifier target physical machine;Triggering creates Module;
The creation module is created for the request to create according to the target cloud host on the target physical machine The target cloud host.
Cloud host creation method and device provided in an embodiment of the present invention, take in the request to create for target cloud host Band first virtually than label when, indicate that the user has the demand of virtual ratio of specified physical machine, if there is with the first virtual ratio First physical machine of tag identifier, and the quantity of the first physical machine medium cloud host is less than destination virtual ratio, then by first object Reason machine is determined as target physical machine, and target cloud host is created on the target physical machine, virtually compares if there is no with first The physical machine of tag identifier, or exist with first virtually than the physical machine of tag identifier still the physical machine medium cloud host number Amount is equal to destination virtual ratio, then the first preset quantity platform is selected not create cloud host and not by virtually than the empty physical of tag identifier Machine is determined as target physical machine, is used in combination first virtually than after the tag identifier target physical machine, then created on the target physical machine Build target cloud host.As it can be seen that scheme provided in an embodiment of the present invention is for having the virtual user's than demand of specified physical machine Request to create does not need manual dispatching Auto-matching can be realized and virtually compare, created automatically in the physical machine of specified virtual ratio Cloud host is built, error is reduced.
Description of the drawings
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 technology description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of invention for those of ordinary skill in the art without creative efforts, can be with Obtain other attached drawings according to these attached drawings.
Fig. 1 is a kind of flow diagram of cloud host creation method provided in an embodiment of the present invention;
Fig. 2 is the flow diagram of another cloud host creation method provided in an embodiment of the present invention;
Fig. 3 is the signal that physical machine is grouped using label in a specific embodiment provided in an embodiment of the present invention Figure;
Fig. 4 is the virtual stream than label dynamic note of physical machine in a specific embodiment provided in an embodiment of the present invention Journey schematic diagram;
Fig. 5 is the virtual than label dynamic resolution note of physical machine in a specific embodiment provided in an embodiment of the present invention Flow diagram;
Fig. 6 is that the label of physical machine in a specific embodiment provided in an embodiment of the present invention detaches the flow signal of logic Figure;
Fig. 7 is a kind of structural schematic diagram of cloud host creating device provided in an embodiment of the present invention.
Specific implementation mode
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete Site preparation describes, it is clear that described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.It is based on Embodiment in the present invention, it is obtained by those of ordinary skill in the art without making creative efforts every other Embodiment shall fall within the protection scope of the present invention.
To solve prior art problem, an embodiment of the present invention provides a kind of cloud host creation method and devices.Lower kept man of a noblewoman A kind of cloud host creation method is first provided for the embodiments of the invention to be described in detail.
It should be noted that the executive agent of scheme provided in an embodiment of the present invention can be scheduler, scheduler is used for Cloud host is created into task scheduling to physical machine, so that physical machine completes the establishment of cloud host.
Fig. 1 is a kind of flow diagram of cloud host creation method provided in an embodiment of the present invention, and this method includes:
S101 receives the request to create for target cloud host.
The quantity of target cloud host to be created, the type of target cloud host can be carried in request to create, are created and are somebody's turn to do The information etc. of the virtual ratio of the physical machine of target cloud host can also carry other information, the present embodiment certainly in request to create This is not limited.
S102 judges that first whether is carried in request to create is virtually compared label;If carrying first in request to create virtually to compare Label then executes S103.
Wherein, it first virtually is used to determine the destination virtual ratio for the physical machine for creating target cloud host than label, and has The destination virtual than physical machine first virtually compare tag identifier with this.
For example, if a user ask create a cloud host, and it is desirable that this cloud host create in specific object On reason machine, specific physical machine refers to that the quantity for the cloud host that can be at most created in this physical machine is no more than a certain particular value, This particular value can be referred to as virtually to compare.Most multipotency in the physical machine of virtual ratio is designated, and to create this virtual than corresponding Quantity cloud host.
In practical application, if virtual ratio is designated in a physical machine, can with virtually identifying the physical machine than label, For example, a physical machine is appointed virtual than being 3, then the virtual of the physical machine can be than label:ratio_3.Virtually compared The physical machine that label ratio_3 is identified can be understood as most multipotency in the physical machine and create 3 cloud hosts.
Label can be understood as that physical machine is marked with the form of keyword, to realize the classification to physical machine.It is real Border application in, physical machine by virtually than tag identifier the case where can be managed with tables of data.When a physical machine is not designated Virtually than when, it is corresponding virtually than label that tables of data does not record the physical machine, when the physical machine be designated it is a certain virtually than when, then According to specified, virtually than updating the data, the physical machine in table is corresponding virtually to compare label.Tables of data as shown in Table 1, physics Machine PM_1 be expert at corresponding " virtually than label " row be marked with virtually than label ratio_3, indicate that the physical machine is virtually compared Label ratio_3 mark, and physical machine PM_2 corresponding " virtually than label " row of being expert at are unmarked virtually than label, indicate this Physical machine is not compared tag identifier virtually.When judging whether with the physical machine virtually identified than label ratio_3, inquiry " virtually than label ", row whether there is label ratio_3 in tables of data.Tables of data can store in the scheduler, scheduler Select do not create cloud host and not by virtually than the empty physical machine of tag identifier as target physical machine after, by target physical Machine corresponding first is virtually stored than label into tables of data.
Table 1
Physical machine identifies Virtually compare label
PM_1 ratio_3
PM_2
PM_3 ratio_4
It should be noted that when physical machine by one virtually than tag identifier after, this virtually than label be deleted before, The physical machine cannot again by others virtually be identified than label, but if this virtually than label be deleted after, the physical machine It can virtually be identified than label by others, that is to say, that a physical machine cannot be simultaneously by multiple virtually than label institute Mark.
The physical machine that virtually can be understood as specifying virtual ratio than the physical machine of tag identifier, is not compared label virtually The physical machine of mark can be understood as General Physics machine.It should be understood that the physical machine of virtual ratio is specified to belong to specified area, and it is general Logical physical machine belongs to public dispatch area, specifies the physical machine of virtual ratio and being isolated for General Physics machine, need not be by artificially drawing The physical isolation means such as subregion, but virtually reach nature isolation than label by identifying, this isolation method greatly subtracts Artificial intervention is lacked, need not manually be scheduled, to alleviate the workload of technical staff.
It should be understood that not all user has the demand of the virtual ratio of specified physical machine, those are not referred to Determine the ordinary user of the virtual ratio of physical machine, they can create not virtually than tag identifier cloud host to be created In physical machine, that is, create in the General Physics machine of public dispatch area.
Specifically, creating the request to create of cloud host, scheduler for the ordinary user of the virtual ratio of not specified physical machine The physical machine of establishment cloud host can be selected from General Physics machine;For each cloud host in request to create, creates and correspond to Cloud host create task, further according to the resource situation of resource and each General Physics machine needed for each cloud host, by cloud master Machine creates the establishment that task scheduling completes cloud host to one or more General Physics machine.
Specifically, the weighted value of each General Physics machine, physical machine can be calculated according to the resource service condition of physical machine Weighted value can be:The ratio of the used resource value of the physical machine and the total resource value of the physical machine, the smaller table of weighted value The surplus resources of bright physical machine are more, then, according to the weighted value calculated, are determined from General Physics machine and create cloud host Physical machine.For example, can randomly choose weighted value is less than the physical machine of default weighted value threshold value to create cloud host, it can also root According to the size of weighted value, preoption weight values small physical machines creates cloud host.It wherein, can be with when calculating weighted value Individually consider a certain resource of physical machine, such as disk residual capacity, memory, can also consider the group of multiple resources simultaneously It closes, the present embodiment does not limit this.
Further, if also taken in the request to create of ordinary user's establishment cloud host of the virtual ratio of not specified physical machine When cpu type with the physical machine for creating cloud host, then also need to from identified physical machine selection and meet cpu type to want The physical machine asked creates cloud host.For example, if the cpu type for carrying the physical machine for creating cloud host in request to create is 2680v4, then scheduler will be dispatched, cloud host establishment task to one or more cpu type will be 2680v4 and weighted value is expired On the General Physics machine required enough.
S103 is judged whether with first virtually than at least first physical machine for tag identifier, wherein the first object The quantity of reason machine medium cloud host is less than destination virtual ratio;If it does, S104 is executed, if it does not, executing S105.
S104 at least first physical machine will be determined as target physical machine;S106 is executed again.
S105 selects the first preset quantity platform not create cloud host and is not determined than the empty physical machine of tag identifier virtually For target physical machine, it is used in combination first virtually than the tag identifier target physical machine;S106 is executed again.
S106 creates target cloud host according to the request to create of target cloud host on target physical machine.
It should be understood that if virtually more current than in the physical machine of tag identifier to have created this first virtual with first Than corresponding quantity cloud host, then the physical machine cannot create other cloud hosts again.Therefore, if there is currently with first Virtually than the quantity of tag identifier and cloud host be less than destination virtual than the first physical machine, then can be directly by first object Reason machine creates target cloud host as target physical machine on the target physical machine;If there is currently no with first virtual Than the first physical machine of tag identifier, or exist by first virtually than the physical machine of tag identifier but physical machine medium cloud master The quantity of machine be equal to destination virtual ratio, then can first be selected from General Physics machine the first preset quantity platform do not create cloud host and Target physical machine is not determined as by the empty physical machine virtually than tag identifier, is used in combination first virtually than the tag identifier target physical Machine, then target cloud host is created on identified target physical machine.
It should be noted that the above-mentioned empty physical machine for not creating cloud host only indicates do not have cloud master in the current physical machine Machine, does not limit whether the physical machine once created cloud host, which can be the physics for never creating cloud host Machine, or once created the physical machine of the cloud host of ordinary user, and can also be once virtually to be crossed and worked as than tag identifier It is preceding not by virtually than the physical machine of tag identifier.
Specifically, the above-mentioned request to create according to target cloud host, creates the step of target cloud host on target physical machine Suddenly, may include:
The second physical machine for creating target cloud host is determined from target physical machine;
For each target cloud host in request to create, creates corresponding cloud host and create task;
The resource situation of resource and each second physical machine needed for each target cloud host creates each cloud host Build the establishment that task scheduling completes target cloud host to one or more second physical machine.
Specifically, the weighted value of each target physical machine, weighted value can be calculated according to the resource service condition of physical machine It is smaller to show that the surplus resources of physical machine are more, then, according to the weighted value calculated, is determined from target physical machine and create mesh Mark the second physical machine of cloud host.The weighted value of physical machine can be:The used resource value of the physical machine and the physical machine are total Resource value ratio.
For example, can randomly choose weighted value is less than the physical machine for presetting weighted value threshold value as the second physical machine, also may be used With according to the size of weighted value, the small physical machine of preoption weight values is as the second physical machine.Wherein, weighted value is being calculated When, it can individually consider a certain resource of physical machine, such as disk residual capacity, memory, can also consider a variety of moneys simultaneously The combination in source, the present embodiment do not limit this.
It should be understood that a request to create may need to create multiple target cloud hosts, each target cloud host pair A cloud host is answered to create task.In this case, due to the resource constraint of physical machine, such as disk residual capacity, memory money The resource in source, possible second physical machine cannot meet the needs of multiple target cloud hosts, therefore this multiple target cloud host It needs to create in one or more second physical machine, the resource needed for each target cloud host and each second physical machine Resource situation, cloud host establishment task scheduling is completed into the wounds of all target cloud hosts to one or more second physical machine It builds.
Further, if also carry the cpu type for the physical machine for creating target cloud host in request to create, also The selection from the second physical machine is needed to meet the physical machine of cpu type requirement to create target cloud host.For example, being asked if created It is 2680v4 to seek the cpu type of the middle physical machine for carrying and creating target cloud host, is appointed then scheduler will dispatch cloud host and create It is engaged in selecting cpu type in the second physical machine of 2680v4 to one or more.
Specifically, the resource situation of the resource and each second physical machine needed for the above-mentioned each target cloud host of basis, it will Each cloud host creates the step of task scheduling to one or more second physical machine completes the establishment of target cloud host, can wrap It includes:
Judge whether that can complete each cloud host creates task according to the resource situation of each second physical machine;
Target cloud is completed if it is, execute each cloud host creating task scheduling to one or more second physical machine The step of establishment of host;
If it is not, then the second preset quantity platform of selection does not create cloud host and not by virtually than the empty physical machine of tag identifier It is determined as the second physical machine, is used in combination first virtually than tag identifier second physical machine, then executes to create in each cloud host and appoint Business is dispatched to the step of one or more second physical machine completes the establishment of target cloud host.
For example, there is currently 5 the second physical machines, a request to create needs to create 10 target cloud hosts, if this 5 The resource of the second physical machine of platform can complete the establishment task of this 10 target cloud hosts, then directly create this 10 cloud hosts One or more in task scheduling to this 5 second physical machines is to complete the establishment of target cloud host.
Another situation, if the inadequate resource of this 5 the second physical machines is to complete the establishment of this 10 target cloud hosts Task is then needed first to select 1 empty physical machine for not creating cloud host to be determined as the second physical machine from General Physics machine, is used in combination First virtually than tag identifier second physical machine, then this 10 cloud hosts are created task scheduling to this 6 the second physical machines In one or more to complete the establishment of target cloud host.
Further, if the resource of this 6 the second physical machines is still not enough to complete the establishment of this 10 target cloud hosts Task then needs to select 1 empty physical machine for not creating cloud host to be determined as the second physical machine from General Physics machine again, and With first virtually than tag identifier second physical machine, until the resource of obtained second physical machine can complete this 10 mesh The establishment task of cloud host is marked, and then each cloud host is created in task scheduling to the second obtained physical machine.
In practical application, the value of above-mentioned second preset quantity and above-mentioned first preset quantity can be the same or different, The present embodiment does not limit this.
In one implementation, there is no do not create cloud host and not by virtually than the empty physical machine of tag identifier In the case of, it can also export there is no not creating cloud host and not by virtually than the prompting message of the empty physical machine of tag identifier. It should be understood that there is no do not create cloud host and not by virtually than the empty physical machine of tag identifier, that is, public dispatch area The lazy weight of middle General Physics machine, so that target cloud host creates failure, therefore exporting prompting message can be with reminding technology The inadequate resource of the public dispatch area of personnel, in order to which technical staff carries out resource adjustment or supplement.
In one implementation, for ease of the condition managing of physical machine and General Physics machine to specifying virtual ratio, also Can from physical machine whether by virtually than tag identifier, physical machine with the presence or absence of in terms of two, cloud host to the state of physical machine into Row is distinguished.
Specifically, the cloud host creation method can also include:
Whether according to current time physical machine each physics virtually is determined than tag identifier and with the presence or absence of cloud host The state of machine:
If physical machine is there are cloud host and by virtually than tag identifier, which is first state;
If physical machine is there is no cloud host and is virtually not up to preset time than the time that label is not deleted, the physics Machine is the second state;
If physical machine did not created cloud host and not by virtually than tag identifier, which is the third state;
If physical machine reaches preset time there is no cloud host and virtually than the time that label is not deleted, delete virtual It is determined as the third state than label, and by the physical machine.
It should be noted that for ease of recording the state of each physical machine, above-mentioned three kinds of states can be corresponded to one respectively A state value alloc_stat indicates that physical machine is in and uses for example, the corresponding state value alloc_stat of first state is 1 State, the corresponding state value alloc_stat of the second state are 2, indicate that physical machine is in the lock state, the third state is corresponding State value alloc_stat is 0, indicates that physical machine is in init state.In practical application, scheduler can be recorded and be updated The state value of the physical machine is updated to the shape after variation by the state of each physical machine when the state of physical machine changes The corresponding state value of state.
For example, at the beginning, when do not have in physical machine A cloud host and not by virtually than tag identifier when, physical machine A In the third state;Later, if physical machine A is selected as specifying the physical machine of virtual ratio and by virtually than label mark Know, then physical machine A is in first state, at this point, the state value of physical machine A is set to 1 by scheduler by 0, and is dispatching Device detects that the state value of physical machine A is 1 always there is no before cloud host in physical machine A;Then, if detected Cloud host is not present in physical machine A, the state value of physical machine A can be set to 2 by scheduler by 1, and physical machine A is in the Two-state, at this time in physical machine A there is no cloud host and not being deleted also than label virtually, and scheduler is by physical machine A State value at the time of be set to 2 by 1 timing, after reaching preset time, whether scheduler detects again deposits in physical machine A In cloud host, if there is cloud host, then the state value of physical machine A is set to 1 by 2, indicates that physical machine A can continue to make To specify the physical machine of virtual ratio, if there is no cloud host, then the virtual than label and by the physical machine of physical machine A is deleted State value be set to 0 by 2, indicate physical machine A by specify virtual ratio physical machine be changed into General Physics machine, from specified area return To public dispatch area.
As it can be seen that when the physical machine deficiency of the specified virtual ratio in specified area, virtually than tag identifier by way of, will be public The General Physics machine of dispatch area is changed into the physical machine of specified virtual ratio altogether, when not having cloud host in the physical machine for specifying virtual ratio When, it will be virtual than label deletion in the physical machine, so that it is turned again to public dispatch area as General Physics machine.It is this to be based on The physical machine resource dynamic management mode of label not only meets the demand that user specifies the physical machine of virtual ratio, while also real The resource-sharing in specified area and the physical machine of public dispatch area is showed.
It should be noted that after all cloud hosts are all deleted in the physical machine for specifying virtual ratio, physical machine is from first For state to the second state, the second state is a middle transition stage, also referred to as label pre-separation state, and at this moment physical machine is in Lock-out state, scheduler cannot dispatch this physical machine, i.e., in the second state, cloud host will not be created task tune by scheduler It spends in this physical machine.
It will be appreciated by persons skilled in the art that not having in the physical machine that one is specified virtual ratio if scheduler detects Have and just at once delete the virtual of the physical machine than label when cloud host, error is in this case likely resulted in, this is because cloud The high concurrent of host request to create, may occur in the short time the other cloud hosts of scheduler schedules create tasks to this Situation in physical machine, therefore this second state is arranged can be to avoid this problem.
It is above-mentioned to judge whether with the first virtual ratio mark in the case of the state of scheduler records and update physical machine Sign at least first physical machine for mark, wherein the quantity of the first physical machine medium cloud host is less than the step of destination virtual ratio, May include:
It obtains with first virtually than the physical machine of tag identifier, is determined as candidate first physical machine;
It will be in the physical machine of first state in candidate first physical machine, is determined as the first physical machine, wherein the first physics The quantity of machine medium cloud host is less than destination virtual ratio;
Judge whether at least first physical machine;
Above-mentioned selection the first preset quantity platform does not create cloud host and is not determined than the empty physical machine of tag identifier virtually For target physical machine the step of, may include:
The physical machine that the first preset quantity platform is in the third state is selected to be determined as target physical machine.
It should be understood that due in the physical machine of first state and the second state all in by virtually than the shape of tag identifier State, it is therefore desirable to which the state for first judging each candidate first physical machine, if it is first state, then first physical machine of candidate can To be determined as the first physical machine, cannot be scheduled if it is the second state since the physical machine of the second state is in the lock state Scheduled in device, therefore the first physical machine of candidate of the second state cannot be confirmed as the first physical machine.
As seen from the above, cloud host creation method provided in this embodiment, in the request to create for target cloud host Carry first virtually than label when, indicate that the user has the demand of virtual ratio of specified physical machine, if there is with first virtual Than the first physical machine of tag identifier, and the quantity of the first physical machine medium cloud host be less than destination virtual ratio, then by this first Physical machine is determined as target physical machine, and target cloud host is created on the target physical machine, if there is no with first virtual Than the physical machine of tag identifier, or exist with first virtual than the physical machine of the tag identifier still physical machine medium cloud host Quantity is equal to destination virtual ratio, then the first preset quantity platform is selected not create cloud host and not by virtually than the empty of tag identifier Reason machine is determined as target physical machine, is used in combination first virtually than after the tag identifier target physical machine, then on the target physical machine Create target cloud host.As it can be seen that scheme provided in this embodiment is for there is the wound of the virtual user than demand of specified physical machine Request is built, manual dispatching is not needed Auto-matching can be realized and virtually compare, automatically created in the physical machine of specified virtual ratio Cloud host reduces error.
Fig. 2 is the flow diagram of another cloud host creation method provided in an embodiment of the present invention, implementation shown in Fig. 1 On the basis of example, the first demand label can also be carried in the request to create, the first demand label is for identifying the user to wound Build the requirement of the physical machine of target cloud host;
Correspondingly, the step of above-mentioned S102 judges whether to carry the first user tag in request to create, Ke Yiwei:
S102a judges whether to carry first in request to create virtually than label and the first demand label;
Above-mentioned S103 judge whether with first virtually than at least first physical machine for tag identifier the step of, can Think:
S103a is judged whether simultaneously with first virtually than at least one of label and the first demand tag identifier One physical machine;
Above-mentioned S105 selects the first preset quantity platform not create cloud host and not by virtually than the empty physical machine of tag identifier Be determined as target physical machine, be used in combination first virtually than the tag identifier target physical machine the step of, Ke Yiwei:
S105a selects the first preset quantity platform not create cloud host and not by virtually than label and demand tag identifier Empty physical machine is determined as target physical machine, is used in combination first virtually than label and the first demand tag identifier target physical machine.
In practical application, there is specified physical machine virtually to also want to specifying the establishment of cloud host virtually than the user of demand Than and meet in the physical machine of particular requirement, wherein demand tag identifier can also be used by meeting the physical machine of particular demands.It is real It, can also be by a variety of different types of demand label marks by the physical machine virtually than the specified virtual ratio of tag identifier in the application of border Know.
For example, user has specified not only the virtual than being 3 of physical machine when creating cloud host, while also wanting to specific Cloud host is created in the physical machine of cpu type, at this point, can also be carried in request to create for identifying the physics for creating cloud host The demand label of the cpu type of machine shows this when it is cpu type label phy_cpu_2680v4 to carry the first demand label Request to create cloud host to be created must be 2680v4 and virtually than in the physical machine for 3 creating in cpu type, because The physical machine that this cpu type is 2680v4 can be used virtually than label ratio_3 and cpu type label phy_cpu_ simultaneously 2680v4 is identified.
Alternatively, when the type of service of the user is more, which also wants to create in the cloud host of identical services type It, then can be according to type of service to specifying the physical machine of virtual ratio to divide in identical physical machine.For example, request to create In can also carry for identify create cloud host physical machine type of service demand label, when the first demand mark of carrying When label are type of service label sub_user_A1, show that request to create cloud host to be created must created in business Type is in the physical machine of A1.The physical machine that type of service is A1 can be used virtually than label ratio_3 and type of service simultaneously Label sub_user_A1 is identified.
It should be noted that by virtually can be by a variety of different types of demand label marks than the physical machine of tag identifier Know, but cannot be by multiple same type of demand tag identifiers.For example, the physical machine that a cpu type is 2680v4 can be same When by virtually than label ratio_3, demand label phy_cpu_2680v4, demand label sub_user_A1 mark, but cannot Simultaneously by virtually than label ratio_3, demand label phy_cpu_2680v4, demand label phy_cpu_2680v3, demand mark Sub_user_A1 marks are signed, it can not be simultaneously by virtually than label ratio_3, demand label phy_cpu_2680v3, demand mark Sign sub_user_A1, demand label sub_user_A2 marks.It should be understood that phy_cpu_2680v3 and phy_cpu_ 2680v4 is to belong to same type of demand label, and sub_user_A1, sub_user_A2 are also to belong to same type of demand Label.
It, can also be according to the need of user in addition to the cpu type label and type of service label of the example above in practical application It asks the other types of demand label of setting, the present embodiment not to limit the quantity of the demand label entrained by request to create, such as creates A variety of demand labels can be carried simultaneously by building in request, can also only be carried a kind of demand label, be all reasonable.
In practical application, physical machine can be managed the case where demand tag identifier with tables of data.For example, when an object When reason machine is not by a certain demand tag identifier, tables of data does not record the corresponding demand label of the physical machine, when the physical machine is by certain When one demand tag identifier, the corresponding user tag of the physical machine is recorded in tables of data.Tables of data as shown in Table 1, physics Machine PM_1 be expert at corresponding " type of service label " row be marked with type of service label sub_user_A1, indicate the physical machine Identified by type of service label sub_user_A1, and physical machine PM_3 be expert at corresponding " type of service label " row do not mark Note has label, indicates that the physical machine is not identified by type of service label.When judging whether simultaneously with virtually comparing label When the physical machine of ratio_3 and cpu type label phy_cpu_2680v4 marks, by inquiring tables of data it is found that physical machine mark Know the physical machine for being PM_1 to meet the requirements.Tables of data can store in the scheduler, and scheduler does not create cloud host selecting And not by after virtually than the empty physical machine of label and type of service tag identifier as target physical machine, by target physical machine pair In the virtual storage to tables of data than label ratio_3 and type of service label sub_user_A1 answered, that is, with virtually than mark Ratio_3 and type of service label sub_user_A1 is signed to identify target physical machine.
Table 2
It should be understood that virtually have the demand of the virtual ratio of specified physical machine than tag identifier user, demand label into One step identifies user to other demands of the physical machine of establishment cloud host, virtually can will can be understood as one than label here Grade label, demand label are two level label, and the mode of this grade labelling meets a variety of demands of the user to physical machine, also just In the quick determining physical machine for meeting user demand.
It should be understood that physical machine can also reach the physical machine and other objects of the type by a certain demand tag identifier The isolation of reason machine also need not be manually scheduled when carrying a certain demand label in request to create, and scheduler can be by cloud Host creates task scheduling to by the physical machine of the demand tag identifier, and this isolation method based on label equally reduces people For intervention, the workload of technical staff is alleviated.
It should be understood that if there is currently with first virtually than the first physics of label and the first demand tag identifier Machine, and the cloud host number in the first physical machine is less than destination virtual ratio, then it can be directly using first physical machine as mesh Physical machine is marked, and creates target cloud host on the target physical machine;If there is currently no with first virtually than label and First physical machine of one demand tag identifier, or exist by first virtually than the physical machine of label and the first demand tag identifier But the quantity of the physical machine medium cloud host is equal to destination virtual ratio, then the first present count can be first selected from General Physics machine Amount platform does not create cloud host and is not determined as target physical machine by the empty physical machine virtually than label and demand tag identifier, is used in combination First virtually than label and the first demand tag identifier target physical machine, then creates target on identified target physical machine Cloud host.
It should be noted that the above-mentioned empty physical machine for not creating cloud host only indicates do not have cloud master in the current physical machine Machine, does not limit whether the physical machine once created cloud host, which can be the physics for never creating cloud host Machine, or once virtually crossed than label or demand tag identifier but current not by virtually than label or demand tag identifier Physical machine.
Specifically, requests to create of the S106 according to target cloud host, creates the step of target cloud host on target physical machine Suddenly, may include:
The second physical machine for creating target cloud host is determined from target physical machine;
For each target cloud host in request to create, creates corresponding cloud host and create task;
The resource situation of resource and each target physical machine needed for each target cloud host creates each cloud host Build the establishment that task scheduling completes target cloud host to one or more second physical machine.
Specifically, the weighted value of each target physical machine, weighted value can be calculated according to the resource service condition of physical machine It is smaller to show that the surplus resources of physical machine are more, then, according to the weighted value calculated, is determined from target physical machine and create mesh Mark the second physical machine of cloud host.The weighted value of physical machine can be:The used resource value of the physical machine and the physical machine are total Resource value ratio.For example, can randomly choose weighted value is less than the physical machine of default weighted value threshold value as the second physics Machine, can also be according to the size of weighted value, and the small physical machine of preoption weight values is as the second physical machine.Wherein, it is calculating When weighted value, it can individually consider a certain resource of physical machine, such as disk residual capacity, memory, can also consider simultaneously The combination of multiple resources, the present embodiment do not limit this.
It should be understood that a request to create may need to create multiple target cloud hosts, each target cloud host pair A cloud host is answered to create task.In this case, due to the resource constraint of physical machine, such as disk residual capacity, memory money The resource in source, possible second physical machine cannot meet the needs of multiple target cloud hosts, therefore this multiple target cloud host It needs to create in one or more second physical machine, the resource needed for each target cloud host and each second physical machine Resource situation, cloud host establishment task scheduling is completed into the wounds of all target cloud hosts to one or more second physical machine It builds.
Specifically, the resource situation of the resource and each second physical machine needed for the above-mentioned each target cloud host of basis, it will Each cloud host creates the step of task scheduling to one or more second physical machine completes the establishment of target cloud host, can wrap It includes:
Judge whether that can complete each cloud host creates task according to the resource situation of each second physical machine;
Target cloud is completed if it is, execute each cloud host creating task scheduling to one or more second physical machine The step of establishment of host;
If it is not, then the second preset quantity platform of selection does not create cloud host and not by virtually than label and demand tag identifier Empty physical machine be determined as the second physical machine, be used in combination first virtually than label and the first demand tag identifier second physical machine, The step that each cloud host is created to establishment of the task scheduling to one or more second physical machine completion target cloud host is executed again Suddenly.
For example, there is currently 5 the second physical machines, a request to create needs to create 10 target cloud hosts, if this 5 The resource of the second physical machine of platform can complete the establishment task of this 10 target cloud hosts, then directly create this 10 cloud hosts One or more in task scheduling to this 5 second physical machines is to complete the establishment of target cloud host.
Another situation, if the inadequate resource of this 5 the second physical machines is to complete the establishment of this 10 target cloud hosts Task is then needed first to select 1 empty physical machine for not creating cloud host to be determined as the second physical machine from General Physics machine, is used in combination First virtually than tag identifier second physical machine, then this 10 cloud hosts are created task scheduling to this 6 the second physical machines In one or more to complete the establishment of target cloud host.
Further, if the resource of this 6 the second physical machines is still not enough to complete the establishment of this 10 target cloud hosts Task then needs to select 1 empty physical machine for not creating cloud host to be determined as the second physical machine from General Physics machine again, and With first virtually than tag identifier second physical machine, until the resource of obtained second physical machine can complete this 10 mesh The establishment task of cloud host is marked, and then each cloud host is created in task scheduling to the second obtained physical machine.
In practical application, the value of above-mentioned second preset quantity and above-mentioned first preset quantity can be the same or different, The present embodiment does not limit this.
In one implementation, there is no do not create cloud host and not by virtually than label and demand tag identifier In the case of empty physical machine, it can also export that there is no do not create cloud host and not by virtually than label and demand tag identifier The prompting message of empty physical machine.It should be understood that there is no do not create cloud host and not by virtually than label and demand label mark The empty physical machine of knowledge, that is, in public dispatch area General Physics machine lazy weight so that target cloud host create failure, Therefore output prompting message can be with the inadequate resource of the public dispatch area of reminding technology personnel, in order to which technical staff carries out resource tune Whole or supplement.
In one implementation, for ease of the condition managing of physical machine and General Physics machine to specifying virtual ratio, also It can be in terms of whether physical machine be by virtually than label and demand tag identifier, physical machine with the presence or absence of two, cloud host to physics The state of machine distinguishes.
Specifically, the cloud host creation method can also include:
According to current time physical machine whether by virtually than label and demand tag identifier and with the presence or absence of cloud host it is true The state of fixed each physical machine:
If physical machine is there are cloud host and by virtually than label and demand tag identifier, which is first state;
If physical machine than the time that label and demand label are not deleted there is no cloud host and when virtually not up to presetting Between, then the physical machine is the second state;
If physical machine did not created cloud host and not by virtually than label and demand tag identifier, which is third State;
If cloud host is not present in physical machine and the time not being deleted than label and demand label virtually reaches preset time, It then deletes virtually than label and demand label, and the physical machine is determined as the third state.
In practical applications, different attributes, including fixed attribute and recyclable attribute different labels can be arranged. Wherein, the label with fixed attribute does not delete the label when all cloud hosts in deletion of physically machine;And with recyclable The label of attribute deletes the label when all cloud hosts in deletion of physically machine.Label with fixed attribute is properly termed as solid Calibration label, the label with recyclable attribute are properly termed as variable label.
First illustrate the label with fixed attribute:For every physical machine, since the cpu type of physical machine is Determining, therefore the demand label of physical machine cpu type could be provided as the label of fixed attribute, for example, cpu type is The physical machine of 2680v4, after the physical machine is by demand label phy_cpu_2680v4 marks, when there is no clouds in the physical machine When host, demand label phy_cpu_2680v4 is not deleted.It should be understood that in fact, if deleting the need of the physical machine Label phy_cpu_2680v4 is sought, if subsequently needing to identify the physical machine with the demand label of physical machine cpu type again When, which still can be identified by demand label phy_cpu_2680v4.So for fixed labels, when being identified Physical machine in be not present cloud host when, can not be deleted.
The label with recyclable attribute is illustrated again:One physical machine can be by any virtually than label or any industry Therefore service type tag identifier virtually could be provided as the label of recyclable attribute than label and type of service label.For example, After one physical machine is virtually identified than label ratio_3, after cloud host is not present in the physical machine, virtually compare label Ratio_3 is deleted, in this way, the follow-up physical machine can virtually be identified than label ratio_4 by other, it can also be again by this Virtually identified than label ratio_3.Likewise, a physical machine is identified by type of service label sub_user_A1, when the business After type label sub_user_A1 is deleted, which can also be identified by other type of service label sub_user_A2, It can also be identified again by type of service label sub_user_A1.So for variable label, when the physics identified When cloud host being not present in machine, which should be deleted.
Therefore, it when while cloud host being not present in the physical machine of two variable tag identifiers, needs two variable marks Label are all deleted;Simultaneously be fixed in the physical machine of label and variable tag identifier be not present cloud host when, only delete can be changed label, Do not delete fixed labels.That is, in the state for determining physical machine, marked regardless of whether being fixed tag identifier or fixing Whether label are deleted, and only consider to can be changed label.
It should be noted that for ease of recording the state of each physical machine, above-mentioned three kinds of states can be corresponded to one respectively A state value alloc_stat indicates that physical machine is in and uses for example, the corresponding state value alloc_stat of first state is 1 State, the corresponding state value alloc_stat of the second state are 2, indicate that physical machine is in the lock state, the third state is corresponding State value alloc_stat is 0, indicates that physical machine is in init state.In practical application, scheduler can be recorded and be updated The state value of the physical machine is updated to the shape after variation by the state of each physical machine when the state of physical machine changes The corresponding state value of state.
For example, at the beginning, when there is no cloud host in physical machine A and not by virtually than label and demand tag identifier When, physical machine A is in the third state;Later, if physical machine A is selected as target physical machine and is virtually compared label With demand tag identifier, then physical machine A is in first state, at this point, the state value of physical machine A is set to by scheduler by 0 1, and there is no before cloud host in scheduler detects physical machine A, the state value of physical machine A is 1 always;So Afterwards, cloud host is not present in physical machine A if detected, the state value of physical machine A can be set to 2 by scheduler by 1, should Physical machine A is in the second state, and cloud host is not present in physical machine A at this time and is not deleted also than label and demand label virtually It removes, and scheduler timing at the time of the state value of physical machine A is set to 2 by 1, after reaching preset time, scheduler It detects in physical machine A and is then set to the state value of physical machine A by 2 if there is cloud host again with the presence or absence of cloud host 1, indicate that physical machine A can continue then to delete the physical machine if there is no cloud host as the physical machine of specified virtual ratio The state value of the physical machine than label and demand label and is set to 0 by the virtual of A by 2, indicates physical machine A by specified virtual ratio Physical machine be changed into General Physics machine, return to public dispatch area from specified area.
As it can be seen that when the dedicated physical machine deficiency of a certain type in specified area, by virtually than label and demand label mark The General Physics machine of public dispatch area is changed into the physical machine of specified virtual ratio by the mode of knowledge, when the physics for specifying virtual ratio When there is no cloud host in machine, will be in the physical machine it is virtual deleted than label and demand label, make its as General Physics machine again It is secondary to return to public dispatch area.This physical machine resource dynamic management mode based on label not only meets user and specifies physics The demand of the virtual ratio of machine, while also achieving the resource-sharing of the physical machine between specified area and public dispatch area.
It should be noted that after all cloud hosts are all deleted in the physical machine for specifying virtual ratio, the physical machine is from the One state is changed into the second state, and the second state is a middle transition stage, also referred to as label pre-separation state, at this moment the object Reason machine is in the lock state, and scheduler cannot dispatch the physical machine, i.e., in the second state, scheduler will not create cloud host In task scheduling to the physical machine.
It will be appreciated by persons skilled in the art that not having in the physical machine that one is specified virtual ratio if scheduler detects Have and just at once delete the virtual of the physical machine than label and demand label when cloud host, in this case likely results in error, This is because the high concurrent of cloud host request to create, may occur the other cloud hosts of scheduler schedules and create in the short time Situation in task to this physical machine, therefore this second state is arranged can be to avoid this problem.
Scheduler records and update physical machine state in the case of, it is above-mentioned judge whether simultaneously use first virtually Than at least first physical machine for label and the first demand tag identifier, wherein the quantity of the first physical machine medium cloud host is small In the destination virtual ratio the step of, may include:
It obtains while with first virtually than the physical machine of label and the first demand tag identifier, is determined as candidate first physics Machine;
It will be in the physical machine of first state in candidate first physical machine, is determined as the first physical machine, wherein the first physics The quantity of machine medium cloud host is less than destination virtual ratio;
Judge whether at least first physical machine;
Above-mentioned selection the first preset quantity platform does not create cloud host and not by virtually than the sky of label and demand tag identifier Physical machine is determined as the step of target physical machine, including:
The physical machine that the first preset quantity platform is in the third state is selected to be determined as target physical machine.
It should be understood that since the physical machine of first state and the second state is all in by virtually than label and demand label The state of mark, it is therefore desirable to the state for first judging each candidate first physical machine, if it is first state, then the candidate first Physical machine can be determined as the first physical machine, if it is the second state, since the physical machine of the second state is in the lock state, no It can be scheduled scheduled in device, therefore the first physical machine of candidate of the second state cannot be confirmed as the first physical machine.
As seen from the above, in scheme provided in this embodiment, first is carried in the request to create for target cloud host When virtually than label and the first demand label, indicate that the user has the demand of virtual ratio of specified physical machine, and the user wishes By target cloud host create meet particular demands, specify in the physical machine of virtual ratio, if there is with first virtual than mark First physical machine of label and the first demand tag identifier, and the quantity of the first physical machine medium cloud host is less than destination virtual ratio, First physical machine is then determined as target physical machine, and creates target cloud host on the target physical machine, if there is no With first virtually than the physical machine of label and the first demand tag identifier, or exist with first virtually than label and the first demand The physical machine of tag identifier but the quantity of the physical machine medium cloud host is equal to destination virtual ratio, then select the first preset quantity platform Cloud host is not created and target physical machine is not determined as by the empty physical machine virtually than label and demand tag identifier, is used in combination first Virtually than label and the first demand tag identifier target physical machine after, then target cloud host is created on the target physical machine. As it can be seen that scheme provided in this embodiment is for there is specified physical machine virtually than the request to create with the users of other demands simultaneously, Do not need manual dispatching can be realized specify virtual ratio physical machine in specific physical machine on automatically create cloud host, reduce Error.
The cloud host creation method of embodiment illustrated in fig. 1 is illustrated with a specific embodiment below.
Fig. 3 is the schematic diagram that physical machine is grouped using label in this specific embodiment.
As shown in figure 3, having 11 physical machines, respectively host1~host11, wherein the physics identified by label tag1 Machine has host1~host4, host9~host11, has host5~host11 by the label tag2 physical machines identified.If by this 11 Platform physical machine is grouped according to label, can be divided into the grouping of tag1 labels label, point of tag2 labels label as shown in Figure 3 Group, the grouping of tag1&&tag2 combination tags label, tag1 | | the grouping of tag2 combination tags label, wherein tag1 label marks Include physical machine host1~host4, host9~host11 in the grouping of note, includes physical machine in the grouping of tag2 labels label Include physical machine host9~host11, tag1 in the grouping of host5~host11, tag1&&tag2 combination tag label | | Include physical machine host1~host11 in the grouping of tag2 combination tags label.
When label tag when creating cloud host for being passed to and being attached in physical machine, such as create cloud host for the first time The physical machine for specifying a certain virtual ratio generates this virtually than corresponding virtually than label, by this according to certain naming rule Virtually it is attached with to not by the physical machine virtually than on the empty physical machine of tag identifier, making specified virtual ratio than label.It is right In the naming rule of label tag, English alphabet, number combination and " _ " can be supported, when name, suggests with " _ " segmentation, first Part indicates that classification dimension, further part indicate specific category, and the label started using SYS_ can also be arranged as internal reservation Tag need to indicate that, virtually than label, n indicates virtual according to the tag specially treateds, such as SYS_ratio_n, wherein ratio when scheduling The value of ratio.
Combination tag is used when only passing a parameter in the request to create that user creates cloud host, for the life of combination tag Name rule, " | | " indicate or, showing that cloud host can be dispatched to | | the tag connected is grouped and concentrates, and " " indicates and show Cloud host can Tiao Duzhi && connected tag grouping intersection in ,~show that cloud host cannot be dispatched to the grouping of institute's prefix In.The priority relationship of these three connectors is:~>&&>||.
Fig. 4 is the virtual flow diagram than label dynamic note of physical machine in this specific embodiment.
As shown in figure 4, scheduler receives the request that user creates cloud host in the physical machine for specifying virtual ratio, this is asked Include virtually than label TAG in the incoming parameter asked:SYS_ratio_n shows that cloud host will be created and is marked in SYS_ratio_n In the grouping for signing label, subsequently into physical machine filtration stage, whole physical machines are scanned, " whole physical machines " mentioned here is Refer to virtually than whole physical machines of tag identifier.To each physical machine, judge in the physical machine it is virtual than label whether be SYS_ratio_n labels, if so, judging whether cloud host number is less than n in the physical machine again, certainly, in filtering physical machine When other filter conditions can also be set, that is, judge whether the physical machine meets other filters, if a physical machine meets institute It has ready conditions, then can be determined that the physical machine meets the requirements, if a physical machine is unsatisfactory for either condition, judge the physical machine not It meets the requirements.If there is meeting the physical machine of filter condition, then it can enter weight calculation link, calculating meets filter condition The weighted value of physical machine creates cloud host according to weighted value selection target physical machine.If not meeting the object of filter condition Reason machine then judges whether public dispatch area has and do not create cloud host and not by virtually than the empty physical machine of tag identifier, if so, One is then selected not create cloud host and not by virtually than the empty physical machine of tag identifier, virtually than label SYS_ on note Ratio_n in the grouping for marking physical machine cut-in to SYS_ratio_n labels, and enters physical machine filtration stage.Into one Step, if public dispatch area does not create cloud host and than the empty physical machine of tag identifier, can also virtually not alarmed Inadequate resource, so that technical staff carries out resource adjustment or supplement.
Fig. 5 is the virtual flow diagram than label dynamic resolution note of physical machine in this specific embodiment.
As shown in figure 5, for virtually than the physical machine of tag identifier, when deleting a cloud host in the physical machine When, scheduler may determine that in the physical machine whether also have cloud host to exist, can if cloud host is not present in the physical machine With will in the physical machine it is virtual than label remove.Another situation, scheduler use garbage reclamation (GC) mechanism periodically Scanning institute is useful virtually than the physical machine of tag identifier, when finding that there is no cloud hosts in a certain physical machine, so that it may with should It is virtual than label removal in physical machine.
Fig. 6 is that the label of physical machine in this specific embodiment detaches the flow diagram of logic.
As shown in fig. 6, for virtually than the physical machine of tag identifier, the cloud host is detected after user deletes cloud host The use at place is used virtually than the physical machine of tag identifier, or using GC mechanism periodic scans virtually than the physics of tag identifier Machine judges whether there is also cloud hosts in physical machine, if it does not exist, then the alloc_stat values of the physical machine are set to 2, and Start timing, judges whether there is also cloud hosts in the physical machine again after preset time, and if so, by the physical machine Alloc_stat values be set to 1 again, indicate the physical machine can continue as specify virtual ratio physical machine, if there is no The alloc_stat values of the physical machine are then set to 0, the virtual than label of the physical machine will be deleted by also meaning that, be made General Physics machine returns to public dispatch area.In addition, if being found during updating the alloc_stat values of the physical machine When alloc_stat values state value corresponding with the state that the physical machine is presently in mismatches, it can also alarm, for example, When in the physical machine there is no cloud host and alloc_stat values are neither 1 nor be 2, it is known that alloc_stat values occur wrong Accidentally.
Corresponding with above-mentioned cloud host creation method, the embodiment of the present invention additionally provides a kind of cloud host creating device.
Corresponding with embodiment of the method shown in FIG. 1, Fig. 7 is a kind of cloud host creating device provided in an embodiment of the present invention Structural schematic diagram, which may include:
Receiving module 701, for receiving the request to create for target cloud host;
First judgment module 702, for judging that whether carrying first in the request to create virtually compares label, wherein institute The first destination virtual ratio for virtually being used to determine the physical machine for creating the target cloud host than label is stated, and empty with the target The physical machine of quasi- ratio first virtually compares tag identifier with this;If carrying, the second judgment module 703 is triggered;
Second judgment module 703, for judging whether with described first virtually than at least the one of tag identifier The first physical machine of platform, wherein the quantity of the first physical machine medium cloud host is less than the destination virtual ratio;If it is present Trigger the first determining module 704;If it does not exist, then the second determining module 705 of triggering;
First determining module 704, at least first physical machine to be determined as target physical machine;Triggering Creation module 706;
Second determining module 705, for selecting the first preset quantity platform not create cloud host and not by virtual than marking The empty physical machine of label mark is determined as target physical machine, is used in combination described first virtually than the tag identifier target physical machine;Triggering Creation module 706;
The creation module 706 is created for the request to create according to the target cloud host on the target physical machine Build the target cloud host.
As seen from the above, cloud host creating device provided in this embodiment, in the request to create for target cloud host Carry first virtually than label when, indicate that the user has the demand of virtual ratio of specified physical machine, if there is with first virtual Than the first physical machine of tag identifier, and the quantity of the first physical machine medium cloud host be less than destination virtual ratio, then by this first Physical machine is determined as target physical machine, and target cloud host is created on the target physical machine, if there is no with first virtual Than the physical machine of tag identifier, or exist with first virtual than the physical machine of the tag identifier still physical machine medium cloud host Quantity is equal to destination virtual ratio, then the first preset quantity platform is selected not create cloud host and not by virtually than the empty of tag identifier Reason machine is determined as target physical machine, is used in combination first virtually than after the tag identifier target physical machine, then on the target physical machine Create target cloud host.As it can be seen that scheme provided in this embodiment is for there is the wound of the virtual user than demand of specified physical machine Request is built, manual dispatching is not needed Auto-matching can be realized and virtually compare, automatically created in the physical machine of specified virtual ratio Cloud host reduces error.
Specifically, the creation module 706, may include:
First determination sub-module (not shown) creates the target cloud master for being determined from the target physical machine Second physical machine of machine;
First creates submodule (not shown), for for each target cloud host in the request to create, wound It builds corresponding cloud host and creates task;
Second creates submodule (not shown), for the resource and each second needed for each target cloud host Each cloud host is created task scheduling to one or more second physical machine and completes target cloud host by the resource situation of physical machine Establishment.
Specifically, first determination sub-module, may include:
First computing unit (not shown) calculates each object for the resource service condition according to physical machine The weighted value of reason machine, weighted value is smaller to show that the surplus resources of physical machine are more;
First determination unit (not shown), for according to the weighted value, wound to be determined from the target physical machine Build the second physical machine of the target cloud host.
Specifically, described second creates submodule, may include:
First judging unit (not shown), for judged whether according to the resource situation of each second physical machine can It completes each cloud host and creates task;If so, the first creating unit (not shown) of triggering, if not, the second wound of triggering Build unit (not shown);
First creating unit, it is complete to one or more second physical machine for each cloud host to be created task scheduling At the establishment of target cloud host;
Second creating unit, for selecting the second preset quantity platform not create cloud host and not by virtually than label mark The empty physical machine of knowledge is determined as the second physical machine, is used in combination described first virtually than tag identifier second physical machine, then will be each Cloud host creates the establishment that task scheduling completes target cloud host to one or more second physical machine.
Specifically, described device can also include:
First output module (not shown), for there is no do not create cloud host and do not compared tag identifier virtually Empty physical machine in the case of, output is not there is no creating cloud host and not by virtually than the prompt of the empty physical machine of tag identifier Message.
Specifically, described device can also include:
Third determining module (not shown), for according to current time physical machine whether by virtually than tag identifier with And whether there is cloud host, determine the state of each physical machine:
If the physical machine is there are cloud host and by virtually than tag identifier, the physical machine is first state;
If the physical machine is there is no cloud host and is virtually not up to preset time than the time that label is not deleted, institute It is the second state to state physical machine;
If the physical machine did not created cloud host and not by virtually than tag identifier, the physical machine is third shape State;
If the physical machine is there is no cloud host and virtually reaches preset time than the time that label is not deleted, delete It is described virtually than label, and the physical machine is determined as the third state;
Second judgment module 703, including:
First obtains submodule (not shown), for obtaining with described first virtually than the physical machine of tag identifier, It is determined as candidate first physical machine;
Second determination sub-module (not shown), for the object of first state will to be in candidate first physical machine Reason machine is determined as the first physical machine, wherein the quantity of the first physical machine medium cloud host is less than the destination virtual ratio;
First judging submodule (not shown), for judging whether at least first physical machine;
Second determining module 705, is specifically used for:
It selects the physical machine that the first preset quantity platform is in the third state to be determined as target physical machine, first void is used in combination Intend than the tag identifier target physical machine.
Specifically, the first demand label can also be carried in one implementation, in the request to create, described first Demand label is used to identify the requirement of physical machine of the user to creating the target cloud host;
Correspondingly, first judgment module 702, specifically can be used for:
Judge whether to carry first in the request to create virtually than label and the first demand label;
Second judgment module 703, specifically can be used for:
It judges whether simultaneously with described first virtually than at least one first of label and the first demand tag identifier Physical machine, wherein the quantity of the first physical machine medium cloud host is less than the destination virtual ratio;
Described second determines 705 modules, specifically can be used for:
The first preset quantity platform is selected not create cloud host and not by virtually than the empty physical of label and demand tag identifier Machine is determined as target physical machine, is used in combination described first virtually than label and the first demand tag identifier target physical machine.
Specifically, the creation module 706, may include:
Third determination sub-module (not shown) creates the target cloud master for being determined from the target physical machine Second physical machine of machine;
Third creates submodule (not shown), for for each target cloud host in the request to create, wound It builds corresponding cloud host and creates task;
4th creates submodule (not shown), is used for the resource needed for each target cloud host and each target Each cloud host is created task scheduling to one or more second physical machine and completes target cloud host by the resource situation of physical machine Establishment.
Specifically, the third determination sub-module, including:
Second computing unit (not shown) calculates each object for the resource service condition according to physical machine The weighted value of reason machine, weighted value is smaller to show that the surplus resources of physical machine are more;
Second determination unit (not shown), for according to the weighted value, wound to be determined from the target physical machine Build the second physical machine of the target cloud host.
Specifically, the described 4th creates submodule, including:
Second judgment unit (not shown), for judged whether according to the resource situation of each second physical machine can It completes each cloud host and creates task;If so, triggering third creating unit (not shown), if not, the 4th wound of triggering Build unit (not shown);
The third creating unit, it is complete to one or more second physical machine for each cloud host to be created task scheduling At the establishment of the second cloud host;
4th creating unit, for select the second preset quantity platform do not create cloud host and not by virtually than label and The empty physical machine of demand tag identifier is determined as the second physical machine, is used in combination described first virtually than label and the first demand label mark Know second physical machine, then each cloud host is created into task scheduling to one or more second physical machine and completes target cloud host Establishment.
Specifically, described device can also include:
Second output module (not shown), for judging that there is no do not create cloud host and not by virtual than marking Label and demand tag identifier empty physical machine in the case of, output there is no do not create cloud host and not by virtually than label and need Seek the prompting message of the empty physical machine of tag identifier.
Specifically, described device can also include:
Whether the 4th determining module (not shown) is used for according to current time physical machine by virtually than label and demand Tag identifier and the state that each physical machine is determined with the presence or absence of cloud host:
If the physical machine is there are cloud host and by virtually than label and demand tag identifier, the physical machine is first State;
If there is no cloud hosts and virtually not up to more pre- than the time that label and demand label are not deleted for the physical machine If the time, then the physical machine is the second state;
If the physical machine did not created cloud host and not by virtually than label and demand tag identifier, the physical machine For the third state;
If cloud host is not present in the physical machine and the time not being deleted than label and demand label virtually reaches default It time, then deletes described virtually than label and demand label, and the physical machine is determined as the third state;
Second judgment module 703 may include:
Second obtains submodule (not shown), for obtaining while with described first virtually than label and the first demand The physical machine of tag identifier is determined as candidate first physical machine;
4th determination sub-module (not shown), for the object of first state will to be in candidate first physical machine Reason machine is determined as the first physical machine, wherein the quantity of the first physical machine medium cloud host is less than the destination virtual ratio;
Second judgment submodule (not shown), for judging whether at least first physical machine;
Second determining module 705, specifically can be used for:
It selects the physical machine that the first preset quantity platform is in the third state to be determined as target physical machine, first void is used in combination It is quasi- than label and the first demand tag identifier target physical machine.
It should be noted that herein, relational terms such as first and second and the like are used merely to a reality Body or operation are distinguished with another entity or operation, are deposited without necessarily requiring or implying between these entities or operation In any actual relationship or order or sequence.Moreover, the terms "include", "comprise" or its any other variant are intended to Non-exclusive inclusion, so that the process, method, article or equipment including a series of elements is not only wanted including those Element, but also include other elements that are not explicitly listed, or further include for this process, method, article or equipment Intrinsic element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that There is also other identical elements in process, method, article or equipment including the element.
Each embodiment in this specification is all made of relevant mode and describes, identical similar portion between each embodiment Point just to refer each other, and each embodiment focuses on the differences from other embodiments.Especially for device reality For applying example, since it is substantially similar to the method embodiment, so description is fairly simple, related place is referring to embodiment of the method Part explanation.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the scope of the present invention.It is all Any modification, equivalent replacement, improvement and so within the spirit and principles in the present invention, are all contained in protection scope of the present invention It is interior.

Claims (24)

1. a kind of cloud host creation method, which is characterized in that the method includes:
Receive the request to create for target cloud host;
Judge that first whether is carried in the request to create is virtually compared label, wherein described first virtually than label for determining Create the destination virtual ratio of the physical machine of the target cloud host, and with the destination virtual than physical machine with this first virtually Compare tag identifier;
If carrying described first in the request to create virtually than label, judge whether virtually to compare label with described first At least first physical machine for mark, wherein the quantity of the first physical machine medium cloud host is less than the destination virtual ratio;
If it is present at least first physical machine is determined as target physical machine;
If it does not exist, then the first preset quantity platform of selection does not create cloud host and not by virtually than the empty physical machine of tag identifier It is determined as target physical machine, is used in combination described first virtually than the tag identifier target physical machine;
According to the request to create of the target cloud host, the target cloud host is created on the target physical machine.
2. according to the method described in claim 1, it is characterized in that, the request to create according to the target cloud host, The step of target cloud host being created on the target physical machine, including:
The second physical machine for creating the target cloud host is determined from the target physical machine;
For each target cloud host in the request to create, creates corresponding cloud host and create task;
Each cloud host is created and is appointed by the resource situation of resource and each second physical machine needed for each target cloud host Business is dispatched to the establishment that one or more second physical machine completes target cloud host.
3. according to the method described in claim 2, it is characterized in that, described determined from the target physical machine creates the mesh The step of marking the second physical machine of cloud host, including:
According to the resource service condition of physical machine, the weighted value of each target physical machine is calculated, weighted value is smaller to show physical machine Surplus resources it is more;
According to the weighted value, the second physical machine for creating the target cloud host is determined from the target physical machine.
4. according to the method described in claim 2, it is characterized in that, resource needed for each target cloud host of the basis and every Each cloud host is created task scheduling to one or more second physical machine and completes target by the resource situation of a second physical machine The step of establishment of cloud host, including:
Judge whether that can complete each cloud host creates task according to the resource situation of each second physical machine;
Target cloud host is completed if it is, execute each cloud host creating task scheduling to one or more second physical machine Establishment the step of;
If it is not, then the second preset quantity platform of selection does not create cloud host and is not determined than the empty physical machine of tag identifier virtually For the second physical machine, it is used in combination described first virtually than tag identifier second physical machine, then execute to create in each cloud host and appoint Business is dispatched to the step of one or more second physical machine completes the establishment of target cloud host.
5. according to claim 1-4 any one of them methods, which is characterized in that the method further includes:
There is no do not create cloud host and not by virtually than the empty physical machine of tag identifier in the case of, output is not there is no creating Build cloud host and not by virtually than the prompting message of the empty physical machine of tag identifier.
6. according to the method described in claim 1, it is characterized in that, the method further includes:
According to current time physical machine whether by virtually than tag identifier and with the presence or absence of cloud host, each physical machine is determined State:
If the physical machine is there are cloud host and by virtually than tag identifier, the physical machine is first state;
If the physical machine is there is no cloud host and is virtually not up to preset time, the object than the time that label is not deleted Reason machine is the second state;
If the physical machine did not created cloud host and not by virtually than tag identifier, the physical machine is the third state;
If the physical machine reaches preset time there is no cloud host and virtually than the time that label is not deleted, delete described in Virtually than label, and the physical machine is determined as the third state;
It is described to judge whether with described first virtually than at least first physical machine for tag identifier, wherein described The quantity of one physical machine medium cloud host is less than the step of destination virtual ratio, including:
It obtains with described first virtually than the physical machine of tag identifier, is determined as candidate first physical machine;
It will be in the physical machine of first state in candidate first physical machine, is determined as the first physical machine, wherein described first The quantity of physical machine medium cloud host is less than the destination virtual ratio;
Judge whether at least first physical machine;
The first preset quantity platform of the selection does not create cloud host and is not determined as mesh by the empty physical machine virtually than tag identifier The step of marking physical machine, including:
The physical machine that the first preset quantity platform is in the third state is selected to be determined as target physical machine.
7. according to the method described in claim 1, it is characterized in that, also carrying the first demand label, institute in the request to create The first demand label is stated for identifying requirement of the user to the physical machine of the establishment target cloud host;
It is described judge whether to carry in the request to create first virtually than label the step of, including:
Judge whether to carry first in the request to create virtually than label and the first demand label;
It is described judge whether with described first virtually than at least first physical machine for tag identifier the step of, including:
It judges whether simultaneously with described first virtually than at least first physics for label and the first demand tag identifier Machine, wherein the quantity of the first physical machine medium cloud host is less than the destination virtual ratio;
The first preset quantity platform of the selection does not create cloud host and is not determined as mesh by the empty physical machine virtually than tag identifier Mark physical machine, be used in combination described first virtually than the tag identifier target physical machine the step of, including:
The first preset quantity platform is selected not create cloud host and not true by the empty physical machine virtually than label and demand tag identifier It is set to target physical machine, is used in combination described first virtually than label and the first demand tag identifier target physical machine.
8. the method according to the description of claim 7 is characterized in that the request to create according to the target cloud host, The step of target cloud host being created on the target physical machine, including:
The second physical machine for creating the target cloud host is determined from the target physical machine;
For each target cloud host in the request to create, creates corresponding cloud host and create task;
Each cloud host is created and is appointed by the resource situation of resource and each target physical machine needed for each target cloud host Business is dispatched to the establishment that one or more second physical machine completes target cloud host.
9. according to the method described in claim 8, it is characterized in that, described determined from the target physical machine creates the mesh The step of marking the second physical machine of cloud host, including:
According to the resource service condition of physical machine, the weighted value of each target physical machine is calculated, weighted value is smaller to show physical machine Surplus resources it is more;
According to the weighted value, the second physical machine for creating the target cloud host is determined from the target physical machine.
10. according to the method described in claim 8, it is characterized in that, resource needed for each target cloud host of the basis and Each cloud host is created task scheduling to one or more second physical machine and completes mesh by the resource situation of each second physical machine The step of marking the establishment of cloud host, including:
Judge whether that can complete each cloud host creates task according to the resource situation of each second physical machine;
If it is, executing described by each cloud host establishment task scheduling to one or more second physical machine the second cloud of completion The step of establishment of host;
If it is not, then the second preset quantity platform of selection does not create cloud host and not by virtually than the sky of label and demand tag identifier Physical machine is determined as the second physical machine, is used in combination described first virtually than label and the first demand tag identifier second physical machine, The establishment that each cloud host establishment task scheduling is completed to target cloud host to one or more second physical machine is executed again The step of.
11. according to claim 7-10 any one of them methods, which is characterized in that the method further includes:
Judge there is no do not create cloud host and not by virtually than the empty physical machine of label and demand tag identifier the case where Under, there is no do not create cloud host and not by virtually than the prompting message of label and the empty physical machine of demand tag identifier for output.
12. the method according to the description of claim 7 is characterized in that the method further includes:
It is each according to whether current time physical machine is determined than label and demand tag identifier and with the presence or absence of cloud host by virtually The state of a physical machine:
If the physical machine is there are cloud host and by virtually than label and demand tag identifier, the physical machine is the first shape State;
If the physical machine than the time that label and demand label are not deleted there is no cloud host and when virtually not up to presetting Between, then the physical machine is the second state;
If the physical machine did not created cloud host and not by virtually than label and demand tag identifier, the physical machine is the Three condition;
If cloud host is not present in the physical machine and the time not being deleted than label and demand label virtually reaches preset time, It then deletes described virtually than label and demand label, and the physical machine is determined as the third state;
It is described to judge whether simultaneously with described first virtually than at least one first of label and the first demand tag identifier Physical machine, wherein the quantity of the first physical machine medium cloud host is less than the step of destination virtual ratio, including:
It obtains while with described first virtually than the physical machine of label and the first demand tag identifier, is determined as candidate first physics Machine;
It will be in the physical machine of first state in candidate first physical machine, is determined as the first physical machine, wherein described first The quantity of physical machine medium cloud host is less than the destination virtual ratio;
Judge whether at least first physical machine;
The first preset quantity platform of the selection does not create cloud host and not by virtually than the empty physical of label and demand tag identifier Machine is determined as the step of target physical machine, including:
The physical machine that the first preset quantity platform is in the third state is selected to be determined as target physical machine.
13. a kind of cloud host creating device, which is characterized in that described device includes:
Receiving module, for receiving the request to create for target cloud host;
First judgment module, for judging that whether carrying first in the request to create virtually compares label, wherein described first is empty The quasi- destination virtual ratio than label for determining the physical machine for creating the target cloud host, and with the destination virtual than object Reason machine first virtually compares tag identifier with this;If carrying, the second judgment module is triggered;
Second judgment module, for judging whether with described first virtually than at least first object for tag identifier Reason machine, wherein the quantity of the first physical machine medium cloud host is less than the destination virtual ratio;If it is present triggering first Determining module;If it does not exist, then the second determining module of triggering;
First determining module, at least first physical machine to be determined as target physical machine;Triggering creates mould Block;
Second determining module, for selecting the first preset quantity platform not create cloud host and not by virtually than tag identifier Empty physical machine is determined as target physical machine, is used in combination described first virtually than the tag identifier target physical machine;Trigger creation module;
The creation module, for the request to create according to the target cloud host, on the target physical machine described in establishment Target cloud host.
14. device according to claim 13, which is characterized in that the creation module, including:
First determination sub-module, for determining the second physical machine for creating the target cloud host from the target physical machine;
First creates submodule, for for each target cloud host in the request to create, creating corresponding cloud host wound Build task;
Second creates submodule, the resource feelings for resource and each second physical machine needed for each target cloud host Each cloud host is created establishment of the task scheduling to one or more second physical machine completion target cloud host by condition.
15. device according to claim 14, which is characterized in that first determination sub-module, including:
First computing unit calculates the weighted value of each target physical machine, weight for the resource service condition according to physical machine It is worth and smaller shows that the surplus resources of physical machine are more;
First determination unit, for according to the weighted value, being determined from the target physical machine and creating the target cloud host The second physical machine.
16. device according to claim 14, which is characterized in that described second creates submodule, including:
First judging unit, for judging whether that can complete each cloud host creates according to the resource situation of each second physical machine Build task;If so, the first creating unit of triggering, if not, the second creating unit of triggering;
First creating unit completes mesh for each cloud host to be created task scheduling to one or more second physical machine Mark the establishment of cloud host;
Second creating unit, for selecting the second preset quantity platform not create cloud host and not by virtually than tag identifier Empty physical machine is determined as the second physical machine, is used in combination described first virtually than tag identifier second physical machine, then by each cloud master Machine creates the establishment that task scheduling completes target cloud host to one or more second physical machine.
17. according to claim 13-16 any one of them devices, which is characterized in that described device further includes:
First output module, for there is no do not create cloud host and not by virtually than the empty physical machine of tag identifier the case where Under, there is no do not create cloud host and not by virtually than the prompting message of the empty physical machine of tag identifier for output.
18. device according to claim 17, which is characterized in that described device further includes:
Whether third determining module is used for according to current time physical machine by virtually than tag identifier and with the presence or absence of cloud master Machine determines the state of each physical machine:
If the physical machine is there are cloud host and by virtually than tag identifier, the physical machine is first state;
If the physical machine is there is no cloud host and is virtually not up to preset time, the object than the time that label is not deleted Reason machine is the second state;
If the physical machine did not created cloud host and not by virtually than tag identifier, the physical machine is the third state;
If the physical machine reaches preset time there is no cloud host and virtually than the time that label is not deleted, delete described in Virtually than label, and the physical machine is determined as the third state;
Second judgment module, including:
First obtains submodule, for obtaining with described first virtually than the physical machine of tag identifier, is determined as candidate first object Reason machine;
Second determination sub-module is determined as first for will be in the physical machine of first state in candidate first physical machine Physical machine, wherein the quantity of the first physical machine medium cloud host is less than the destination virtual ratio;
First judging submodule, for judging whether at least first physical machine;
Second determining module, is specifically used for:
It selects the physical machine that the first preset quantity platform is in the third state to be determined as target physical machine, the described first virtual ratio is used in combination The tag identifier target physical machine.
19. device according to claim 13, which is characterized in that the first demand label is also carried in the request to create, The first demand label is used to identify the requirement of physical machine of the user to creating the target cloud host;
First judgment module, is specifically used for:
Judge whether to carry first in the request to create virtually than label and the first demand label;
Second judgment module, is specifically used for:
It judges whether simultaneously with described first virtually than at least first physics for label and the first demand tag identifier Machine, wherein the quantity of the first physical machine medium cloud host is less than the destination virtual ratio;
Second determining module, is specifically used for:
The first preset quantity platform is selected not create cloud host and not true by the empty physical machine virtually than label and demand tag identifier It is set to target physical machine, is used in combination described first virtually than label and the first demand tag identifier target physical machine.
20. device according to claim 19, which is characterized in that the creation module, including:
Third determination sub-module, for determining the second physical machine for creating the target cloud host from the target physical machine;
Third creates submodule, for for each target cloud host in the request to create, creating corresponding cloud host wound Build task;
4th creates submodule, the resource feelings for resource and each target physical machine needed for each target cloud host Each cloud host is created establishment of the task scheduling to one or more second physical machine completion target cloud host by condition.
21. device according to claim 20, which is characterized in that the third determination sub-module, including:
Second computing unit calculates the weighted value of each target physical machine, weight for the resource service condition according to physical machine It is worth and smaller shows that the surplus resources of physical machine are more;
Second determination unit, for according to the weighted value, being determined from the target physical machine and creating the target cloud host The second physical machine.
22. device according to claim 20, which is characterized in that the described 4th creates submodule, including:
Second judgment unit, for judging whether that can complete each cloud host creates according to the resource situation of each second physical machine Build task;If so, triggering third creating unit, if not, the 4th creating unit of triggering;
The third creating unit completes for each cloud host to be created task scheduling to one or more second physical machine The establishment of two cloud hosts;
4th creating unit, for selecting the second preset quantity platform not create cloud host and not by virtually than label and demand The empty physical machine of tag identifier is determined as the second physical machine, is used in combination described first to be virtually somebody's turn to do than label and the first demand tag identifier Second physical machine, then each cloud host is created into task scheduling to the wound of one or more second physical machine completion target cloud host It builds.
23. according to claim 19-22 any one of them devices, which is characterized in that described device further includes:
Second output module, for judging that there is no do not create cloud host and not by virtually than label and demand tag identifier Empty physical machine in the case of, output is not there is no creating cloud host and not by virtually than the empty of label and demand tag identifier The prompting message of reason machine.
24. device according to claim 19, which is characterized in that described device further includes:
4th determining module, for according to current time physical machine whether by virtually than label and demand tag identifier and whether There are the states that cloud host determines each physical machine:
If the physical machine is there are cloud host and by virtually than label and demand tag identifier, the physical machine is the first shape State;
If the physical machine than the time that label and demand label are not deleted there is no cloud host and when virtually not up to presetting Between, then the physical machine is the second state;
If the physical machine did not created cloud host and not by virtually than label and demand tag identifier, the physical machine is the Three condition;
If cloud host is not present in the physical machine and the time not being deleted than label and demand label virtually reaches preset time, It then deletes described virtually than label and demand label, and the physical machine is determined as the third state;
Second judgment module, including:
Second obtains submodule, for obtaining while with described first virtually than the physics of label and the first demand tag identifier Machine is determined as candidate first physical machine;
4th determination sub-module is determined as first for will be in the physical machine of first state in candidate first physical machine Physical machine, wherein the quantity of the first physical machine medium cloud host is less than the destination virtual ratio;
Second judgment submodule, for judging whether at least first physical machine;
Second determining module, is specifically used for:
It selects the physical machine that the first preset quantity platform is in the third state to be determined as target physical machine, the described first virtual ratio is used in combination Label and the first demand tag identifier target physical machine.
CN201710256717.6A 2017-04-19 2017-04-19 Cloud host creation method and device Active CN108574718B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710256717.6A CN108574718B (en) 2017-04-19 2017-04-19 Cloud host creation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710256717.6A CN108574718B (en) 2017-04-19 2017-04-19 Cloud host creation method and device

Publications (2)

Publication Number Publication Date
CN108574718A true CN108574718A (en) 2018-09-25
CN108574718B CN108574718B (en) 2021-03-26

Family

ID=63575966

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710256717.6A Active CN108574718B (en) 2017-04-19 2017-04-19 Cloud host creation method and device

Country Status (1)

Country Link
CN (1) CN108574718B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109495555A (en) * 2018-11-01 2019-03-19 郑州云海信息技术有限公司 A kind of method and apparatus based on cloud platform creation cloud host
CN109660393A (en) * 2018-12-18 2019-04-19 郑州云海信息技术有限公司 A kind of update method and its device of cloud host specification
CN110795182A (en) * 2019-09-18 2020-02-14 平安科技(深圳)有限公司 Cloud host creation method and system
CN112188470A (en) * 2020-09-10 2021-01-05 中国联合网络通信集团有限公司 Method and device for determining privacy number platform

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102299929A (en) * 2011-09-15 2011-12-28 北京天地云箱科技有限公司 Access control method, system and device for virtual machine
CN104468803A (en) * 2014-12-12 2015-03-25 华为技术有限公司 Virtual data center resource mapping method and equipment
CN105453039A (en) * 2013-07-17 2016-03-30 赛门铁克公司 Systems and methods for instantly restoring virtual machines in high input/output load environments
CN106126345A (en) * 2016-06-30 2016-11-16 广东睿江云计算股份有限公司 There is internal memory control method and the system of the physical machine of cloudy main frame
CN106227582A (en) * 2016-08-10 2016-12-14 华为技术有限公司 Elastic telescopic method and system
CN106354544A (en) * 2016-08-24 2017-01-25 华为技术有限公司 Virtual machine creating method and system and host

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102299929A (en) * 2011-09-15 2011-12-28 北京天地云箱科技有限公司 Access control method, system and device for virtual machine
CN105453039A (en) * 2013-07-17 2016-03-30 赛门铁克公司 Systems and methods for instantly restoring virtual machines in high input/output load environments
CN104468803A (en) * 2014-12-12 2015-03-25 华为技术有限公司 Virtual data center resource mapping method and equipment
CN106126345A (en) * 2016-06-30 2016-11-16 广东睿江云计算股份有限公司 There is internal memory control method and the system of the physical machine of cloudy main frame
CN106227582A (en) * 2016-08-10 2016-12-14 华为技术有限公司 Elastic telescopic method and system
CN106354544A (en) * 2016-08-24 2017-01-25 华为技术有限公司 Virtual machine creating method and system and host

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109495555A (en) * 2018-11-01 2019-03-19 郑州云海信息技术有限公司 A kind of method and apparatus based on cloud platform creation cloud host
CN109660393A (en) * 2018-12-18 2019-04-19 郑州云海信息技术有限公司 A kind of update method and its device of cloud host specification
CN110795182A (en) * 2019-09-18 2020-02-14 平安科技(深圳)有限公司 Cloud host creation method and system
CN112188470A (en) * 2020-09-10 2021-01-05 中国联合网络通信集团有限公司 Method and device for determining privacy number platform
CN112188470B (en) * 2020-09-10 2022-08-12 中国联合网络通信集团有限公司 Method and device for determining privacy number platform

Also Published As

Publication number Publication date
CN108574718B (en) 2021-03-26

Similar Documents

Publication Publication Date Title
US8732215B2 (en) Environment classification and service analysis
CN104461744B (en) A kind of resource allocation methods and device
CN104067216B (en) System and method for implementing expansible data storage service
CN108574718A (en) A kind of cloud host creation method and device
CN101730099B (en) Terminal management method based on authority control and device
CN105242983B (en) A kind of date storage method and a kind of data storage management service device
CN105069134A (en) Method for automatically collecting Oracle statistical information
EP2372551A1 (en) Real time backup storage node assignment
US20060136525A1 (en) Method, computer program product and mass storage device for dynamically managing a mass storage device
DE112010004062T5 (en) OPTIMIZING AN ARCHIVE MANAGEMENT PLANNING
JPH11203372A (en) Method for managing stock for automatic assigning stock and device therefor
CN111309440B (en) Method and equipment for managing and scheduling multiple types of GPUs
CN114153580A (en) Cross-multi-cluster work scheduling method and device
CN112214288B (en) Pod scheduling method, device, equipment and medium based on Kubernetes cluster
CN103473076A (en) Issuing method and issuing system for code version
EP3018581B1 (en) Data staging management system
CN111475784A (en) Authority management method and device
CN110297713A (en) Configuration management system and method of cloud host
CN110971439A (en) Policy decision method and device, system, storage medium, policy decision unit and cluster
CN109885642A (en) Classification storage method and device towards full-text search
CN114661419A (en) Service quality control system and method
CN107656796A (en) A kind of virtual machine cold moving method, system and equipment
CN107943423A (en) The management method and computer-readable recording medium of storage resource in cloud system
CN102298560B (en) Equipment managing apparatus, equipment managing method, and equipment managing system
CN108805527A (en) A kind of project management method and device

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