CN116594739A - Control method of virtual machine, computer equipment and storage medium - Google Patents

Control method of virtual machine, computer equipment and storage medium Download PDF

Info

Publication number
CN116594739A
CN116594739A CN202310837556.5A CN202310837556A CN116594739A CN 116594739 A CN116594739 A CN 116594739A CN 202310837556 A CN202310837556 A CN 202310837556A CN 116594739 A CN116594739 A CN 116594739A
Authority
CN
China
Prior art keywords
virtual machine
virtualization
preset
console
default
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.)
Granted
Application number
CN202310837556.5A
Other languages
Chinese (zh)
Other versions
CN116594739B (en
Inventor
周高登
陈立军
桂伟
郭雄
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Wuhan Barda Technology Co ltd
Original Assignee
Wuhan Barda 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 Wuhan Barda Technology Co ltd filed Critical Wuhan Barda Technology Co ltd
Priority to CN202310837556.5A priority Critical patent/CN116594739B/en
Publication of CN116594739A publication Critical patent/CN116594739A/en
Application granted granted Critical
Publication of CN116594739B publication Critical patent/CN116594739B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/51Discovery or management thereof, e.g. service location protocol [SLP] or web services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45591Monitoring or debugging support
    • 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/45595Network integration; Enabling network access in virtual machine instances
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Stored Programmes (AREA)

Abstract

The application discloses a control method of a virtual machine, computer equipment and a storage medium, wherein the method comprises the following steps: acquiring target virtual machines to be controlled from a plurality of preset virtual machines of a server; acquiring a preset virtual machine type corresponding to a target virtual machine and taking the preset virtual machine type as the target virtual machine type; the target virtual machine type is sent to the server side, so that the server side feeds back a target access address of a target virtualization control console corresponding to the target virtual machine type; based on the target access address, accessing a target virtualization console of the plurality of preset virtualization consoles to control the target virtual machine through the target virtualization console. According to the embodiment of the application, the target virtual machines in the plurality of preset virtual machines are determined, and the target access address of the corresponding target virtualization control console is requested based on the type of the target virtual machines, so that the target virtualization control console is accessed, the automatic matching of the target virtual machines to the target virtualization control console is realized, and the control of the virtual machines is more convenient.

Description

Control method of virtual machine, computer equipment and storage medium
Technical Field
The present application relates to the field of virtual machines, and in particular, to a control method of a virtual machine, a computer device, and a storage medium.
Background
A virtualization console is a tool that manages a virtualized environment and can be used to control virtual machines. However, the virtualization consoles provided by different manufacturers are often not universal, and the virtualization consoles of the same manufacturer can generally only control the virtual machines of the manufacturer, so that a plurality of different types of virtualization consoles and virtual machines exist.
When a virtual machine needs to be controlled, a user often manually determines a corresponding virtualization console to provide a virtual machine control function, which results in very inconvenient control of the virtual machine.
Disclosure of Invention
The embodiment of the application provides a control method of a virtual machine, computer equipment and a storage medium, which aim to realize automatic matching from a target virtual machine to a target virtualization console, so that the control of the virtual machine is more convenient.
In one aspect, the present application provides a method for controlling a virtual machine, where the method includes:
acquiring a target virtual machine to be controlled from a plurality of preset virtual machines of a server, wherein each preset virtual machine corresponds to a preset virtual machine type;
acquiring a preset virtual machine type corresponding to the target virtual machine and taking the preset virtual machine type as the target virtual machine type;
the target virtual machine type is sent to the server side, so that the server side feeds back a target access address of a target virtualization control console corresponding to the target virtual machine type;
and accessing the target virtualization control console in a plurality of preset virtualization control consoles based on the target access address so as to control the target virtual machine through the target virtualization control console.
In some embodiments, after obtaining the target virtual machine to be controlled in the plurality of preset virtual machines at the server, the method further includes:
acquiring a pre-stored default access address, wherein the default access address is the access address of a default virtualization console in a plurality of preset virtualization consoles;
accessing the default virtualization control console based on the default access address to control the target virtual machine through the default virtualization control console to obtain a control feedback result, wherein the control failure result is a control failure result or a control success result;
and when the control feedback result is a control failure result, judging that the default virtualization control console is not matched with the preset virtual machine type corresponding to the target virtual machine, and executing the step of acquiring the preset virtual machine type corresponding to the target virtual machine.
In some embodiments, before the target virtual machine to be controlled is obtained in the plurality of preset virtual machines at the server, the method further includes:
acquiring the times of each preset virtualization control console used for virtual machine control in a preset historical time period;
determining the use probability of each preset virtualization control console based on the times;
determining the default virtualization control console from a plurality of preset virtualization control consoles based on the use probability;
and storing the access address of the default virtualization control console as the default access address.
In some embodiments, the determining the usage probability of each preset virtualization console based on the number of times includes:
acquiring a preset virtualization control console which is used for virtual machine control the last time from a current time point, and taking the preset virtualization control console as a first control console;
correcting the times of the first control console by adopting a preset correction value to obtain corrected times of the first control console;
determining a frequency of use of each preset virtualization console based on the corrected times of the first console, the times of each preset virtualization console other than the first console;
and determining the use probability of each preset virtualization control console based on the use frequency.
In some embodiments, the determining, based on the frequency of use, a probability of use for each of the preset virtualization consoles includes:
acquiring a preset virtual machine type corresponding to each preset virtualization control console;
determining the number of preset virtual machines of the preset virtual machine types corresponding to each preset virtualization control console in a plurality of preset virtual machines of the server;
determining the frequency weight of use of each preset virtualization control console based on the number of preset virtual machines of the preset virtual machine types corresponding to each preset virtualization control console;
and weighting the frequency of use of each preset virtualization control console by adopting the frequency weight of use of each preset virtualization control console to obtain the probability of use of each preset virtualization control console.
In some embodiments, the determining, based on the probability of use, the default virtualization console from among a plurality of the preset virtualization consoles includes:
sequencing a plurality of preset virtualization consoles according to the use probability from large to small to obtain a console sequence;
and taking a preset number of preset virtualization consoles which are arranged at the front in the console sequence as a plurality of default virtualization consoles.
In some embodiments, the storing the access address of the default virtualization console as the default access address includes:
determining access priorities of the default virtualization consoles based on the ranking of the default virtualization consoles in the console sequence;
taking the access priority of each default virtualization control station as the address priority of the access address of each default virtualization control station;
and taking the access address of each default virtualization control console as each default access address, and storing the access address of each default virtualization control console in association with the address priority of the access address of each default virtualization control console.
In some embodiments, accessing the default virtualization console based on the default access address to control the target virtual machine through the default virtualization console to obtain a control feedback result includes:
based on the default access addresses, sequentially accessing the default virtualization consoles according to the address priorities stored in association with the default access addresses, so as to sequentially control the target virtual machines through the default virtualization consoles;
and in the process of sequentially accessing each default virtualization control console to sequentially control the target virtual machine through each default virtualization control console, if the control of the target virtual machine through each default virtualization control console fails, judging that the control feedback result is a control failure result.
In another aspect, the present application also provides a computer apparatus, including:
one or more processors;
a memory; and
one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the processor to implement steps in the method of controlling a virtual machine of any of the claims.
In another aspect, the present application also provides a computer readable storage medium having stored thereon a computer program to be loaded by a processor to perform the steps in the control method of a virtual machine according to any one of the above.
The embodiment of the application provides a control method of a virtual machine, computer equipment and a storage medium, wherein the method comprises the following steps: acquiring a target virtual machine to be controlled from a plurality of preset virtual machines of a server, wherein each preset virtual machine corresponds to a preset virtual machine type; acquiring a preset virtual machine type corresponding to a target virtual machine and taking the preset virtual machine type as the target virtual machine type; the target virtual machine type is sent to the server side, so that the server side feeds back a target access address of a target virtualization control console corresponding to the target virtual machine type; based on the target access address, accessing a target virtualization console of the plurality of preset virtualization consoles to control the target virtual machine through the target virtualization console. According to the embodiment of the application, the target virtual machines in the plurality of preset virtual machines are determined, and the target access address of the corresponding target virtualization control console is requested based on the type of the target virtual machines, so that the target virtualization control console is accessed, the automatic matching of the target virtual machines to the target virtualization control console is realized, and the control of the virtual machines is more convenient.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of an embodiment of a method for controlling a virtual machine according to an embodiment of the present application;
FIG. 2 is a flowchart illustrating another embodiment of a method for controlling a virtual machine according to an embodiment of the present application;
FIG. 3 is a flowchart illustrating a control method of a virtual machine according to another embodiment of the present application;
FIG. 4 is a schematic diagram of an embodiment of a computer device provided in an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to fall within the scope of the application.
In the description of the present application, the terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more of the described features. In the description of the present application, the meaning of "a plurality" is two or more, unless explicitly defined otherwise.
In the present application, the term "exemplary" is used to mean "serving as an example, instance, or illustration. Any embodiment described as "exemplary" in this disclosure is not necessarily to be construed as preferred or advantageous over other embodiments. The following description is presented to enable any person skilled in the art to make and use the application. In the following description, details are set forth for purposes of explanation. It will be apparent to one of ordinary skill in the art that the present application may be practiced without these specific details. In other instances, well-known structures and processes have not been described in detail so as not to obscure the description of the application with unnecessary detail. Thus, the present application is not intended to be limited to the embodiments shown, but is to be accorded the widest scope consistent with the principles and features disclosed herein.
The embodiment of the application provides a control method of a virtual machine, computer equipment and a storage medium, and the control method, the computer equipment and the storage medium are respectively described in detail below.
Referring to fig. 1, fig. 1 is a flowchart illustrating an embodiment of a control method of a virtual machine according to an embodiment of the application. The control method of the virtual machine is applied to a user side (generally a web side), the user side is used for communicating with a server side, the user side is integrated with a plurality of different types of preset virtualization consoles in advance, the different types of preset virtualization consoles are often provided by different factories and used for controlling virtual machines of the different factories, and the types of the preset virtualization consoles such as a KVM (Kernel-based Virtual Machine) console, a VMware (virtual machine ware, virtual machine product) console and the like. Generally, among a plurality of preset virtualization consoles pre-integrated at a user side, only one preset virtualization console of the same kind is provided. The control method of the virtual machine may include:
101. acquiring a target virtual machine to be controlled from a plurality of preset virtual machines of a server, wherein each preset virtual machine corresponds to a preset virtual machine type;
in this embodiment, the server is provided with a plurality of preset virtual machines, each preset virtual machine corresponds to a preset virtual machine type, and a plurality of preset virtual machines of the same preset virtual machine type may exist at the same time. In general, the preset virtual machine types are generally determined based on different vendors that provide preset virtual machines, i.e., preset virtual machines of different vendors generally belong to different preset virtual machine types. Preset virtual machine types such as KVM (Kernel-based Virtual Machine ), VMware (virtual machine ware, virtual machine artifacts), etc.
The target virtual machine to be controlled is selected by a user, for example, the user side can display a list of a plurality of preset virtual machines of the server side, so that the user can select the target virtual machine to be controlled from the list.
102. Acquiring a preset virtual machine type corresponding to a target virtual machine and taking the preset virtual machine type as the target virtual machine type;
in this embodiment, the list of the plurality of preset virtual machines displayed on the user side further includes a preset virtual machine type corresponding to each preset virtual machine, so after the user selects the target virtual machine to be controlled, the user side may directly obtain the preset virtual machine type corresponding to the target virtual machine and use the preset virtual machine type as the target virtual machine type.
103. The target virtual machine type is sent to the server side, so that the server side feeds back a target access address of a target virtualization control console corresponding to the target virtual machine type;
in this embodiment, the server side stores access addresses of the virtualization consoles corresponding to the preset virtual machine types in advance. In general, the preset virtual machines and the virtualization consoles corresponding to the same preset virtual machine type are provided by the same manufacturer, so that the virtualization consoles corresponding to the preset virtual machine types can be determined based on the preset virtual machine types.
104. Based on the target access address, accessing a target virtualization console of the plurality of preset virtualization consoles to control the target virtual machine through the target virtualization console.
In this embodiment, since a plurality of different kinds of preset virtualization consoles are integrated in the client, the target access address is an address in the client. And accessing a target virtualization control console in a plurality of preset virtualization control consoles based on the target access address, namely automatically opening a control interface of the target virtualization control console, so that the target virtual machine is controlled by the target virtualization control console.
According to the control method of the virtual machine, the target virtual machines in the plurality of preset virtual machines are determined, and the target access address of the corresponding target virtualization control console is requested based on the type of the target virtual machine, so that the target virtualization control console is accessed, automatic matching of the target virtual machine to the target virtualization control console is realized, and the control of the virtual machine is more convenient. Moreover, through the unified server interface, the control variability of different preset virtual machines can be avoided, and the learning cost of a user is reduced.
As shown in fig. 2, on the basis of the embodiment shown in fig. 1, after obtaining the target virtual machine to be controlled in the multiple preset virtual machines of the server side, the method may further include:
201. acquiring a pre-stored default access address, wherein the default access address is the access address of a default virtualization control console in a plurality of preset virtualization control consoles;
in this embodiment, since the solution in the embodiment shown in fig. 1 needs to request, from the server, the target access address of the target virtualization console corresponding to the target virtual machine type, so that the access speed to the target virtualization console is low, in this embodiment, the default access address is stored in advance in the client, so as to improve the access speed to the target virtualization console. Wherein the default access address characterizes: more likely to be the target access address of the target virtualization console corresponding to the target virtual machine type.
202. Based on the default access address, accessing a default virtualization control console to control a target virtual machine through the default virtualization control console, so as to obtain a control feedback result, wherein the control failure result is a control failure result or a control success result;
in some embodiments, after the target virtual machine to be controlled is acquired, the default virtualization console is accessed directly based on the default access address to control the target virtual machine through the default virtualization console. Since the default access address is more likely to be the target access address of the target virtualization console corresponding to the target virtual machine type, it is more likely that the target virtual machine is directly successfully controlled by the default virtualization console. Thus accessing the default virtualization console to control the target virtual machine through the default virtualization console may further include: detecting whether the target virtual machine is successfully controlled by the default virtualization control console; if the target virtual machine is successfully controlled by the default virtualization control console, the control feedback result is a control success result, and the default virtualization control console is the target virtualization control console, so that the step 102 and subsequent steps are not required to be executed at this time, and the access speed to the target virtualization control console is improved.
In some embodiments, detecting whether the target virtual machine was successfully controlled by the default virtualization console may include: transmitting a control connection instruction through a default virtualization console; if the control connection feedback information fed back by the target virtual machine is received within the preset time, judging that the target virtual machine is successfully controlled by the default virtualization control console; if the control connection feedback information fed back by the target virtual machine is not received within the preset time, the fact that the target virtual machine is not successfully controlled through the default virtualization control console is judged, namely the control of the target virtual machine through the default virtualization control console fails.
203. And when the control feedback result is a control failure result, judging that the default virtual console is not matched with the preset virtual machine type corresponding to the target virtual machine, and executing the step of acquiring the preset virtual machine type corresponding to the target virtual machine.
In this embodiment, when the control feedback result is the control failure result, it indicates that the default virtualization console is not the target virtualization console, so that it is determined that the default virtualization console does not correspond to the preset virtual machine type corresponding to the target virtual machine, and step 102 and subsequent steps are performed to implement control over the target virtual machine.
It can be seen that the embodiment of the application improves the control efficiency of the target virtual machine by presetting the default virtualization control console which is more likely to be matched with the target virtual machine to be controlled.
As shown in fig. 3, the manner of determining the default access address is described on the basis of the embodiment shown in fig. 2. Specifically, before the target virtual machine to be controlled is acquired in the plurality of preset virtual machines of the server side, the method may further include:
301. acquiring the times of each preset virtualization control console used for virtual machine control in a preset historical time period;
in this embodiment, the preset history period may be set based on actual demand. The number of times that the preset virtualization console is used for virtual machine control, that is, the number of times that the preset virtualization console successfully controls the preset virtual machine of the server.
302. Determining the use probability of each preset virtualization control console based on the times;
in some embodiments, determining the probability of use for each preset virtualization console based on the number of times may include: counting the total times of all preset virtualization consoles in the user side, which are used for virtual machine control in a preset historical time period; and taking the percentage between the number of times that each preset virtualization control console is used for virtual machine control and the total number of times in a preset historical time period as the use probability of each preset virtualization control console.
In some embodiments, to improve the matching success rate of the default virtualization console and the target virtual machine to be controlled, determining the usage probability of each preset virtualization console based on the number of times may include: acquiring a preset virtualization control console which is used for virtual machine control for the last time from a current time point from a plurality of preset virtualization control consoles of a user side, and taking the preset virtualization control consoles as a first control console; correcting the number of times of the first control console by adopting a preset correction value to obtain the corrected number of times of the first control console, wherein the corrected number of times is larger than the number of times before correction; determining the use frequency of each preset virtualization control console based on the corrected times of the first control console and the times of each preset virtualization control console except the first control console; based on the frequency of use, a probability of use for each preset virtualization console is determined.
In a further embodiment, determining the frequency of use of each preset virtualization console based on the corrected number of times of the first console, the number of times of each preset virtualization console other than the first console may include: calculating the sum of the corrected times of the first control console and the times of each preset virtualization control console except the first control console in the user side to obtain the corrected total times; taking the percentage between the corrected times and the corrected total times of the first control console as the use probability of the first control console; and taking the percentage between the times of each preset virtualization control console except the first control console and the corrected total times in the user side as the use probability of each preset virtualization control console except the first control console, thereby obtaining the use frequency of each preset virtualization control console.
In a further embodiment, to improve the matching success rate of the default virtualization console and the target virtual machine to be controlled, determining the usage probability of each preset virtualization console based on the usage frequency may include: acquiring preset virtual machine types corresponding to each preset virtualization control console; determining the number of preset virtual machines of preset virtual machine types corresponding to each preset virtualization control console in a plurality of preset virtual machines of a server, wherein the preset virtual machine types comprise a first type and a second type, and the number of the preset virtual machines of the first type is 5, and the number of the preset virtual machines of the second type is 6; determining the frequency of use weight of each preset virtual control console based on the number of preset virtual machines of the preset virtual machine types corresponding to each preset virtual control console, for example, normalizing the number of preset virtual machines of the preset virtual machine types corresponding to each preset virtual control console to obtain the frequency of use weight of each preset virtual control console; and weighting the use frequency of each preset virtualization control console by adopting the use frequency weight of each preset virtualization control console to obtain the use probability of each preset virtualization control console. When the frequency of use of each preset virtualization console is weighted by using the frequency of use weight of each preset virtualization console, specifically, the frequency of use of the same preset virtualization console is weighted by using the frequency of use weight of the same preset virtualization console.
303. Determining a default virtualization control console from a plurality of preset virtualization control consoles based on the use probability;
in some embodiments, determining a default virtualization console from among a plurality of preset virtualization consoles based on the probability of use may include: and taking the preset virtualization control console with the highest probability of use as a default virtualization control console.
In some embodiments, determining a default virtualization console from among a plurality of preset virtualization consoles based on the probability of use may include: sequencing a plurality of preset virtualization consoles according to the use probability from large to small to obtain a console sequence; and taking a preset number of preset virtualization consoles which are arranged at the front in the console sequence as a plurality of default virtualization consoles, namely, a plurality of default virtualization consoles arranged in the user side exist at the same time. The preset number may be set based on actual requirements.
304. And storing the access address of the default virtualization control console as a default access address.
In some embodiments, for a case that there are multiple default virtualization consoles set in the user side at the same time, storing the access address of the default virtualization consoles as the default access address may include: determining access priority of each default virtualization console based on the ranking of each default virtualization console in the console sequence, wherein the higher the ranking of the default virtualization console in the console sequence is, the higher the access priority of the default virtualization console is; taking the access priority of each default virtualization control station as the address priority of the access address of each default virtualization control station, wherein the higher the access priority of the default virtualization control station is, the higher the address priority of the access address is; and taking the access address of each default virtualization control station as each default access address, and storing the access address of each default virtualization control station in association with the address priority of the access address of each default virtualization control station. In the association storage, the same default access address and the address priority of the default access address are stored in a one-to-one association.
In a further embodiment, accessing the default virtualization console based on the default access address to control the target virtual machine through the default virtualization console to obtain the control feedback result may include: based on each default access address, sequentially accessing each default virtualization control console according to the address priority stored in the association of each default access address, sequentially controlling the target virtual machine through each default virtualization control console, taking the default access address comprising a first address and a second address, wherein the address priority stored in the association of the first address is higher than the address priority stored in the association of the second address as an example, firstly accessing the default virtualization control console of the first address based on the first address, controlling the target virtual machine through the default virtualization control console of the first address, detecting whether the default virtualization control console of the first address successfully controls the target virtual machine, and secondly accessing the default virtualization control console of the second address based on the second address if the control of the default virtualization control console of the first address fails, controlling the target virtual machine through the default virtualization control console of the second address, and then detecting whether the default virtualization control console of the second address successfully controls the target virtual machine; and in the process of sequentially accessing each default virtualization control console to sequentially control the target virtual machine through each default virtualization control console, if the control of the target virtual machine through each default virtualization control console fails, judging that the control feedback result is a control failure result. If the target virtual machine is successfully controlled by any default virtualization control console, judging that the control feedback result is a control success result, and not executing the step of accessing other follow-up default virtualization control consoles to sequentially control the target virtual machine by the other follow-up default virtualization control consoles. It can be seen that, in this embodiment, a plurality of default virtualization consoles that are more likely to match with the target virtual machine to be controlled are preset, so that the control efficiency of the target virtual machine is improved.
In addition to the above description of the control method for a virtual machine, an embodiment of the present application further provides a computer device, where the computer device includes:
one or more processors;
a memory; and
one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the processor to perform the steps of any of the above-described embodiments of the method of controlling a virtual machine.
As shown in fig. 4, a schematic structural diagram of a computer device according to an embodiment of the present application is shown, specifically:
the computer device may include one or more processors 401 of a processing core, a storage unit 402 of one or more computer readable storage media, a power supply 403, and an input unit 404, among other components. Those skilled in the art will appreciate that the computer device structure shown in FIG. 4 is not limiting of the computer device and may include more or fewer components than shown, or may be combined with certain components, or a different arrangement of components. Wherein:
the processor 401 is a control center of the computer device, connects respective portions of the entire computer device using various interfaces and lines, and performs various functions of the computer device and processes data by running or executing software programs and/or modules stored in the storage unit 402 and calling data stored in the storage unit 402, thereby performing overall monitoring of the computer device. Optionally, processor 401 may include one or more processing cores; preferably, the processor 401 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, an application program, etc., and the modem processor mainly processes wireless communication. It will be appreciated that the modem processor described above may not be integrated into the processor 401.
The storage unit 402 may be used to store software programs and modules, and the processor 401 executes various functional applications and data processing by running the software programs and modules stored in the storage unit 402. The storage unit 402 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required for at least one function, and the like; the storage data area may store data created according to the use of the computer device, etc. In addition, the storage unit 402 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory unit 402 may also include a memory controller to provide the processor 401 with access to the memory unit 402.
The computer device further comprises a power supply 403 for supplying power to the various components, preferably the power supply 403 may be logically connected to the processor 401 by a power management system, so that functions of charge, discharge, and power consumption management may be performed by the power management system. The power supply 403 may also include one or more of any of a direct current or alternating current power supply, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
The computer device may also include an input unit 404, which input unit 404 may be used to receive input numeric or character information and to generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.
Although not shown, the computer device may further include a display unit or the like, which is not described herein. In particular, in the embodiment of the present application, the processor 401 in the computer device loads executable files corresponding to the processes of one or more application programs into the storage unit 402 according to the following instructions, and the processor 401 executes the application programs stored in the storage unit 402, so as to implement various functions, as follows:
acquiring a target virtual machine to be controlled from a plurality of preset virtual machines of a server, wherein each preset virtual machine corresponds to a preset virtual machine type; acquiring a preset virtual machine type corresponding to a target virtual machine and taking the preset virtual machine type as the target virtual machine type; the target virtual machine type is sent to the server side, so that the server side feeds back a target access address of a target virtualization control console corresponding to the target virtual machine type; based on the target access address, accessing a target virtualization console of the plurality of preset virtualization consoles to control the target virtual machine through the target virtualization console.
According to the control method of the virtual machine, the target virtual machines in the plurality of preset virtual machines are determined, and the target access address of the corresponding target virtualization control console is requested based on the type of the target virtual machine, so that the target virtualization control console is accessed, automatic matching of the target virtual machine to the target virtualization control console is realized, and the control of the virtual machine is more convenient.
To this end, embodiments of the present application provide a computer-readable storage medium, which may include: read Only Memory (ROM), random access Memory (RAM, random Access Memory), magnetic or optical disk, and the like. The computer readable storage medium stores a plurality of instructions that can be loaded by a processor to perform the steps in any of the virtual machine control methods provided by the embodiments of the present application. For example, the instructions may perform the steps of:
acquiring a target virtual machine to be controlled from a plurality of preset virtual machines of a server, wherein each preset virtual machine corresponds to a preset virtual machine type; acquiring a preset virtual machine type corresponding to a target virtual machine and taking the preset virtual machine type as the target virtual machine type; the target virtual machine type is sent to the server side, so that the server side feeds back a target access address of a target virtualization control console corresponding to the target virtual machine type; based on the target access address, accessing a target virtualization console of the plurality of preset virtualization consoles to control the target virtual machine through the target virtualization console.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and for parts of one embodiment that are not described in detail, reference may be made to related descriptions of other embodiments.
The above describes in detail a control method, a computer device and a storage medium of a virtual machine provided by the embodiments of the present application, and specific examples are applied to illustrate the principles and implementations of the present application, where the descriptions of the above embodiments are only used to help understand the method and core ideas of the present application; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in light of the ideas of the present application, the present description should not be construed as limiting the present application.

Claims (10)

1. A method for controlling a virtual machine, the method comprising:
acquiring a target virtual machine to be controlled from a plurality of preset virtual machines of a server, wherein each preset virtual machine corresponds to a preset virtual machine type;
acquiring a preset virtual machine type corresponding to the target virtual machine and taking the preset virtual machine type as the target virtual machine type;
the target virtual machine type is sent to the server side, so that the server side feeds back a target access address of a target virtualization control console corresponding to the target virtual machine type;
and accessing the target virtualization control console in a plurality of preset virtualization control consoles based on the target access address so as to control the target virtual machine through the target virtualization control console.
2. The method for controlling a virtual machine according to claim 1, wherein after obtaining a target virtual machine to be controlled in the plurality of preset virtual machines at the server, further comprises:
acquiring a pre-stored default access address, wherein the default access address is the access address of a default virtualization console in a plurality of preset virtualization consoles;
accessing the default virtualization control console based on the default access address to control the target virtual machine through the default virtualization control console to obtain a control feedback result, wherein the control failure result is a control failure result or a control success result;
and when the control feedback result is a control failure result, judging that the default virtualization control console is not matched with the preset virtual machine type corresponding to the target virtual machine, and executing the step of acquiring the preset virtual machine type corresponding to the target virtual machine.
3. The method for controlling a virtual machine according to claim 2, wherein before obtaining a target virtual machine to be controlled in the plurality of preset virtual machines at the server, the method further comprises:
acquiring the times of each preset virtualization control console used for virtual machine control in a preset historical time period;
determining the use probability of each preset virtualization control console based on the times;
determining the default virtualization control console from a plurality of preset virtualization control consoles based on the use probability;
and storing the access address of the default virtualization control console as the default access address.
4. The method for controlling a virtual machine according to claim 3, wherein determining the use probability of each of the preset virtualization consoles based on the number of times comprises:
acquiring a preset virtualization control console which is used for virtual machine control the last time from a current time point, and taking the preset virtualization control console as a first control console;
correcting the times of the first control console by adopting a preset correction value to obtain corrected times of the first control console;
determining a frequency of use of each preset virtualization console based on the corrected times of the first console, the times of each preset virtualization console other than the first console;
and determining the use probability of each preset virtualization control console based on the use frequency.
5. The method for controlling a virtual machine according to claim 4, wherein determining a use probability of each of the preset virtualization consoles based on the use frequency comprises:
acquiring a preset virtual machine type corresponding to each preset virtualization control console;
determining the number of preset virtual machines of the preset virtual machine types corresponding to each preset virtualization control console in a plurality of preset virtual machines of the server;
determining the frequency weight of use of each preset virtualization control console based on the number of preset virtual machines of the preset virtual machine types corresponding to each preset virtualization control console;
and weighting the frequency of use of each preset virtualization control console by adopting the frequency weight of use of each preset virtualization control console to obtain the probability of use of each preset virtualization control console.
6. The method for controlling a virtual machine according to claim 3, wherein the determining the default virtualization console from among the plurality of preset virtualization consoles based on the usage probability comprises:
sequencing a plurality of preset virtualization consoles according to the use probability from large to small to obtain a console sequence;
and taking a preset number of preset virtualization consoles which are arranged at the front in the console sequence as a plurality of default virtualization consoles.
7. The method for controlling a virtual machine according to claim 6, wherein storing the access address of the default virtualization console as the default access address comprises:
determining access priorities of the default virtualization consoles based on the ranking of the default virtualization consoles in the console sequence;
taking the access priority of each default virtualization control station as the address priority of the access address of each default virtualization control station;
and taking the access address of each default virtualization control console as each default access address, and storing the access address of each default virtualization control console in association with the address priority of the access address of each default virtualization control console.
8. The method for controlling a virtual machine according to claim 7, wherein accessing the default virtualization console based on the default access address to control the target virtual machine through the default virtualization console, to obtain a control feedback result, comprises:
based on the default access addresses, sequentially accessing the default virtualization consoles according to the address priorities stored in association with the default access addresses, so as to sequentially control the target virtual machines through the default virtualization consoles;
and in the process of sequentially accessing each default virtualization control console to sequentially control the target virtual machine through each default virtualization control console, if the control of the target virtual machine through each default virtualization control console fails, judging that the control feedback result is a control failure result.
9. A computer device, the computer device comprising:
one or more processors;
a memory; and
one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the processor to implement the steps in the method of controlling a virtual machine of any of claims 1 to 8.
10. A computer-readable storage medium, characterized in that a computer program is stored thereon, which computer program is loaded by a processor to perform the steps in the control method of a virtual machine according to any one of claims 1 to 8.
CN202310837556.5A 2023-07-10 2023-07-10 Control method of virtual machine, computer equipment and storage medium Active CN116594739B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310837556.5A CN116594739B (en) 2023-07-10 2023-07-10 Control method of virtual machine, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310837556.5A CN116594739B (en) 2023-07-10 2023-07-10 Control method of virtual machine, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN116594739A true CN116594739A (en) 2023-08-15
CN116594739B CN116594739B (en) 2023-10-10

Family

ID=87604733

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310837556.5A Active CN116594739B (en) 2023-07-10 2023-07-10 Control method of virtual machine, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116594739B (en)

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110161482A1 (en) * 2008-08-22 2011-06-30 Bonola Thomas J Remote graphics console and virtual media access to virtual machine guests
US20130307970A1 (en) * 2012-05-15 2013-11-21 Ca, Inc. Agentless recording for virtual machine consoles
CN103645957A (en) * 2013-12-25 2014-03-19 北京搜狐新媒体信息技术有限公司 Resource management and control method for virtual machines, and resource management and control device for virtual machines
US20140258446A1 (en) * 2013-03-07 2014-09-11 Citrix Systems, Inc. Dynamic configuration in cloud computing environments
CN104735071A (en) * 2015-03-27 2015-06-24 浪潮集团有限公司 Network access control implementation method between virtual machines
US9183059B1 (en) * 2012-06-01 2015-11-10 Wyse Technology L.L.C. VM client administrative interface for virtual machine instantiation allows a user to select from a subset of predetermined available resources assigned to the user
CN105389198A (en) * 2015-10-16 2016-03-09 浪潮(北京)电子信息产业有限公司 Automatic reconnection method and device of virtual machine console
WO2019080010A1 (en) * 2017-10-25 2019-05-02 深圳市互盟科技股份有限公司 Cloud computing-based virtual machine control system and method therefor
US20200174818A1 (en) * 2017-06-27 2020-06-04 New H3C Cloud Technologies Co., Ltd. Virtual machine management
CN113821302A (en) * 2021-08-30 2021-12-21 济南浪潮数据技术有限公司 Method and device for deploying virtual machine on virtualization cloud platform, electronic equipment and medium
CN115185643A (en) * 2022-07-22 2022-10-14 地平线征程(杭州)人工智能科技有限公司 Access control method and device, computer readable storage medium and electronic equipment
CN115344889A (en) * 2022-08-19 2022-11-15 济南浪潮数据技术有限公司 Console access method, device, equipment and medium for virtual machine

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110161482A1 (en) * 2008-08-22 2011-06-30 Bonola Thomas J Remote graphics console and virtual media access to virtual machine guests
US20130307970A1 (en) * 2012-05-15 2013-11-21 Ca, Inc. Agentless recording for virtual machine consoles
US9183059B1 (en) * 2012-06-01 2015-11-10 Wyse Technology L.L.C. VM client administrative interface for virtual machine instantiation allows a user to select from a subset of predetermined available resources assigned to the user
US20140258446A1 (en) * 2013-03-07 2014-09-11 Citrix Systems, Inc. Dynamic configuration in cloud computing environments
CN103645957A (en) * 2013-12-25 2014-03-19 北京搜狐新媒体信息技术有限公司 Resource management and control method for virtual machines, and resource management and control device for virtual machines
CN104735071A (en) * 2015-03-27 2015-06-24 浪潮集团有限公司 Network access control implementation method between virtual machines
CN105389198A (en) * 2015-10-16 2016-03-09 浪潮(北京)电子信息产业有限公司 Automatic reconnection method and device of virtual machine console
US20200174818A1 (en) * 2017-06-27 2020-06-04 New H3C Cloud Technologies Co., Ltd. Virtual machine management
WO2019080010A1 (en) * 2017-10-25 2019-05-02 深圳市互盟科技股份有限公司 Cloud computing-based virtual machine control system and method therefor
CN113821302A (en) * 2021-08-30 2021-12-21 济南浪潮数据技术有限公司 Method and device for deploying virtual machine on virtualization cloud platform, electronic equipment and medium
CN115185643A (en) * 2022-07-22 2022-10-14 地平线征程(杭州)人工智能科技有限公司 Access control method and device, computer readable storage medium and electronic equipment
CN115344889A (en) * 2022-08-19 2022-11-15 济南浪潮数据技术有限公司 Console access method, device, equipment and medium for virtual machine

Also Published As

Publication number Publication date
CN116594739B (en) 2023-10-10

Similar Documents

Publication Publication Date Title
US10120676B2 (en) Method of updating baseboard management controller firmware for fan speed control
CN101989212B (en) Method and device for providing virtual machine management program for starting blade server
EP1734436A1 (en) Automatically controlling processor mode of multi-core processor
CN111190739B (en) Resource allocation method and device, electronic equipment and storage medium
CN116594739B (en) Control method of virtual machine, computer equipment and storage medium
CN117033144B (en) Remote inspection method, equipment and medium for server
CN113411225A (en) QGA service management method, device, equipment and medium based on cloud host
CN110134454B (en) Method and device for starting application program
CN114911332B (en) Method and system for regulating and controlling server fan, electronic equipment and storage medium
CN114816766B (en) Computing resource allocation method and related components thereof
US9348667B2 (en) Apparatus for managing application program and method therefor
CN113075992B (en) Memory power-on method, device, equipment and computer readable storage medium
US20140189342A1 (en) Method for controlling registration of input device in input handler instance, terminal and storage device
CN114090054A (en) Intelligent equipment upgrading method and device, storage medium and electronic equipment
CN111130863A (en) Virtual network card management method, system, equipment and computer storage medium
CN114764353B (en) ML to ML orchestration system and method for Information Handling System (IHS) all system optimization
CN116991636B (en) Data incremental backup method, system and storage medium based on distributed storage
CN116974859A (en) Display method of stored information, computer equipment and storage medium
CN115899973A (en) Signal adjusting method and device of air conditioning system communication device and air conditioning system
CN117230626A (en) Clothes drying control method and device, dryer and storage medium
CN114827302A (en) Communication protocol adaptation method, device, equipment and storage medium
CN117632371A (en) Memory optimization method, device, equipment and storage medium
CN115897127A (en) Washing machine control method and device, computer equipment and storage medium
CN117663380A (en) Air conditioner control method, device, medium and air conditioner equipment
CN117149613A (en) Use case grouping method, device, computer equipment and storage 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
GR01 Patent grant
GR01 Patent grant