Method and system for scheduling virtual machines in integrated virtual machine clusters
First Claim
1. A method for scheduling virtual machines in an integrated virtual machine cluster, the method being performed by a computer program executable by a processor, the method comprising:
- S1). obtaining a filename of a target virtual machine from a directory created for the virtual machines when a user requests to start the target virtual machine;
S2). inquiring, based on the filename of the target virtual machine, a storage module or a database to acquire nodes where copies of the target virtual machine are located, wherein a node is a physical machine or computer for hosting one or more virtual machines;
S3). selecting, based on a relationship between the acquired nodes where copies of the target virtual machine are located and nodes of the integrated virtual machine cluster that meet a CPU and memory configuration requirement of the target virtual machine, a set of nodes for starting the target virtual machine, and calculating a score for each node in the selected set of nodes to determine a target node; and
S4). running the target virtual machine on the determined target node,wherein (S3) further includes;
S30). obtaining configurations of CPU and memory required by the target virtual machine,S31). locating all nodes in the integrated virtual machine cluster to obtain a first set of nodes,S32). judging whether each node in the first set of nodes meets the CPU and memory configuration requirement of the target virtual machine, and removing nodes in the first set of nodes that do not meet the configuration requirement, so as to create a second set of nodes,S33). determining the acquired nodes in (S2) as a third set of nodes,S34). in response to an intersection existing between the second set of nodes and the third set of nodes, determining the intersection of the second set of nodes and the third set of nodes as a fourth set of nodes,S35). calculating a score of each node in the fourth set of nodes, andS36). selecting a node with a highest score as the target node, wherein the highest score indicating a highest efficiency for running the target virtual machine on the selected target node.
2 Assignments
0 Petitions
Accused Products
Abstract
A method for scheduling virtual machines in a virtual machine cluster includes obtaining a filename of a target virtual machine when a user requests to start the target virtual machine; inquiring, based on the filename of the target virtual machine, a storage module or a database to acquire one or more nodes where copies of the target virtual machine are located; selecting, from the acquired one or more nodes, a node with a highest score as a target node having a copy of the target virtual machine; and running the copy of the target virtual machine on the selected target node with the highest score.
-
Citations
16 Claims
-
1. A method for scheduling virtual machines in an integrated virtual machine cluster, the method being performed by a computer program executable by a processor, the method comprising:
-
S1). obtaining a filename of a target virtual machine from a directory created for the virtual machines when a user requests to start the target virtual machine; S2). inquiring, based on the filename of the target virtual machine, a storage module or a database to acquire nodes where copies of the target virtual machine are located, wherein a node is a physical machine or computer for hosting one or more virtual machines; S3). selecting, based on a relationship between the acquired nodes where copies of the target virtual machine are located and nodes of the integrated virtual machine cluster that meet a CPU and memory configuration requirement of the target virtual machine, a set of nodes for starting the target virtual machine, and calculating a score for each node in the selected set of nodes to determine a target node; and S4). running the target virtual machine on the determined target node, wherein (S3) further includes; S30). obtaining configurations of CPU and memory required by the target virtual machine, S31). locating all nodes in the integrated virtual machine cluster to obtain a first set of nodes, S32). judging whether each node in the first set of nodes meets the CPU and memory configuration requirement of the target virtual machine, and removing nodes in the first set of nodes that do not meet the configuration requirement, so as to create a second set of nodes, S33). determining the acquired nodes in (S2) as a third set of nodes, S34). in response to an intersection existing between the second set of nodes and the third set of nodes, determining the intersection of the second set of nodes and the third set of nodes as a fourth set of nodes, S35). calculating a score of each node in the fourth set of nodes, and S36). selecting a node with a highest score as the target node, wherein the highest score indicating a highest efficiency for running the target virtual machine on the selected target node. - View Dependent Claims (2, 3, 4, 5, 6)
-
-
7. A system for scheduling virtual machines in an integrated virtual machine cluster, comprising at least one processor, the at least one processor being configured to:
-
acquire a filename of a target virtual machine from a directory created for the virtual machines when a user requests to start the target virtual machine; based on the filename of the target virtual machine, inquire a storage module or a database to acquire nodes where copies of the target virtual machine are located, wherein a node is a physical machine or computer for hosting one or more virtual machines; based on a relationship between the acquired nodes where copies of the target virtual machine are located and nodes of the integrated virtual machine cluster that meet a CPU and memory configuration requirement of the target virtual machine, select a set of nodes for starting the target virtual machine; calculating a score for each node in the selected set of nodes to determine a target node; and run the target virtual machine on the determined target node; wherein further includes; obtaining configurations of CPU and memory required by the target virtual machine; locating all nodes in the integrated virtual machine cluster to obtain a first set of nodes; judging whether each node in the first set of nodes meets the CPU and memory configuration requirement of the target virtual machine, and removing nodes in the first set of nodes that do not meet the configuration requirement, so as to create a second set of nodes; determining the acquired nodes in (S2) as a third set of nodes; in response to an intersection existing between the second set of nodes and the third set of nodes, determining the intersection of the second set of nodes and the third set of nodes as a fourth set of nodes; calculating a score of each node in the fourth set of nodes; and selecting a node with a highest score as the target node, wherein the highest score indicating a highest efficiency for running the target virtual machine on the selected target node. - View Dependent Claims (8, 9, 10, 11)
-
-
12. A non-transitory computer-readable medium having computer program for, when being executed by a processor, performing a method for scheduling virtual machines in an integrated virtual machine cluster, the method comprising:
-
S1). obtaining a filename of a target virtual machine from a directory created for the virtual machines when a user requests to start the target virtual machine; S2). inquiring, based on the filename of the target virtual machine, a storage module or a database to acquire nodes where copies of the target virtual machine are located, wherein a node is a physical machine or computer for hosting one or more virtual machines; S3). selecting, based on a relationship between the acquired nodes where copies of the target virtual machine are located and nodes of the integrated virtual machine cluster that meet a CPU and memory configuration requirement of the target virtual machine, a set of nodes for starting the target virtual machine, and calculating a score for each node in the selected set of nodes to determine a target node; and S4). running the target virtual machine on the determined target node, wherein (S3) further includes; S30). obtaining configurations of CPU and memory required by the target virtual machine, S31). locating all nodes in the integrated virtual machine cluster to obtain a first set of nodes, S32). judging whether each node in the first set of nodes meets the CPU and memory configuration requirement of the target virtual machine, and removing nodes in the first set of nodes that do not meet the configuration requirement, so as to create a second set of nodes, S33). determining the acquired nodes in (S2) as a third set of nodes, S34). in response to an intersection existing between the second set of nodes and the third set of nodes, determining the intersection of the second set of nodes and the third set of nodes as a fourth set of nodes, S35). calculating a score of each node in the fourth set of nodes, and 36). selecting a node with a highest score as the target node, wherein the highest score indicating a highest efficiency for running the target virtual machine on the selected target node. - View Dependent Claims (13, 14, 15, 16)
-
Specification