Virtual machine association-anticorrelation system and method thereof in a kind of cloud data center operating system
Technical field
The present invention relates to dispatching technique field in the cloud data center operating system, specifically virtual machine association-anticorrelation system and method thereof in a kind of cloud data center operating system.
Background technology
Current, cloud computing is approved by industry that gradually cloud data center operating system realizes and be committed to practice gradually.In cloud data center operating system, Security of the system is particularly important, and its direct relation the availability of system.
Most of homogeneous system do not realize that virtual machine is related, the anticorrelation function, but mostly can require this function to the higher industry of security requirement.
In order to guarantee Security of the system, professional, we have proposed virtual machine association-anticorrelation system in the cloud data center operating system.
Summary of the invention
Technical assignment of the present invention is to solve the deficiencies in the prior art, and virtual machine association-anticorrelation system in a kind of cloud data center operating system is provided.
Technical scheme of the present invention realizes that in the following manner system configuration comprises: association-anticorrelation module (1) when virtual machine is opened; Association during virtual machine (vm) migration-anticorrelation module (2); Association during virtual machine HA-anticorrelation module (3); Relevance monitoring module (4), wherein,
When association-anticorrelation module (1) referred to that virtual machine is opened selection host physical machine when virtual machine was opened, pay the utmost attention to the physical machine at the virtual machine place related with it, can not select the physical machine with its anticorrelation virtual machine place, consider simultaneously the load of host;
Association during virtual machine (vm) migration-anticorrelation module (2) is when referring to virtual machine (vm) migration, and the virtual machine related with it be Autonomic Migration Framework simultaneously, when the target physical machine is selected, considers the load of all and virtual machine associated virtual machine to be migrated; Simultaneously, the target physical machine can not be selected the host with the virtual machine place of its anticorrelation;
Association during virtual machine HA-when anticorrelation module (3) referred to virtual machine HA, the HA virtual machine related with it in the selection of target host, do not considered the physical machine with its anticorrelation virtual machine place simultaneously;
Relevance monitoring module (4) refers to regularly monitor the relevance situation of all virtual machines, for the virtual machine of association, if the not situation on a host is arranged, automatically carries out the comparison of host load, with virtual machine (vm) migration to a host; For the virtual machine of anticorrelation, if the situation that has same host is arranged, automatically virtual machine is separated by migration operation, keep anticorrelation.
Virtual machine association-anticorrelation method in a kind of cloud data center operating system, concrete steps are as follows:
The job step of the association when 1) virtual machine is opened-anticorrelation module: suppose that virtual machine V needs to open;
(1) obtain and the physical machine P of the virtual machine of the relevant relation of V operation and the load of calculating P, if the loading within the system constraint scope of P, then P is the target host, if the P load too high then can't be opened this virtual machine, opens unsuccessfully, returns failure cause; If P is empty, then change (2) over to;
The load of (2) obtaining the physical machine P1 that is opening with the virtual machine of the relevant relation of V and calculating P, if the loading within the system constraint scope of P1, then P1 is the target host, if P1 load too high, then can't open this virtual machine, open unsuccessfully, return failure cause; If P1 is empty, then change (3) over to;
(3) obtaining the physical machine tabulation PList that does not have anticorrelation to concern the virtual machine operation with V or opening also travels through, the physical machine P2 that positioning load is minimum, if P2 loads within the system constraint scope, then P2 is the target host, if P2 load too high, then can't open this virtual machine, open unsuccessfully and return, the prompting failure cause; If PList is empty, opens unsuccessfully and return, the prompting failure cause;
2) association during virtual machine (vm) migration-anticorrelation module supposes that virtual machine V needs migration;
(1) obtains virtual machine VList with the V relating operation, and calculate the configuration summation of VList and V;
(2) obtaining the physical machine tabulation PList that does not have anticorrelation to concern the virtual machine operation with V or opening also travels through, the physical machine P that positioning load is minimum, according to the virtual machine that will the move configuration summation of calculating, if P loads within the system constraint scope, then P is the target host, turn (3), if P load too high or PList are empty, then finish this time migration;
(3) many requests of generating virtual machines migration begin migration, if failure is arranged, then carry out rollback, and this time migration finishes;
3) association during virtual machine (vm) migration-anticorrelation module supposes that virtual machine V needs HA;
(1) obtains virtual machine VList with the V relating operation, and calculate the configuration summation of VList and V;
(2) obtaining the physical machine tabulation PList that does not have anticorrelation to concern the virtual machine operation with V or opening also travels through, the physical machine P that positioning load is minimum, according to the virtual machine that will the move configuration summation of calculating, if P loads within the system constraint scope, then P is the target host, turn (3), if P load too high or PList are empty, then finish this HA;
(3) many requests of generating virtual machines HA, beginning HA for virtual machine in the VList, if its state is normal, carries out migration operation with it, to replace the HA operation, to guarantee uniqueness and the relevance of virtual machine;
4) relevance monitoring module
(1) suppose that virtual machine V1 is related with V2, V1 is on physical machine P1, and V2 is on physical machine P2, and the relatively load of P1 and P2 is if P1<P2 is then moved to V2 on the P1;
(2) suppose virtual machine V1 and V2 anticorrelation, host is P, then needs V1 or V2 are moved on other physical machine.
System of the present invention, association-anticorrelation module when virtual machine is opened, the host at the virtual machine place that accurate selection will be opened, the host at the virtual machine place that Automatic-searching is related with it is also judged loading condition; Automatically evade the selection with the virtual machine place host of its anticorrelation.
System of the present invention, during virtual machine (vm) migration, the association during virtual machine (vm) migration-anticorrelation module Autonomic Migration Framework virtual machine related with it, keep relevance, simultaneously, in the selection of target host, the virtual machine that all are related with it is considered in the calculating of load, the accuracy that proof load is calculated is evaded the target host with the virtual machine place of its anticorrelation automatically, keeps the anticorrelation between virtual machine.
System of the present invention, association during virtual machine HA-anticorrelation module, during virtual machine HA, the HA virtual machine related with it greatly reduced judgement number of times and the time-delay of HA so automatically, simultaneously, in the selection of target host, the virtual machine configuration of all disposable HA, the accuracy that proof load is calculated are considered in the calculating of load, automatically evade the target host with its anticorrelation virtual machine place, keep the anticorrelation between virtual machine.
System of the present invention, the relevance monitoring module by regularly monitoring, operation, keeps relevance and the anticorrelation of virtual machine.
System of the present invention has following outstanding beneficial effect: improve the availability of Security of the system and system, satisfy most of homogeneous system to realizing that virtual machine is related, the needs of anticorrelation function.
Description of drawings
Accompanying drawing 1 is the system flow schematic diagram.
Embodiment
Below in conjunction with accompanying drawing system of the present invention is described in further detail.
System configuration of the present invention mainly comprises: the association when virtual machine is opened-anticorrelation module (1); Association during virtual machine (vm) migration-anticorrelation module (2); Association during virtual machine HA-anticorrelation module (3); Relevance monitoring module (4).
Wherein, when the association when virtual machine is opened-anticorrelation module (1) refers to that virtual machine is opened, when selecting host's physical machine, pay the utmost attention to the physical machine at the virtual machine place related with it, consider simultaneously the load of host; Can not select the physical machine with its anticorrelation virtual machine place.Association during virtual machine (vm) migration-anticorrelation module (2) is when referring to virtual machine (vm) migration, and the virtual machine related with it be Autonomic Migration Framework simultaneously, when the target physical machine is selected, considers the load of all and virtual machine associated virtual machine to be migrated; Simultaneously, the target physical machine can not be selected the host with the virtual machine place of its anticorrelation.Association during virtual machine HA-when anticorrelation module (3) referred to virtual machine HA, the HA virtual machine related with it in the selection of target host, do not considered the physical machine with its anticorrelation virtual machine place simultaneously.Relevance monitoring module (4) refers to regularly monitor the relevance situation of all virtual machines, for the virtual machine of association, if the not situation on a host is arranged, automatically carries out the comparison of host load, with virtual machine (vm) migration to a host; For the virtual machine of anticorrelation, if the situation that has same host is arranged, automatically virtual machine is separated by migration operation, keep anticorrelation.
Virtual machine association-anticorrelation system is described below in the cloud data center operating system: the association that virtual machine is opened-anticorrelation module, when virtual machine is opened, at first obtain the host that the virtual machine related with it moves, judge the load of host, if load allows, then selecting this physical machine is the target host, if load surpasses system's allowed band, then return and open unsuccessfully, and the prompting reason; If not related with it virtual machine operation, then obtain the host that the virtual machine related with it opened moves, judge the load of host, if load allows, then selecting this physical machine is the target host, if load surpasses the scope that system allows, then return and open unsuccessfully, and the prompting reason; If the virtual machine related with it of not opening, then select load minimum and not with the physical machine of its anticorrelation virtual operation as target host (load permission).
Association during virtual machine (vm) migration-anticorrelation module when virtual machine (vm) migration, is judged the virtual machine related with it, is directed to simultaneously these virtual machines and all generates the migration instruction, and calculate the total load of the virtual machine cluster that needs migration.With the loading condition of this total load as Automatic-searching target host, automatically it is minimum and meet the physical machine of system load scope to search load, judge simultaneously the virtual machine operation that whether has on this physical machine with virtual machine anticorrelation to be migrated, if have, then continue to seek, if nothing, then this physical machine is the target host, improve the migration instruction, migration begins to carry out.If failure is arranged in the transition process, the then migration operation rollback before all, whole process writes off.
Association during virtual machine HA-anticorrelation module when virtual machine needs HA, is judged the virtual machine related with it, is directed to simultaneously these virtual machines and all generates the HA instruction, and calculate the total load of the virtual machine cluster that needs migration.With the loading condition of this total load as Automatic-searching target host, automatically it is minimum and meet the physical machine of system load scope to search load, judge simultaneously the virtual machine operation that whether has on this physical machine with the virtual machine anticorrelation for the treatment of HA, if have, then continue to seek, if nothing, then this physical machine is the target host.Judge the virtual machine of other HA, if state is normal, then the HA operation changes migration operation (guaranteeing virtual machine uniqueness and relevance) into.If in the HA process failure is arranged, the then HA rollback before all, whole HA process writes off.
The relevance monitoring module refers to regularly monitor the relevance situation of all virtual machines, for the virtual machine of association, if the not situation on a host is arranged, automatically carries out the comparison of host load, with virtual machine (vm) migration to a host; For the virtual machine of anticorrelation, if the situation that has same host is arranged, automatically virtual machine is separated by migration operation, keep anticorrelation.
Embodiment
Below, with an instantiation explanation the method.
1. the association when virtual machine is opened-anticorrelation module
Suppose that virtual machine V needs to open;
(1) obtain and the physical machine P of the virtual machine of the relevant relation of V operation and the load of calculating P, if the loading within the system constraint scope of P, then P is the target host, if the P load too high then can't be opened this virtual machine, opens unsuccessfully, returns failure cause; If P is empty, then change (2) over to
The load of (2) obtaining the physical machine P1 that is opening with the virtual machine of the relevant relation of V and calculating P, if the loading within the system constraint scope of P1, then P1 is the target host, if P1 load too high, then can't open this virtual machine, open unsuccessfully, return failure cause; If P1 is empty, then change (3) over to
(3) obtaining the physical machine tabulation PList that does not have anticorrelation to concern the virtual machine operation with V or opening also travels through, the physical machine P2 that positioning load is minimum, if P2 loads within the system constraint scope, then P2 is the target host, if P2 load too high, then can't open this virtual machine, open unsuccessfully and return, the prompting failure cause; If PList is empty, opens unsuccessfully and return, the prompting failure cause;
2. the association during virtual machine (vm) migration-anticorrelation module
Suppose that virtual machine V needs migration;
(1) obtains virtual machine VList with the V relating operation, and calculate the configuration summation of VList and V;
(2) obtain the physical machine tabulation PList that does not have anticorrelation to concern the virtual machine operation with V or opening and also travel through,
The physical machine P that positioning load is minimum, according to the virtual machine that will the move configuration summation of calculating, if the loading within the system constraint scope of P, then P is the target host, turns (3), if P load too high or PList be empty, then finishes this time to move;
(3) many requests of generating virtual machines migration begin migration.If failure is arranged, then carry out rollback, this time migration finishes;
3. the association during virtual machine (vm) migration-anticorrelation module
Suppose that virtual machine V needs HA;
(1) obtains virtual machine VList with the V relating operation, and calculate the configuration summation of VList and V;
(2) obtain the physical machine tabulation PList that does not have anticorrelation to concern the virtual machine operation with V or opening and also travel through,
The physical machine P that positioning load is minimum, according to the virtual machine that will the move configuration summation of calculating, if the loading within the system constraint scope of P, then P is the target host, turns (3), if P load too high or PList be sky, then finishes this HA;
(3) many requests of generating virtual machines HA, beginning HA.For virtual machine in the VList, if its state is normal, it is carried out migration operation, to replace the HA operation, to guarantee uniqueness and the relevance of virtual machine;
4. relevance monitoring module
(1) suppose that virtual machine V1 is related with V2, V1 is on physical machine P1, and V2 is on physical machine P2.The relatively load of P1 and P2 is if P1<P2 is then moved to V2 on the P1;
(2) suppose virtual machine V1 and V2 anticorrelation, host is P, then needs V1 or V2 are moved on other physical machine.
Except the disclosed technical characterictic of specification of the present invention, be the public office technology of those skilled in the art.