CN116880877A - Virtual machine enhancement tool upgrading method and device, computer equipment and storage medium - Google Patents

Virtual machine enhancement tool upgrading method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN116880877A
CN116880877A CN202310878641.6A CN202310878641A CN116880877A CN 116880877 A CN116880877 A CN 116880877A CN 202310878641 A CN202310878641 A CN 202310878641A CN 116880877 A CN116880877 A CN 116880877A
Authority
CN
China
Prior art keywords
virtual machine
enhancement tool
file
upgrading
operating system
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
CN202310878641.6A
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.)
Anchao Cloud Software Co Ltd
Original Assignee
Anchao Cloud Software 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 Anchao Cloud Software Co Ltd filed Critical Anchao Cloud Software Co Ltd
Priority to CN202310878641.6A priority Critical patent/CN116880877A/en
Publication of CN116880877A publication Critical patent/CN116880877A/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
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • G06F8/63Image based installation; Cloning; Build to order
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • 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
    • 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)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)

Abstract

The application relates to a virtual machine enhancement tool upgrading method, a device, computer equipment and a storage medium. The method comprises the following steps: responding to a virtual machine enhancement tool upgrading request, and acquiring an operating system type; calling corresponding upgrade service according to the type of the operating system, and reading a new version of enhancement tool file from the upgrade image file of the virtual machine; and upgrading the virtual machine enhancement tool according to the enhancement tool file of the new version through the upgrade service. By adopting the method, the upgrading efficiency of the virtual enhancement tool can be improved.

Description

Virtual machine enhancement tool upgrading method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method, an apparatus, a computer device, a storage medium, and a computer program product for upgrading a virtual machine enhancement tool.
Background
In a cloud computing environment, computing resources of a data center are split into a large number of Virtual Machines (VMs) by a virtualization technology, where a Virtual Machine is a plurality of instances that are virtualized on a server and can run an OS (Operating System). The virtual machine enhancement tool is self-contained in the virtual machine and is used for enhancing the performance of the virtual display card and the hard disk and synchronizing the virtual machine with a host file, a clock or a network driver. Along with iteration of the data center, new functions are added continuously, performance optimization, defect repair and the like are realized, and the virtual machine enhancement tool also needs to be upgraded.
In the conventional technology, most of the upgrading process of the virtual machine enhancement tool needs to manually uninstall the installed old version enhancement tool, and after the uninstallation is completed, the installation process of the new version enhancement tool is continuously manually executed, so that the upgrading efficiency is lower.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a virtual enhancement tool upgrading method, apparatus, computer device, storage medium, and computer program product that can improve the upgrading efficiency of a virtual enhancement tool.
In a first aspect, the present application provides a method for upgrading a virtual machine enhancement tool. The method comprises the following steps:
responding to a virtual machine enhancement tool upgrading request, and acquiring an operating system type;
calling corresponding upgrade service according to the type of the operating system, and reading a new version of enhancement tool file from the upgrade image file of the virtual machine;
and upgrading the virtual machine enhancement tool according to the enhancement tool file of the new version through the upgrade service.
In one embodiment, invoking an upgrade service corresponding to an operating system type, and reading a new version of enhancement tool file from an upgrade image file of a virtual machine, including:
when the type of the operating system is a first operating system, calling asynchronous service, stopping the virtual machine enhancement tool, and reading a new version enhancement tool file from an upgrade image file of the virtual machine;
when the type of the operating system is a second operating system, calling a monitoring service, stopping the virtual machine enhancement tool, and reading a new version enhancement tool file from an upgrade image file of the virtual machine enhancement tool;
wherein the first operating system is different from the second operating system.
In one embodiment, invoking an asynchronous service, stopping a virtual machine enhancement tool, and reading a new version of an enhancement tool file from the virtual machine enhancement tool, comprises:
calling asynchronous service and pushing the upgrade program into a first operating system;
and executing the upgrading program through the first operating system, stopping the virtual machine enhancement tool, and reading the enhancement tool file of the new version from the upgrading image file of the virtual machine.
In one embodiment, upgrading, by an upgrade service, a virtual machine enhancement tool according to a new version of the enhancement tool file includes:
after the first operating system acquires the new version of the enhancement tool file, replacing the old version of the enhancement tool file according to the new version of the enhancement tool file;
starting the virtual machine enhancement tool to finish the upgrading of the virtual machine enhancement tool.
In one embodiment, upgrading, by an upgrade service, a virtual machine enhancement tool according to a new version of the enhancement tool file includes:
replacing the enhancement tool file of the old version according to the enhancement tool file of the new version by monitoring service;
starting the virtual machine enhancement tool to finish the upgrading of the virtual machine enhancement tool.
In one embodiment, the method further comprises:
when the type of the operating system is the second operating system, sending a virtual machine enhancement tool upgrading request to the virtual machine enhancement tool; the virtual machine enhancement tool upgrading request is used for indicating the virtual machine enhancement tool to modify the content of the pre-built shared memory;
when the monitoring service monitors that the content of the shared memory is changed, stopping the virtual machine enhancement tool, and reading the enhancement tool file of the new version from the upgrade image file of the virtual machine.
In a second aspect, the application further provides a device for upgrading the virtual machine enhancement tool. The device comprises:
the type determining module is used for responding to the upgrading request of the virtual machine enhancement tool and acquiring the type of the operating system;
the file copying module is used for calling the corresponding upgrading service according to the type of the operating system and reading the enhanced tool file of the new version from the upgrading image file of the virtual machine;
and the tool upgrading module is used for upgrading the virtual machine enhancement tool according to the enhancement tool file of the new version through the upgrading service.
In a third aspect, the present application also provides a computer device. The computer device comprises a memory storing a computer program and a processor which when executing the computer program performs the steps of:
responding to a virtual machine enhancement tool upgrading request, and acquiring an operating system type;
calling corresponding upgrade service according to the type of the operating system, and reading a new version of enhancement tool file from the upgrade image file of the virtual machine;
and upgrading the virtual machine enhancement tool according to the enhancement tool file of the new version through the upgrade service.
In a fourth aspect, the present application also provides a computer-readable storage medium. The computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of:
responding to a virtual machine enhancement tool upgrading request, and acquiring an operating system type;
calling corresponding upgrade service according to the type of the operating system, and reading a new version of enhancement tool file from the upgrade image file of the virtual machine;
and upgrading the virtual machine enhancement tool according to the enhancement tool file of the new version through the upgrade service.
In a fifth aspect, the present application also provides a computer program product. The computer program product comprising a computer program which, when executed by a processor, performs the steps of:
responding to a virtual machine enhancement tool upgrading request, and acquiring an operating system type;
calling corresponding upgrade service according to the type of the operating system, and reading a new version of enhancement tool file from the upgrade image file of the virtual machine;
and upgrading the virtual machine enhancement tool according to the enhancement tool file of the new version through the upgrade service.
According to the virtual machine enhancement tool upgrading method, device, computer equipment, storage medium and computer program product, after the virtual machine obtains a virtual machine enhancement tool upgrading request, the virtual machine can automatically respond to the request, corresponding upgrading service is called according to the type of an operating system, a new version of enhancement tool file is read from an upgrading image file, and the virtual machine enhancement tool is upgraded according to the new version of enhancement tool file. Automatic upgrading is supported, manual operation is not needed, and the upgrading efficiency of the virtual machine enhancement tool is improved.
Drawings
FIG. 1 is a flow diagram of a virtual machine enhancement tool upgrade method in one embodiment;
FIG. 2 is a flow chart of an embodiment of invoking an upgrade service corresponding to an operating system type, and reading a new version of an enhancement tool file from an upgrade image file of a virtual machine;
FIG. 3 is a flow diagram of a virtual machine enhancement tool upgrade of a first operating system in one embodiment;
FIG. 4 is a flow diagram of a virtual machine enhancement tool upgrade of a second operating system in one embodiment;
FIG. 5 is a flowchart of a method for upgrading a virtual machine enhancement tool according to another embodiment;
FIG. 6 is a block diagram of a virtual machine enhancement tool upgrade apparatus in one embodiment;
fig. 7 is an internal structural diagram of a computer device in one embodiment.
Detailed Description
The present application will be described in further detail with reference to the drawings and examples, in order to make the objects, technical solutions and advantages of the present application more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
In one embodiment, as shown in fig. 1, a virtual machine enhancement tool upgrading method is provided, and the method is applied to a virtual machine for illustration in this embodiment. In this embodiment, the method includes the steps of:
step 102, responding to the virtual machine enhancement tool upgrading request, and acquiring the type of the operating system.
The virtual machine enhancement Tools (VM Tools) are self-contained in the virtual machine, and are used for enhancing the performance of the virtual graphics card and the hard disk, and synchronizing the virtual machine with a host file, a clock or a network driver. For convenience of description, the virtual machine enhancement tool may be simply referred to as an enhancement tool hereinafter. A virtual machine is a complete computer system that runs in a completely isolated environment with complete hardware system functionality emulated by software. The virtual machine enhancement tool upgrade request is used for instructing the virtual machine to upgrade the virtual machine enhancement tool. Various operating systems, such as windows systems and various versions of linux systems, may be running in the virtual machine.
Specifically, the virtual machine obtains a virtual machine enhancement tool upgrade request, and in response to the virtual machine enhancement tool upgrade request, obtains a type of an operating system running in the virtual machine. The upgrade modes of the virtual machine enhancement tools corresponding to different operating systems are different.
Before upgrading the virtual machine enhancement tool, the virtual machine can bind the image file, call the qga mount method to display the disk character, and then judge whether the image file is successfully bound. If the binding is successful, an enhanced tool upgrade operation may be performed. If the binding fails, the upgrade operation cannot be performed.
And 104, calling a corresponding upgrade service according to the type of the operating system, and reading the new version of the enhancement tool file from the upgrade image file of the virtual machine.
And step 106, upgrading the virtual machine enhancement tool according to the enhancement tool file of the new version through the upgrade service.
The upgrade service refers to a program for upgrading the virtual machine enhancement tool, and the program is automatically completed by the system and does not need to interact with a user. The new version of the enhancement tool file refers to the latest file of the virtual machine enhancement tool.
The upgrade modes of the virtual machine enhancement tools corresponding to different operating systems are different, but the problem that the child process terminates the parent process exists, so that upgrade operation is required to be performed by adding upgrade services corresponding to the operating systems.
When different operating systems are operated in the virtual machine, the operating system can acquire the current version number, call upgrading service corresponding to the operating system and copy and replace related files of the virtual machine enhancement tool. Specifically, the new version of the enhancement tool file is read from the upgrade image file of the virtual machine through the upgrade service. And replacing the enhancement tool file of the old version with the enhancement tool file of the new version to finish the upgrading operation of the enhancement tool of the virtual machine. The copied and replaced enhancement tool files may include executable files to be updated, such as executable files of the enhancement tool, dependency files running the enhancement tool, and the like.
Optionally, the upgrading process of each virtual machine is not affected, and when a plurality of virtual machines receive the upgrading request of the machine-simulated enhancement tool at the same time, upgrading operation can be performed at the same time, so that a batch upgrading function is realized.
According to the virtual machine enhancement tool upgrading method, after the virtual machine obtains the virtual machine enhancement tool upgrading request, the virtual machine can automatically respond to the request, corresponding upgrading service is called according to the type of the operating system, the enhancement tool file of the new version is read from the upgrading image file, and the virtual machine enhancement tool is upgraded according to the enhancement tool file of the new version. Automatic upgrading is supported, manual operation is not needed, and the upgrading efficiency of the virtual machine enhancement tool is improved.
In one embodiment, as shown in fig. 2, invoking the upgrade service corresponding to the operating system type, and reading the new version of the enhancement tool file from the upgrade image file of the virtual machine includes:
step 202, when the operating system type is the first operating system, calling an asynchronous service, stopping the virtual machine enhancement tool, and reading the enhancement tool file of the new version from the upgrade image file of the virtual machine.
And 204, when the type of the operating system is the second operating system, calling a monitoring service, stopping the virtual machine enhancement tool, and reading the enhancement tool file of the new version from the upgrade image file of the virtual machine.
Wherein the first operating system is different from the second operating system. For example, the first operating system may be linux. The second operating system may be windows. Asynchronous service (asynchronous application) refers to the step of plugging a call into a system thread pool and entrusting a system process to call so as to realize the function of starting and stopping a virtual machine enhancement tool. The monitoring service is a self-developed windows service, and operates independently without being influenced by the enhancement tool.
Specifically, aiming at the linux operating system, the linux operating system is called to perform upgrading operation through asynchronous service. Further, in the upgrading process of the linux operating system, the virtual machine enhancement tool is stopped first, and then a new version of enhancement tool file is read from an upgrading image file of the virtual machine.
The upgrade process of windows operating system relies on the newly added listening service. The monitoring service is registered in a windows service list when the virtual machine enhancement tool is installed, and the monitoring service is started automatically and continuously operates. The windows operating system can perform upgrading operation through the monitoring service. Further, during the operation process of the monitoring service, the virtual machine enhancement tool is stopped first, and then the enhancement tool file of the new version is read from the upgrade image file of the virtual machine.
In this embodiment, for different operating systems, the enhancement tool is automatically upgraded by different upgrade services, so that the upgrade efficiency and upgrade accuracy of the enhancement tool can be greatly improved.
In an alternative to the above embodiment, invoking an asynchronous service, stopping a virtual machine enhancement tool, and reading a new version of the enhancement tool file from the upgrade image file, includes: calling asynchronous service and pushing the upgrade program into a first operating system; and executing the upgrading program through the first operating system, stopping the virtual machine enhancement tool, and reading the enhancement tool file of the new version from the upgrading image file.
Wherein the upgrade program is a separate process for performing the upgrade operation.
Specifically, the first operating system may send a virtual machine enhancement tool upgrade request to an asynchronous service that, upon receiving the upgrade request, pushes the upgrade program into a thread pool of the first operating system. And executing the upgrade program through the thread pool, and stopping the virtual machine enhancement tool after the upgrade program starts to run. And then, reading the new version of the enhancement tool file from the upgrade image file. By asynchronously calling the upgrade program, the upgrade program can be immediately pushed into the thread pool for upgrade operation after an upgrade request is acquired, and the asynchronous service can continuously acquire the upgrade request, so that the occupation of system resources can be reduced.
In this alternative manner, the first operating system upgrades the enhancement tool by asynchronously calling the upgrade program, which can save system resources.
In the above alternative, upgrading, by the upgrade service, the virtual machine enhancement tool according to the enhancement tool file of the new version includes: after the first operating system acquires the new version of the enhancement tool file, replacing the old version of the enhancement tool file according to the new version of the enhancement tool file; starting the virtual machine enhancement tool to finish the upgrading of the virtual machine enhancement tool.
And executing an upgrade program by a thread pool of the first operating system, stopping the virtual machine enhancement tool after the upgrade program starts to run, and reading the enhancement tool file of the new version from the upgrade image file. The new version of the enhancement tool file is the complete enhancement tool file. And then, replacing the enhancement tool file of the old version with the enhancement tool file of the new version, so that the enhancement tool can be completely and accurately upgraded. And then starting the virtual machine enhancement tool, comparing the updated version number of the virtual machine enhancement tool with the current version number acquired before upgrading, if the version numbers are inconsistent, indicating that the version number of the virtual machine enhancement tool is updated, and finishing upgrading of the virtual machine enhancement tool.
In the optional mode, after the first operating system acquires the new version of the enhancement tool file, the first operating system can automatically replace the old version of the enhancement tool file according to the new version of the enhancement tool file and start the virtual machine enhancement tool, the whole upgrading process does not need to restart the virtual machine, and the whole upgrading process is silent and rapid, so that the noninductive upgrading is realized. In addition, the copy and replacement of the enhancement tool files are directly carried out, so that the problem that partial drivers remain and the network or hard disk function is abnormal due to incomplete unloading of the enhancement tools caused by manual upgrading can be avoided, and the accurate upgrading of the enhancement tools is realized.
In an alternative manner of the above embodiment, upgrading, by the upgrade service, the virtual machine enhancement tool according to the enhancement tool file of the new version includes: replacing the enhancement tool file of the old version according to the enhancement tool file of the new version by monitoring service; starting the virtual machine enhancement tool to finish the upgrading of the virtual machine enhancement tool.
And a monitoring service is operated in the second operating system, an upgrading program is executed through the monitoring service, the virtual machine enhancement tool is stopped, and a new version enhancement tool file is read from the upgrading image file of the virtual machine. The new version of the enhancement tool file is the complete enhancement tool file. And then, replacing the enhancement tool file of the old version according to the enhancement tool file of the new version, so that the enhancement tool can be completely and accurately upgraded. And further starting the virtual machine enhancement tool, judging whether the version number of the virtual machine enhancement tool is updated, and if so, finishing the upgrading of the virtual machine enhancement tool.
In the optional mode, the second operating system automatically replaces the enhancement tool file of the old version according to the enhancement tool file of the new version through monitoring service, and starts the virtual machine enhancement tool, the whole upgrading process does not need to restart the virtual machine, and the whole upgrading process is silent and rapid, so that the noninductive upgrading is realized. In addition, the copy and replacement of the enhancement tool files are directly carried out, so that the problem that partial drivers remain and the network or hard disk function is abnormal due to incomplete unloading of the enhancement tools caused by manual upgrading can be avoided, and the accurate upgrading of the enhancement tools is realized.
In one embodiment, the method further comprises: when the type of the operating system is the second operating system, sending a virtual machine enhancement tool upgrading request to the virtual machine enhancement tool; the virtual machine enhancement tool upgrading request is used for indicating the virtual machine enhancement tool to modify the content of the pre-built shared memory; when the monitoring service monitors that the content of the shared memory is changed, stopping the virtual machine enhancement tool, and reading the enhancement tool file of the new version from the upgrade image file of the virtual machine.
The shared memory refers to a memory space shared among processes, and may also be referred to as a shared memory space.
The virtual machine enhancement tool communicates with the listening service by sharing memory. Specifically, the monitoring service opens up a shared memory space, names the shared memory space, and then binds the shared memory space to the manager account. By binding the shared memory space to the manager account. Because the virtual machine enhancement tool uses a plurality of operations requiring the administrator related rights, such as high-level rights operation, the shared memory space is bound to the management user to ensure that the operations requiring the high-level rights can normally run.
After the virtual machine acquires the upgrade request of the virtual machine enhancement tool, the virtual machine sends the upgrade request to the virtual machine enhancement tool. The virtual machine enhancement tool modifies the contents of the shared memory space according to the upgrade request. The monitoring service monitors the shared memory space in real time, when the content of the shared memory space is monitored to be changed, the monitoring service indicates that the enhancement tool needs to be updated, the monitoring service starts to execute an updating program, stops the virtual machine enhancement tool, reads a new version of enhancement tool file from an updating image file of the virtual machine, replaces an old version of enhancement tool file according to the new version of enhancement tool file, and then starts the virtual machine enhancement tool to complete the updating of the virtual machine enhancement tool.
In this embodiment, by constructing a shared memory space between the virtual machine enhancement tool and the monitoring service, when the monitoring service monitors that the content of the shared memory space is changed, it indicates that the virtual machine enhancement tool needs to be upgraded, so that the upgrade operation of the virtual machine enhancement tool is rapidly executed, and silence rapid upgrade is achieved.
In one embodiment, the upgrade operations of the first operating system and the second operating system are implemented by executing an upgrade program, and after the first operating system and the second operating system read the new version of the enhancement tool file, the first operating system and the second operating system execute operations such as exception processing and compatibility processing. Specifically, the exception refers to unsuccessful performance of the upgrade program in the process of performing the upgrade, such as failure of replacing the file, failure of the dependent package to cause service start-up, and the like. If the upgrade program is abnormal, code rollback is performed, so that the enhancement tool of the old version can be ensured to normally operate. For compatible processing, the upgrade program can judge whether the new version of the enhancement tool file is compatible with the environment in which the old version of the enhancement tool file operates in the operation process, if not, the enhancement tool is not upgradeable, and the file replacement process is not performed, so that the upgrade process is blocked. By executing operations such as exception handling and compatible handling, the exception of the upgrade operation of the enhancement tool can be found in time, and the exception condition can be handled quickly.
In one embodiment, as shown in fig. 3, a flow chart of a virtual machine enhancement tool upgrade process of the first operating system is shown, where the upgrade request refers to a virtual machine enhancement tool upgrade request, and the asynchronous service module refers to an asynchronous service. The method comprises the steps that a virtual machine calls an interface monitoring module (api monitoring module), an upgrading request is accessed, the upgrading request is sent to an asynchronous service module through a virtual machine enhancement tool, and after the upgrading request is received, the asynchronous service module pushes an upgrading program into a first operating system, and upgrading operation is executed through the first operating system.
In one embodiment, as shown in fig. 4, a flow chart of a virtual machine enhancement tool upgrade process of the second operating system is shown, where the upgrade request refers to a virtual machine enhancement tool upgrade request. By executing the monitoring service installation program, the installation of the virtual machine enhancement tool is realized. The virtual machine calls an interface monitoring module (api monitoring module), accesses the upgrade request, sends the upgrade request to the virtual machine enhancement tool, and the virtual machine enhancement tool informs the monitoring service to upgrade through the upgrade communication module. The content of the shared memory can be modified by upgrading the communication module. When the monitoring service monitors that the content of the shared memory is changed, namely, the request in the shared memory is acquired, the upgrading operation is executed.
In another embodiment, as shown in fig. 5, there is provided a virtual machine enhancement tool upgrade method, which includes the steps of:
step 502, in response to a virtual machine enhancement tool upgrade request, obtains an operating system type. When the operating system type is the first operating system, executing step 504; when the operating system type is the second operating system, step 506 is performed.
Step 504, calling asynchronous service, pushing the upgrade program into the first operating system; and executing the upgrading program through the first operating system, stopping the virtual machine enhancement tool, and reading the enhancement tool file of the new version from the upgrading image file of the virtual machine. Execution continues with step 508.
Step 506, sending the virtual machine enhancement tool upgrade request to the virtual machine enhancement tool; when the monitoring service monitors that the content of the shared memory is changed, stopping the virtual machine enhancement tool, and reading the enhancement tool file of the new version from the upgrade image file of the virtual machine enhancement tool. Execution continues with step 510.
Step 508, replacing the old version of the enhancement tool file with the new version of the enhancement tool file. Execution continues with step 512.
Step 510, replacing the old version of the enhancement tool file according to the new version of the enhancement tool file by the listening service.
Step 512, starting the virtual machine enhancement tool to complete the upgrade of the virtual machine enhancement tool.
In this embodiment, after the virtual machine obtains the upgrade request of the virtual machine enhancement tool, the virtual machine can automatically respond to the request, call the corresponding upgrade service according to the type of the operating system, read the enhancement tool file of the new version from the upgrade image file, and upgrade the virtual machine enhancement tool according to the enhancement tool file of the new version. Automatic upgrading is supported, manual operation is not needed, and the upgrading efficiency of the virtual machine enhancement tool is improved.
It should be understood that, although the steps in the flowcharts related to the embodiments described above are sequentially shown as indicated by arrows, these steps are not necessarily sequentially performed in the order indicated by the arrows. The steps are not strictly limited to the order of execution unless explicitly recited herein, and the steps may be executed in other orders. Moreover, at least some of the steps in the flowcharts described in the above embodiments may include a plurality of steps or a plurality of stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of the steps or stages is not necessarily performed sequentially, but may be performed alternately or alternately with at least some of the other steps or stages.
Based on the same inventive concept, the embodiment of the application also provides a virtual machine enhancement tool upgrading device for realizing the virtual machine enhancement tool upgrading method. The implementation of the solution provided by the device is similar to the implementation described in the above method, so the specific limitation in the embodiments of the device for upgrading a virtual machine enhancement tool provided below may refer to the limitation of the method for upgrading a virtual machine enhancement tool hereinabove, and will not be repeated herein.
In one embodiment, as shown in fig. 6, there is provided a virtual machine enhancement tool upgrading apparatus, including: a type determination module 602, a file replication module 604, and a tool upgrade module 606, wherein:
the type determining module 602 is configured to obtain an operating system type in response to a virtual machine enhancement tool upgrade request.
And the file copying module 604 is used for calling the corresponding upgrade service according to the type of the operating system and reading the new version of the enhancement tool file from the upgrade image file of the virtual machine.
The tool upgrade module 606 is configured to upgrade, through an upgrade service, the virtual machine enhancement tool according to the new version of the enhancement tool file.
In one embodiment, the file replication module 604 is further configured to call an asynchronous service, stop the virtual machine enhancement tool, and read a new version of the enhancement tool file from the upgrade image file of the virtual machine when the operating system type is the first operating system; when the type of the operating system is a second operating system, calling a monitoring service, stopping the virtual machine enhancement tool, and reading a new version enhancement tool file from an upgrade image file of the virtual machine enhancement tool; wherein the first operating system is different from the second operating system.
In one embodiment, the file replication module 604 is further configured to invoke an asynchronous service to push the upgrade program to the first operating system; and executing the upgrading program through the first operating system, stopping the virtual machine enhancement tool, and reading the enhancement tool file of the new version from the upgrading image file of the virtual machine.
In one embodiment, the tool upgrade module 606 is further configured to replace the old version of the enhancement tool file according to the new version of the enhancement tool file after the first operating system obtains the new version of the enhancement tool file; starting the virtual machine enhancement tool to finish the upgrading of the virtual machine enhancement tool.
In one embodiment, the tool upgrade module 606 is further configured to replace the old version of the enhancement tool file with the new version of the enhancement tool file by listening to the service; starting the virtual machine enhancement tool to finish the upgrading of the virtual machine enhancement tool.
In one embodiment, the file replication module 604 is further configured to send a virtual machine enhancement tool upgrade request to the virtual machine enhancement tool when the operating system type is the second operating system; the virtual machine enhancement tool upgrading request is used for indicating the virtual machine enhancement tool to modify the content of the pre-built shared memory; when the monitoring service monitors that the content of the shared memory is changed, stopping the virtual machine enhancement tool, and reading the enhancement tool file of the new version from the upgrade image file of the virtual machine.
The modules in the virtual machine enhancement tool upgrading device can be implemented in whole or in part by software, hardware and a combination thereof. The above modules may be embedded in hardware or may be independent of a processor in the computer device, or may be stored in software in a memory in the computer device, so that the processor may call and execute operations corresponding to the above modules.
In one embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 7. The computer device includes a processor, a memory, an Input/Output interface (I/O) and a communication interface. The processor, the memory and the input/output interface are connected through a system bus, and the communication interface is connected to the system bus through the input/output interface. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database of the computer device is used for storing data such as upgrade image files. The input/output interface of the computer device is used to exchange information between the processor and the external device. The communication interface of the computer device is used for communicating with an external terminal through a network connection. The computer program, when executed by a processor, implements a virtual machine enhancement tool upgrade method.
It will be appreciated by those skilled in the art that the structure shown in FIG. 7 is merely a block diagram of some of the structures associated with the present inventive arrangements and is not limiting of the computer device to which the present inventive arrangements may be applied, and that a particular computer device may include more or fewer components than shown, or may combine some of the components, or have a different arrangement of components.
In an embodiment, there is also provided a computer device comprising a memory and a processor, the memory having stored therein a computer program, the processor implementing the steps of the method embodiments described above when the computer program is executed.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored which, when executed by a processor, carries out the steps of the method embodiments described above.
In an embodiment, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the steps of the method embodiments described above.
It should be noted that, the user information (including but not limited to user equipment information, user personal information, etc.) and the data (including but not limited to data for analysis, stored data, presented data, etc.) related to the present application are information and data authorized by the user or sufficiently authorized by each party, and the collection, use and processing of the related data need to comply with the related laws and regulations and standards of the related country and region.
Those skilled in the art will appreciate that implementing all or part of the above described methods may be accomplished by way of a computer program stored on a non-transitory computer readable storage medium, which when executed, may comprise the steps of the embodiments of the methods described above. Any reference to memory, database, or other medium used in embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory, resistive random access Memory (ReRAM), magnetic random access Memory (Magnetoresistive Random Access Memory, MRAM), ferroelectric Memory (Ferroelectric Random Access Memory, FRAM), phase change Memory (Phase Change Memory, PCM), graphene Memory, and the like. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory, and the like. By way of illustration, and not limitation, RAM can be in the form of a variety of forms, such as static random access memory (Static Random Access Memory, SRAM) or dynamic random access memory (Dynamic Random Access Memory, DRAM), and the like. The databases referred to in the embodiments provided herein may include at least one of a relational database and a non-relational database. The non-relational database may include, but is not limited to, a blockchain-based distributed database, and the like. The processor referred to in the embodiments provided in the present application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, or the like, but is not limited thereto.
The technical features of the above embodiments may be arbitrarily combined, and all possible combinations of the technical features in the above embodiments are not described for brevity of description, however, as long as there is no contradiction between the combinations of the technical features, they should be considered as the scope of the description.
The foregoing examples illustrate only a few embodiments of the application and are described in detail herein without thereby limiting the scope of the application. It should be noted that it will be apparent to those skilled in the art that several variations and modifications can be made without departing from the spirit of the application, which are all within the scope of the application. Accordingly, the scope of the application should be assessed as that of the appended claims.

Claims (10)

1. A method for upgrading a virtual machine enhancement tool, the method comprising:
responding to a virtual machine enhancement tool upgrading request, and acquiring an operating system type;
calling corresponding upgrade service according to the type of the operating system, and reading a new version of enhancement tool file from the upgrade image file of the virtual machine;
and upgrading the virtual machine enhancement tool according to the enhancement tool file of the new version through the upgrade service.
2. The method of claim 1, wherein the calling the upgrade service corresponding to the operating system type to read the new version of the enhancement tool file from the upgrade image file of the virtual machine comprises:
when the type of the operating system is a first operating system, calling asynchronous service, stopping the virtual machine enhancement tool, and reading a new version enhancement tool file from an upgrade image file of the virtual machine;
when the type of the operating system is a second operating system, calling a monitoring service, stopping the virtual machine enhancement tool, and reading a new version enhancement tool file from an upgrade image file of the virtual machine enhancement tool;
wherein the first operating system is different from the second operating system.
3. The method of claim 2, wherein invoking the asynchronous service, stopping the virtual machine enhancement tool, and reading a new version of the enhancement tool file from the virtual machine enhancement tool comprises:
calling asynchronous service and pushing an upgrade program into the first operating system;
and executing the upgrading program through the first operating system, stopping the virtual machine enhancement tool, and reading the enhancement tool file of the new version from the upgrading image file of the virtual machine.
4. The method of claim 3, wherein the upgrading, by the upgrade service, the virtual machine enhancement tool according to the new version of enhancement tool file comprises:
after the first operating system acquires the new version of the enhancement tool file, replacing the old version of the enhancement tool file according to the new version of the enhancement tool file;
starting the virtual machine enhancement tool to finish the upgrading of the virtual machine enhancement tool.
5. The method of claim 2, wherein the upgrading, by the upgrade service, the virtual machine enhancement tool according to the new version of enhancement tool file comprises:
replacing the enhancement tool file of the old version according to the enhancement tool file of the new version through the monitoring service;
starting the virtual machine enhancement tool to finish the upgrading of the virtual machine enhancement tool.
6. The method according to claim 2, wherein the method further comprises:
when the type of the operating system is a second operating system, sending the virtual machine enhancement tool upgrading request to a virtual machine enhancement tool; the virtual machine enhancement tool upgrading request is used for indicating the virtual machine enhancement tool to modify the content of the pre-built shared memory;
and stopping the virtual machine enhancement tool when the monitoring service monitors that the content of the shared memory is changed, and reading the enhancement tool file of the new version from the upgrade image file of the virtual machine.
7. A virtual machine enhancement tool upgrade apparatus, the apparatus comprising:
the type determining module is used for responding to the upgrading request of the virtual machine enhancement tool and acquiring the type of the operating system;
the file copying module is used for calling the corresponding upgrading service according to the type of the operating system and reading the enhancement tool file of the new version from the upgrading image file of the virtual machine;
and the tool upgrading module is used for upgrading the virtual machine enhancement tool according to the enhancement tool file of the new version through the upgrading service.
8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor implements the steps of the method of any of claims 1 to 6 when the computer program is executed.
9. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that the computer program, when being executed by a processor, implements the steps of the method of any of claims 1 to 6.
CN202310878641.6A 2023-07-17 2023-07-17 Virtual machine enhancement tool upgrading method and device, computer equipment and storage medium Pending CN116880877A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310878641.6A CN116880877A (en) 2023-07-17 2023-07-17 Virtual machine enhancement tool upgrading method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310878641.6A CN116880877A (en) 2023-07-17 2023-07-17 Virtual machine enhancement tool upgrading method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN116880877A true CN116880877A (en) 2023-10-13

Family

ID=88254518

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310878641.6A Pending CN116880877A (en) 2023-07-17 2023-07-17 Virtual machine enhancement tool upgrading method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN116880877A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117093246A (en) * 2023-10-19 2023-11-21 深圳市掌锐电子有限公司 Method for upgrading OTA AB partition of multiple operating systems in virtual machine

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117093246A (en) * 2023-10-19 2023-11-21 深圳市掌锐电子有限公司 Method for upgrading OTA AB partition of multiple operating systems in virtual machine
CN117093246B (en) * 2023-10-19 2024-02-23 深圳市掌锐电子有限公司 Method for upgrading OTA AB partition of multiple operating systems in virtual machine

Similar Documents

Publication Publication Date Title
US10114630B2 (en) Management of software and operating system updates required for the process of creating a virtual machine facsimile of an existing physical or virtual machine
CN111492347A (en) System and method for updating containers
US20080104441A1 (en) Data processing system and method
CN107608681B (en) Operating system installation method and device and server
CN109710317B (en) System starting method and device, electronic equipment and storage medium
US20200272445A1 (en) Installation of operating system
CN109408122B (en) Equipment starting method, electronic equipment and computer storage medium
US10664598B1 (en) Firmware security patch deployment
US9235426B2 (en) Multicore processor system, computer product, and notification method for updating operating system
CN116880877A (en) Virtual machine enhancement tool upgrading method and device, computer equipment and storage medium
US20190303172A1 (en) Information processing apparatus, device assignment method, and computer readable medium
CN110716845A (en) Method for reading log information of Android system
CN115291946A (en) Hongmong system transplanting method, device, electronic equipment and readable medium
US9158550B2 (en) Caching based operating system installation
CN116775061A (en) Deployment method, device, equipment and storage medium of micro-service application
CN111913753A (en) Method and system for changing starting mode in cloud migration of windows system
WO2023087622A1 (en) Virtual machine boot configuration method and apparatus, computer device, and storage medium
US20150212866A1 (en) Management system for service of multiple operating environments, and methods thereof
US9448782B1 (en) Reducing a size of an application package
KR102423056B1 (en) Method and system for swapping booting disk
WO2020029995A1 (en) Application upgrading through sharing dependencies
US20070260577A1 (en) Providing COM access to an isolated system
KR101420026B1 (en) A method, apparatus and computer program for loading files during a boot-up process
CN110825417A (en) Application program updating method and system
CN115421785B (en) Method, device and medium for transplanting application program

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