CN117453242A - Application updating method of virtual machine, computing equipment and computing system - Google Patents

Application updating method of virtual machine, computing equipment and computing system Download PDF

Info

Publication number
CN117453242A
CN117453242A CN202311282395.4A CN202311282395A CN117453242A CN 117453242 A CN117453242 A CN 117453242A CN 202311282395 A CN202311282395 A CN 202311282395A CN 117453242 A CN117453242 A CN 117453242A
Authority
CN
China
Prior art keywords
application
virtual machine
target virtual
updated
update
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
CN202311282395.4A
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.)
XFusion Digital Technologies Co Ltd
Original Assignee
XFusion Digital Technologies 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 XFusion Digital Technologies Co Ltd filed Critical XFusion Digital Technologies Co Ltd
Priority to CN202311282395.4A priority Critical patent/CN117453242A/en
Publication of CN117453242A publication Critical patent/CN117453242A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • 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

Abstract

The embodiment of the application updating method, the computing device and the computing system for the virtual machine relate to the technical field of servers and can improve the success rate of application updating in the virtual machine. The method comprises the following steps: responding to an application update request, and sending an application identifier of an application to be updated to a target virtual machine through a virtual serial port by a host machine, wherein the target virtual machine is a virtual machine which operates on the host machine and needs to be updated by the application; the target virtual machine adds an update package of the application to be updated in the host machine to a file system of the target virtual machine; and the target virtual machine updates the application to be updated based on the update package.

Description

Application updating method of virtual machine, computing equipment and computing system
Technical Field
The present disclosure relates to the field of server technologies, and in particular, to an application update method, a computing device, and a computing system for a virtual machine.
Background
As is well known, a Virtual Machine (VM) is a virtual computer with an independent Operating System (OS) running on a host machine; in practical application, the version of the application software deployed on the virtual machine needs to be updated and upgraded.
The common method for updating the application on the virtual machine is that the virtual machine updates the application on the virtual machine based on network connection with the host machine; however, in a scenario without a network or an unstable network, when an application on the virtual machine is updated, the update of the application fails, thereby reducing the success rate of the update of the application.
Disclosure of Invention
The embodiment of the application updating method, the computing device and the computing system of the virtual machine are used for improving the success rate of application updating on the virtual machine.
In order to achieve the above purpose, the embodiments of the present application adopt the following technical solutions:
in a first aspect, an embodiment of the present application provides an application update method of a virtual machine, where the method includes: responding to an application update request, and sending an application identifier of an application to be updated to a target virtual machine through a virtual serial port by a host machine, wherein the target virtual machine is a virtual machine which operates on the host machine and needs to be updated by the application; the target virtual machine adds an update package of the application to be updated in the host machine to a file system of the target virtual machine; and the target virtual machine updates the application to be updated based on the update package.
The application of the application updating method of the virtual machine comprises the steps that a host machine sends an application identifier of an application to be updated to a target virtual machine needing to be updated on the host machine through a virtual serial port; and adding the update of the application to be updated in the host machine to a file system of the target virtual machine by the target virtual machine, and finally, updating the application to be updated on the target virtual machine based on the update package by the target virtual machine. In the updating process, the host machine and the target virtual machine running on the host machine are communicated based on the virtual serial port, so that the problem that the updating of the application to be updated fails due to the network problem in the updating process of the application to be updated is avoided, and the success rate of updating the application to be updated on the virtual machine is improved.
In a possible implementation manner, the adding, by the target virtual machine, an update package of an application to be updated in a host to a file system of the target virtual machine includes: the target virtual machine sends a mounting notification to the host machine through the virtual serial port; the host machine responds to the mounting notification, mounts the update package to an optical drive of the target virtual machine, and sends a mounting success message to the target virtual machine through a virtual serial port; and the target virtual machine responds to the mounting success message, and adds an update package from the CD-ROM to the file system of the target virtual machine.
According to the embodiment, the host is used for mounting the update package of the application to be updated to the optical drive of the target virtual machine, and then the target virtual machine is used for adding the update package of the application to be updated to the file system of the target virtual machine from the optical drive.
In a possible implementation manner, the updating, by the target virtual machine, the application to be updated based on the update package includes:
the target virtual machine updates the application to be updated in a preset updating mode based on the updating packet; the preset updating mode comprises the following steps: incremental updates or full updates.
In a possible implementation manner, before the host machine sends the application identifier of the application to be updated to the target virtual machine through the virtual serial port in response to the application update request, the method further includes: the host receives an application update request sent by the management device, wherein the application update request comprises the following steps: the method comprises the steps of identifying a target virtual machine and identifying an application to be updated, wherein the application update request is a request generated by the management device in response to target operation input by a user.
In the above embodiment, the user may update the application on the virtual machine in the host machine managed by the management device, and compared with the manner that the user triggers the update flow of the application to be updated on the target virtual machine on each host machine, the update flow of the application to be updated is simplified, so that the update efficiency of the application to be updated is improved. In addition, in the above embodiment, the host may send the update result of the application to be updated in the target virtual machine to the management device, so that the user may learn, through the management device, the update result of the application on the virtual machine in the host managed by the management device in time, thereby improving the user experience.
In a possible implementation manner, the updating, by the target virtual machine, the application to be updated based on the update package includes:
the target virtual machine obtains a preset updating strategy from the host machine through the virtual serial port, wherein the preset updating strategy comprises the following steps: any one of a real-time update strategy, a timing update strategy, a polling update strategy and a parallel update strategy; the target virtual machine updates the application to be updated based on the update package and a preset update strategy;
in a possible implementation manner, before the target virtual machine adds an update package of an application to be updated in a host machine to a file system of the target virtual machine, the method further includes: the target virtual machine determines whether the target virtual machine meets preset conditions; wherein, the preset condition includes: the unused rate of the processor in the target virtual machine is greater than or equal to a first threshold; and/or, the unused rate of the memory in the target virtual machine is greater than or equal to a second threshold; and/or the unused rate of the hard disk in the target virtual machine is greater than or equal to a third threshold; the target virtual machine adds an update package of an application to be updated in a host machine to a file system of the target virtual machine, and the method comprises the following steps: and under the condition that the target virtual machine meets the target preset condition, the target virtual machine adds an update package of the application to be updated in the host machine to a file system of the target virtual machine.
Before updating the application to be updated on the target virtual machine, the embodiment determines whether to update the application to be updated on the target virtual machine by judging whether the target virtual machine meets the preset condition; when the target virtual machine meets the preset condition (namely, the target virtual machine is in a healthy state), updating the application to be updated on the target virtual machine; when the target virtual machine does not meet the preset condition (namely, the target virtual machine is in a non-healthy state), the application to be updated on the target virtual machine is not updated, so that the problem that the application to be updated on the target virtual machine fails to be updated due to the healthy state of the target virtual machine is avoided, and the success rate of updating the application to be updated on the virtual machine is improved.
In a possible implementation manner, in case that the application to be updated fails to be updated, the method further includes: the method comprises the steps that a target virtual machine obtains the number of times of update failure of an application to be updated; under the condition that the number of times of update failure is smaller than the preset number of times of failure, the target virtual machine updates the application to be updated which fails to update again based on the update package; and under the condition that the update failure times are equal to the preset failure times, the target virtual machine determines that the update of the application to be updated fails and rolls back the application to be updated to the version before the update.
Under the condition that the update of the application to be updated fails, when the update failure frequency of the application to be updated is smaller than the preset failure frequency, the application to be updated is updated again until the update of the application to be updated is successful or until the update failure frequency of the application to be updated is larger than or equal to the preset failure frequency, so that the fault tolerance of the application to be updated is improved.
In a possible implementation manner, the method further includes: and the target virtual machine sends the update result of the application to be updated to the host machine through the virtual serial port.
According to the embodiment, the updating result is sent to the host machine, so that a user can timely acquire the updating result of the application to be updated in the target virtual machine through the host machine, and timely process the application to be updated which fails to be updated, and the user experience is improved.
In a possible implementation manner, the sending, by the host machine, an application identifier of an application to be updated to a target virtual machine through a virtual serial port includes: and the application updating service running in the host machine sends the application identifier of the application to be updated to the daemon service running in the target virtual machine through the virtual serial port.
In a second aspect, an embodiment of the present application provides an application update apparatus, where the application update apparatus includes a transceiver unit and a processing unit; the receiving and transmitting unit is used for responding to an application updating request, sending an application identifier of an application to be updated to a target virtual machine through a virtual serial port, wherein the target virtual machine is a virtual machine which operates on a host machine and needs to be updated; the processing unit is used for adding an update package of the application to be updated in the host machine to a file system of the target virtual machine; the processing unit is further used for updating the application to be updated in the target virtual machine based on the update package.
In one possible implementation manner, the transceiver unit is configured to send a mount notification to the host through the virtual serial port; the processing unit is used for responding to the mounting notification, mounting the update package to the CD-ROM of the target virtual machine, and sending a mounting success message to the target virtual machine through the virtual serial port; the processing unit is further configured to add an update package from the optical drive to the file system of the target virtual machine in response to the mount success message.
In a possible implementation manner, the transceiver unit is configured to receive an application update request sent by the management device, where the application update request includes: the identification of the target virtual machine and the application identification of the application to be updated, the application update request is a request generated by the management device in response to the target operation input by the user.
In a possible implementation manner, the transceiver unit is configured to obtain a preset update policy from the host through the virtual serial port, where the preset update policy includes: any one of a real-time update strategy, a timing update strategy, a polling update strategy and a parallel update strategy; the processing unit is used for updating the application to be updated based on the update package and a preset update strategy.
In one possible implementation manner, the processing unit is configured to determine whether the target virtual machine meets a preset condition; the preset conditions comprise: the unused rate of the processor in the target virtual machine is greater than or equal to a first threshold; and/or, the unused rate of the memory in the target virtual machine is greater than or equal to a second threshold; and/or the unused rate of the hard disk in the target virtual machine is greater than or equal to a third threshold; the processing unit is further configured to add an update package of an application to be updated in the host to a file system of the target virtual machine if the target virtual machine meets a target preset condition.
In one possible implementation manner, the transceiver unit is configured to obtain the number of update failures of the application to be updated; the processing unit is used for updating the application to be updated which fails to update based on the update package under the condition that the number of times of update failure is smaller than the preset number of times of failure; and under the condition that the number of the update failures is equal to the preset failure number, determining that the application to be updated fails to update, and rolling back the application to be updated to the version before updating.
In one possible implementation manner, the transceiver unit is configured to send an update result of the application to be updated to the host through the virtual serial port.
In a possible implementation manner, the transceiver unit is configured to send, through the virtual serial port, an application identifier of an application to be updated to a daemon service running in the target virtual machine.
In a third aspect, a computing device is provided, the computing device comprising a processor and a memory, the memory and the processor being electrically connected; the memory is used to store program instructions that are executed by the processor to implement the method of the first aspect and its possible implementation.
In a fourth aspect, there is provided a computing system comprising: a management device and the computing device of the third aspect; the management equipment is connected with the computing equipment computer through a network; the management device is configured to send an application update request to the host, where the application update request includes: the method comprises the steps of identifying a target virtual machine and identifying an application to be updated in the target virtual machine.
In a fifth aspect, there is provided a computer readable storage medium storing computer instructions that, when executed by a computing device, cause the computing device to perform the functions of the apparatus of the first aspect and possible implementations thereof.
In a sixth aspect, there is provided a computer program product containing instructions which, when run on a computing device, cause the computing device to perform the functions of the apparatus of the first aspect and possible implementations thereof described above.
It should be appreciated that, the technical solutions of the second aspect to the sixth aspect and the corresponding possible embodiments of the present application may refer to the technical effects of the first aspect and the corresponding possible embodiments, which are not described herein.
Drawings
Fig. 1 is a schematic diagram of a management system according to an embodiment of the present application;
fig. 2 is a schematic hardware structure of a computing device according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a system architecture of a virtual machine and a CPU according to an embodiment of the present application;
fig. 4 is a flowchart of an application update method of a virtual machine according to an embodiment of the present application;
fig. 5 is a schematic view of a virtual machine management interface according to an embodiment of the present application;
fig. 6 is a second flowchart of an application update method of a virtual machine according to an embodiment of the present application;
fig. 7 is a flowchart of a method for updating an application of a virtual machine according to an embodiment of the present application;
Fig. 8 is a flowchart of an application update method of a virtual machine according to an embodiment of the present application;
fig. 9 is a flowchart fifth of an application update method of a virtual machine according to an embodiment of the present application;
FIG. 10 is a schematic diagram of a host management interface according to an embodiment of the present disclosure;
FIG. 11 is a schematic diagram of an update result interface according to an embodiment of the present application;
fig. 12 is a schematic structural diagram of an application updating device according to an embodiment of the present application.
Detailed Description
The term "and/or" is herein merely an association relationship describing an associated object, meaning that there may be three relationships, e.g., a and/or B, may represent: a exists alone, A and B exist together, and B exists alone.
The terms first and second and the like in the description and in the claims of embodiments of the present application are used for distinguishing between different objects and not necessarily for describing a particular sequential order of objects. For example, the first threshold and the second threshold, etc., are used to distinguish between different thresholds, and are not used to describe a particular order of thresholds.
In the embodiments of the present application, words such as "exemplary" or "such as" are used to mean serving as examples, illustrations, or descriptions. Any embodiment or design described herein as "exemplary" or "for example" should not be construed as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "such as" is intended to present related concepts in a concrete fashion.
In the description of the embodiments of the present application, unless otherwise indicated, the meaning of "a plurality" means two or more. For example, a plurality of hosts refers to two or more hosts.
Firstly, explaining some concepts related in an application updating method, a computing device and a computing system of a virtual machine provided in the embodiments of the present application:
virtual machine: refers to a complete computer system with complete hardware system functions that operates in a completely isolated environment through software simulation. Work that can be done in a physical computer can be done in a virtual machine. When creating a virtual machine in a computer, a part of hard disk and memory capacity of the physical machine are required to be used as the hard disk and memory capacity of the virtual machine. Each virtual machine has an independent hard disk and operating system, and can operate as if a physical machine were used.
In the background art, when updating an application on a virtual machine in a scene without a network or an unstable network, the update of the application fails, so that the success rate of the update of the application is reduced; in order to solve the problem, the embodiment of the application provides an application updating method of a virtual machine, wherein a host machine sends an application identifier of an application to be updated to a target virtual machine which needs to be updated on the host machine through a virtual serial port; and adding the update of the application to be updated in the host machine to a file system of the target virtual machine by the target virtual machine, and finally, updating the application to be updated on the target virtual machine based on the update package by the target virtual machine. In the updating process, the host machine and the target virtual machine running on the host machine are communicated based on the virtual serial port, so that the problem that the updating of the application to be updated fails due to the network problem in the updating process of the application to be updated is avoided, and the success rate of updating the application to be updated on the virtual machine is improved.
The application updating method provided by the embodiment of the application is applied to a management system shown in fig. 1; the management system includes: host 101, host 102, host 103, and management device 104.
The management device 104 is configured to send, to each of the hosts 101 and 103, an identifier of a target virtual machine running on the host and an application identifier of an application to be updated, where, taking the host 101 as an example, the target virtual machine in the host 101 is a virtual machine that needs to be updated by an application from multiple virtual machines running on the host 101. Wherein the management device 104 is respectively connected with the host machine 101 and the host machine 103 through a network; in particular, the management device 104 may be a computing device having processing capabilities such as a server, computer, or the like.
The host 101 is configured to receive an application update request sent by the management device 104, where the application update request includes: the identity of the target virtual machine in the host 101 and the application identity of the application to be updated; then, the host 101 sends the application identifier of the application to be updated to the target virtual machine through the virtual serial port between the host and the target virtual machine, so that the target virtual machine updates the application to be updated.
It should be noted that, the virtual machines (e.g., virtual machine 1012) on the host 101 are all running on the operating system of the host 101, and the virtual machine 1012 communicates with the host 101 based on virtual serial ports.
The host machine 101 is configured to run a plurality of virtual machines such as a virtual machine 1011, a virtual machine 1012, a virtual machine..and a virtual machine 101x, and the plurality of virtual machines may be virtual machines whose operating system is Windows or virtual machines whose operating system is linux. A plurality of applications exist on any one of the plurality of virtual machines; taking the virtual machine 1012 as an example, a video application, a reading application, and a music application exist on the virtual machine 1012. In particular, the host machine 101 may be a desktop computer, a notebook, a server, or the like, computing device having computing and storage capabilities.
It should be understood that, the descriptions of the host 102 and the host 103 are similar to those of the host 101, and detailed descriptions of the host 102 and the host 103 are referred to the descriptions of the host 101 and are not repeated herein.
It should be noted that, the application updating method provided in the embodiment of the present application is applied to a scenario of updating and upgrading an application of a virtual machine in the management system; the above management system is described by taking a host machine including a host machine 101 and a host machine 103 as an example, and in practical application, the management system may include at least one host machine; similarly, the management system is described by taking a host machine running a plurality of virtual machines as an example, and in practical application, the host machine may run at least one virtual machine.
Illustratively, FIG. 2 is a schematic diagram of a computing device hardware architecture of host 101, host 102, or host 103. The computing device may be a high-density server, a rack server, a high-performance server, a GPU (graphics processing unit) server, or the like.
The hardware portion of the computing device includes a processor (central processing unit, CPU), an out-of-band controller, and a memory, among others. The software portion mainly includes an out-of-band management module, and an Operating System (OS).
Wherein the out-of-band management module operates within the out-of-band controller and the OS and BIOS operate within the processor (as shown in fig. 2). The out-of-band management module may be a management unit of a non-business module. For example, the out-of-band management module may remotely maintain and manage the computing device via a dedicated data channel. The out-of-band management module is completely independent of the operating system of the computing device and may communicate with the OS through an out-of-band management interface of the computing device. Wherein, at least one virtual machine is operated in the OS, specifically comprising: virtual machine_1 to virtual machine_n.
For example, as shown in fig. 3, the system architecture between the virtual machine_1 and the CPU in the host machine for running the OS is shown, where the virtual machine_1 includes an application a, an application B, and a daemon service, and the daemon service is configured to create a virtual serial port between the virtual machine_1 and the CPU when initializing the virtual machine_1, and receive update instructions of the CPU corresponding to the application a and the application B through the virtual serial port; the daemon service is also operable to update application a and application B in response to the update instruction.
An application update service is operated in the CPU and is used for sending the update instruction to the daemon service in the virtual machine_1 through a virtual serial port; the virtual serial port is used for providing a virtual serial port channel for interaction between the virtual machine and the host machine.
By way of example, the out-of-band management module may include a management unit that calculates the operating state of the device, a management system in a management chip outside of the in-band controller, a system management module (system management mode, SMM), and the like. It should be noted that, the embodiments of the present application are not limited to the specific form of the out-of-band management module, and the above is merely exemplary.
The memory, also called internal memory or main memory, is installed in a memory slot on a motherboard of the computing device, and the memory controller communicate through a memory channel (channel).
It should be noted that, the system architecture and the application scenario described in the embodiments of the present application are for more clearly describing the technical solution of the embodiments of the present application, and do not constitute a limitation on the technical solution provided in the embodiments of the present application, and those skilled in the art can know that, with the evolution of the system architecture and the appearance of a new service scenario, the technical solution provided in the embodiments of the present application is also applicable to similar technical problems.
The embodiment of the application provides an application updating method of a virtual machine, as shown in fig. 4, the method includes: S110-S130.
And S110, responding to the application updating request, and sending an application identifier of the application to be updated to the target virtual machine by the host machine through the virtual serial port.
At least one virtual machine is operated on the host machine, and the at least one virtual machine is communicated with the host machine through a virtual serial port; wherein at least one application exists in the at least one virtual machine.
The virtual serial port is a virtual serial port channel which is created by the virtual machine during initialization and used for providing interaction between the virtual machine and the host machine.
The target virtual machine is a virtual machine that needs to update an application on the target virtual machine, for example, it is assumed that a host machine is running with a virtual machine_1 and a virtual machine_2, and when the host machine needs to update an application on the virtual machine_1, the virtual machine_1 is the target virtual machine.
When there are multiple target virtual machines in the host, and the applications to be updated of the multiple target virtual machines are the same, the host sends application identifiers of the applications to be updated to the multiple target virtual machines, respectively, so that the multiple target virtual machines execute the following S120-S130.
When a plurality of target virtual machines exist in the host machine and the corresponding applications to be updated in the target virtual machines are different; the host machine sends application identifiers of the respective corresponding applications to be updated to the plurality of target virtual machines, respectively, so that the plurality of target virtual machines execute the following S120-S130 based on the application identifiers of the respective corresponding applications to be updated.
For example, assuming that a host machine runs with a virtual machine_1 and a virtual machine_2, when the host machine needs to update an application a in the virtual machine_1 and an application B in the virtual machine_2, the virtual machine_1 and the virtual machine_2 are both target virtual machines, and at this time, the host machine sends an application identifier of the application a to the virtual machine_1 and an application identifier of the application B to the virtual machine_2.
It should be noted that, the application update request is a request triggered after a user designates a target virtual machine on the host machine and an application to be updated on the target virtual machine, for indicating to update the application to be updated on the target virtual machine.
In one implementation, the application update request is a request triggered after a user designates a target virtual machine on a host machine and an application to be updated on the target virtual machine; the method specifically comprises the following steps: the user accesses a virtual machine management interface on the host machine, and triggers the application update request after selecting a target virtual machine and an application to be updated on the target virtual machine in the virtual machine management interface; the virtual machine management interface comprises all virtual machines running on the host machine and all applications on each virtual machine in all the virtual machines.
For example, assume that a virtual machine management interface is shown in fig. 5, which includes virtual machine_1 to virtual machine_4 running on a host machine; wherein, each of the virtual machine_1 to the virtual machine_3 comprises an application A and an application B, and each of the virtual machine_4 comprises an application B and an application C. After a user selects an application A in the virtual machine_1, an application B in the virtual machine_3 and an application B and an application C in the virtual machine_4 on the interface, clicking an update button to trigger an application update request, wherein the request comprises an identification of a target virtual machine and an application identification of an application to be updated; the host machine obtains the identification of the target virtual machine (namely, virtual machine_1, virtual machine_3 and virtual machine_4) appointed by the user and the application identification of the application to be updated corresponding to the target virtual machine; namely; the application to be updated of the virtual machine_1 is an application A, the application to be updated of the virtual machine_3 is an application B, and the application to be updated of the virtual machine_4 is an application B and an application C. Then, the host sends the application identifier of the application a to the virtual machine_1, the application identifier of the application B to the virtual machine_3, and the application identifiers of the application B and the application C to the virtual machine_4.
In another implementation manner, the application update request is a request sent by the management device to the host machine after the user designates the target virtual machine and the application to be updated on the management device; the management device is a device for managing the host, and the specific implementation process of the management device is shown in S310-S330, which are not described herein.
Optionally, an application update service is run in the host, and a daemon service is run in each virtual machine in the at least one virtual machine; when the virtual machine where the daemon service is located starts, the virtual serial port is created. The daemon service in each virtual machine interacts with the application update service in the host machine based on the virtual serial port; based on this, the implementation manner of S110 includes: and the application updating service running in the host machine sends the application identification of the application to be updated to the daemon service running in the target virtual machine through the virtual serial port.
It should be noted that, the application update service may be an independent application in the host machine, or may be a functional module in an application (such as VMtools) in the host machine; similarly, the daemon service in the virtual machine may be an independent application or process, or may be a functional module in an application or process (e.g., internal daemon-gum-agent, qga) in the virtual machine.
S120, the target virtual machine adds an update package of the application to be updated in the host machine to a file system of the target virtual machine.
It should be noted that, the update package may be stored in the host machine in advance by the user, or may be sent to the host machine by the management device, and in this embodiment of the present application, the method for obtaining the update package is not limited.
In one implementation manner, the implementation manner of S120 is based on an optical drive of the target virtual machine, and the update package is added to a file system of the target virtual machine, as shown in fig. 6 in conjunction with fig. 4, and the specific implementation process includes: s120a-S120d.
S120a, the target virtual machine sends a mounting notification to the host machine through the virtual serial port.
The mounting notification is used for indicating the host to mount the update package of the application to be updated in the target virtual machine to the CD-ROM of the target virtual machine.
And S120b, the host machine responds to the mounting notification to mount the update package of the application to be updated to the CD-ROM of the target virtual machine.
The specific implementation of S120b includes: the host converts the update package of the application to be updated into an image file (simply referred to as the image file of the update package), and then executes a mount command to mount the image file of the update package into a directory (such as dev/sr 0) corresponding to the CD-ROM of the target virtual machine.
S120c, the host machine sends a successful mounting message to the target virtual machine through the virtual serial port.
The successful message is used to instruct the host to mount the update package to the file directory corresponding to the CD-ROM of the target virtual machine.
And S120d, the target virtual machine responds to the successful mounting message, and an update package of the application to be updated is added into a file system of the target virtual machine from an optical drive of the target virtual machine.
The specific implementation manner of S120d may be that the target virtual machine copies the update package in the optical drive to a file system of the target virtual machine (e.g., a home file directory in the file system) based on a copy command; the target virtual machine may mount the update package in the optical drive to a file system of the target virtual machine based on the mount command. The implementation manner of S120d is not limited in the specific embodiment of the present application.
According to the embodiment, the host is used for mounting the update package of the application to be updated to the optical drive of the target virtual machine, and then the target virtual machine is used for adding the update package of the application to be updated to the file system of the target virtual machine from the optical drive.
In another implementation manner, the implementation manner of S120 is to add the update package to the file system of the target virtual machine based on the shared folder between the target virtual machine and the host machine, and in conjunction with fig. 4, as shown in fig. 7, the specific implementation process includes: S120A-S120D.
S120A, the target virtual machine sends an adding notification to the host machine through the virtual serial port.
The addition notification is used for indicating the host to add the update package to a shared folder, wherein the shared folder is a folder which is visible to both the host and the target virtual machine and can be subjected to read-write operation.
And S120B, the host responds to the addition notice to add the update package of the application to be updated to the shared folder.
The specific implementation of S120B may be that the host executes a mount command to mount the update package in the shared folder; the host may execute copy command to copy the update package to the shared folder.
S120C, the host machine sends an addition success message to the target virtual machine through the virtual serial port.
And S120D, the target virtual machine responds to the adding success message, and an update package of the application to be updated is added from the shared file to a file system of the target virtual machine.
It should be noted that, the implementation of the above-mentioned S120C-S120D is similar to that of S120C-S120D, and specific descriptions of S120C-S120D may refer to the above-mentioned related descriptions of S120C-S120D, which are not repeated here.
And S130, the target virtual machine updates the application to be updated based on the update package of the application to be updated.
In one implementation manner, the specific implementation of S130 includes: the target virtual machine updates the application to be updated in a preset updating mode based on an updating packet of the application to be updated; the preset updating mode comprises the following steps: incremental updates or full updates.
The incremental updating is to update the application to be updated based on the difference between the updating package and the application to be updated; the full-volume update is that a target virtual machine firstly uninstalls an application to be updated in the target virtual machine, and then installs the application in an update package of the application to be updated.
It should be noted that, the preset updating manner may be configured in the target virtual machine by the user through the host, or may be sent to the target virtual machine by the management device through the host, and in this embodiment of the present application, the acquiring manner of the preset updating manner is not limited.
In another implementation manner, the specific implementation of S130 includes: and the target virtual machine updates the application to be updated based on the update package of the application to be updated and a preset update strategy. The preset updating strategy comprises the following steps: a real-time update policy, a timed update policy, a polling update policy, or a parallel update policy.
It should be noted that, the preset update policy may be configured in the target virtual machine by the user through the host, or may be sent by the management device to the target virtual machine through the host, and in this embodiment of the present application, the method for obtaining the preset update policy is not limited.
The real-time update policy is used for indicating a policy that when an update package of an application to be updated is added to a file system of a target virtual machine, the target virtual machine immediately updates the application to be updated based on the update package.
The above-mentioned timing update policy is used to indicate a policy that, after adding an update package of an application to be updated to a file system of a target virtual machine, the target virtual machine updates the application to be updated based on the update package only at a preset time point. For example: assuming that the preset time point is 0 point; then, when the target virtual machine acquires the update package at 18 points, the application to be updated is not updated; only when the point reaches 0, the target virtual machine updates the application to be updated based on the update package.
The polling update strategy is used for indicating a strategy that the target virtual machine sequentially updates each application to be updated according to the arrangement sequence of the plurality of applications to be updated under the condition that the plurality of applications to be updated exist in the target virtual machine. For example: assume that the application to be updated present in the target virtual machine includes: application 1 to application 3; at this time, the target virtual machine updates the application 1, updates the application 2 after the update of the application 1 is completed, and updates the application 3 after the update of the application 2 is completed.
The parallel update policy is used for representing a policy that the target virtual machine updates at least two applications to be updated in the plurality of applications to be updated at the same time when the plurality of applications to be updated exist in the target virtual machine.
The method includes the steps that an example is given, 8 applications to be updated exist in a target virtual machine A, and a preset updating strategy of the target virtual machine A is a parallel updating strategy; at this time, the target virtual machine creates a thread pool, and the number of available threads in the thread pool is 4; then, the target virtual machine a allocates an application to be updated to each available thread in the thread pool, so that the target virtual machine a updates the allocated application to be updated. When an idle thread appears in the 4 threads (i.e. the thread has completed updating the allocated applications to be updated), the target virtual machine allocates the 5 th application to be updated (i.e. any one of the applications to be updated which are not updated) to the idle thread, and reciprocates in sequence until the 8 applications to be updated are all completed updating.
The application of the application updating method of the virtual machine comprises the steps that a host machine sends an application identifier of an application to be updated to a target virtual machine needing to be updated on the host machine through a virtual serial port; and adding the update of the application to be updated in the host machine to a file system of the target virtual machine by the target virtual machine, and finally, updating the application to be updated on the target virtual machine based on the update package by the target virtual machine. In the updating process, the host machine and the target virtual machine running on the host machine are communicated based on the virtual serial port, so that the problem that the updating of the application to be updated fails due to the network problem in the updating process of the application to be updated is avoided, and the success rate of updating the application to be updated on the virtual machine is improved.
Based on the application updating method shown in fig. 4, another application updating method of a virtual machine is provided in the embodiment of the present application, as shown in fig. 8, the method includes: S210-S270.
And S210, responding to the application updating request, and sending an application identifier of the application to be updated to the target virtual machine by the host machine through the virtual serial port.
It should be noted that, the implementation of S210 is similar to the implementation of S110, and specific descriptions of S210 may refer to the related descriptions of S110, which are not repeated herein.
S220, the target virtual machine determines whether the target virtual machine meets preset conditions.
The preset conditions are used for determining the health state of the target virtual machine, and when the target virtual machine meets the preset conditions, the target virtual machine is indicated to be in the health state; and when the target virtual machine does not meet the preset condition, indicating that the target virtual machine is in an unhealthy state. The preset conditions include, but are not limited to: the unused rate of the processor in the target virtual machine is greater than or equal to a first threshold; and/or, the unused rate of the memory in the target virtual machine is greater than or equal to a second threshold; and/or the unused rate of the hard disk in the target virtual machine is greater than or equal to a third threshold.
The first threshold value is larger than or equal to the computing force resource required by the updated application to be updated of the target virtual machine; the second threshold value is larger than or equal to the memory space required by the application to be updated after the target virtual machine is updated; the third threshold value is larger than or equal to the storage amount required by the updated application to be updated when the target virtual machine stores the updated application to be updated.
It should be noted that, in the embodiment of the present application, the preset conditions include: the unused rate of the processor in the target virtual machine is greater than or equal to a first threshold; the explanation is given by taking the case that the unused rate of the memory in the target virtual machine is greater than or equal to the second threshold value and the unused rate of the hard disk in the target virtual machine is greater than or equal to the third threshold value as examples, and details are not repeated in the following.
By way of example, assume that the first threshold is 10%, the second threshold is 20%, and the third threshold is 5%; the preset conditions include: the unused rate of the processor in the target virtual machine is greater than or equal to 10%; the unused rate of the memory in the target virtual machine is greater than or equal to 20% g and the unused rate of the hard disk in the target virtual machine is greater than or equal to 5%. When the unused rate of the processor in the target virtual machine is 40%, the unused rate of the memory in the target virtual machine is 50%, and the unused rate of the hard disk in the target virtual machine is 45%, the target virtual machine meets the preset condition.
When the target virtual machine does not satisfy the preset condition, the target virtual machine determines an update result of the application to be updated thereon as an update failure, and performs S270 described below.
When the target virtual machine satisfies the preset condition, the target virtual machine performs S230 described below.
Before updating the application to be updated on the target virtual machine, the embodiment determines whether to update the application to be updated on the target virtual machine by judging whether the target virtual machine meets the preset condition; when the target virtual machine meets the preset condition (namely, the target virtual machine is in a healthy state), updating the application to be updated on the target virtual machine; when the target virtual machine does not meet the preset condition (namely, the target virtual machine is in a non-healthy state), the application to be updated on the target virtual machine is not updated, so that the problem that the application to be updated on the target virtual machine fails to be updated due to the healthy state of the target virtual machine is avoided, and the success rate of updating the application to be updated on the virtual machine is improved.
And S230, the target virtual machine adds an update package of the application to be updated in the host machine to a file system of the target virtual machine.
And S240, the target virtual machine updates the application to be updated based on the update package of the application to be updated.
It should be noted that, the implementation of S230-S240 is similar to the implementation of S120-S130, and specific descriptions of S230-S240 may refer to the related descriptions of S120-S130, which are not repeated here.
When the above-described application to be updated fails to be updated, the following S250 to S270 are executed.
When the above-described application to be updated is successfully updated, the following S270 is executed.
S250, the target virtual machine acquires the number of times of failure in updating the application to be updated.
It should be noted that, in one process, when the update of the application to be updated fails, the target virtual machine records the number of times that the update of the application to be updated fails; when the process ends, the target virtual machine clears the number of update failures. That is, when the update of the application to be updated fails, the target virtual machine records the number of update failures of the application to be updated in the current process, and the number of update failures is cleared by the target virtual machine when the current process ends. Based on this, the implementation manner of S250 includes: the target virtual machine obtains the number of times of update failure of the application to be updated from the local.
When the number of update failures of the application to be updated is less than the preset number of failures, the target virtual machine again executes S240.
When the number of update failures of the application to be updated is greater than or equal to the preset number of failures, the target virtual machine executes S260.
And S260, the target virtual machine determines that the application to be updated fails to update, and rolls back the application to be updated to the version before updating.
It should be noted that, the implementation manner of rolling back the application to be updated to the version before updating is referred to the related art, and will not be described herein.
Under the condition that the update of the application to be updated fails, when the update failure frequency of the application to be updated is smaller than the preset failure frequency, the application to be updated is updated again until the update of the application to be updated is successful or until the update failure frequency of the application to be updated is larger than or equal to the preset failure frequency, so that the fault tolerance of the application to be updated is improved.
S270, the target virtual machine sends the update result of the application to be updated to the host machine through the virtual serial port.
According to the embodiment, the updating result is sent to the host machine, so that a user can timely acquire the updating result of the application to be updated in the target virtual machine through the host machine, and timely process the application to be updated which fails to be updated, and the user experience is improved.
In a scenario in which a user designates, through a management device, the target virtual machine and an application to be updated in the target virtual machine, an embodiment of the present application provides an application update method of the virtual machine, as shown in fig. 9, where the method includes: S310-S380.
S310, the management equipment receives target operation of a user on a host management interface.
The management device is a device for managing a host, wherein the management device interacts with the host through a network.
The host management interface is an interface for managing output (i.e. display) of the device, and the interface comprises: all hosts hosted by the management device and all virtual machines running on each host hosted by the management device, and all applications on each of the all virtual machines.
The target operation is an operation that a user selects an application needing to be updated (i.e. an application to be updated) on a host management interface.
For example, assume that a host management interface for managing device output is shown in fig. 10, where the management interface includes: host a and host B managing the device's managed hosts. The host machine A runs with a virtual machine_1 and a virtual machine_2; wherein, the virtual machine_1 has application a and application B, and the virtual machine_2 has application C and application D. The host machine B runs with a virtual machine_3 and a virtual machine_4; wherein, application C and application D exist in virtual machine_3 and virtual machine_4. The target operation input by the user on the host management interface comprises: when the application C and the application D in the virtual machine_3 are selected; the target operation is used for indicating to update the application C and the application D on the virtual machine_3 running in the host machine B, that is, the user designates the target virtual machine in the host machine B as the virtual machine_3 through the management device, and designates the application to be updated in the virtual machine_3 as the application C and the application D.
S320, the management device acquires the selected information.
The selected information includes: the method comprises the steps of identifying a target host, identifying a target virtual machine in the target host, and identifying an application to be updated in the target virtual machine.
The target host is a host which needs to update the application on the virtual machine running on the target host in a plurality of hosts managed by the management equipment; the target virtual machine is a virtual machine that needs to be updated for applications thereon, among a plurality of virtual machines running on the target host machine.
Illustratively, based on the example in S310 described above, the target host in the selected information acquired by the management apparatus includes: host B, target virtual machine comprising: virtual machine_3; the application to be updated in the target virtual machine comprises the following steps: application C and application D.
S330, the management device sends an application update request to the target host.
The application update request is used for indicating to update the application to be updated on the target virtual machine running on the target host, and the application update request comprises: the method comprises the steps of identifying a target virtual machine and identifying an application to be updated in the target virtual machine.
Illustratively, based on the example in S320 above, the application update request includes: the identity of virtual machine_3 and the identity of application C and the identity of application 3.
It should be noted that the number of the target hosts may be one or more; when the number of the target hosts is a plurality, the management device sends an application update request to each target host, so that each target host updates the application to be updated on the target virtual machine running on the target host. In this embodiment, the target host is taken as an example for explanation, and details are not repeated in the following.
Optionally, the application update request further includes: presetting an updating mode and/or presetting an updating strategy.
The preset updating mode is used for indicating the target virtual machine to update the application to be updated in an incremental updating mode or update the application to be updated in a full updating mode. The method comprises the steps that a preset updating strategy is used for indicating a target virtual machine to update a strategy to be updated and applied; the preset updating strategy comprises the following steps: a real-time update policy, a timed update policy, a polling update policy, or a parallel update policy.
It should be noted that, the preset updating manner and the preset updating policy are consistent with the preset updating manner and the preset updating policy in S130, and specific descriptions of the preset updating manner and the preset updating policy may refer to the related descriptions in S130, which are not repeated herein.
S340, the target host machine sends the application identification of the application to be updated to the target virtual machine through the virtual serial port.
It should be noted that, the implementation of the bit S340 is similar to the implementation of S110, and the specific description of S340 may refer to the related description of S110, which is not repeated herein.
S350, the target virtual machine adds an update package of the application to be updated in the target host machine to a file system of the target virtual machine.
And S360, the target virtual machine updates the application to be updated based on the update package of the application to be updated.
It should be noted that, the implementation of the bits S350-S360 is similar to the implementation of the bits S120-S130, and specific descriptions of the bits S350-S360 may refer to the related descriptions of the bits S120-S130, which are not repeated here.
And S370, the target virtual machine sends the updating result of the application to be updated to the target host machine through the virtual serial port.
It should be noted that, the implementation of S370 is similar to the implementation of S270, and specific descriptions of S370 may refer to the related descriptions of S270, which are not repeated herein.
And S380, the target host machine sends the update result of the application to be updated to the management equipment.
The management device is used for outputting the updating result so that a user can acquire the updating result of the application to be updated through the management device.
Illustratively, based on the example in S330 above, the target host is host B, the target virtual machine is virtual machine_3, and the applications to be updated are application C and application D on virtual machine_3. Updating the application C and the application D based on the S340-S360, and assuming that the update of the application C fails and the update of the application D is successful; the host B sends the update results of the application C and the application D on the virtual machine_3 to the management equipment; so that the management apparatus outputs the update results of the application C and the application D in the update result interface as shown in fig. 11. The update result interface includes: host B (target host), virtual machine_3 (target virtual machine) in host B, application C (application to be updated) in virtual machine_3, and application D in virtual machine_3.
In the above embodiment, the user may update the application on the virtual machine in the host machine managed by the management device, and compared with the manner that the user triggers the update flow of the application to be updated on the target virtual machine on each host machine, the update flow of the application to be updated is simplified, so that the update efficiency of the application to be updated is improved. In addition, in the above embodiment, the host may send the update result of the application to be updated in the target virtual machine to the management device, so that the user may learn, through the management device, the update result of the application on the virtual machine in the host managed by the management device in time, thereby improving the user experience.
The foregoing description of the solution provided in the embodiments of the present application has been mainly presented in terms of a method. To achieve the above functions, it includes corresponding hardware structures and/or software modules that perform the respective functions. Those of skill in the art will readily appreciate that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be implemented as hardware or combinations of hardware and computer software. Whether a function is implemented as hardware or computer software driven hardware depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The embodiment of the present application may divide the function modules of the application updating apparatus according to the above method example, for example, each function module may be divided corresponding to each function, or two or more functions may be integrated into one processing module. The integrated modules may be implemented in hardware or in software functional modules. It should be noted that, in the embodiment of the present application, the division of the modules is schematic, which is merely a logic function division, and other division manners may be implemented in actual implementation.
Fig. 12 shows a possible configuration diagram of the application updating apparatus involved in the above-described embodiment in the case where respective functional blocks are divided with corresponding respective functions. As shown in fig. 12, the application updating apparatus includes: a transceiver unit 1201 and a processing unit 1202.
The transceiver unit 1201 is configured to send, in response to an application update request, an application identifier of an application to be updated to a target virtual machine through a virtual serial port; for example, step S110 in the above-described method embodiment is performed.
The processing unit 1202 is configured to add an update package of an application to be updated in a host to a file system of a target virtual machine; for example, step S120 in the above-described method embodiment is performed.
The processing unit 1202 is further configured to update the application to be updated based on the update package; for example, step S130 in the above-described method embodiment is performed.
Optionally, the transceiver unit 1201 is configured to send a mount notification to the host through the virtual serial port; for example, step S120a in the above-described method embodiment is performed.
The processing unit 1202 is configured to mount the update package to an optical drive of the target virtual machine in response to the mount notification; for example, step S120b in the above-described method embodiment is performed.
The transceiver unit 1201 is configured to send a mount success message to the target virtual machine through the virtual serial port; for example, step S120c in the above-described method embodiment is performed.
The processing unit 1202 is further configured to add an update package from the optical drive to a file system of the target virtual machine in response to the mount success message; for example, step S120d in the above-described method embodiment is performed.
Optionally, the transceiver unit 1201 is configured to receive an application update request sent by the management device; for example, step S330 in the above-described method embodiment is performed.
Optionally, the transceiver unit 1201 is configured to obtain a preset update policy from the host through the virtual serial port.
Optionally, the processing unit 1202 is configured to determine whether the target virtual machine meets a preset condition; for example, step S220 in the above-described method embodiment is performed.
The processing unit 1202 is further configured to add an update package of an application to be updated in the host to a file system of the target virtual machine if the target virtual machine meets a target preset condition; for example, step S230 in the above-described method embodiment is performed.
Optionally, the transceiver unit 1201 is configured to obtain the number of times that the update of the application to be updated fails; for example, step S250 in the above-described method embodiment is performed.
The processing unit 1202 is configured to, in a case where the number of update failures is smaller than the preset number of failures, update the application to be updated that fails to update again based on the update package.
The processing unit 1202 is configured to determine that the application to be updated fails to update and rollback the application to be updated to a version before updating if the number of update failures is equal to a preset number of failures; for example, step S260 in the above-described method embodiment is performed.
Optionally, the transceiver unit 1201 is configured to send an update result of the application to be updated to the host through the virtual serial port; for example, step S270 in the above-described method embodiment is performed.
Optionally, the transceiver unit 1201 sends the application identifier of the application to be updated to the daemon service running in the target virtual machine through the virtual serial port.
The units of the application updating device may also be used to perform other actions in the above method embodiments, and all relevant content of each step related to the above method embodiments may be referred to the functional descriptions of the corresponding functional modules, which are not repeated herein.
The embodiment of the application also provides a computing device, which comprises a memory and a processor, wherein the memory is electrically connected with the processor; the memory is used for storing program instructions that are executed by the processor to implement any of the methods described above for host and virtual machine execution.
The embodiment of the application also provides a computing system, which comprises: a management device and a computing device; the management equipment is connected with the computing equipment computer through a network; the computing device is used for executing any one of the methods executed by the host machine and the virtual machine; the management device is configured to send an application update request to the host, where the application update request includes: the method comprises the steps of identifying a target virtual machine and identifying an application to be updated in the target virtual machine.
Embodiments of the present application also provide a computer-readable storage medium having stored thereon computer instructions that, when executed on a computing device, cause the computing device to perform any one of the methods performed by the host and virtual machine described above.
For the explanation of the relevant content and the description of the beneficial effects in any of the above-mentioned computer-readable storage media, reference may be made to the above-mentioned corresponding embodiments, and the description thereof will not be repeated here.
Embodiments of the present application provide a computer program product that, when run on a computer, causes the computer to perform any of the methods performed by the host and virtual machine described above.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using a software program, it may be wholly or partly implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer instructions are loaded and executed on a computer, the processes or functions in accordance with embodiments of the present application are produced in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by a wired (e.g., coaxial cable, fiber optic, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device including one or more servers, data centers, etc. that can be integrated with the available medium. The usable medium may be a magnetic medium (e.g., floppy disk, magnetic tape), an optical medium (e.g., digital video disc (digital video disc, DVD)), or a semiconductor medium (e.g., solid state disk (solid state drives, SSD)), or the like.
From the foregoing description of the embodiments, it will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of functional modules is illustrated, and in practical application, the above-described functional allocation may be implemented by different functional modules according to needs, i.e. the internal structure of the apparatus is divided into different functional modules to implement all or part of the functions described above. The specific working processes of the above-described systems, devices and units may refer to the corresponding processes in the foregoing method embodiments, which are not described herein.
In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods may be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the modules or units is merely a logical functional division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be embodied essentially or in part or all of the technical solution or in part in the form of a software product stored in a storage medium, including instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor to perform all or part of the steps of the methods described in the various embodiments of the present application. And the aforementioned storage medium includes: flash memory, removable hard disk, read-only memory, random access memory, magnetic or optical disk, and the like.
The foregoing is merely a specific embodiment of the present application, but the protection scope of the present application is not limited thereto, and any changes or substitutions within the technical scope of the present disclosure should be covered in the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. An application updating method of a virtual machine, the method comprising:
responding to an application update request, and sending an application identifier of an application to be updated to a target virtual machine through a virtual serial port by a host machine, wherein the target virtual machine is a virtual machine which operates on the host machine and needs to be updated;
the target virtual machine adds an update package of the application to be updated in the host machine to a file system of the target virtual machine;
and the target virtual machine updates the application to be updated based on the update package.
2. The method of claim 1, wherein the target virtual machine adds an update package for the application to be updated in the host machine to a file system of the target virtual machine, comprising:
the target virtual machine sends a mounting notification to the host machine through the virtual serial port;
The host machine responds to the mounting notification, mounts the update package to an optical drive of the target virtual machine, and sends a mounting success message to the target virtual machine through a virtual serial port;
and the target virtual machine responds to the mounting success message, and adds the update package to a file system of the target virtual machine from the optical drive.
3. The method according to claim 1 or 2, wherein before the host machine sends the application identification of the application to be updated to the target virtual machine through the virtual serial port in response to the application update request, the method further comprises:
the host receives an application update request sent by the management device, wherein the application update request comprises: the identifier of the target virtual machine and the application identifier of the application to be updated, and the application update request is a request generated by the management device in response to a target operation input by a user.
4. A method according to any of claims 1-3, wherein the target virtual machine updating the application to be updated based on the update package comprises:
the target virtual machine obtains a preset updating strategy from the host machine through the virtual serial port, wherein the preset updating strategy comprises the following steps: any one of a real-time update strategy, a timing update strategy, a polling update strategy and a parallel update strategy;
And the target virtual machine updates the application to be updated based on the update package and the preset update strategy.
5. The method of any of claims 1-4, wherein before the target virtual machine adds the update package for the application to be updated in the host machine to the file system of the target virtual machine, the method further comprises:
the target virtual machine determines whether the target virtual machine meets a preset condition; wherein, the preset conditions include:
the unused rate of the processor in the target virtual machine is greater than or equal to a first threshold; and/or the number of the groups of groups,
the unused rate of the memory in the target virtual machine is greater than or equal to a second threshold; and/or the number of the groups of groups,
the unused rate of the hard disk in the target virtual machine is larger than or equal to a third threshold value;
the target virtual machine adds an update package of the application to be updated in the host machine to a file system of the target virtual machine, including:
and under the condition that the target virtual machine meets the target preset condition, the target virtual machine adds an update package of the application to be updated in the host machine to a file system of the target virtual machine.
6. The method according to any of claims 1-5, wherein in case the application to be updated fails to update, the method further comprises:
the target virtual machine obtains the times of failure in updating the application to be updated;
when the number of failed updating times is smaller than the preset number of failed updating times, the target virtual machine updates the application to be updated which fails to update again based on the updating packet;
and under the condition that the update failure times are equal to the preset failure times, the target virtual machine determines that the update of the application to be updated fails and rolls back the application to be updated to a version before update.
7. The method according to any one of claims 1-6, further comprising:
and the target virtual machine sends the updating result of the application to be updated to the host machine through the virtual serial port.
8. The method according to any one of claims 1-7, wherein the host machine sends the application identifier of the application to be updated to the target virtual machine through the virtual serial port, including:
and the application updating service running in the host machine sends the application identification of the application to be updated to the daemon service running in the target virtual machine through the virtual serial port.
9. A computing device, the computing device comprising a memory and a processor; the memory is electrically connected with the processor; the memory is configured to store program instructions, the processor being configured to execute the program instructions to cause the computing device to implement the method of any of claims 1-8.
10. A computing system, the computing system comprising: a management device and a computing device as claimed in claim 9; the management device is connected with the computing device computer through a network;
the management device is configured to send an application update request to the host, where the application update request includes: and the identification of the target virtual machine and the application identification of the application to be updated in the target virtual machine.
CN202311282395.4A 2023-09-28 2023-09-28 Application updating method of virtual machine, computing equipment and computing system Pending CN117453242A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311282395.4A CN117453242A (en) 2023-09-28 2023-09-28 Application updating method of virtual machine, computing equipment and computing system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311282395.4A CN117453242A (en) 2023-09-28 2023-09-28 Application updating method of virtual machine, computing equipment and computing system

Publications (1)

Publication Number Publication Date
CN117453242A true CN117453242A (en) 2024-01-26

Family

ID=89591926

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311282395.4A Pending CN117453242A (en) 2023-09-28 2023-09-28 Application updating method of virtual machine, computing equipment and computing system

Country Status (1)

Country Link
CN (1) CN117453242A (en)

Similar Documents

Publication Publication Date Title
TWI453597B (en) System and method for management of an iov adapter through a virtual intermediary in an iov management partition
US8301806B2 (en) Configuring an input/output adapter
US8762999B2 (en) Guest-initiated resource allocation request based on comparison of host hardware information and projected workload requirement
US8141094B2 (en) Distribution of resources for I/O virtualized (IOV) adapters and management of the adapters through an IOV management partition via user selection of compatible virtual functions
US20170102952A1 (en) Accessing data stored in a remote target using a baseboard management controler (bmc) independently of the status of the remote target's operating system (os)
JP5272709B2 (en) Address assignment method, computer, physical machine, program, and system
US20130091334A1 (en) Method for data backup, device and system
EP3706368A1 (en) Method and device for deploying virtualized network element device
JP2009123217A (en) Method for managing input/output (i/o) virtualization in data processing system, data processing system, and computer program
US10430082B2 (en) Server management method and server for backup of a baseband management controller
US20210042045A1 (en) Storage system and resource allocation control method
US20190037043A1 (en) Data Prefetching Method and Apparatus
US20210326207A1 (en) Stripe reassembling method in storage system and stripe server
WO2021004256A1 (en) Node switching method in node failure and related device
EP3358795B1 (en) Method and apparatus for allocating a virtual resource in network functions virtualization (nfv) network
EP3495939B1 (en) Method and device for storing data in distributed block storage system, and computer readable storage medium
CN112134752B (en) Method, system, equipment and medium for monitoring switch based on BMC
KR101137085B1 (en) Managing of an initial program load in a logical partition of data storage system, a storage controller, and a computer readable storage medium
CN112631994A (en) Data migration method and system
CN117453242A (en) Application updating method of virtual machine, computing equipment and computing system
US20160070478A1 (en) Storage control device and storage control method
JP6870390B2 (en) Resource allocation method, connection management server and connection management program in a system based on a virtual infrastructure
WO2018173300A1 (en) I/o control method and i/o control system
CN117827366A (en) Resource allocation method of virtual machine, computing equipment and computing system
US7853758B2 (en) Avoiding failure of an initial program load in a logical partition of a data storage system

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