Summary of the invention
The object of the invention is to overcome deficiency of the prior art, dynamic configuration method for virtual resource under a kind of cloud computing environment is provided, it can realize the virtual resource of set scale according to certain access strategy and interrupt strategy, for user dynamically configures sub-virtual resource, in order to improve the service efficiency of virtual resource, reduce the operation cost of cloud computing operator.
For achieving the above object, the invention provides the dynamic configuration method for virtual resource under a kind of cloud computing environment, comprise the following steps:
S1, user management module receive and the access request of verified users;
S2, policy issue module generate access strategy and interrupt strategy for user and are sent to resource management module;
The load of S3, statistical monitoring module monitors virtual resource also by resource management module according to access strategy, determines whether as user distributes sub-virtual resource;
The load of S4, statistical monitoring module Real-Time Monitoring virtual resource also passes through resource management module at least according to the interrupt strategy in step S2, the sub-virtual resource shared by releasing user, and does synchronized update configuration to residue virtual resource.
As a further improvement on the present invention, described step S1 specifically comprises:
User management module receives and the access request of verified users, and determines whether registered user;
If so, then the mirror snapshot corresponding with the access request of user is judged whether further;
If not, then receive and preserve the application for registration of user, and generating unique user identification code for user.
As a further improvement on the present invention, described step S2 specifically comprises: the access request of policy issue module receives user, and generates access strategy and interrupt strategy according to the log-on message of user and access request for user and be sent to resource management module.
As a further improvement on the present invention, the access strategy in described step S2 comprises: to the grade classification of access privilege, in order to arrange the access rights of different brackets to different user;
Interrupt strategy in described step S2 comprises: to the division of user's antithetical phrase virtual resource holding time length, the grade classification of user's antithetical phrase virtual resource consumption, and user publishes operation.
As a further improvement on the present invention, also comprise in described step S2: resource management module judges whether the mirror snapshot corresponding with the access request of user,
If there is mirror snapshot, then from memory node, read mirror snapshot attribute;
If without mirror snapshot, then redirect performs step S3 to have judged whether assignable residue virtual resource further.
As a further improvement on the present invention, " determine whether as user distributes sub-virtual resource " in described step S3 to comprise: by the load of statistical monitoring module monitors virtual resource, and judged whether assignable residue virtual resource;
If not, then the access request of user is refused;
If so, then continue to judge whether this assignable residue virtual resource matches with the access request of user.
As a further improvement on the present invention, described step S3 also comprises: when statistic mixed-state module monitors is to when having an assignable residue virtual resource, judge whether this assignable residue virtual resource matches with the access request of user further;
If not, then the access request of user is refused;
If so, be then that user distributes the sub-virtual resource matched with the access request of user by resource management module root access strategy.
As a further improvement on the present invention, the sub-virtual resource in described step S3 at least represents with the form of virtual machine, and pushes to the client device of user.
As a further improvement on the present invention, described step S4 specifically comprises: the running status of each sub-virtual resource of statistical monitoring module Real-Time Monitoring, and judges whether triggered interrupts strategy;
If not, then user holds over this sub-virtual resource;
If so, then generate the mirror snapshot of sub-virtual resource by resource management module and back up to memory node, the sub-virtual resource then shared by releasing user, and synchronized update configuration is done to residue virtual resource.
As a further improvement on the present invention, also comprise in described step S4: resource management module is be sent to user management module after the mirror snapshot of sub-virtual resource generates unique mirror snapshot identification code, and binds with the user identification code that user management module generates.
As a further improvement on the present invention, in described step S4, " the sub-virtual resource shared by releasing user " specifically comprises:
Resource management module carries out power-off operation or pending operation or sleep operation to the sub-virtual resource shared by user.
As a further improvement on the present invention, also comprise in described step S4: resource management module is forced to generate the mirror snapshot of sub-virtual resource and backed up to memory node, the sub-virtual resource then shared by releasing user.
As a further improvement on the present invention, described memory node is positioned at local computer and/or remote computer.
Compared with prior art, the invention has the beneficial effects as follows: pass through the present invention, achieve set virtual resource according to certain access strategy and interrupt strategy, for user dynamically configures sub-virtual resource, thus improve the service efficiency of virtual resource, and reduce the operation cost of cloud computing operator.
Embodiment
Below in conjunction with each execution mode shown in the drawings, the present invention is described in detail; but should be noted that; these execution modes are not limitation of the present invention; those of ordinary skill in the art are according to these execution mode institute work energy, method or structural equivalent transformations or substitute, and all belong within protection scope of the present invention.
A kind of embodiment of the dynamic configuration method for virtual resource under a kind of cloud computing environment of the present invention shown in please refer to the drawing 1 to Fig. 3.
In the present embodiment, the dynamic configuration method for virtual resource under a kind of cloud computing environment, comprises the following steps:
S1, user management module receive and the access request of verified users;
S2, policy issue module generate access strategy and interrupt strategy for user and are sent to resource management module;
The load of S3, statistical monitoring module monitors virtual resource also by resource management module according to access strategy, determines whether as user distributes sub-virtual resource;
The load of S4, statistical monitoring module Real-Time Monitoring virtual resource also passes through resource management module at least according to the interrupt strategy in step S2, the sub-virtual resource shared by releasing user, and does synchronized update configuration to residue virtual resource.
Coordinate with reference to shown in Fig. 2 and Fig. 3, concrete, in user environment, user can pass through exercisable client device, such as PC, mobile internet device, access request is initiated through step S101 to user management module 10 by API (ApplicationProgrammingInterface, application programming interface).User management module 10 receives and the access request of verified users 100.
Concrete, this user management module 10 performs step S102, to judge that whether the user of this initiation access request is for registered user.If so, then redirect performs step S104 and judges whether the mirror snapshot corresponding with the access request of user further; If not, then redirect execution step S103 carries out new user's registration.This user management module 10 receives and preserves the application for registration of user, and generates unique user identification code for user.
For new user, the log-on message of user is sent to policy issue module 30 by user management module 10, and is that user generates access strategy and interrupt strategy and is sent to resource management module 20 by policy issue module 30 according to the log-on message of user and access request.
Wherein, the access strategy in described step S2 comprises: to the grade classification of access privilege, in order to arrange the access rights of different brackets to different user; Interrupt strategy in described step S2 comprises: to the division of user's antithetical phrase virtual resource 601,602,603 holding time length, the grade classification of user's antithetical phrase virtual resource 601,602,603 consumption, and user publishes operation.
As shown in Figure 3, in the present embodiment, cloud computing operator comprises to the virtual resource 60 that all users can provide and being distributed by resource management module 20 and sub-virtual resource 601, sub-virtual resource 602 and sub-virtual resource 603 shared by user A, user B and user C.Wherein, the different area shown in sub-virtual resource 601,602,603 represents virtual computing resource, virtual storage resource, virtual network resource and the virtual software resource that different sub-virtual resources is formed.
The virtual resource be not yet assigned with in virtual resource 60 defines assignable residue virtual resource 61.It should be noted that, this virtual resource 60 formed by the physical equipments such as server, memory device, gateway, router, switch and related management system and software.In the present invention, virtual resource 60 is construed as the application based on all virtual states in cloud computing environment; Therefore, remain virtual resource 61, sub-virtual resource 601,602,603 is also identical.
As shown in Figure 2, when registered user in step S104 through judgement after, mirror snapshot when resource management module 20 confirms after judging that the last time that this registered user does not match with the access request of user exits or new user are after succeeding in registration, and direct redirect also performs step S106.Concrete, in step s 106, it has been the load of user A, user B, sub-virtual resource 601 that user C distributes, sub-virtual resource 602 and sub-virtual resource 603 that statistical monitoring module 40 monitors the load of virtual resource 60 and monitoring by resource management module 20, and has determined whether assignable residue virtual resource 61.
Wherein, the load of so-called virtual resource 60 and sub-virtual resource 601,602,603 refers to the use amount of virtual cpu in virtual resource 60 and sub-virtual resource 601,602,603, virtual memory, virtual memory facilities, virtual network, software, utilization rate and tight situation.
Concrete, " determine whether as user distributes sub-virtual resource " in described step S3 to comprise: the load of being monitored virtual resource 60 by statistical monitoring module 40, and judged whether assignable residue virtual resource 61.If not, then redirect performs step S108 and refuses the access request of user; If so, then redirect performs step S107, to continue to judge whether this assignable residue virtual resource 61 matches with the access request of user.
Further, in described step S3, when statistic mixed-state module 40 has monitored assignable residue virtual resource 61, to perform step S107.In step s 107, resource management module 20 judges whether this assignable residue virtual resource 61 matches with the access request of user further.If not, then redirect performs step S108 and refuses the access request of user; If so, then by resource management module 20 for user distributes the sub-virtual resource (not shown) matched with the access strategy of this user.
Certainly, if a certain user in user management module 10 successful registration cross and be once assigned with sub-virtual resource (not shown), then it can preserve the mirror snapshot of sub-virtual resource when exiting a last time in memory node 50.Therefore, if registered user performs step S104 from step S102 redirect.Concrete, resource management module 20 judges whether the mirror snapshot (ImageSnapshot) corresponding with the access request of user; If there is mirror snapshot, then from memory node 50, read mirror snapshot attribute; If without mirror snapshot, then redirect performs step S106 to have judged whether assignable residue virtual resource 61 further.
Wherein, this mirror snapshot attribute (ImageSnapshotProperties) is the information of the sub-virtual resource that this user occupies when exiting from cloud computing environment last time.Concrete, this mirror snapshot attribute comprises: the creation-time of user identification code, mirror image size, sub-virtual resource, the size of sub-virtual resource, the resource distribution etc. of recovery needed for mirror snapshot.
Mirror snapshot (ImageSnapshot) can be the information stored in the form of a file, comprise operating system file, data, application program etc., be written in file according to specific form, as: VHD (VirtualHardDisk) is the standard that Microsoft proposes, and VMX is the standard that VMware proposes.The benefit of this mode is the flexible copy of file and is easy to management.At present, in IaaS cloud calculation services, mirror snapshot import and export the rapid deployment and the migration that realize sub-virtual resource, be applied in actual virtual management by a large amount of.
Wherein, the snapshot towards storage resources class can be the preservation form of cloud storage system self-defining, and this form comprises computer documents form.The snapshot of software-oriented class can be the snapshot form required for applicable software itself, such as basic software bag, customization software or other codes that can be read by computer and perform be stored in memory node.
Preferably, the sub-virtual resource in described step S3 can be represent with the form of virtual machine, and pushes to the client device of user.This client device comprises personal computer, panel computer, the Internet mobile device, personal digital assistant etc.Sub-virtual resource in certain described step S3 also can be represent with XaaS (all are all served).XaaS is the general name of various cloud computing service content and form, modally comprises: namely software serve (SaaS), namely infrastructure serve (IaaS), namely platform serves (PaaS).
When statistical monitoring module 40 monitor residue virtual resource 61 have and be enough to the access request meeting user time, redirect performs step S109, thus according to the access strategy of user for user distributes sub-virtual resource.
Meanwhile, the load of each sub-virtual resource of statistical monitoring module 40 Real-Time Monitoring, and judge whether triggered interrupts strategy (the step S111 namely in Fig. 2).
If not (i.e. non-triggered interrupts strategy), then user holds over this sub-virtual resource (the step S112 namely in Fig. 2), until this user's triggered interrupts strategy; (if i.e. triggered interrupts strategy), then redirect performs step S113.In step S113, resource management module 20 generates the mirror snapshot of sub-virtual resource and backs up to memory node 50, and then redirect performs step S114.Sub-virtual resource in step S114 shared by releasing user, and synchronized update configuration (the step S110 namely in Fig. 2) is done to residue virtual resource 61.Now, the virtual computing resource had of assignable residue virtual resource 61, virtual storage resource, virtual network resource and virtual software resource are in constantly dynamic change.
In the present embodiment, described memory node 50 is positioned at local computer and/or remote computer, and is preferably local computer.Certainly, this memory node 50 also can be arranged in any cloud memory node.
Wherein, in described step S4, " the sub-virtual resource shared by releasing user " specifically comprises:
Sub-virtual resource shared by resource management module 20 couples of users carries out power-off operation or pending operation or sleep operation.
Concrete, also comprise in step s 4 which: resource management module 20 is be sent to user management module 10 after the mirror snapshot of sub-virtual resource generates unique mirror snapshot identification code, and the user identification code generated with this user management module 10 in user management module 10 is bound.
When this user sends access request to user management module 10 again, when after execution step S104, directly redirect can perform step S105, directly can read mirror snapshot attribute from memory node 50 like this.
In the present embodiment, also comprise in described step S4: resource management module 20 is forced to generate the mirror snapshot of sub-virtual resource and backed up to memory node 50, the sub-virtual resource then shared by releasing user.In the case, resource management module 20 also can do synchronized update configuration to residue virtual resource 61.
In the present embodiment, achieve set virtual resource 60 according to certain access strategy and interrupt strategy, for user dynamically configures the sub-virtual resource matched with the access request of user, improve the service efficiency of virtual resource 60, and reduce the operation cost of cloud computing operator.
A series of detailed description listed is above only illustrating for feasibility execution mode of the present invention; they are also not used to limit the scope of the invention, all do not depart from the skill of the present invention equivalent implementations done of spirit or change all should be included within protection scope of the present invention.
To those skilled in the art, obviously the invention is not restricted to the details of above-mentioned one exemplary embodiment, and when not deviating from spirit of the present invention or essential characteristic, the present invention can be realized in other specific forms.Therefore, no matter from which point, all should embodiment be regarded as exemplary, and be nonrestrictive, scope of the present invention is limited by claims instead of above-mentioned explanation, and all changes be therefore intended in the implication of the equivalency by dropping on claim and scope are included in the present invention.Any Reference numeral in claim should be considered as the claim involved by limiting.
In addition, be to be understood that, although this specification is described according to execution mode, but not each execution mode only comprises an independently technical scheme, this narrating mode of specification is only for clarity sake, those skilled in the art should by specification integrally, and the technical scheme in each embodiment also through appropriately combined, can form other execution modes that it will be appreciated by those skilled in the art that.