CN113806016A - Resource scheduling method, system, equipment and medium for virtual machine - Google Patents
Resource scheduling method, system, equipment and medium for virtual machine Download PDFInfo
- Publication number
- CN113806016A CN113806016A CN202111035192.6A CN202111035192A CN113806016A CN 113806016 A CN113806016 A CN 113806016A CN 202111035192 A CN202111035192 A CN 202111035192A CN 113806016 A CN113806016 A CN 113806016A
- Authority
- CN
- China
- Prior art keywords
- storage pool
- storage
- virtual machine
- host
- target
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 24
- 230000005012 migration Effects 0.000 claims abstract description 62
- 238000013508 migration Methods 0.000 claims abstract description 62
- 230000001960 triggered effect Effects 0.000 claims abstract description 31
- 230000004044 response Effects 0.000 claims description 19
- 238000004590 computer program Methods 0.000 claims description 8
- 238000010586 diagram Methods 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000001495 anti-association Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 230000014509 gene expression Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
- G06F2009/45562—Creating, deleting, cloning virtual machine instances
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
- G06F2009/4557—Distribution of virtual machine instances; Migration and load balancing
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Memory System Of A Hierarchy Structure (AREA)
Abstract
The invention discloses a resource scheduling method of a virtual machine, which comprises the following steps: responding to a storage pool triggering preset rule, and determining a plurality of hosts corresponding to the storage pool; determining a virtual machine to be subjected to data migration and a source host in a plurality of hosts according to a preset rule triggered by the storage pool; acquiring load parameters of a plurality of other storage pools mounted by each host; determining a target host and a target storage pool in a plurality of other storage pools mounted under the target host according to the load parameters; and migrating the data of the virtual machine to be subjected to data migration from the storage pool to a target storage pool downloaded by the target host. The invention also discloses a system, a computer device and a readable storage medium. The scheme provided by the invention can automatically schedule the resources of the storage pool, thereby achieving the load balance of the storage pool.
Description
Technical Field
The present invention relates to the field of storage, and in particular, to a method, a system, a device, and a storage medium for resource scheduling of a virtual machine.
Background
At present, a resource scheduling scheme provided by a VMware manufacturer can only be used in combination with solutions such as vCD, vRA, Horizon view and the like based on association and anti-association rules, and does not automatically process storage related alarms.
Disclosure of Invention
In view of the above, in order to overcome at least one aspect of the above problem, an embodiment of the present invention provides a method for scheduling resources of a virtual machine, including:
responding to a storage pool triggering preset rule, and determining a plurality of hosts corresponding to the storage pool;
determining a virtual machine to be subjected to data migration and a source host in a plurality of hosts according to a preset rule triggered by the storage pool;
acquiring load parameters of a plurality of other storage pools mounted by each host;
determining a target host and a target storage pool in a plurality of other storage pools mounted under the target host according to the load parameters;
and migrating the data of the virtual machine to be subjected to data migration from the storage pool to a target storage pool downloaded by the target host.
In some embodiments, determining a number of hosts corresponding to the storage pool in response to the storage pool triggering a preset rule further comprises:
acquiring the utilization rate and IO (input/output) pressure value of the storage pool at intervals of a preset time period;
responding to the utilization rate of the storage pool being larger than a utilization rate threshold value, triggering a first preset rule by the storage pool;
and responding to the IO pressure value of the storage pool being larger than the pressure threshold value, triggering a second preset rule by the storage pool.
In some embodiments, determining a source host of the plurality of hosts and a virtual machine to be subjected to data migration on the source host according to a preset rule triggered by the storage pool, further includes:
responding to a first preset rule triggered by the virtual machine, determining the virtual machine to be subjected to data migration according to the maximum virtual machine file in the storage pool, and further determining the source host according to the virtual machine to be subjected to data migration;
and responding to a second preset rule triggered by the virtual machine, taking the virtual machine with the largest virtual machine file in the virtual machines in the closed state in the plurality of hosts as the virtual machine to be subjected to data migration, and determining the source host according to the virtual machine to be subjected to data migration.
In some embodiments, obtaining load parameters for a number of other storage pools each of said host mounts further comprises:
responding to the storage pool to trigger a first preset rule, and acquiring the current utilization rate of a plurality of other storage pools mounted by each host;
and responding to the storage pool triggering a second preset rule, and acquiring the current IO pressure value of a plurality of other storage pools mounted by each host.
In some embodiments, determining a target host and a target storage pool of a number of other storage pools downloaded by the target host based on the load parameter further comprises:
responding to the storage pool to trigger a first preset rule, and judging whether the current utilization rates of a plurality of other storage pools mounted under the source host are all larger than a first preset value;
in response to the existence of other storage pools of which the current utilization rate is smaller than a first preset value, taking the storage pools smaller than the first preset value as target storage pools and taking the source host as a target host;
and responding to the current utilization rates of a plurality of other storage pools all being larger than the first preset value, and randomly mounting other storage pools with the current utilization rates being smaller than the first preset value from other hosts as target storage pools.
In some embodiments, further comprising:
responding to the storage pool to trigger a second preset rule, and judging whether the current IO pressure values of a plurality of other storage pools mounted under the source host are all larger than a second preset value;
in response to the existence of other storage pools with the current IO pressure value smaller than the second preset value, taking the storage pools smaller than the second preset value as target storage pools and taking the source host as a target host;
and responding to the fact that the current IO pressure values of the other storage pools are all larger than the second preset value, and taking the other storage pools, mounted in the other hosts, of which the current IO pressure values are smaller than the second preset value as target storage pools.
In some embodiments, further comprising:
and deleting the data of the virtual machine to be subjected to the data migration in the storage pool.
Based on the same inventive concept, according to another aspect of the present invention, an embodiment of the present invention further provides a resource scheduling system of a virtual machine, including:
the first determining module is configured to respond to the triggering of a preset rule of a storage pool and determine a plurality of hosts corresponding to the storage pool;
the second determining module is configured to determine a virtual machine to be subjected to data migration and a source host of the plurality of hosts according to a preset rule triggered by the storage pool;
the acquisition module is configured to acquire the load parameters of a plurality of other storage pools mounted by each host;
a third determining module, configured to determine a target host and a target storage pool of a plurality of other storage pools downloaded by the target host according to the load parameter;
and the migration module is configured to migrate the data of the virtual machine to be subjected to data migration from the storage pool to a target storage pool downloaded by the target host.
Based on the same inventive concept, according to another aspect of the present invention, an embodiment of the present invention further provides a computer apparatus, including:
at least one processor; and
a memory storing a computer program operable on the processor, wherein the processor executes the program to perform the steps of any of the above-described virtual machine resource scheduling methods.
Based on the same inventive concept, according to another aspect of the present invention, an embodiment of the present invention further provides a computer-readable storage medium storing a computer program, which when executed by a processor performs the steps of any of the above-mentioned resource scheduling methods for a virtual machine.
The invention has one of the following beneficial technical effects: the scheme provided by the invention can automatically schedule the resources of the storage pool, thereby achieving the load balance of the storage pool.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other embodiments can be obtained by using the drawings without creative efforts.
Fig. 1 is a schematic flowchart of a resource scheduling method for a virtual machine according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a resource scheduling system of a virtual machine according to an embodiment of the present invention;
FIG. 3 is a schematic structural diagram of a computer device provided in an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a computer-readable storage medium according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the following embodiments of the present invention are described in further detail with reference to the accompanying drawings.
It should be noted that all expressions using "first" and "second" in the embodiments of the present invention are used for distinguishing two entities with the same name but different names or different parameters, and it should be noted that "first" and "second" are merely for convenience of description and should not be construed as limitations of the embodiments of the present invention, and they are not described in any more detail in the following embodiments.
According to an aspect of the present invention, an embodiment of the present invention provides a resource scheduling method for a virtual machine, as shown in fig. 1, which may include the steps of:
s1, responding to the storage pool triggering preset rules, and determining a plurality of hosts corresponding to the storage pool;
s2, determining a virtual machine to be subjected to data migration and a source host of a plurality of hosts according to a preset rule triggered by the storage pool;
s3, acquiring load parameters of a plurality of other storage pools mounted by each host;
s4, determining a target host and a target storage pool in a plurality of other storage pools mounted by the target host according to the load parameters;
and S5, migrating the data of the virtual machine to be subjected to data migration from the storage pool to a target storage pool downloaded by the target host.
The scheme provided by the invention can automatically schedule the resources of the storage pool, thereby achieving the load balance of the storage pool.
In some embodiments, an OCFS cluster file system may be used to implement basic management of the file system through 02cb service, and implement that any node in the cluster may access a storage device in parallel, where the storage pool device type supports a local disk of a server node, also supports a shared disk of SCSI service provided by SAS and ATA disks, and also supports a disk of a distributed storage pool.
In this way, multiple different types of storage pools may be mounted on each host. The plurality of storage pools may include a storage pool exclusive to the host or may include a storage pool shared with other hosts. And the storage pool has a special tree structure, only a single DRS directory is needed to be created and can also be called as a storage cluster, different storage pool resources are added into the storage cluster for management, the optimal storage resources are automatically recommended when a VM, a clone or a migration VM is created, and in addition, the storage rate of a certain storage pool on a host is increased or the IO pressure is too large to be higher than a trigger threshold value due to continuous growth of service data of a virtual machine, so that a preset rule is triggered.
In some embodiments, determining a number of hosts corresponding to the storage pool in response to the storage pool triggering a preset rule further comprises:
acquiring the utilization rate and IO (input/output) pressure value of the storage pool at intervals of a preset time period;
responding to the utilization rate of the storage pool being larger than a utilization rate threshold value, triggering a first preset rule by the storage pool;
and responding to the IO pressure value of the storage pool being larger than the pressure threshold value, triggering a second preset rule by the storage pool.
Specifically, the normal operation of the virtual machine needs to see whether the CPU and the memory resources of the host where the virtual machine is located are satisfied, and also needs to see whether the storage resources of the host where the virtual machine is located are satisfied. With the increase of the service data of the virtual machine, when the utilization rate or the IO pressure of a certain storage pool in the cluster is high, the storage pool generates a corresponding alarm, or the utilization rate and the IO pressure of the storage pool can be detected every preset time period, and if the utilization rate or the IO pressure exceeds a set scheduling threshold, scheduling of the storage cluster is triggered. At this time, the background may obtain the% util values of all the stored storage usage rates and IO pressures (several percent of time in one second is used for IO operations), and obtain whether the usage rate of a certain storage pool in the cluster pool is higher than a set threshold or the% util value is higher than the threshold by monitoring.
In some embodiments, determining a source host of the plurality of hosts and a virtual machine to be subjected to data migration on the source host according to a preset rule triggered by the storage pool, further includes:
responding to a first preset rule triggered by the virtual machine, determining the virtual machine to be subjected to data migration according to the maximum virtual machine file in the storage pool, and further determining the source host according to the virtual machine to be subjected to data migration;
and responding to a second preset rule triggered by the virtual machine, taking the virtual machine with the largest virtual machine file in the virtual machines in the closed state in the plurality of hosts as the virtual machine to be subjected to data migration, and determining the source host according to the virtual machine to be subjected to data migration.
Specifically, if the usage rate of a storage pool is higher than a threshold, the disk files of all the virtual machines on the storage pool may be sorted according to size, the largest disk file is obtained as a migration object, and the virtual machine to be subjected to data migration and the source host where the virtual machine is located may be determined by the largest disk file. And if the% util value is higher than or equal to the set threshold, because IO operation of the original storage pool is more frequent at this time, taking the virtual machine with the largest virtual machine file in the virtual machines in the closed state in the plurality of hosts as the virtual machine to be subjected to data migration.
In some embodiments, obtaining load parameters for a number of other storage pools each of said host mounts further comprises:
responding to the storage pool to trigger a first preset rule, and acquiring the current utilization rate of a plurality of other storage pools mounted by each host;
and responding to the storage pool triggering a second preset rule, and acquiring the current IO pressure value of a plurality of other storage pools mounted by each host.
In some embodiments, determining a target host and a target storage pool of a number of other storage pools downloaded by the target host based on the load parameter further comprises:
responding to the storage pool to trigger a first preset rule, and judging whether the current utilization rates of a plurality of other storage pools mounted under the source host are all larger than a first preset value;
in response to the existence of other storage pools of which the current utilization rate is smaller than a first preset value, taking the storage pools smaller than the first preset value as target storage pools and taking the source host as a target host;
and responding to the current utilization rates of a plurality of other storage pools all being larger than the first preset value, and randomly mounting other storage pools with the current utilization rates being smaller than the first preset value from other hosts as target storage pools.
In some embodiments, further comprising:
responding to the storage pool to trigger a second preset rule, and judging whether the current IO pressure values of a plurality of other storage pools mounted under the source host are all larger than a second preset value;
in response to the existence of other storage pools with the current IO pressure value smaller than the second preset value, taking the storage pools smaller than the second preset value as target storage pools and taking the source host as a target host;
and responding to the fact that the current IO pressure values of the other storage pools are all larger than the second preset value, and taking the other storage pools, mounted in the other hosts, of which the current IO pressure values are smaller than the second preset value as target storage pools.
Specifically, after a first preset rule is triggered, the storage pools lower than the first preset value in the cluster may be sorted according to the current utilization rate, the storage pool with the lowest utilization rate mounted on the same host is preferentially obtained as a scheduled target storage pool, and when the storage pool without the application on the same host traverses other storage pools and takes the storage pool with the lowest utilization rate as a target storage pool, the data in the original storage pool is obtained again and is migrated to the target storage pool. After a second preset rule is triggered, the storage pools with the IO pressure values lower than the second preset value in the cluster can be sorted according to the size of the current IO pressure value, the storage pool with the current IO pressure value mounted on the host computer is preferentially obtained to be used as a scheduled target storage pool, the storage pool without the application on the host computer traverses other storage pools and uses the storage pool with the current IO pressure value as a target storage pool, data in the original storage pool is obtained again, and the data are migrated to the target storage pool.
In some embodiments, further comprising:
and deleting the data of the virtual machine to be subjected to the data migration in the storage pool.
Specifically, after the data migration is completed, the virtual machine disk file in the original storage pool is deleted, and the alarm generated in the original storage pool automatically disappears in the history alarm list.
Based on the same inventive concept, according to another aspect of the present invention, an embodiment of the present invention further provides a resource scheduling system 400 of a virtual machine, as shown in fig. 2, including:
a first determining module 401, configured to determine, in response to a storage pool triggering a preset rule, a number of hosts corresponding to the storage pool;
a second determining module 402, configured to determine, according to a preset rule triggered by the storage pool, a virtual machine to be subjected to data migration and a source host of the plurality of hosts;
an obtaining module 403, configured to obtain load parameters of a number of other storage pools mounted by each host;
a third determining module 404, configured to determine, according to the load parameter, a target host and a target storage pool of a plurality of other storage pools downloaded by the target host;
a migration module 405 configured to migrate the data of the virtual machine to be subjected to data migration from the storage pool to a target storage pool downloaded by the target host.
The scheme provided by the invention can automatically schedule the resources of the storage pool, thereby achieving the load balance of the storage pool.
In some embodiments, determining a number of hosts corresponding to the storage pool in response to the storage pool triggering a preset rule further comprises:
acquiring the utilization rate and IO (input/output) pressure value of the storage pool at intervals of a preset time period;
responding to the utilization rate of the storage pool being larger than a utilization rate threshold value, triggering a first preset rule by the storage pool;
and responding to the IO pressure value of the storage pool being larger than the pressure threshold value, triggering a second preset rule by the storage pool.
In some embodiments, determining a source host of the plurality of hosts and a virtual machine to be subjected to data migration on the source host according to a preset rule triggered by the storage pool, further includes:
responding to a first preset rule triggered by the virtual machine, determining the virtual machine to be subjected to data migration according to the maximum virtual machine file in the storage pool, and further determining the source host according to the virtual machine to be subjected to data migration;
and responding to a second preset rule triggered by the virtual machine, taking the virtual machine with the largest virtual machine file in the virtual machines in the closed state in the plurality of hosts as the virtual machine to be subjected to data migration, and determining the source host according to the virtual machine to be subjected to data migration.
In some embodiments, obtaining load parameters for a number of other storage pools each of said host mounts further comprises:
responding to the storage pool to trigger a first preset rule, and acquiring the current utilization rate of a plurality of other storage pools mounted by each host;
and responding to the storage pool triggering a second preset rule, and acquiring the current IO pressure value of a plurality of other storage pools mounted by each host.
In some embodiments, determining a target host and a target storage pool of a number of other storage pools downloaded by the target host based on the load parameter further comprises:
responding to the storage pool to trigger a first preset rule, and judging whether the current utilization rates of a plurality of other storage pools mounted under the source host are all larger than a first preset value;
in response to the existence of other storage pools of which the current utilization rate is smaller than a first preset value, taking the storage pools smaller than the first preset value as target storage pools and taking the source host as a target host;
and responding to the current utilization rates of a plurality of other storage pools all being larger than the first preset value, and randomly mounting other storage pools with the current utilization rates being smaller than the first preset value from other hosts as target storage pools.
In some embodiments, further comprising:
responding to the storage pool to trigger a second preset rule, and judging whether the current IO pressure values of a plurality of other storage pools mounted under the source host are all larger than a second preset value;
in response to the existence of other storage pools with the current IO pressure value smaller than the second preset value, taking the storage pools smaller than the second preset value as target storage pools and taking the source host as a target host;
and responding to the fact that the current IO pressure values of the other storage pools are all larger than the second preset value, and taking the other storage pools, mounted in the other hosts, of which the current IO pressure values are smaller than the second preset value as target storage pools.
In some embodiments, further comprising:
and deleting the data of the virtual machine to be subjected to the data migration in the storage pool.
Based on the same inventive concept, according to another aspect of the present invention, as shown in fig. 3, an embodiment of the present invention further provides a computer apparatus 501, comprising:
at least one processor 520; and
a memory 510, the memory 510 storing a computer program 511 executable on the processor, the processor 520 executing the program to perform the steps of:
s1, responding to the storage pool triggering preset rules, and determining a plurality of hosts corresponding to the storage pool;
s2, determining a virtual machine to be subjected to data migration and a source host of a plurality of hosts according to a preset rule triggered by the storage pool;
s3, acquiring load parameters of a plurality of other storage pools mounted by each host;
s4, determining a target host and a target storage pool in a plurality of other storage pools mounted by the target host according to the load parameters;
and S5, migrating the data of the virtual machine to be subjected to data migration from the storage pool to a target storage pool downloaded by the target host.
The scheme provided by the invention can automatically schedule the resources of the storage pool, thereby achieving the load balance of the storage pool.
In some embodiments, determining a number of hosts corresponding to the storage pool in response to the storage pool triggering a preset rule further comprises:
acquiring the utilization rate and IO (input/output) pressure value of the storage pool at intervals of a preset time period;
responding to the utilization rate of the storage pool being larger than a utilization rate threshold value, triggering a first preset rule by the storage pool;
and responding to the IO pressure value of the storage pool being larger than the pressure threshold value, triggering a second preset rule by the storage pool.
In some embodiments, determining a source host of the plurality of hosts and a virtual machine to be subjected to data migration on the source host according to a preset rule triggered by the storage pool, further includes:
responding to a first preset rule triggered by the virtual machine, determining the virtual machine to be subjected to data migration according to the maximum virtual machine file in the storage pool, and further determining the source host according to the virtual machine to be subjected to data migration;
and responding to a second preset rule triggered by the virtual machine, taking the virtual machine with the largest virtual machine file in the virtual machines in the closed state in the plurality of hosts as the virtual machine to be subjected to data migration, and determining the source host according to the virtual machine to be subjected to data migration.
In some embodiments, obtaining load parameters for a number of other storage pools each of said host mounts further comprises:
responding to the storage pool to trigger a first preset rule, and acquiring the current utilization rate of a plurality of other storage pools mounted by each host;
and responding to the storage pool triggering a second preset rule, and acquiring the current IO pressure value of a plurality of other storage pools mounted by each host.
In some embodiments, determining a target host and a target storage pool of a number of other storage pools downloaded by the target host based on the load parameter further comprises:
responding to the storage pool to trigger a first preset rule, and judging whether the current utilization rates of a plurality of other storage pools mounted under the source host are all larger than a first preset value;
in response to the existence of other storage pools of which the current utilization rate is smaller than a first preset value, taking the storage pools smaller than the first preset value as target storage pools and taking the source host as a target host;
and responding to the current utilization rates of a plurality of other storage pools all being larger than the first preset value, and randomly mounting other storage pools with the current utilization rates being smaller than the first preset value from other hosts as target storage pools.
In some embodiments, further comprising:
responding to the storage pool to trigger a second preset rule, and judging whether the current IO pressure values of a plurality of other storage pools mounted under the source host are all larger than a second preset value;
in response to the existence of other storage pools with the current IO pressure value smaller than the second preset value, taking the storage pools smaller than the second preset value as target storage pools and taking the source host as a target host;
and responding to the fact that the current IO pressure values of the other storage pools are all larger than the second preset value, and taking the other storage pools, mounted in the other hosts, of which the current IO pressure values are smaller than the second preset value as target storage pools.
In some embodiments, further comprising:
and deleting the data of the virtual machine to be subjected to the data migration in the storage pool.
Based on the same inventive concept, according to another aspect of the present invention, as shown in fig. 4, an embodiment of the present invention further provides a computer-readable storage medium 601, where the computer-readable storage medium 601 stores computer program instructions 610, and the computer program instructions 610, when executed by a processor, perform the following steps:
s1, responding to the storage pool triggering preset rules, and determining a plurality of hosts corresponding to the storage pool;
s2, determining a virtual machine to be subjected to data migration and a source host of a plurality of hosts according to a preset rule triggered by the storage pool;
s3, acquiring load parameters of a plurality of other storage pools mounted by each host;
s4, determining a target host and a target storage pool in a plurality of other storage pools mounted by the target host according to the load parameters;
and S5, migrating the data of the virtual machine to be subjected to data migration from the storage pool to a target storage pool downloaded by the target host.
The scheme provided by the invention can automatically schedule the resources of the storage pool, thereby achieving the load balance of the storage pool.
In some embodiments, determining a number of hosts corresponding to the storage pool in response to the storage pool triggering a preset rule further comprises:
acquiring the utilization rate and IO (input/output) pressure value of the storage pool at intervals of a preset time period;
responding to the utilization rate of the storage pool being larger than a utilization rate threshold value, triggering a first preset rule by the storage pool;
and responding to the IO pressure value of the storage pool being larger than the pressure threshold value, triggering a second preset rule by the storage pool.
In some embodiments, determining a source host of the plurality of hosts and a virtual machine to be subjected to data migration on the source host according to a preset rule triggered by the storage pool, further includes:
responding to a first preset rule triggered by the virtual machine, determining the virtual machine to be subjected to data migration according to the maximum virtual machine file in the storage pool, and further determining the source host according to the virtual machine to be subjected to data migration;
and responding to a second preset rule triggered by the virtual machine, taking the virtual machine with the largest virtual machine file in the virtual machines in the closed state in the plurality of hosts as the virtual machine to be subjected to data migration, and determining the source host according to the virtual machine to be subjected to data migration.
In some embodiments, obtaining load parameters for a number of other storage pools each of said host mounts further comprises:
responding to the storage pool to trigger a first preset rule, and acquiring the current utilization rate of a plurality of other storage pools mounted by each host;
and responding to the storage pool triggering a second preset rule, and acquiring the current IO pressure value of a plurality of other storage pools mounted by each host.
In some embodiments, determining a target host and a target storage pool of a number of other storage pools downloaded by the target host based on the load parameter further comprises:
responding to the storage pool to trigger a first preset rule, and judging whether the current utilization rates of a plurality of other storage pools mounted under the source host are all larger than a first preset value;
in response to the existence of other storage pools of which the current utilization rate is smaller than a first preset value, taking the storage pools smaller than the first preset value as target storage pools and taking the source host as a target host;
and responding to the current utilization rates of a plurality of other storage pools all being larger than the first preset value, and randomly mounting other storage pools with the current utilization rates being smaller than the first preset value from other hosts as target storage pools.
In some embodiments, further comprising:
responding to the storage pool to trigger a second preset rule, and judging whether the current IO pressure values of a plurality of other storage pools mounted under the source host are all larger than a second preset value;
in response to the existence of other storage pools with the current IO pressure value smaller than the second preset value, taking the storage pools smaller than the second preset value as target storage pools and taking the source host as a target host;
and responding to the fact that the current IO pressure values of the other storage pools are all larger than the second preset value, and taking the other storage pools, mounted in the other hosts, of which the current IO pressure values are smaller than the second preset value as target storage pools.
In some embodiments, further comprising:
and deleting the data of the virtual machine to be subjected to the data migration in the storage pool.
Finally, it should be noted that, as will be understood by those skilled in the art, all or part of the processes of the methods of the above embodiments may be implemented by a computer program, which may be stored in a computer-readable storage medium, and when executed, may include the processes of the embodiments of the methods described above.
Further, it should be appreciated that the computer-readable storage media (e.g., memory) herein can be either volatile memory or nonvolatile memory, or can include both volatile and nonvolatile memory.
Those of skill would further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the disclosure herein may be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as software or hardware depends upon the particular application and design constraints imposed on the overall system. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the disclosed embodiments of the present invention.
The foregoing is an exemplary embodiment of the present disclosure, but it should be noted that various changes and modifications could be made herein without departing from the scope of the present disclosure as defined by the appended claims. The functions, steps and/or actions of the method claims in accordance with the disclosed embodiments described herein need not be performed in any particular order. Furthermore, although elements of the disclosed embodiments of the invention may be described or claimed in the singular, the plural is contemplated unless limitation to the singular is explicitly stated.
It should be understood that, as used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly supports the exception. It should also be understood that "and/or" as used herein is meant to include any and all possible combinations of one or more of the associated listed items.
The numbers of the embodiments disclosed in the embodiments of the present invention are merely for description, and do not represent the merits of the embodiments.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
Those of ordinary skill in the art will understand that: the discussion of any embodiment above is meant to be exemplary only, and is not intended to intimate that the scope of the disclosure, including the claims, of embodiments of the invention is limited to these examples; within the idea of an embodiment of the invention, also technical features in the above embodiment or in different embodiments may be combined and there are many other variations of the different aspects of the embodiments of the invention as described above, which are not provided in detail for the sake of brevity. Therefore, any omissions, modifications, substitutions, improvements, and the like that may be made without departing from the spirit and principles of the embodiments of the present invention are intended to be included within the scope of the embodiments of the present invention.
Claims (10)
1. A resource scheduling method of a virtual machine is characterized by comprising the following steps:
responding to a storage pool triggering preset rule, and determining a plurality of hosts corresponding to the storage pool;
determining a virtual machine to be subjected to data migration and a source host in a plurality of hosts according to a preset rule triggered by the storage pool;
acquiring load parameters of a plurality of other storage pools mounted by each host;
determining a target host and a target storage pool in a plurality of other storage pools mounted under the target host according to the load parameters;
and migrating the data of the virtual machine to be subjected to data migration from the storage pool to a target storage pool downloaded by the target host.
2. The method of claim 1, wherein determining a number of hosts corresponding to a storage pool in response to the storage pool triggering a preset rule, further comprises:
acquiring the utilization rate and IO (input/output) pressure value of the storage pool at intervals of a preset time period;
responding to the utilization rate of the storage pool being larger than a utilization rate threshold value, triggering a first preset rule by the storage pool;
and responding to the IO pressure value of the storage pool being larger than the pressure threshold value, triggering a second preset rule by the storage pool.
3. The method of claim 2, wherein determining a source host of the plurality of hosts and a virtual machine on the source host to be subject to data migration according to a preset rule triggered by the storage pool, further comprises:
responding to a first preset rule triggered by the virtual machine, determining the virtual machine to be subjected to data migration according to the maximum virtual machine file in the storage pool, and further determining the source host according to the virtual machine to be subjected to data migration;
and responding to a second preset rule triggered by the virtual machine, taking the virtual machine with the largest virtual machine file in the virtual machines in the closed state in the plurality of hosts as the virtual machine to be subjected to data migration, and determining the source host according to the virtual machine to be subjected to data migration.
4. The method of claim 3, wherein obtaining load parameters for a number of other storage pools each of said host mounts, further comprises:
responding to the storage pool to trigger a first preset rule, and acquiring the current utilization rate of a plurality of other storage pools mounted by each host;
and responding to the storage pool triggering a second preset rule, and acquiring the current IO pressure value of a plurality of other storage pools mounted by each host.
5. The method of claim 4, wherein determining a target host and a target storage pool of a number of other storage pools that the target host is to download based on the load parameter, further comprises:
responding to the storage pool to trigger a first preset rule, and judging whether the current utilization rates of a plurality of other storage pools mounted under the source host are all larger than a first preset value;
in response to the existence of other storage pools of which the current utilization rate is smaller than a first preset value, taking the storage pools smaller than the first preset value as target storage pools and taking the source host as a target host;
and responding to the current utilization rates of a plurality of other storage pools all being larger than the first preset value, and randomly mounting other storage pools with the current utilization rates being smaller than the first preset value from other hosts as target storage pools.
6. The method of claim 5, further comprising:
responding to the storage pool to trigger a second preset rule, and judging whether the current IO pressure values of a plurality of other storage pools mounted under the source host are all larger than a second preset value;
in response to the existence of other storage pools with the current IO pressure value smaller than the second preset value, taking the storage pools smaller than the second preset value as target storage pools and taking the source host as a target host;
and responding to the fact that the current IO pressure values of the other storage pools are all larger than the second preset value, and taking the other storage pools, mounted in the other hosts, of which the current IO pressure values are smaller than the second preset value as target storage pools.
7. The method of claim 1, further comprising:
and deleting the data of the virtual machine to be subjected to the data migration in the storage pool.
8. A resource scheduling system of a virtual machine, comprising:
the first determining module is configured to respond to the triggering of a preset rule of a storage pool and determine a plurality of hosts corresponding to the storage pool;
the second determining module is configured to determine a virtual machine to be subjected to data migration and a source host of the plurality of hosts according to a preset rule triggered by the storage pool;
the acquisition module is configured to acquire the load parameters of a plurality of other storage pools mounted by each host;
a third determining module, configured to determine a target host and a target storage pool of a plurality of other storage pools downloaded by the target host according to the load parameter;
and the migration module is configured to migrate the data of the virtual machine to be subjected to data migration from the storage pool to a target storage pool downloaded by the target host.
9. A computer device, comprising:
at least one processor; and
memory storing a computer program operable on the processor, wherein the processor executes the program to perform the steps of the method according to any of claims 1-7.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, is adapted to carry out the steps of the method according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111035192.6A CN113806016A (en) | 2021-09-05 | 2021-09-05 | Resource scheduling method, system, equipment and medium for virtual machine |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111035192.6A CN113806016A (en) | 2021-09-05 | 2021-09-05 | Resource scheduling method, system, equipment and medium for virtual machine |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113806016A true CN113806016A (en) | 2021-12-17 |
Family
ID=78894703
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111035192.6A Pending CN113806016A (en) | 2021-09-05 | 2021-09-05 | Resource scheduling method, system, equipment and medium for virtual machine |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113806016A (en) |
-
2021
- 2021-09-05 CN CN202111035192.6A patent/CN113806016A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP3022649A1 (en) | Virtual machine resource management system and method thereof | |
US9088618B1 (en) | System and methods for ensuring fault tolerance of antivirus protection realized in a virtual environment | |
US10379990B2 (en) | Multi-dimensional selective tracing | |
US9606480B2 (en) | Computer system backup performance optimization through performance analytics | |
JP2017188117A (en) | Reliable generation of unique key in distributed system | |
US10635516B2 (en) | Intelligent logging | |
CN112269661B (en) | Partition migration method and device based on Kafka cluster | |
CN112256433B (en) | Partition migration method and device based on Kafka cluster | |
CN109002348B (en) | Load balancing method and device in virtualization system | |
CN112988062B (en) | Metadata reading limiting method and device, electronic equipment and medium | |
CN113806016A (en) | Resource scheduling method, system, equipment and medium for virtual machine | |
CN110968406B (en) | Method, device, storage medium and processor for processing task | |
CN111399999A (en) | Computer resource processing method and device, readable storage medium and computer equipment | |
CN115951845A (en) | Disk management method, device, equipment and storage medium | |
CN110780815A (en) | Log deleting method and device | |
CN112181600B (en) | Cloud computing resource management method and system | |
CN113992378A (en) | Safety monitoring method and device, electronic equipment and storage medium | |
US10311032B2 (en) | Recording medium, log management method, and log management apparatus | |
CN111078357A (en) | Virtual machine backup method and equipment | |
WO2021096663A1 (en) | Function performance trigger | |
CN110750503A (en) | File deletion speed control method, device, equipment and readable storage medium | |
CN116775364B (en) | Application service health management method and device, electronic equipment and storage medium | |
CN110908776A (en) | Timed task execution method, related device and computer readable storage medium | |
CN110968370B (en) | Data processing method and device | |
CN116643815A (en) | Service arrangement method, device, equipment and medium |
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 |