CN116627582A - Automatic migration method and device of virtual machine, server and readable storage medium - Google Patents

Automatic migration method and device of virtual machine, server and readable storage medium Download PDF

Info

Publication number
CN116627582A
CN116627582A CN202310343037.3A CN202310343037A CN116627582A CN 116627582 A CN116627582 A CN 116627582A CN 202310343037 A CN202310343037 A CN 202310343037A CN 116627582 A CN116627582 A CN 116627582A
Authority
CN
China
Prior art keywords
cluster server
virtual machine
server
cluster
overload
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
Application number
CN202310343037.3A
Other languages
Chinese (zh)
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.)
Xian Wanxiang Electronics Technology Co Ltd
Original Assignee
Xian Wanxiang Electronics 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 Xian Wanxiang Electronics Technology Co Ltd filed Critical Xian Wanxiang Electronics Technology Co Ltd
Priority to CN202310343037.3A priority Critical patent/CN116627582A/en
Publication of CN116627582A publication Critical patent/CN116627582A/en
Pending legal-status Critical Current

Links

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/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/4557Distribution of virtual machine instances; Migration and load balancing
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The application provides an automatic migration method, an automatic migration device, a server and a readable storage medium of a virtual machine, wherein a proxy server can acquire state information of a cluster server in an automatic migration system of the virtual machine in real time, and determine whether an overload cluster server running in overload exists currently according to the state information and resource information of the cluster server, the virtual machine running in the overload cluster server can possibly be blocked or even down, and the proxy server automatically migrates one or more target virtual machines running in the overload cluster server to an idle cluster server with sufficient current resources, so that the cluster server in the automatic migration system of the virtual machine is in a stable running state, the workload of operation and maintenance personnel is saved, the migration efficiency is higher, and the user experience is improved.

Description

Automatic migration method and device of virtual machine, server and readable storage medium
Technical Field
The disclosure relates to the technical field of desktop virtualization, and in particular relates to an automatic migration method, an automatic migration device, a server and a readable storage medium of a virtual machine.
Background
With the development and maturity of cloud computing, the use prospect of cloud desktops is wider and wider, and the cloud desktops are gradually popularized in various industries such as universities, medical treatment, government and the like. For large enterprises, or enterprises comprising a plurality of office sites, a plurality of cluster servers are often arranged to provide desktop services for a plurality of zero terminals. However, the problem that the server resources are insufficient, so that all virtual machines on the server are blocked or even down often occurs, and the use is affected.
Often, a problem can be posed by a user, and an operation and maintenance person needs to manually try to migrate a virtual machine on a server with insufficient resources to other servers according to experience.
However, such processing is wasteful of human resources and inefficient.
Disclosure of Invention
The embodiment of the disclosure provides an automatic migration method, an automatic migration device, a server and a readable storage medium for a virtual machine, which can solve the problems of waste of human resources and low efficiency caused by migration of the virtual machine by operation and maintenance personnel when the existing virtual machine is blocked and down. The technical scheme is as follows:
according to a first aspect of an embodiment of the present disclosure, there is provided an automatic migration method of a virtual machine, including:
acquiring state information of each cluster server, wherein the state information of the cluster server is used for indicating the current resource occupation condition of the cluster server;
according to the state information of each cluster server and the resource information of each cluster server, an overload cluster server is determined from each cluster server;
and migrating the target virtual machine running in the overload cluster server to an idle cluster server.
In one embodiment, the determining the overload cluster server from the cluster servers according to the state information of the cluster servers and the resource information of the cluster servers includes:
obtaining the resource occupation proportion of each cluster server according to the state information of each cluster server and the resource information of each cluster server;
and determining a target cluster server with the resource occupation ratio being greater than or equal to a saturation threshold, and taking the target cluster server as an overload cluster server.
In one embodiment, the method further comprises:
and determining a saturation threshold according to the acquired fluency of the virtual machine running in each cluster server and the resource occupation proportion of each cluster server.
In one embodiment, before the migration of the target virtual machine running in the overloaded cluster server to the idle cluster server, the method further includes:
and determining an idle cluster server and a saturated cluster server according to the state information of each cluster server and the resource information of each cluster server.
In one embodiment, determining the idle cluster server and the saturated cluster server according to the state information of each cluster server and the resource information of each cluster server includes:
according to the state information of each cluster server and the resource information of each cluster server, determining the cluster server with unassigned resources as an initial idle cluster server, and determining the cluster server without unassigned resources as an initial saturated cluster server;
and if the resource occupation ratio exceeds the saturation threshold after the virtual machine is added to the initial idle cluster server, updating the initial idle cluster server to a saturated cluster server to obtain the idle cluster server and the saturated cluster server.
In one embodiment, the migrating the target virtual machine running in the overload cluster server to the idle cluster server includes:
if the overload cluster server and the idle cluster server adopt shared disks to store virtual machine files, migrating service state information of a target virtual machine operated in the overload cluster server to the idle cluster server;
if the overload cluster server and the idle cluster server adopt non-shared disks to store virtual machine files and a target virtual machine in a related state is operated in the overload cluster server, the target virtual machine operated in the overload cluster server is migrated to the idle cluster server;
and if the overload cluster server and the idle cluster server adopt non-shared disks to store virtual machine files and the overload cluster server does not have a virtual machine in a shutdown state, migrating a target virtual machine running in the overload cluster server to the idle cluster server after the overload cluster server is shut down.
In one embodiment, the state information of the cluster server includes: processing at least one of resource consumption information, memory resource usage information, network resource occupation information and input/output resource occupation information;
the resource information of the cluster server includes: at least one of a total amount of processing resources, a total amount of memory resources, a total amount of network resources, and a total amount of input/output resources.
According to a second aspect of an embodiment of the present disclosure, there is provided an automatic migration apparatus of a virtual machine, including:
the system comprises an acquisition module, a storage module and a control module, wherein the acquisition module is used for acquiring state information of each cluster server, and the state information of the cluster server is used for indicating the current resource occupation condition of the cluster server;
the processing module is used for determining overload cluster servers from the cluster servers according to the state information of the cluster servers and the resource information of the cluster servers;
and the migration module is used for migrating the target virtual machine running in the overload cluster server to the idle cluster server.
According to a third aspect of embodiments of the present disclosure, there is provided a server comprising a processor and a memory, the memory having stored therein at least one computer instruction that is loaded and executed by the processor to implement the steps performed in the method for automatic migration of a virtual machine described in the first aspect and any embodiment of the first aspect.
According to a fourth aspect of embodiments of the present disclosure, there is provided a computer readable storage medium having stored therein at least one computer instruction that is loaded and executed by a processor to implement the steps performed in the method for automatic migration of a virtual machine described in the first aspect and any embodiment of the first aspect.
According to the automatic migration method, the device, the server and the readable storage medium of the virtual machine, the proxy server can acquire the state information of the cluster servers in the automatic migration system of the virtual machine in real time, and according to the state information and the resource information of the cluster servers, whether the overload cluster server running in overload exists currently or not is determined, the virtual machine running in the overload cluster server can possibly be blocked or even down, and the proxy server automatically migrates one or more target virtual machines running in the overload cluster server to an idle cluster server with sufficient current resources, so that the cluster server in the automatic migration system of the virtual machine is in a stable running state, the workload of operation and maintenance personnel is saved, the migration efficiency is higher, and the user experience is improved.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure.
FIG. 1 is a schematic diagram of a VDI architecture provided by the present disclosure;
fig. 2 is a schematic structural diagram of an automatic migration system of a virtual machine according to an embodiment of the present disclosure;
fig. 3 is a flow chart of an automatic migration method of a virtual machine according to an embodiment of the disclosure;
fig. 4 is a schematic structural diagram of an automatic migration apparatus of a virtual machine according to an embodiment of the present disclosure.
Detailed Description
Reference will now be made in detail to exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, the same numbers in different drawings refer to the same or similar elements, unless otherwise indicated. The implementations described in the following exemplary examples are not representative of all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with some aspects of the present disclosure as detailed in the accompanying claims.
Desktop Virtualization (VDI) refers to the virtualization of a computer's end system (also referred to as a desktop) to achieve security and flexibility of desktop use. Desktop systems belonging to our individual can be accessed over a network at any location and at any time through any device. And various physical devices are virtualized by utilizing a virtual technology, so that the utilization rate of resources is effectively improved, the cost is saved, and the application quality is improved. Under the support of the virtualization technology, the connection between the network software and the hardware equipment is more flexible, and the expandability is also greatly improved. The cloud desktop essentially stores and manages various user information in a unified way by using a virtualization technology, and through simple network access equipment, a user side can enter the cloud desktop to realize centralized management and realize efficient resource sharing.
VDI, in brief, virtualizes your desktop by running a Windows system on a cluster server in a data center. Users connect with virtual desktops (often referred to as virtual machines) through client computing protocols from client devices (zero terminals), users access their desktops through zero terminals just as traditional locally installed desktops, users can connect to their desktops at any time and anywhere, as long as there is a network, IT personnel can more easily manage desktop users and data, as all data is at the server, and the data of the clients is safer.
Referring to fig. 1, fig. 1 is a schematic diagram of a VDI architecture provided in the present disclosure, where a virtual machine may run in a cluster server, and a user may access, through a zero terminal, the virtual machine allocated to the virtual machine on the cluster server, thereby obtaining a desktop image, and control the obtained virtual desktop thereof in a reverse control manner. In fig. 1 it is exemplarily shown that a zero terminal 1 can access a virtual machine 1, that a zero terminal 2 can access virtual machines 2, … … and that a zero terminal N can be oriented to a virtual machine N.
With development and maturity of cloud computing, the use scene of the cloud desktop is wider and wider, and various industries such as universities, medical treatment, government and the like begin to gradually popularize the cloud desktop for office work, and the cloud desktop is an overall trend in the future.
For example, for an enterprise, a cluster server may be arranged to provide desktop services for a plurality of zero terminals. For some large enterprises, or for some enterprises that include multiple office locations, multiple cluster servers are often provided.
For virtualized architecture, virtual manifestations of server, storage, networking, etc. infrastructure are created by software technology. This enables IT organizations to run multiple virtual systems on a single server, allowing maximum use of computing resource utilization; however, the virtual machine services on a single server are different, so that the problems of blocking, even downtime and the like of all virtual machines on the server which belong to the server often occur due to insufficient server resources, and the use of users is affected.
For the problem, the common practice can only be that the user firstly gives the problem, and then the operation and maintenance personnel migrate the virtual machine on the server to the server with sufficient resources according to the existing conditions until the resources on the server are sufficient, so that the phenomenon of blocking and the like does not occur when the user uses the virtual machine.
The automatic migration method of the virtual machine provided by the embodiment of the disclosure can be applied to an automatic migration system of the virtual machine, and the automatic migration system of the virtual machine is introduced below.
Referring to fig. 2, fig. 2 is a schematic structural diagram of an automatic migration system of a virtual machine according to an embodiment of the present disclosure, where the automatic migration system of a virtual machine may include: cluster server, proxy server and zero terminal. Wherein the cluster server is exemplarily shown as cluster server 1, cluster servers 2, … … and cluster server N. Zero terminals are shown schematically as zero terminal 1, zero terminals 2, … … and zero terminal N. The automatic migration system of the virtual machine shown in fig. 2 is that a proxy (broker) server is added in the existing VDI system architecture, the proxy server is located between a cluster server and a zero terminal and is connected with a plurality of cluster servers and a plurality of zero terminals, all the cluster servers can be located in different local area networks in different areas, and the proxy server and each cluster server are in the same network. Each zero terminal can access the proxy server and obtain services from the proxy server. Each zero terminal can also access the corresponding cluster server through a login account.
According to the automatic migration method of the virtual machine, the proxy server can acquire the state information of the cluster server in the automatic migration system of the virtual machine in real time, and according to the state information and the resource information of the cluster server, whether the overload cluster server operated by overload exists currently or not is determined, the situation that the virtual machine operated by the overload cluster server is blocked or even down is likely to occur, and the proxy server automatically migrates one or more target virtual machines operated by the overload cluster server to an idle cluster server with sufficient current resources, so that the cluster server in the automatic migration system of the virtual machine is in a stable operation state, the workload of operation and maintenance personnel is saved, the migration efficiency is high, and the user experience is improved.
The technical scheme provided by the present disclosure is described in detail below with specific examples.
Referring to fig. 3, fig. 3 is a flowchart of an automatic migration method of a virtual machine according to an embodiment of the present disclosure, where the automatic migration method of a virtual machine provided by the embodiment is executed by a server, and the server may be a proxy server in the automatic migration system of a virtual machine shown in fig. 2. The method provided by the embodiment may include the following steps.
Step 301, obtaining state information of each cluster server.
The state information of the cluster server is used for indicating the current resource occupation condition of the cluster server.
Alternatively, the status information of the cluster server may include, but is not limited to: processing at least one of resource consumption information, memory resource usage information, network resource occupation information, and input/output resource occupation information.
The proxy server can acquire the state information of the cluster server by sending a query message to the cluster server; the cluster server can also send the state information of the cluster server to the proxy server periodically or in real time in an active reporting mode.
Step 302, determining an overload cluster server from the cluster servers according to the state information of the cluster servers and the resource information of the cluster servers.
The resource information of the cluster server refers to the total amount of each resource of the cluster server.
Alternatively, the resource information of the cluster server may include, but is not limited to: at least one of a total amount of processing resources, a total amount of memory resources, a total amount of network resources, and a total amount of input/output resources.
The overload cluster server refers to overload of a currently running virtual machine, that is, the current resource occupation exceeds the amount that the cluster server can bear. The virtual machines running in the overloaded cluster server may get stuck and even down.
For each cluster server, the proxy server can judge whether the cluster server is overloaded according to the state information of the cluster server and the resource information of the cluster server, and if the cluster server is overloaded, the cluster server is determined to be the overloaded cluster server.
And 303, migrating the target virtual machine running in the overload cluster server to an idle cluster server.
The idle cluster server refers to that the resource occupation of the running virtual machine does not reach a saturated state, i.e. idle resources exist in the idle cluster server.
Wherein the target virtual machine is one or more virtual machines in the overloaded cluster server.
For each overloaded cluster server, the proxy server migrates the target virtual machine running in that overloaded cluster server to any of the idle cluster servers to transition that overloaded cluster server to a non-overloaded state.
According to the automatic migration method of the virtual machine, the proxy server can acquire the state information of the cluster server in the automatic migration system of the virtual machine in real time, and according to the state information and the resource information of the cluster server, whether the overload cluster server operated by overload exists currently or not is determined, the situation that the virtual machine operated by the overload cluster server is blocked or even down is likely to occur, and the proxy server automatically migrates one or more target virtual machines operated by the overload cluster server to an idle cluster server with sufficient current resources, so that the cluster server in the automatic migration system of the virtual machine is in a stable operation state, the workload of operation and maintenance personnel is saved, the migration efficiency is high, and the user experience is improved.
Further, step 302 may be implemented by the following step 3021, based on the embodiment shown in fig. 3.
And 3021, obtaining the resource occupation ratio of each cluster server according to the state information of each cluster server and the resource information of each cluster server.
In this embodiment, if the status information of the cluster server includes one type of information, the proportion of the status information to the resource information is the resource occupation proportion
If the state information of the cluster server contains two or more kinds of information, each kind of state information can be together with the corresponding resource information to determine the resource occupation proportion. Illustratively, when the state information includes processing resource consumption information and the resource information includes a total amount of processing resources, the ratio value of the processing resource consumption information to the total amount of processing resources is a processing resource occupation ratio.
Step 3022, judging whether the resource occupation ratio of each cluster server is greater than or equal to a saturation threshold.
If yes, go on to step 3023. If not, then step 3024 is continued.
The saturation threshold may be used to indicate that the proportion of occupied resources is beyond the range that the current cluster server can carry.
The saturation threshold may be preset, or may be determined according to the obtained smoothness of the virtual machine running in each cluster server and the resource occupation ratio of each cluster server. The smoothness of the virtual machines running in the cluster server may be obtained according to information fed back by the user using the virtual machines.
Correspondingly, if the state information of the cluster server contains one kind of information, judging whether the resource occupation proportion is larger than or equal to a saturation threshold.
If the state information of the cluster server contains two or more kinds of information, when judging whether the resource occupation proportion is greater than or equal to the saturation threshold, different kinds of resources can be respectively judged, namely, the resource occupation proportion determined by each kind of state information is compared and judged with the saturation threshold corresponding to the information. If the resource occupation proportion of any kind of information is larger than or equal to the saturation threshold of the kind, determining that the resource occupation proportion of the target cluster server is larger than or equal to the saturation threshold.
Illustratively, when the state information includes processing resource consumption information and the resource information includes a total amount of processing resources, it is required to determine whether the ratio of occupied processing resources is greater than or equal to a processing resource saturation threshold. If the current processing resource occupation ratio is greater than or equal to the processing resource saturation threshold, whether the occupation ratio of other kinds of resources is greater than or equal to the kind of resource saturation threshold or not can be determined that the occupation ratio of the resources of the target cluster server is greater than or equal to the saturation threshold.
And 3023, determining the cluster server as a target cluster server, and taking the target cluster server as an overload cluster server.
Step 3024, determining that the cluster server is not an overloaded cluster server.
According to the embodiment, whether the target cluster server is overloaded is determined by comparing the resource occupation proportion of the cluster server with the saturation threshold, and the overloaded cluster server can be accurately and quickly determined, so that the overloaded cluster server is accurately and quickly processed. Therefore, the cluster server in the automatic migration system of the virtual machine is in a stable running state, the workload of operation and maintenance personnel is saved, the migration efficiency is higher, and the user experience is improved.
In some scenarios, the proxy server may maintain in real time which of the current cluster servers are idle cluster servers and saturated cluster servers, so that when the overload cluster server needs to be processed, virtual machines running in the overload cluster server are moved to the idle cluster server in time. Specific examples are described in detail below.
Further, step 3030 may be included prior to step 303 on the basis of any of the method embodiments described above.
Step 3030, determining an idle cluster server and a saturated cluster server according to the state information of each cluster server and the resource information of each cluster server.
The free cluster server refers to a cluster server that has free resources currently available and can be used for a newly built virtual machine without causing virtual machine blocking.
The saturated cluster server refers to a cluster server which has few free resources at present and is provided for a newly built virtual machine to use, so that the virtual machine is blocked and the like.
Further, step 3030 may be implemented by the following steps.
Step 30301, determining the cluster server with the unassigned resource as an initial idle cluster server according to the status information of each cluster server and the resource information of each cluster server, and determining the cluster server without the unassigned resource as an initial saturated cluster server.
The cluster servers are divided into an initial idle cluster server and an initial saturated cluster server according to whether unallocated resources exist.
Step 30302, judging whether the resource occupation ratio exceeds the saturation threshold after the virtual machine is added to the initial idle cluster server.
If yes, go on to step 30303. If not, proceed to step 30304.
There are various implementations of the determination process in step 30302, and two implementations are shown below by way of example.
In one possible implementation, the determination may be based on resources occupied by a single virtual machine and resources already occupied by an initial idle cluster server.
In another possible implementation, the determination may be made by simulating an newly added service virtual machine to test whether the initial idle cluster server will reach a resource bottleneck.
Step 30303, updating the initial idle cluster server to a saturated cluster server to obtain the idle cluster server and the saturated cluster server.
And 30304, the initial idle cluster server is used as an idle cluster server to obtain an idle cluster server and a saturated cluster server.
In this embodiment, the initial idle cluster server may have few idle resources and cannot support the running of the newly added virtual machine, so that the initial idle cluster server needs to be updated to a saturated cluster server. The other initial idle cluster servers are idle cluster servers. Therefore, the idle cluster server is accurately and clearly determined, and migration processing is accurately carried out on the target virtual machine running in the overload cluster server. Therefore, the cluster server in the automatic migration system of the virtual machine is in a stable running state, the workload of operation and maintenance personnel is saved, the migration efficiency is higher, and the user experience is improved.
On the basis of any of the above method embodiments, further, step 303 may be implemented by the following steps.
Step 3031, judging whether the overload cluster server and the idle cluster server adopt shared disks to store virtual machine files.
If yes, go on to step 3032. If not, then step 3033 is continued.
Step 3032, migrating the service state information of the target virtual machine running in the overload cluster server to the idle cluster server.
Step 3033, judging whether the target virtual machine in the related power-on state is operated in the overload cluster server.
If yes, go on to step 3034. If not, then step 3035 is continued.
And step 3034, migrating the target virtual machine running in the overload cluster server to an idle cluster server.
And step 3035, migrating the target virtual machine running in the overload cluster server to an idle cluster server after the target virtual machine is powered off.
In this embodiment, if the overload cluster server and the idle cluster server adopt the shared disk to store the virtual machine files, the live migration may be performed, that is, the virtual machine files stored in the shared disk may not be moved, and the service state information may be migrated. If the overload cluster server and the idle cluster server do not adopt the shared disk to store virtual machine files, cold migration can be performed, because the virtual machines needing to be migrated are interrupted by the cold migration, whether the virtual machines in the shutdown state exist in operation can be checked in the overload cluster server to reduce the influence on the operation of the virtual machines, if so, the virtual machines in the shutdown state can be directly migrated, and if not, one or more target virtual machines in the virtual machines need to be shutdown first and then the migration operation is performed.
The method provided by the present disclosure is described below with specific examples. The present example includes the following processing steps.
Step 1, a Broker server queries information and a state of a host, where the information includes, but is not limited to, hardware configuration (parameters such as cpu, memory, etc.) of the host, and the state is a current state (parameters such as cpu, memory, network, IOPS, etc. in the running process) of the host.
And step 2, detecting whether a certain parameter in the current running state of the host reaches the bottleneck or a performance alarm appears.
And step 3, executing migration operation.
Each step is described in detail below. Step 1 may include the following steps 1.1 to 1.5. Step 2 may include the following steps 2.1 and 2.2. Step 3 may include the following steps 3.1 and 3.2.
And 1.1, the proxy server monitors the environment information and the state of all the nodes, and the specific implementation can be that the proxy server inquires or automatically reports the nodes.
Step 1.2, the obtained node information comprises information such as the number of allocated physical cpus, the memory size and the like, and according to the information, the number of virtual machines supported by the current node on physical configuration can be judged.
Step 1.3, the obtained node state comprises the current running state, such as occupation conditions of cpu, memory, network and the like, and whether the node resource reaches the bottleneck state can be judged according to the parameters; specifically, whether the occupancy rate of the parameters reaches more than 90% or not can be judged, or the feedback fluency and the resource occupancy condition of the clients can be collected according to big data, and the resource bottleneck is calculated, if the current resource usage exceeds the bottleneck, the migration work can be judged to be needed, or the migration work can be started manually according to the feedback of the clients; the above policy implementations can be designed in detail by the architect according to the specific scenario, this time providing only a few options. Note that since each parameter affects the overall usage, migration is required when one parameter exceeds the bottleneck.
And 1.4, sorting the node information collected in the step 1.2, and dividing the node information into an a form and a b form, wherein the a form is a node list which is supported by physical configuration and is used for continuously establishing virtual machine resources, and the b form is a node list which is not supported by physical configuration and is used for continuously establishing the virtual machine resources (which can be judged according to the existing unassigned resources).
Step 1.5, optimizing the two forms a and b in the step 1.4, wherein the optimizing point is a node which is selected from the form a and has a new virtual machine exceeding the resource bottleneck, and then removing the node from the form a and adding the node into the form b; the method is specifically realized, the judgment can be carried out according to the occupied resources of a single virtual machine and the occupied resources of the nodes in the form a, or whether the nodes can reach the resource bottleneck can be tested by simulating the newly added service virtual machine; note here that the newly added node defaults to form a and the newly added virtual machine resource defaults to be added on the node in form a.
Step 2.1, triggering a resource bottleneck or giving a performance alarm when a user uses a cloud desktop; specific strategies may refer to the proposed strategy implementation scheme in step 1.3.
And 2.2, automatically triggering the migration operation, or manually starting the automatic migration operation by operation and maintenance personnel due to insufficient customer feedback performance resources.
Step 3.1, according to the processing scheme in step 1.5, the migration process is that the nodes in the form b migrate to the nodes in the form a, and an automatic migration scheme can be automatically judged and set according to the strategy, specifically, the migration action is automatically completed by the system, and the resource judgment is completed by the scheme in step 1.5; if the current virtualization scheme is a shared disk, a thermomigration scheme can be used, virtual machines on the nodes can use shared storage to store virtual machine files, so that the time for copying hard disks is saved, the current service state information, including upper-layer connection table items such as memory and TCP and the like, is only transferred between two nodes, the copying time of state synchronization is relatively short, and the original virtual machine can also provide services when in synchronization so that the service can not be interrupted; if the current virtualization scheme does not adopt a shared disk, cold migration is needed, and the cold migration needs to perform shutdown and re-migration on the virtual machine, which can cause user service interruption, and it is recommended that the virtual machine with other states on the node as shutdown can be migrated.
Step 3.2, reclassifying the two migrated nodes according to step 1.5, but note that the node migrating the virtual machine needs to judge whether to add the form b according to the actual situation, if the virtual machine with smaller calculation amount is required, the virtual machine resource can be continuously added on the node, and if the scene is not available, the virtual machine resource can be directly added into the form b.
The proposal is supplemented with the explanation that the migration requires the node configuration to be basically the same, otherwise, the problem of drive mismatch can occur.
The embodiment of the disclosure provides a host automatic detection migration scheme based on a virtualization architecture, which can automatically detect whether the resources on the current host are in an overload state or not in operation, and can automatically process the overload host, so that the environment is always in a stable running state.
Based on the method for automatically migrating a virtual machine described in the embodiment corresponding to fig. 3, the following embodiments of the apparatus of the present disclosure may be used to execute the embodiments of the method of the present disclosure.
Referring to fig. 4, fig. 4 is a schematic structural diagram of an automatic migration apparatus of a virtual machine according to an embodiment of the present disclosure, where the automatic migration apparatus of a virtual machine may include:
the acquiring module 41 is configured to acquire status information of each cluster server, where the status information of the cluster server is used to indicate a current resource occupation situation of the cluster server;
a processing module 42, configured to determine an overload cluster server from the cluster servers according to the state information of each cluster server and the resource information of each cluster server;
and the migration module 43 is configured to migrate the target virtual machine running in the overload cluster server to an idle cluster server.
In one embodiment, the processing module 42 is specifically configured to:
obtaining the resource occupation proportion of each cluster server according to the state information of each cluster server and the resource information of each cluster server;
and determining a target cluster server with the resource occupation ratio being greater than or equal to a saturation threshold, and taking the target cluster server as an overload cluster server.
In one embodiment, the processing module 42 is further configured to:
and determining a saturation threshold according to the acquired fluency of the virtual machine running in each cluster server and the resource occupation proportion of each cluster server.
In one embodiment, the processing module 42 is further configured to: and determining an idle cluster server and a saturated cluster server according to the state information of each cluster server and the resource information of each cluster server.
In one embodiment, the processing module 42 is specifically configured to:
according to the state information of each cluster server and the resource information of each cluster server, determining the cluster server with unassigned resources as an initial idle cluster server, and determining the cluster server without unassigned resources as an initial saturated cluster server;
and if the resource occupation ratio exceeds the saturation threshold after the virtual machine is added to the initial idle cluster server, updating the initial idle cluster server to a saturated cluster server to obtain the idle cluster server and the saturated cluster server.
In one embodiment, the migration module 43 is specifically configured to:
if the overload cluster server and the idle cluster server adopt shared disks to store virtual machine files, migrating service state information of a target virtual machine operated in the overload cluster server to the idle cluster server;
if the overload cluster server and the idle cluster server adopt non-shared disks to store virtual machine files and a target virtual machine in a related state is operated in the overload cluster server, the target virtual machine operated in the overload cluster server is migrated to the idle cluster server;
and if the overload cluster server and the idle cluster server adopt non-shared disks to store virtual machine files and the overload cluster server does not have a virtual machine in a shutdown state, migrating a target virtual machine running in the overload cluster server to the idle cluster server after the overload cluster server is shut down.
In one embodiment, the state information of the cluster server includes: processing at least one of resource consumption information, memory resource usage information, network resource occupation information and input/output resource occupation information;
the resource information of the cluster server includes: at least one of a total amount of processing resources, a total amount of memory resources, a total amount of network resources, and a total amount of input/output resources.
The implementation principle and the beneficial effects of the device provided by the embodiment of the present disclosure are similar to those of the method embodiment provided above, and are not repeated here.
The disclosed embodiments provide a server including a processor and a memory, the memory storing at least one computer instruction, the instructions being loaded and executed by the processor to implement the steps performed in the method for automatic migration of a virtual machine described in the above embodiments.
Based on the method for automatically migrating a virtual machine described in the embodiment corresponding to fig. 3, the embodiment of the present disclosure further provides a computer readable storage medium, for example, a non-transitory computer readable storage medium may be a Read Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like. The storage medium stores computer instructions for executing the method for automatically migrating a virtual machine described in the embodiment corresponding to fig. 3, which is not described herein.
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 for instructing relevant hardware, where the program may be stored in a computer readable storage medium, and the storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any adaptations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.

Claims (10)

1. An automatic migration method of a virtual machine, comprising:
acquiring state information of each cluster server, wherein the state information of the cluster server is used for indicating the current resource occupation condition of the cluster server;
according to the state information of each cluster server and the resource information of each cluster server, an overload cluster server is determined from each cluster server;
and migrating the target virtual machine running in the overload cluster server to an idle cluster server.
2. The method according to claim 1, wherein said determining an overloaded cluster server from among the cluster servers based on the state information of the cluster servers and the resource information of the cluster servers, comprises:
obtaining the resource occupation proportion of each cluster server according to the state information of each cluster server and the resource information of each cluster server;
and determining a target cluster server with the resource occupation ratio being greater than or equal to a saturation threshold, and taking the target cluster server as an overload cluster server.
3. The method according to claim 1, wherein the method further comprises:
and determining a saturation threshold according to the acquired fluency of the virtual machine running in each cluster server and the resource occupation proportion of each cluster server.
4. The method of claim 1, wherein prior to migrating the target virtual machine running in the overloaded cluster server to an idle cluster server, further comprising:
and determining an idle cluster server and a saturated cluster server according to the state information of each cluster server and the resource information of each cluster server.
5. The method of claim 4, wherein determining the free cluster server and the saturated cluster server based on the status information of each cluster server and the resource information of each cluster server comprises:
according to the state information of each cluster server and the resource information of each cluster server, determining the cluster server with unassigned resources as an initial idle cluster server, and determining the cluster server without unassigned resources as an initial saturated cluster server;
and if the resource occupation ratio exceeds the saturation threshold after the virtual machine is added to the initial idle cluster server, updating the initial idle cluster server to a saturated cluster server to obtain the idle cluster server and the saturated cluster server.
6. The method of claim 1, wherein the migrating the target virtual machine running in the overloaded cluster server to an idle cluster server comprises:
if the overload cluster server and the idle cluster server adopt shared disks to store virtual machine files, migrating service state information of a target virtual machine operated in the overload cluster server to the idle cluster server;
if the overload cluster server and the idle cluster server adopt non-shared disks to store virtual machine files and a target virtual machine in a related state is operated in the overload cluster server, the target virtual machine operated in the overload cluster server is migrated to the idle cluster server;
and if the overload cluster server and the idle cluster server adopt non-shared disks to store virtual machine files and the overload cluster server does not have a virtual machine in a shutdown state, migrating a target virtual machine running in the overload cluster server to the idle cluster server after the overload cluster server is shut down.
7. The method according to any of claims 1-6, wherein the cluster server status information comprises: processing at least one of resource consumption information, memory resource usage information, network resource occupation information and input/output resource occupation information;
the resource information of the cluster server includes: at least one of a total amount of processing resources, a total amount of memory resources, a total amount of network resources, and a total amount of input/output resources.
8. An automatic migration apparatus for a virtual machine, comprising:
the system comprises an acquisition module, a storage module and a control module, wherein the acquisition module is used for acquiring state information of each cluster server, and the state information of the cluster server is used for indicating the current resource occupation condition of the cluster server;
the processing module is used for determining overload cluster servers from the cluster servers according to the state information of the cluster servers and the resource information of the cluster servers;
and the migration module is used for migrating the target virtual machine running in the overload cluster server to the idle cluster server.
9. A server comprising a processor and a memory having stored therein at least one computer instruction that is loaded and executed by the processor to implement the steps performed in the method of automated migration of virtual machines of any one of claims 1 to 7.
10. A computer readable storage medium having stored therein at least one computer instruction loaded and executed by a processor to implement the steps performed in the method of automated migration of virtual machines of any one of claims 1 to 7.
CN202310343037.3A 2023-03-31 2023-03-31 Automatic migration method and device of virtual machine, server and readable storage medium Pending CN116627582A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310343037.3A CN116627582A (en) 2023-03-31 2023-03-31 Automatic migration method and device of virtual machine, server and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310343037.3A CN116627582A (en) 2023-03-31 2023-03-31 Automatic migration method and device of virtual machine, server and readable storage medium

Publications (1)

Publication Number Publication Date
CN116627582A true CN116627582A (en) 2023-08-22

Family

ID=87625482

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310343037.3A Pending CN116627582A (en) 2023-03-31 2023-03-31 Automatic migration method and device of virtual machine, server and readable storage medium

Country Status (1)

Country Link
CN (1) CN116627582A (en)

Similar Documents

Publication Publication Date Title
US10922205B2 (en) Monitoring applications running on containers
US10257266B2 (en) Location of actor resources
CN110865867B (en) Method, device and system for discovering application topological relation
US10609159B2 (en) Providing higher workload resiliency in clustered systems based on health heuristics
US7996525B2 (en) Systems and methods for dynamically provisioning cloud computing resources
US8782215B2 (en) Performance testing in a cloud environment
US8589538B2 (en) Storage workload balancing
US20070028239A1 (en) Dynamic performance management for virtual servers
US9934059B2 (en) Flow migration between virtual network appliances in a cloud computing network
CN111522636B (en) Application container adjusting method, application container adjusting system, computer readable medium and terminal device
US10289441B1 (en) Intelligent scale-out federated restore
US10880367B2 (en) Load balancing stretched clusters in a distributed network
KR20110083084A (en) Apparatus and method for operating server by using virtualization technology
Rouzaud-Cornabas A distributed and collaborative dynamic load balancer for virtual machine
US11593160B2 (en) Virtual computing cluster resource scheduler
US8458702B1 (en) Method for implementing user space up-calls on java virtual machine before/after garbage collection
US11513830B2 (en) Introspection into workloads running within virtual machines
US20200272526A1 (en) Methods and systems for automated scaling of computing clusters
KR20150007698A (en) Load distribution system for virtual desktop service
CN115378962B (en) High-availability communication method and system for storage cluster based on iSCSI protocol
CN111522664A (en) Service resource management and control method and device based on distributed service
US11571618B1 (en) Multi-region game server fleets
Sivaraj et al. Enhancing fault tolerance using load allocation technique during virtualization in cloud computing
CN116627582A (en) Automatic migration method and device of virtual machine, server and readable storage medium
US10860347B1 (en) Virtual machine with multiple content processes

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication