CN109189556B - Affinity rule conflict monitoring method and device based on load balancing - Google Patents

Affinity rule conflict monitoring method and device based on load balancing Download PDF

Info

Publication number
CN109189556B
CN109189556B CN201810993977.6A CN201810993977A CN109189556B CN 109189556 B CN109189556 B CN 109189556B CN 201810993977 A CN201810993977 A CN 201810993977A CN 109189556 B CN109189556 B CN 109189556B
Authority
CN
China
Prior art keywords
rule
virtual machine
drs
host
created
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.)
Active
Application number
CN201810993977.6A
Other languages
Chinese (zh)
Other versions
CN109189556A (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.)
Zhengzhou Yunhai Information Technology Co Ltd
Original Assignee
Zhengzhou Yunhai Information 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 Zhengzhou Yunhai Information Technology Co Ltd filed Critical Zhengzhou Yunhai Information Technology Co Ltd
Priority to CN201810993977.6A priority Critical patent/CN109189556B/en
Publication of CN109189556A publication Critical patent/CN109189556A/en
Application granted granted Critical
Publication of CN109189556B publication Critical patent/CN109189556B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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
    • 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/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5061Partitioning or combining of resources
    • G06F9/5077Logical partitioning of resources; Management or configuration of virtualized 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/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5083Techniques for rebalancing the load in a distributed system
    • 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/45591Monitoring or debugging support

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Stored Programmes (AREA)

Abstract

The application provides an affinity rule conflict monitoring method and device based on load balancing, wherein the method comprises the following steps: when a DRS rule creating instruction is received, determining the type of a DRS rule which is requested to be created by the DRS rule creating instruction; and according to the type of the DRS rule requested to be created, carrying out conflict monitoring on the DRS rule requested to be created and the DRS rule already existing in the system. The embodiment of the application introduces affinity rule management in load balancing, the affinity rule can be set by a user, and the premise of load balancing scheduling is that the set affinity rule must be met, so that the final scheduling is more intelligent, and the scheduling result conforms to the expectation and the requirement of the user better.

Description

Affinity rule conflict monitoring method and device based on load balancing
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for affinity rule conflict monitoring based on load balancing.
Background
In recent years, operating system virtualization technology has become mature, and xen, kvm, vmware systems and the like all allow multiple operating system instances to run concurrently and independently on the same hardware resource. At the heart of these systems is a virtual machine monitor, otherwise known as Hypervisor. Hypervisor provides a complete virtual hardware interface for the guest operating system and schedules these guest operating systems to execute on physical hardware resources. One of the main features of a virtual machine is that the guest operating system can be migrated online between different hosts.
Load imbalance of the host computer in the virtual computing environment is caused by uncertainty of information of the application program and difference of processing capacity of the host computer. Therefore, how to coordinate the loads of different hosts in the network and maintain efficient resource utilization rate is a key problem in the virtual computing environment.
The core idea of load balancing is to utilize a virtual machine migration technology to migrate a virtual machine on a host with high resource utilization rate to a most appropriate target host according to different utilization conditions of resources of each host in the system, thereby realizing dynamic load balancing of each host in a virtual computing environment and achieving full utilization of resources in the whole system. However, in the prior art, most of the load balancing functions are to automatically select the migrated virtual machine and the target host by the program according to the set threshold, and in many cases, the load balancing functions do not meet the user's expectations well.
Disclosure of Invention
In view of the above, the present application is directed to providing a method. The specific scheme is as follows:
in a first aspect, an embodiment of the present application provides a method for affinity rule conflict monitoring based on load balancing, including:
when a DRS rule creating instruction is received, determining the type of a DRS rule which is requested to be created by the DRS rule creating instruction;
and according to the type of the DRS rule requested to be created, carrying out conflict monitoring on the DRS rule requested to be created and the DRS rule already existing in the system.
Optionally, if the type of the DRS rule requested to be created is an aggregation virtual machine rule, performing conflict monitoring on the DRS rule requested to be created and a DRS rule already existing in the system according to the type of the DRS rule requested to be created includes:
if the aggregation virtual machine rule requested to be created and the DRS rule already existing in the system meet any one of the following conditions, determining that the DRS rule requested to be created conflicts with the DRS rule already existing in the system:
the aggregation virtual machine rule created by the request is repeated with the aggregation virtual machine rule existing in the system; alternatively, the first and second electrodes may be,
the request creates an aggregate virtual machine rule in which virtual machine VM1 and VM2 exist, and the VM1 and VM2 exist concurrently in a separate virtual machine rule that already exists in the system.
Optionally, if the type of the DRS rule requested to be created is a split virtual machine rule, performing conflict monitoring on the DRS rule requested to be created and a DRS rule already existing in the system according to the type of the DRS rule requested to be created includes:
if the split virtual machine rule requested to be created and the DRS rule already existing in the system meet any one of the following conditions, determining that the DRS rule requested to be created conflicts with the DRS rule already existing in the system:
the split virtual machine rule created by the request is repeated with a split virtual machine rule already existing in the system; alternatively, the first and second electrodes may be,
the request creates separate virtual machine rules in which virtual machine VM3 and VM4 exist, and the VM3 and VM4 exist simultaneously in an aggregate virtual machine rule that already exists in the system.
Optionally, if the type of the DRS rule requested to be created is a virtual machine to host rule, performing conflict monitoring on the DRS rule requested to be created and a DRS rule already existing in the system according to the type of the DRS rule requested to be created includes:
if the virtual machine-to-host rule requested to be created and the DRS rule already existing in the system meet any one of the following conditions, determining that the DRS rule requested to be created conflicts with the DRS rule already existing in the system:
the virtual machine to host rule created by the request is the same as the virtual machine to host rule virtual machine group and host group existing in the system, and the type of the virtual machine to host rule is the same;
alternatively, the first and second electrodes may be,
the virtual machine to host rule created by the request is the same as a virtual machine group corresponding to an existing virtual machine to host rule in the system, the host group is the same, and the type of the virtual machine to host rule is different;
alternatively, the first and second electrodes may be,
the virtual machine to host rule created by the request is the same as a virtual machine group corresponding to an existing virtual machine to host rule in the system, the host group is different, and the types of the virtual machine to host rule are the same;
wherein the type of the virtual machine-to-host rule includes that a virtual machine of a virtual machine group must run on a host in the host group; and the virtual machines of the virtual machine group cannot run on the host machines in the host machine group.
In a second aspect, an embodiment of the present application provides a load balancing-based affinity rule conflict monitoring module, including:
a type determining unit, configured to determine, when a DRS rule creation instruction is received, a type of a DRS rule that the DRS rule creation instruction requests to be created;
and the conflict monitoring unit is used for monitoring conflict between the DRS rule requested to be created and the DRS rule already existing in the system according to the type of the DRS rule requested to be created.
Optionally, if the type of the DRS rule requested to be created is an aggregation virtual machine rule, the conflict monitoring unit is specifically configured to:
if the aggregation virtual machine rule requested to be created and the DRS rule already existing in the system meet any one of the following conditions, determining that the DRS rule requested to be created conflicts with the DRS rule already existing in the system:
the aggregation virtual machine rule created by the request is repeated with the aggregation virtual machine rule existing in the system; alternatively, the first and second electrodes may be,
the request creates an aggregate virtual machine rule in which virtual machine VM1 and VM2 exist, and the VM1 and VM2 exist concurrently in a separate virtual machine rule that already exists in the system.
Optionally, if the type of the DRS rule requested to be created is a split virtual machine rule, the conflict monitoring unit is specifically configured to:
if the split virtual machine rule requested to be created and the DRS rule already existing in the system meet any one of the following conditions, determining that the DRS rule requested to be created conflicts with the DRS rule already existing in the system:
the split virtual machine rule created by the request is repeated with a split virtual machine rule already existing in the system; alternatively, the first and second electrodes may be,
the request creates separate virtual machine rules in which virtual machine VM3 and VM4 exist, and the VM3 and VM4 exist simultaneously in an aggregate virtual machine rule that already exists in the system.
Optionally, if the type of the DRS rule requested to be created is a virtual machine to host rule, the conflict monitoring unit is specifically configured to:
if the virtual machine-to-host rule requested to be created and the DRS rule already existing in the system meet any one of the following conditions, determining that the DRS rule requested to be created conflicts with the DRS rule already existing in the system:
the virtual machine to host rule created by the request is the same as the virtual machine to host rule virtual machine group and host group existing in the system, and the type of the virtual machine to host rule is the same;
alternatively, the first and second electrodes may be,
the virtual machine to host rule created by the request is the same as a virtual machine group corresponding to an existing virtual machine to host rule in the system, the host group is the same, and the types of the virtual machine to host rule are different;
alternatively, the first and second electrodes may be,
the virtual machine to host rule created by the request is the same as a virtual machine group corresponding to an existing virtual machine to host rule in the system, the host group is different, and the types of the virtual machine to host rule are the same;
wherein the type of the virtual machine-to-host rule includes that a virtual machine of a virtual machine group must run on a host in the host group; and the virtual machines of the virtual machine group cannot run on the host machines in the host machine group.
In a third aspect, an embodiment of the present application provides an affinity rule management apparatus based on load balancing, including:
the DRS group management module is used for editing the DRS group;
the DRS rule management module is used for adding, deleting and/or editing DRS rules in the system;
and the collision monitoring module of the second aspect.
In a fourth aspect, an embodiment of the present application provides a computer memory, where a computer program is stored in the computer memory, and the computer program, when executed by a processor, implements the steps of the first aspect.
In a fifth aspect, an embodiment of the present application provides a computer device, including:
a memory for storing a computer program;
a processor for implementing the steps of the first aspect when executing the computer program.
The embodiment of the application introduces affinity rule management in load balancing, the affinity rule can be set by a user, and the premise of load balancing scheduling is that the set affinity rule must be met, so that the final scheduling is more intelligent, and the scheduling result conforms to the expectation and the requirement of the user better.
The method provided by the application is applied to the device, the computer memory and the equipment, has the beneficial effects, and is not repeated herein.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a schematic flow chart of an affinity rule conflict monitoring method based on load balancing according to an embodiment of the present application;
fig. 2 is a schematic flow chart of an affinity rule verification method based on load balancing according to an embodiment of the present disclosure;
fig. 3 is a schematic structural diagram of an affinity rule conflict monitoring module based on load balancing according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of an affinity rule verification module based on load balancing according to an embodiment of the present disclosure.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
First, a brief description will be given of the concept of the embodiments of the present application.
DRS rules, affinity rules for load balancing. The method comprises the following steps of (1) affinity and anti-affinity, wherein the affinity means that a virtual machine can only run on a specified target host; inverse affinity refers to the inability of a virtual machine to run on a specified target host.
And the DRS group comprises a virtual machine group and a host group, wherein the group members of the virtual machine group can only be virtual machines, and the host group members can only be hosts.
DRS rules, including aggregation virtual machine rules, splitting virtual machine rules, virtual machine to host rules. The aggregation virtual machine rule means that a plurality of selected virtual machines can only run on the same target host; the virtual machine separation rule means that a plurality of virtual machines are selected to be operated in different hosts; the virtual machine to host rule is for the DRS group, and includes two cases: one is that the virtual machines in the virtual machine group must run on the host machines in the host machine group; the other is that the virtual machines in the virtual machine group cannot run on the host machines in the host group.
The embodiment of the application introduces affinity rule management in load balancing, the affinity rule can be set by a user, and the premise of load balancing scheduling is that the set affinity rule must be met, so that the final scheduling is more intelligent, and the scheduling result conforms to the expectation and the requirement of the user better.
The affinity rule management device provided by the embodiment of the application mainly comprises a DRS group management module, a DRS rule management module, an affinity rule conflict monitoring module and an affinity rule verification module which are four core modules.
The basic idea is as follows:
1) the DRS group management module provides functions of adding, deleting, and editing DRS groups, where DRS groups are virtual machine groups and host groups, and the number of DRS groups in a group must be at least greater than 1.
2) The DRS rule management module provides functions of adding, deleting and editing DRS rules, and comprises a virtual machine aggregation module, a virtual machine separation module and a virtual machine to host.
3) Before each time of adding the DRS rule, the affinity rule conflict monitoring module needs to detect whether the DRS rule conflicts with a DRS rule added before, for example, there is a DRS rule before VM1 and VM2 need to run on HOST1, and add a piece of VM1 and VM2 need to run on different HOSTs, and if there is a conflict, the addition is not allowed, so as to prompt a user.
4) The affinity rule verification module provides a verification method for judging whether the DRS rule is satisfied or not for the DRS scheduling module to call, and one of the prerequisites of the DRS scheduling module for scheduling, the virtual machine and the host which are related to the virtual machine to be scheduled to be migrated must satisfy the corresponding DRS rule.
The key points of the embodiment of the present application are collision monitoring of the DRS rule and verification of the DRS rule, which are explained below.
Referring to fig. 1, fig. 1 is a schematic flow chart of an affinity rule conflict monitoring method based on load balancing according to an embodiment of the present application, as shown in fig. 1, which mainly includes the following steps.
Step S101: when a DRS rule creating instruction is received, determining the type of a DRS rule which is requested to be created by the DRS rule creating instruction.
The types of the DRS rules comprise an aggregation virtual machine rule, a separation virtual machine rule and a virtual machine-to-host rule.
Step S102: and according to the type of the DRS rule requested to be created, carrying out conflict monitoring on the DRS rule requested to be created and the DRS rule already existing in the system.
In a first possible implementation manner, if the type of the DRS rule requested to be created is an aggregation virtual machine rule, performing conflict monitoring on the DRS rule requested to be created and a DRS rule already existing in a system according to the type of the DRS rule requested to be created includes:
if the aggregation virtual machine rule requested to be created and the DRS rule already existing in the system meet any one of the following conditions, determining that the DRS rule requested to be created conflicts with the DRS rule already existing in the system:
the aggregation virtual machine rule created by the request is repeated with the aggregation virtual machine rule existing in the system; alternatively, the first and second electrodes may be,
the request creates an aggregate virtual machine rule in which virtual machine VM1 and VM2 exist, and the VM1 and VM2 exist concurrently in a separate virtual machine rule that already exists in the system.
In a second possible implementation manner, if the type of the DRS rule requested to be created is a split virtual machine rule, performing conflict monitoring on the DRS rule requested to be created and a DRS rule already existing in the system according to the type of the DRS rule requested to be created includes:
if the split virtual machine rule requested to be created and the DRS rule already existing in the system meet any one of the following conditions, determining that the DRS rule requested to be created conflicts with the DRS rule already existing in the system:
the split virtual machine rule created by the request is repeated with a split virtual machine rule already existing in the system; alternatively, the first and second electrodes may be,
the request creates separate virtual machine rules in which virtual machine VM3 and VM4 exist, and the VM3 and VM4 exist simultaneously in an aggregate virtual machine rule that already exists in the system.
In a third possible implementation manner, if the type of the DRS rule requested to be created is a virtual machine to host rule, performing conflict monitoring on the DRS rule requested to be created and a DRS rule already existing in the system according to the type of the DRS rule requested to be created includes:
if the virtual machine-to-host rule requested to be created and the DRS rule already existing in the system meet any one of the following conditions, determining that the DRS rule requested to be created conflicts with the DRS rule already existing in the system:
the virtual machine to host rule created by the request is the same as the virtual machine to host rule virtual machine group and host group already existing in the system, and the type of the virtual machine to host rule is the same.
Alternatively, the first and second electrodes may be,
the virtual machine to host rule created by the request is the same as a virtual machine group corresponding to a virtual machine to host rule already existing in the system, the host group is the same, and the types of the virtual machine to host rule are different. For example, the virtual machine-to-host rule requested to be created and the virtual machine-to-host rule already existing in the system both include the virtual machine group 1 and the host group 1, but the virtual machine of which the type of the virtual machine group is the virtual machine group requested to be created must run on the host machine in the host group, while the virtual machine of which the type of the virtual machine-to-host rule already existing in the system is the virtual machine group must not run on the host machine in the host group, obviously, there is a conflict between the two rules.
Alternatively, the first and second electrodes may be,
the virtual machine to host rule created by the request is the same as a virtual machine group corresponding to an existing virtual machine to host rule in the system, the host group is different, and the types of the virtual machine to host rule are the same. For example, a virtual machine requesting to create a virtual machine-to-host rule, which is a virtual machine group of a type different from a virtual machine-to-host rule already existing in the system, must be run on a host in the host group, where the virtual machine-to-host rule requesting to create corresponds to virtual machine group 1 and host group 1, and the virtual machine-to-host rule already existing in the system corresponds to virtual machine group 1 and host group 2. That is, the virtual machine-to-host rule that the creation is requested restricts the virtual machine group 1 to have to run in the host group 1, whereas the virtual machine-to-host rule that already exists in the system restricts the virtual machine group 1 to have to run in the host group 2, obviously conflicting.
Wherein the type of the virtual machine-to-host rule includes that a virtual machine of a virtual machine group must run on a host in the host group; and the virtual machines of the virtual machine group cannot run on the host machines in the host machine group.
Referring to fig. 2, fig. 2 is a schematic flow chart of an affinity rule verification method based on load balancing according to an embodiment of the present application, as shown in fig. 2, which mainly includes the following steps.
Step S201: and acquiring all DRS rules corresponding to the virtual machines to be migrated, wherein the types of the DRS rules comprise virtual machine aggregation rules, virtual machine separation rules and/or virtual machine to host rules.
Before the virtual machine is migrated, a host meeting the migration condition needs to be searched in the system, and a DRS rule corresponding to the virtual machine to be migrated is an influence factor in the migration condition. In this embodiment of the present application, the number of the virtual machines to be migrated may be one or more than one, and the number of the DRS rules may be one or more than one.
Step S202: and sequentially verifying all DRS rules corresponding to the virtual machine to be migrated, and screening a target host in the system, wherein the relationship between the target host and the virtual machine to be migrated meets all DRS rules corresponding to the virtual machine to be migrated.
In specific implementation, the hosts in the system can be traversed, and whether hosts meeting all DRS rules corresponding to the virtual machines to be migrated exist or not can be sequentially judged. For example, if the virtual machine to be migrated corresponds to two DRS rules, i.e., DRS rule 1 and DRS rule 2, respectively, it is necessary to sequentially perform DRS rule 1 and DRS rule 2 verification on the hosts in the system.
If the DRS rule is an aggregation virtual machine rule, verifying the aggregation virtual machine rule, including: if a host computer in the system comprises a first virtual machine set, determining that the host computer comprising the first virtual machine set meets the rule of the aggregated virtual machine, wherein the first virtual machine set is all the virtual machines in the starting state except the virtual machine to be migrated in the virtual machines constrained by the rule of the aggregated virtual machine. For example, the aggregate virtual machine rule constrains that virtual machines VM1, VM2, and VM3 need to run on the same host, and if the virtual machine to be migrated is VM1, the host that satisfies the aggregate virtual machine rule needs to include virtual machine VM2 and VM 3. Of course, this is the case when both VM2 and VM3 are in a powered-on state, and if VM3 is in a powered-off state, then the host that satisfies the aggregate VM rule need only include VM 2.
If the DRS rule is a split virtual machine rule, verifying the split virtual machine rule, including: if a host machine does not contain any virtual machine in a second virtual machine set, determining that the host machine not containing any virtual machine in the second virtual machine set meets the rule of separating virtual machines, wherein the second virtual machine set is all the virtual machines in a starting state except the virtual machine to be migrated in the virtual machines constrained by the rule of separating virtual machines. For example, the split virtual machine rule constrains that virtual machines VM1, VM2, and VM3 cannot run on the same host, and the virtual machine to be migrated is VM1, then the host that satisfies the split virtual machine rule must not include virtual machine VM2 and VM 3. Similarly, where both VM2 and VM3 are in a powered-on state, if VM3 is in a powered-off state, then the host that satisfies the split virtual machine rule need only satisfy that VM2 is not included.
If the DRS rule is a virtual machine to host rule and the type of the virtual machine to host rule is that a virtual machine of a virtual machine group must run on a host in the host group, verifying the virtual machine to host rule, including: determining that any host in the host group of the virtual machine-to-host rule satisfies the virtual machine-to-host rule.
If the DRS rule is a virtual machine to host rule and the virtual machine to host rule is of a type that a virtual machine of a virtual machine group cannot run on a host in the host group, validating the virtual machine to host rule, including: determining that any host in the system other than the host group of the virtual machine-to-host rule satisfies the virtual machine-to-host rule.
The embodiment of the application introduces affinity rule management in load balancing, the affinity rule can be set by a user, and the premise of load balancing scheduling is that the set affinity rule must be met, so that the final scheduling is more intelligent, and the scheduling result conforms to the expectation and the requirement of the user better.
On the basis of the embodiment of the method, the application also provides an affinity rule conflict monitoring module based on load balancing.
Referring to fig. 3, fig. 3 is a schematic structural diagram of an affinity rule conflict monitoring module based on load balancing according to an embodiment of the present application, as shown in fig. 3, which mainly includes the following units.
A type determining unit 301, configured to determine, when a DRS rule creating instruction is received, a type of a DRS rule that the DRS rule creating instruction requests to create;
a conflict monitoring unit 302, configured to perform conflict monitoring on the DRS rule requested to be created and the DRS rule already existing in the system according to the type of the DRS rule requested to be created.
In an optional embodiment, if the type of the DRS rule requested to be created is an aggregation virtual machine rule, the conflict monitoring unit 302 is specifically configured to:
if the aggregation virtual machine rule requested to be created and the DRS rule already existing in the system meet any one of the following conditions, determining that the DRS rule requested to be created conflicts with the DRS rule already existing in the system:
the aggregation virtual machine rule created by the request is repeated with the aggregation virtual machine rule existing in the system; alternatively, the first and second electrodes may be,
the request creates an aggregate virtual machine rule in which virtual machine VM1 and VM2 exist, and the VM1 and VM2 exist concurrently in a separate virtual machine rule that already exists in the system.
In an optional embodiment, if the type of the DRS rule requested to be created is a split virtual machine rule, the conflict monitoring unit 302 is specifically configured to:
if the split virtual machine rule requested to be created and the DRS rule already existing in the system meet any one of the following conditions, determining that the DRS rule requested to be created conflicts with the DRS rule already existing in the system:
the split virtual machine rule created by the request is repeated with a split virtual machine rule already existing in the system; alternatively, the first and second electrodes may be,
the request creates separate virtual machine rules in which virtual machine VM3 and VM4 exist, and the VM3 and VM4 exist simultaneously in an aggregate virtual machine rule that already exists in the system.
In an optional embodiment, if the type of the DRS rule requested to be created is a virtual machine to host rule, the conflict monitoring unit 302 is specifically configured to:
if the virtual machine-to-host rule requested to be created and the DRS rule already existing in the system meet any one of the following conditions, determining that the DRS rule requested to be created conflicts with the DRS rule already existing in the system:
the virtual machine to host rule created by the request is the same as the virtual machine to host rule virtual machine group and the host group existing in the system, and the type of the virtual machine to host rule is the same;
alternatively, the first and second electrodes may be,
the virtual machine to host rule created by the request is the same as a virtual machine group corresponding to an existing virtual machine to host rule in the system, the host group is the same, and the types of the virtual machine to host rule are different;
alternatively, the first and second electrodes may be,
the virtual machine to host rule created by the request is the same as a virtual machine group corresponding to an existing virtual machine to host rule in the system, the host group is different, and the types of the virtual machine to host rule are the same;
wherein the type of the virtual machine-to-host rule includes that a virtual machine of a virtual machine group must run on a host in the host group; and the virtual machines of the virtual machine group cannot run on the host machines in the host machine group.
On the basis of the method embodiment, the application also provides an affinity rule verification module based on load balancing.
Referring to fig. 4, fig. 4 is a schematic structural diagram of an affinity rule verification module based on load balancing according to an embodiment of the present disclosure, as shown in fig. 4, which mainly includes the following units.
An obtaining unit 401, configured to obtain all DRS rules corresponding to a virtual machine to be migrated, where the types of the DRS rules include an aggregation virtual machine rule, a separation virtual machine rule, and/or a virtual machine to host rule;
a verifying unit 402, configured to sequentially verify all DRS rules corresponding to the virtual machine to be migrated, and screen out a target host in the system, where a relationship between the target host and the virtual machine to be migrated meets all DRS rules corresponding to the virtual machine to be migrated.
In an optional embodiment, if the DRS rule is an aggregation virtual machine rule, verifying the aggregation virtual machine rule includes:
if a host computer in the system comprises a first virtual machine set, determining that the host computer comprising the first virtual machine set meets the rule of the aggregated virtual machine, wherein the first virtual machine set is all the virtual machines in the starting state except the virtual machine to be migrated in the virtual machines constrained by the rule of the aggregated virtual machine.
In an optional embodiment, if the DRS rule is a split virtual machine rule, verifying the split virtual machine rule includes:
if a host machine does not contain any virtual machine in a second virtual machine set, determining that the host machine not containing any virtual machine in the second virtual machine set meets the rule of separating virtual machines, wherein the second virtual machine set is all the virtual machines in a starting state except the virtual machine to be migrated in the virtual machines constrained by the rule of separating virtual machines.
In an optional embodiment, if the DRS rule is a virtual machine to host rule, and the virtual machine of which the type is a virtual machine group must run on a host in the host group, validating the virtual machine to host rule includes:
determining that any host in the host group of the virtual machine-to-host rule satisfies the virtual machine-to-host rule.
In an optional embodiment, if the DRS rule is a virtual machine to host rule and a virtual machine with the virtual machine to host rule of the type of a virtual machine group cannot run on a host in the host group, verifying the virtual machine to host rule includes:
determining that any host in the system other than the host group of the virtual machine-to-host rule satisfies the virtual machine-to-host rule.
In yet another embodiment of the present application, the present application provides a computer readable memory, on which a computer program is stored, and the computer program, when executed by a processor, implements the steps of the affinity rule conflict monitoring method based on load balancing and/or the affinity rule verification method based on load balancing in the above embodiments.
In a specific implementation manner of the present application, an embodiment of the present application provides a computer device, including:
a memory for storing a computer program;
a processor, configured to implement the steps of the affinity rule conflict monitoring method based on load balancing and/or the affinity rule verification method based on load balancing in the foregoing embodiments when executing the computer program.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses, devices and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus, device and method may be implemented in other manners. For example, the above-described embodiments of the apparatus are merely illustrative, and for example, a division of a unit is merely a logical division, and an actual implementation may have another division, for example, a plurality of units or components may be combined or integrated into another apparatus, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
Units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a function calling device, or a network device) to execute all or part of the steps of the method of the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The above describes in detail a system and a method for monitoring a power-on state of a server, a computer memory, and a device provided by the present application, and specific examples are applied herein to explain the principles and embodiments of the present application, and the descriptions of the above embodiments are only used to help understand the method and the core idea of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (5)

1. A method for monitoring affinity rule conflict based on load balancing is characterized by comprising the following steps:
when a DRS rule creating instruction is received, determining the type of a DRS rule which is requested to be created by the DRS rule creating instruction;
according to the type of the DRS rule requested to be created, carrying out conflict monitoring on the DRS rule requested to be created and the DRS rule already existing in the system;
the DRS rules comprise an aggregation virtual machine rule, a separation virtual machine rule and a virtual machine to host rule; the type of the virtual machine-to-host rule includes that a virtual machine of a virtual machine group must run on a host in the host group; and, the virtual machines of the virtual machine group must not run on the host machines in the host machine group;
if the type of the DRS rule requested to be created is an aggregated virtual machine rule, performing conflict monitoring on the DRS rule requested to be created and a DRS rule already existing in the system according to the type of the DRS rule requested to be created, including:
if the aggregation virtual machine rule requested to be created and the DRS rule already existing in the system meet any one of the following conditions, determining that the DRS rule requested to be created conflicts with the DRS rule already existing in the system:
the aggregation virtual machine rule created by the request is repeated with the aggregation virtual machine rule existing in the system; alternatively, the first and second electrodes may be,
the request creates an aggregate virtual machine rule in which virtual machine VM1 and VM2 exist, and the VM1 and VM2 exist concurrently in a separate virtual machine rule already existing in the system;
if the type of the DRS rule requested to be created is a split virtual machine rule, performing conflict monitoring on the DRS rule requested to be created and a DRS rule already existing in the system according to the type of the DRS rule requested to be created, including:
if the split virtual machine rule requested to be created and the DRS rule already existing in the system meet any one of the following conditions, determining that the DRS rule requested to be created conflicts with the DRS rule already existing in the system:
the split virtual machine rule created by the request is repeated with a split virtual machine rule already existing in the system; alternatively, the first and second electrodes may be,
the request creates separate virtual machine rules in which virtual machine VM3 and VM4 exist, and the VM3 and VM4 exist simultaneously in an aggregate virtual machine rule that already exists in the system;
if the type of the DRS rule requested to be created is a virtual machine to host rule, performing conflict monitoring on the DRS rule requested to be created and a DRS rule already existing in the system according to the type of the DRS rule requested to be created, including:
if the virtual machine-to-host rule requested to be created and the DRS rule already existing in the system meet any one of the following conditions, determining that the DRS rule requested to be created conflicts with the DRS rule already existing in the system:
the virtual machine to host rule created by the request is the same as the virtual machine to host rule virtual machine group and host group existing in the system, and the type of the virtual machine to host rule is the same;
alternatively, the first and second electrodes may be,
the virtual machine to host rule created by the request is the same as a virtual machine group corresponding to an existing virtual machine to host rule in the system, the host group is the same, and the types of the virtual machine to host rule are different;
alternatively, the first and second electrodes may be,
the virtual machine to host rule created by the request is the same as a virtual machine group corresponding to an existing virtual machine to host rule in the system, the host group is different, and the types of the virtual machine to host rule are the same.
2. An affinity rule conflict monitoring device based on load balancing is characterized by comprising:
the type determining module is used for determining the type of the DRS rule which is requested to be created by the DRS rule creating instruction when the DRS rule creating instruction is received;
a conflict monitoring module, configured to perform conflict monitoring on the DRS rule requested to be created and a DRS rule already existing in the system according to the type of the DRS rule requested to be created;
the DRS rules comprise an aggregation virtual machine rule, a separation virtual machine rule and a virtual machine to host rule; the type of the virtual machine-to-host rule includes that a virtual machine of a virtual machine group must run on a host in the host group; and, the virtual machines of the virtual machine group must not run on the host machines in the host machine group;
if the type of the DRS rule requested to be created is an aggregated virtual machine rule, the conflict monitoring module is specifically configured to:
if the aggregation virtual machine rule requested to be created and the DRS rule already existing in the system meet any one of the following conditions, determining that the DRS rule requested to be created conflicts with the DRS rule already existing in the system:
the aggregation virtual machine rule created by the request is repeated with the aggregation virtual machine rule existing in the system; alternatively, the first and second electrodes may be,
the request creates an aggregate virtual machine rule in which virtual machine VM1 and VM2 exist, and the VM1 and VM2 exist concurrently in a separate virtual machine rule already existing in the system;
if the type of the DRS rule requested to be created is a split virtual machine rule, the conflict monitoring module is specifically configured to:
if the split virtual machine rule requested to be created and the DRS rule already existing in the system meet any one of the following conditions, determining that the DRS rule requested to be created conflicts with the DRS rule already existing in the system:
the split virtual machine rule created by the request is repeated with a split virtual machine rule already existing in the system; alternatively, the first and second electrodes may be,
the request creates separate virtual machine rules in which virtual machine VM3 and VM4 exist, and the VM3 and VM4 exist simultaneously in an aggregate virtual machine rule that already exists in the system;
if the type of the DRS rule requested to be created is a virtual machine to host rule, the conflict monitoring module is specifically configured to:
if the virtual machine to host rule requested to be created and the DRS rule already existing in the system meet any one of the following conditions, determining that the DRS rule requested to be created conflicts with the DRS rule already existing in the system:
the virtual machine to host rule created by the request is the same as the virtual machine to host rule virtual machine group and host group existing in the system, and the type of the virtual machine to host rule is the same;
alternatively, the first and second electrodes may be,
the virtual machine to host rule created by the request is the same as a virtual machine group corresponding to an existing virtual machine to host rule in the system, the host group is the same, and the types of the virtual machine to host rule are different;
alternatively, the first and second electrodes may be,
the virtual machine to host rule created by the request is the same as a virtual machine group corresponding to an existing virtual machine to host rule in the system, the host group is different, and the types of the virtual machine to host rule are the same.
3. The affinity rule conflict monitoring apparatus based on load balancing according to claim 2, comprising:
the DRS group management module is used for editing the DRS group;
and the DRS rule management module is used for adding, deleting and/or editing the DRS rules in the system.
4. A computer memory, characterized in that the computer memory has stored thereon a computer program which, when being executed by a processor, carries out the method of claim 1.
5. A computer device, comprising:
a memory for storing a computer program;
a processor for implementing the method of claim 1 when executing the computer program.
CN201810993977.6A 2018-08-29 2018-08-29 Affinity rule conflict monitoring method and device based on load balancing Active CN109189556B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810993977.6A CN109189556B (en) 2018-08-29 2018-08-29 Affinity rule conflict monitoring method and device based on load balancing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810993977.6A CN109189556B (en) 2018-08-29 2018-08-29 Affinity rule conflict monitoring method and device based on load balancing

Publications (2)

Publication Number Publication Date
CN109189556A CN109189556A (en) 2019-01-11
CN109189556B true CN109189556B (en) 2022-08-12

Family

ID=64916873

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810993977.6A Active CN109189556B (en) 2018-08-29 2018-08-29 Affinity rule conflict monitoring method and device based on load balancing

Country Status (1)

Country Link
CN (1) CN109189556B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111625338B (en) * 2020-05-28 2024-01-19 广东浪潮大数据研究有限公司 Affinity rule scheduling method and device and related equipment

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102508718A (en) * 2011-11-22 2012-06-20 杭州华三通信技术有限公司 Method and device for balancing load of virtual machine
WO2017000645A1 (en) * 2015-06-30 2017-01-05 华为技术有限公司 Method and apparatus for allocating host resource

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9003411B2 (en) * 2009-05-13 2015-04-07 Verizon Patent And Licensing Inc. Automated provisioning and configuration of virtual and physical servers
US10083065B2 (en) * 2012-12-21 2018-09-25 Red Hat Israel, Ltd. Creating multiple rules for a device to allow concurrent access to the device by different virtual machines
CN105607950A (en) * 2015-10-30 2016-05-25 浪潮(北京)电子信息产业有限公司 Virtual machine resource configuration method and apparatus
CN106844011A (en) * 2017-01-23 2017-06-13 郑州云海信息技术有限公司 A kind of cluster and its virtual machine migration method, system
CN107885579A (en) * 2017-11-13 2018-04-06 郑州云海信息技术有限公司 The load-balancing method and computer-readable recording medium of virtual machine

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102508718A (en) * 2011-11-22 2012-06-20 杭州华三通信技术有限公司 Method and device for balancing load of virtual machine
WO2017000645A1 (en) * 2015-06-30 2017-01-05 华为技术有限公司 Method and apparatus for allocating host resource

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
HDAS:异构集群上Hadoop+框架中的动态亲和性调度;何文婷等;《高技术通讯》;20160415(第04期);全文 *
面向JCF中间件的亲和性动态负载均衡算法;曹卫东等;《计算机工程与设计》;20180816(第08期);全文 *

Also Published As

Publication number Publication date
CN109189556A (en) 2019-01-11

Similar Documents

Publication Publication Date Title
US11068946B2 (en) NUMA-based client placement
US10474488B2 (en) Configuration of a cluster of hosts in virtualized computing environments
US10241674B2 (en) Workload aware NUMA scheduling
US10514960B2 (en) Iterative rebalancing of virtual resources among VMs to allocate a second resource capacity by migrating to servers based on resource allocations and priorities of VMs
US10176019B2 (en) Dynamic management of computing platform resources
Kc et al. Scheduling hadoop jobs to meet deadlines
US9201697B2 (en) System and method to reduce memory usage by optimally placing VMS in a virtualized data center
US9363192B2 (en) Automatic remediation in a distributed computer system with multiple clusters of host computers
US9626221B2 (en) Dynamic guest virtual machine identifier allocation
US9690608B2 (en) Method and system for managing hosts that run virtual machines within a cluster
EP2867771A1 (en) Optimizing placement of virtual machines
US10228978B2 (en) Dynamic management of computing platform resources
US10666572B2 (en) Dynamic management of computing platform resources
CN107003713B (en) Event driven method and system for logical partitioning for power management
US9841983B2 (en) Single click host maintenance
US10374967B2 (en) Profile-based placement of clients
US10318343B2 (en) Migration methods and apparatuses for migrating virtual machine including locally stored and shared data
US20120240111A1 (en) Storage medium storing program for controlling virtual machine, computing machine, and method for controlling virtual machine
US20150160973A1 (en) Domain based resource isolation in multi-core systems
CN109189556B (en) Affinity rule conflict monitoring method and device based on load balancing
CN105677481A (en) Method and system for processing data and electronic equipment
CN106325972B (en) Virtual machine management method and network equipment
US9933832B2 (en) Systems and methods for modifying power states in a virtual environment
US11080079B2 (en) Autonomously reproducing and destructing virtual machines
CN109617954B (en) Method and device for creating cloud host

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