CN110489150A - A kind of hot upgrade method of virtual machine, device and its relevant device - Google Patents
A kind of hot upgrade method of virtual machine, device and its relevant device Download PDFInfo
- Publication number
- CN110489150A CN110489150A CN201910792572.0A CN201910792572A CN110489150A CN 110489150 A CN110489150 A CN 110489150A CN 201910792572 A CN201910792572 A CN 201910792572A CN 110489150 A CN110489150 A CN 110489150A
- Authority
- CN
- China
- Prior art keywords
- virtual machine
- target
- upgrading
- storage medium
- hot
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
- G06F8/65—Updates
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
- G06F2009/4557—Distribution of virtual machine instances; Migration and load balancing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
- G06F2009/45583—Memory management, e.g. access or allocation
Abstract
This application discloses a kind of hot upgrade methods of virtual machine, including hot upgrade command determines target virtual machine and the corresponding file destination of the target virtual machine based on the received;State acquisition is carried out to the initial virtual machine process of the target virtual machine, obtains target status information;Start the upgrading virtual machine process of the target virtual machine by the file destination;The corresponding shared storage medium of the target virtual machine is opened by the upgrading virtual machine process;The target status information is synchronized in the shared storage medium;The hot upgrade method of the virtual machine while avoiding the wasting of resources, can greatly improve the heat upgrading efficiency of virtual machine.Disclosed herein as well is a kind of hot update device of virtual machine, equipment and computer readable storage mediums, have above-mentioned beneficial effect.
Description
Technical field
This application involves virtual technology field, in particular to a kind of hot upgrade method of virtual machine further relates to a kind of virtual machine
Hot update device, equipment and computer readable storage medium.
Background technique
In computer science, virtual technology is a kind of by combination or the existing computer resource of subregion, so that these
Resource shows as one or more operating environments, to provide the technology of the access mode better than original resource distribution.It is specific and
Speech, by software virtual machine, can simulate one or more virtual computer, and these on a physical computer
Virtual machine can complete work as physical computer.Certainly, virtual machine is identical as physical computer, equally exists upgrading and asks
Topic.
The upgrading of virtual machine generally passes through heat upgrading and realizes, heat upgrading is online upgrading, non-interrupting service process.Existing
Have in technology, the heat upgrading of virtual machine is by the live migration of virtual machine in a host into another host, in the host
Its thermophoresis is returned again after completing upgrading.However, there is more serious inefficiency in this kind of implementation, specifically
For, due to needing to be migrated twice to virtual machine, the transition process consuming time is longer, and heat upgrading efficiency is more low,
Especially in the case where the larger generation dirty data excessive velocities of virtual machine traffic pressure, this kind of defect is particularly evident;In addition,
The use of multiple host also results in the additional occupancy of memory and cpu resource, causes the wasting of resources.
Therefore, how while avoiding the wasting of resources, the heat upgrading efficiency for effectively improving virtual machine is art technology
Personnel's urgent problem to be solved.
Summary of the invention
The purpose of the application is to provide a kind of hot upgrade method of virtual machine, and the hot upgrade method of the virtual machine can avoid providing
While source wastes, the heat upgrading efficiency of virtual machine is greatly improved;The another object of the application is to provide a kind of virtual machine heat
Update device, equipment and computer readable storage medium all have above-mentioned beneficial effect.
In a first aspect, this application provides a kind of hot upgrade method of virtual machine, the hot upgrade method of virtual machine includes:
Hot upgrade command determines target virtual machine and the corresponding file destination of the target virtual machine based on the received;
State acquisition is carried out to the initial virtual machine process of the target virtual machine, obtains target status information;
Start the upgrading virtual machine process of the target virtual machine by the file destination;
The corresponding shared storage medium of the target virtual machine is opened by the upgrading virtual machine process;
The target status information is synchronized in the shared storage medium.
Preferably, the upgrade command hot based on the received determines that target virtual machine and the target virtual machine are corresponding
File destination, comprising:
Target address information is determined according to the hot upgrade command, and the target is determined according to the target address information
Virtual machine;
The hot upgrade command is parsed, the corresponding file destination information of the target virtual machine is obtained.
Preferably, described that corresponding shared storage Jie of the target virtual machine is opened by the upgrading virtual machine process
Matter, comprising:
The location information of shared memory file and the location information of shared disk are determined according to the initial virtual machine process;
According to the location information of the shared memory file, the shared drive is opened by the upgrading virtual machine process
File;
According to the location information of the shared disk, the shared disk is opened by the upgrading virtual machine process.
It is preferably, described that the target status information is synchronized in the shared storage medium, comprising:
By the target status information thermophoresis into the shared storage medium.
Preferably, it is described by the target status information thermophoresis into the shared storage medium, comprising:
By Transmission Control Protocol by the target status information thermophoresis into the shared storage medium.
Preferably, after the heat upgrading for completing the target virtual machine, further includes:
Close the initial virtual machine process of the target virtual machine.
Preferably, after the heat upgrading for completing the target virtual machine, further includes:
Delete the original document for creating the initial virtual machine process.
Second aspect, present invention also provides a kind of hot update device of virtual machine, the hot update device of virtual machine includes:
Virtual machine information determining module determines target virtual machine and the mesh for hot upgrade command based on the received
Mark the corresponding file destination of virtual machine;
Virtual machine state acquisition module carries out state acquisition for the initial virtual machine process to the target virtual machine,
Obtain target status information;
Virtual machine process starting module, for starting the upgrading virtual machine of the target virtual machine by the file destination
Process;
Shared storage medium starting module, it is corresponding for opening the target virtual machine by the upgrading virtual machine process
Shared storage medium;
The hot upgraded module of virtual machine, for the target status information to be synchronized in the shared storage medium.
The third aspect, present invention also provides a kind of WEB loopholes to identify that equipment, the WEB loophole identification equipment include:
Memory, for storing computer program;
Processor realizes the step of the hot upgrade method of any one of the above virtual machine when for executing the computer program
Suddenly.
Fourth aspect, present invention also provides a kind of computer readable storage medium, the computer readable storage medium
On be stored with computer program, the computer program realizes any one of the above virtual machine heat upgrading side when being executed by processor
The step of method.
The hot upgrade method of a kind of virtual machine provided herein, including hot upgrade command determines target void based on the received
Quasi- machine and the corresponding file destination of the target virtual machine;Shape is carried out to the initial virtual machine process of the target virtual machine
State acquisition, obtains target status information;Start the upgrading virtual machine process of the target virtual machine by the file destination;It is logical
It crosses the upgrading virtual machine process and opens the corresponding shared storage medium of the target virtual machine;The target status information is same
Step is into the shared storage medium.
As it can be seen that technical solution provided herein, is realized in the same host by way of shared storage medium
The heat upgrading of virtual machine, firstly, since this kind of hot upgrading mode is not necessarily to change the running position of virtual machine, so that after migration
Virtual machine is still run on original host, is not take up network bandwidth and disk io, and virtual machine to be upgraded only needs to carry out
Primary migration greatly reduces hot update time, and then improve the heat upgrading efficiency of virtual machine without moving back;Secondly as
This kind of hot upgrading mode is moved by the way of shared storage medium without treating the corresponding storage medium of upgrading virtual machine
It moves, only migrates the status information of virtual machine, and since the information content of virtual machine state information is smaller, it can be complete in a short time
At migration, the heat upgrading efficiency of virtual machine is further improved;Further, since this kind of hot upgrading mode only needs a master
The parallel hot upgrading processing of multiple main frames can be realized in machine as a result, greatly improves the heat upgrading efficiency of virtual machine.
In addition, realizing the heat upgrading of virtual machine by a host, without occupying additional computer resource, resource wave is effectively prevented
Take.
A kind of hot update device of virtual machine, equipment and computer readable storage medium provided herein, all has
Beneficial effect is stated, details are not described herein.
Detailed description of the invention
In order to illustrate the technical solutions in the embodiments of the present application or in the prior art more clearly, to embodiment or will show below
There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this
The embodiment of application for those of ordinary skill in the art without creative efforts, can also basis
The attached drawing of offer obtains other attached drawings.
Fig. 1 is a kind of flow diagram of the hot upgrade method of virtual machine provided herein;
Fig. 2 is the flow diagram of the hot upgrade method of another virtual machine provided herein;
Fig. 3 is a kind of schematic diagram of the hot upgrade method of virtual machine provided herein;
Fig. 4 is a kind of structural schematic diagram of the hot update device of virtual machine provided herein;
Fig. 5 is the structural schematic diagram of the hot update device of another virtual machine provided herein;
Fig. 6 is a kind of structural schematic diagram of the hot updating apparatus of virtual machine provided herein.
Specific embodiment
The core of the application is to provide a kind of hot upgrade method of virtual machine, and the hot upgrade method of the virtual machine can avoid providing
While source wastes, the heat upgrading efficiency of virtual machine is greatly improved;Another core of the application is to provide a kind of virtual machine heat
Update device, equipment and computer readable storage medium all have above-mentioned beneficial effect.
To keep the purposes, technical schemes and advantages of the embodiment of the present application clearer, below in conjunction with the embodiment of the present application
In attached drawing, the technical scheme in the embodiment of the application is clearly and completely described, it is clear that described embodiment is
Some embodiments of the present application, instead of all the embodiments.Based on the embodiment in the application, those of ordinary skill in the art
All other embodiment obtained without making creative work, shall fall in the protection scope of this application.
Heat upgrading, which refers to, treats the online upgrading that updating apparatus is not interrupted regular traffic, as previously mentioned, the prior art
In need to realize by two hosts when carrying out heat upgrading to virtual machine, there are more serious thermophoresis inefficiency and
Problem of resource waste, therefore, to solve this problem, this application provides a kind of hot upgrade method of virtual machine, the virtual machine heat liters
Grade method while avoiding the wasting of resources, can greatly improve the heat upgrading efficiency of virtual machine.
Referring to FIG. 1, Fig. 1 is a kind of flow diagram of the hot upgrade method of virtual machine provided herein, this is virtual
The hot upgrade method of machine may include:
S101: hot upgrade command determines target virtual machine and the corresponding file destination of target virtual machine based on the received;
This step aims at the determination of target virtual machine and its file destination, wherein target virtual machine is in host
Need to carry out the virtual machine of hot upgrading, file destination is the file upgraded for realizing target virtual machine, and specifically can be can
Execute file and its corresponding library file.Specifically, can be determined according to the hot upgrade command when receiving hot upgrade command
Target virtual machine and its file destination, wherein hot upgrade command can directly be inputted by client by technical staff, can also be with
It is responded according to preset condition automatic trigger, such as timing condition, acquisition modes have no effect on the implementation of the technical program.
As a kind of preferred embodiment, above-mentioned upgrade command hot based on the received determines that target virtual machine and target are empty
The quasi- corresponding file destination of machine may include: to determine target address information according to hot upgrade command, and according to target address information
Determine target virtual machine;Hot upgrade command is parsed, the corresponding file destination information of target virtual machine is obtained.
For above-mentioned target virtual machine and its file destination constant current journey really, present applicant proposes a kind of more specific realities
Existing mode, specifically, the quantity for the virtual machine being arranged in a host is not unique, every virtual machine should all be provided with its institute
Therefore the unique information of category, such as IP address, ID mark can realize the determination to target virtual machine according to location information, work as skill
When art personnel issue hot upgrade command, the address information of target virtual machine and its corresponding file destination can be additional to hot upgrading
In instruction, host can determine corresponding target virtual machine according to the target address information in hot upgrade command as a result, and from heat
File destination is parsed in upgrade command, to realize the heat upgrading of target virtual machine.
S102: state acquisition is carried out to the initial virtual machine process of target virtual machine, obtains target status information;
This step aims at the acquisition to target virtual machine status information, currently running especially by target virtual machine
Process, i.e., above-mentioned initial virtual machine process are realized.Wherein, above-mentioned target status information is that corresponding target virtual machine virtualizes mould
The running state information of quasi- all hardware equipment, for example, hardware device can be cpu, network interface card, Magnetic Disk Controler, video card, string
Mouthful etc., status information can correspond to port status, the variable of register etc. that hardware device is run to support.It is understood that
It is that the citing of hardware above equipment and its status information is only several concrete types provided by the present application, does not do unique restriction.
It should be noted that even if target virtual machine virtualizes the hardware device numerous types of simulation, but its corresponding shape
The information content very little of state information, can be completed in a short time transmission, without considering the resources such as network bandwidth, memory, disk io
Limitation.
S103: start the upgrading virtual machine process of target virtual machine by file destination;
This step aims at the upgrading that target virtual machine corresponds to process, due to the initial virtual machine process of target virtual machine
It is to be obtained by running corresponding original document, for the upgrading for realizing target virtual machine, the target that can will be obtained based on S101
File replaces original document, specifically, since original document is under the respective stored path for having been stored in target virtual machine
, it therefore, can transfer them in the caching being pre-created, and file destination is stored to above-mentioned store path, Jin Ertong
It crosses and runs the file destination and start new virtual machine process, i.e., above-mentioned upgrading virtual machine process;It is of course also possible in destination virtual
Store path is created in machine, and file destination is stored to newly-built store path or corresponds to store path different from original document
Under other store paths, to pass through operational objective file start upgrading virtual machine process.
It is understood that above-mentioned file destination is version updating, functionality compared to the original document of target virtual machine
The more diversified executable file that can be used for opening virtual machine process.
S104: the corresponding shared storage medium of target virtual machine is opened by upgrading virtual machine process;
This step aims at the shared of storage medium, wherein storage medium by target virtual machine initial virtual machine into
Journey creation is called, and is mainly used for storing the data information that target virtual machine generates.Firstly, can refer in the prior art
The implementation process of virtual machine heat upgrading realizes that the heat of virtual machine upgrades by two hosts, specifically by virtual machine pair to be upgraded
The storage medium answered and its all status informations are uniformly migrated by currently running host to another host, it is clear that,
Its migrating data amount is larger, and transit time is too long, and then leads to the reduction of virtual machine heat upgrading efficiency, moreover, in void to be upgraded
In the quasi- biggish situation of machine traffic pressure, this kind of defect is become apparent.Therefore, the application completes the process to target virtual machine
After upgrading, the corresponding shared storage medium of initial virtual machine process is found under specified path using upgrading virtual machine process,
And open it, it realizes that the storage medium of upgrading virtual machine process and initial virtual machine process is shared as a result, no longer needs to mesh
The storage medium of mark virtual machine is migrated, and Data Migration pressure is greatly reduced, to effectively increase the heat of virtual machine
Upgrade efficiency.It is contemplated that, the specific routing information of shared storage medium directly can determine according to file destination.
As a kind of preferred embodiment, the corresponding shared storage of target virtual machine is opened above by upgrading virtual machine process
Medium may include: the position letter of location information and shared disk that shared memory file is determined according to initial virtual machine process
Breath;According to the location information of shared memory file, shared memory file is opened by upgrading virtual machine process;According to shared disk
Location information, pass through upgrading virtual machine process open shared disk.
For above-mentioned shared storage medium, it is specifically as follows shared memory file and shared disk, is used equally for realization pair
Answer the storage of Various types of data information in target virtual machine, wherein shared memory file can be directly by the initial void of target virtual machine
Quasi- machine process creation, creation position can determine that shared disk is same according to the original document for starting initial virtual machine process
Sample can be specified by original document.The shared of storage medium can be realized by opening shared file and shared disk as a result, specifically
, the location information of shared memory file and shared disk can be determined respectively by initial virtual machine process first, and then be based on
Place information inquiry simultaneously opens corresponding shared memory file and shared disk.
It is understood that the concrete type of above-mentioned shared storage medium is only a kind of realization side provided herein
Formula uniquely can be not other any kind of storage mediums of achievable data information memory.
S105: target status information is synchronized in shared storage medium.
This step aims at the heat upgrading of target virtual machine, specifically, after opening shared storage medium, it can be by base
It is synchronized in the shared storage medium in the target status information of S102 acquisition, so far, realizes target virtual machine status information
Migration, process upgrading and storage medium it is shared, complete the heat upgrading of target virtual machine.
As previously mentioned, the information content very little of target virtual machine status information, can be completed in a short time transmission, lead in addition
The migration that the shared mode of storage medium avoids storage medium is crossed, the transit time of data information, Jin Erji are effectively shortened
The big heat upgrading efficiency for improving virtual machine.Further, based on described above as can be seen that in compared to the prior art
Virtual machine moving out and moving back, and the application is the heat upgrading for realizing virtual machine by a host, need to only carry out primary virtual
The migration of machine status information greatly improves the heat upgrading efficiency of virtual machine.In addition, can also further realize more masters
The synchronization process of machine, and then realize the batch heat upgrading of virtual machine.
It is above-mentioned that target status information is synchronized in shared storage medium as a kind of preferred embodiment, may include: by
Target status information thermophoresis is into shared storage medium.
This application provides a kind of synchronous method of more specific target status information, i.e., real based on thermophoresis technology
Existing, thermophoresis specifically refers to the change that virtual machine carries out running position under open state, that is to say, that in target status information
In synchronous process, all business of target virtual machine can be operated normally, and can effectively avoid upgraded by virtual machine heat as a result,
Cause service disconnection inconvenient to user's bring, improves user friendly.
Preferably, it is above-mentioned by target status information thermophoresis into shared storage medium, may include: to pass through TCP
(Transmission Control Protocol, transmission control protocol) agreement deposits target status information thermophoresis to shared
In storage media.
Specifically, the thermophoresis for target status information, can be realized by Transmission Control Protocol, Transmission Control Protocol is a kind of towards even
Connecing, reliable transport layer communication protocol based on byte stream, reliability with higher.
The hot upgrade method of virtual machine provided herein, it is real in the same host by way of shared storage medium
The heat upgrading of virtual machine is showed, firstly, since this kind of hot upgrading mode is not necessarily to change the running position of virtual machine, so that after migration
Virtual machine still run on original host, be not take up network bandwidth and disk io, and virtual machine to be upgraded only need to be into
The primary migration of row greatly reduces hot update time, and then improve the heat upgrading efficiency of virtual machine without moving back;Secondly, by
In this kind of hot upgrading mode by the way of shared storage medium, carried out without treating the corresponding storage medium of upgrading virtual machine
Migration only migrates the status information of virtual machine, and since the information content of virtual machine state information is smaller, it can be in a short time
Migration is completed, the heat upgrading efficiency of virtual machine is further improved;Further, since this kind of hot upgrading mode only needs a master
The parallel hot upgrading processing of multiple main frames can be realized in machine as a result, greatly improves the heat upgrading efficiency of virtual machine.
In addition, realizing the heat upgrading of virtual machine by a host, without occupying additional computer resource, resource wave is effectively prevented
Take.
On the basis of the various embodiments described above, referring to FIG. 2, Fig. 2 is another virtual machine heat liter provided herein
The flow diagram of grade method, the hot upgrade method of the virtual machine can include:
S201: hot upgrade command determines target virtual machine and the corresponding file destination of target virtual machine based on the received;
S202: state acquisition is carried out to the initial virtual machine process of target virtual machine, obtains target status information;
S203: start the upgrading virtual machine process of target virtual machine by file destination;
S204: the corresponding shared storage medium of target virtual machine is opened by upgrading virtual machine process;
S205: target status information is synchronized in shared storage medium;
S206: the initial virtual machine process of target virtual machine is closed.
S207: the original document for creating initial virtual machine process is deleted.
Specifically, after completing to the heat upgrading of target virtual machine, it, can be by target virtual machine to avoid cpu resource from occupying
Initial virtual machine process close, that is, stop initial virtual machine process operation;To avoid memory space from occupying, can will be used to create
The original document for building initial virtual machine process is deleted.The additional occupancy that can effectively reduce computer resource as a result, avoids resource
Waste.
Specific implementation process about above-mentioned steps S201 to S205 can refer to the content of previous embodiment, herein no longer into
Row repeats.
On the basis of above-mentioned each embodiment, this application provides a kind of more specifically hot upgrade method of virtual machine,
Specifically referring to FIG. 3, Fig. 3 is a kind of schematic diagram of the hot upgrade method of virtual machine provided herein.Wherein, virtual machine process
A is the initial virtual machine process of target virtual machine, and virtual machine process B is the upgrading virtual machine process of target virtual machine.
1, normal operation of the target virtual machine based on initial virtual machine process:
Specifically, target virtual machine starts virtual machine process A using original document, it is shared interior by virtual machine process A creation
File is deposited, and determines shared disk, for example, the corresponding start command of virtual machine process A are as follows:
qemu-system-x86-id 3482854414958-smp 4-boot d-hda/home/vm_images/
Images.img-m 4096-object memory-backend-file, id=mem-node0, size=4096M, mem-
Path=/tmp, share=on;
It can be seen that the start command indicate use/home/vm_images/images.img as virtual machine share
Disk, and shared memory file is created at memory directory/tmp, and corresponding memory size is 4G.Wherein, for mem-
Path specified path can create shared memory file under its catalogue if it is catalogue;If it is shared memory file,
Then it can be used directly.It can be seen that after virtual machine process A starting according to mem-path=/tmp as a result, it can be in/tmp catalogue
It is lower to obtain following shared memory file :/tmp/3482854414958.qemu_back_mem._objects_mem-
Node0.TR9j5a, wherein the last string number of the shared memory file is at random that each process initiation is different.
2, the heat upgrading of target virtual machine:
Firstly, parsing obtains the corresponding file destination of target virtual machine in hot upgrade command, which is replaced
Original document, can be seen that the original document for needing to be replaced according to the start command of above-mentioned virtual machine process A is qemu-
system-x86.Illustrate a bit, wherein the original document for needing to be replaced generally/lib and/usr/lib the two catalogues
Under .so file, in the present embodiment, original .so file transfer under specifically general/lib and/usr/lib the two catalogues
Into preset cache, then by file destination it is corresponding store to/lib and/usr/lib catalogue under, complete file replacement.Further,
It can use the virtual machine process B of file destination starting target virtual machine, at this point, virtual machine process B both can be directly using void
The shared memory file of quasi- machine process A creation, can also directly open shared disk, corresponding, the starting life of virtual machine process B
It enables are as follows: qemu-system-x86-id 3482854414958-smp 4-boot d-hda/home/vm_images/
Images.img-m 4096-object memory-backend-file, id=mem-node0, size=4096M, mem-
Path=/tmp/3482854414958.qemu_back_mem._objects_mem-node0 .TR9j5a, share=on-
incoming tcp:127.0.0.1:7001;
It can be seen that the shared disk that the start command of virtual machine process B has used virtual machine process A specified :/home/
Vm_images/images.img, and the shared memory file for having used virtual machine process A to create: mem-path=/tmp/
3482854414958.qemu_back_mem._objects_mem-node0.TR9j5a virtual machine process B can be straight as a result,
Connect the shared memory file and shared disk using virtual machine process A.In addition,-incoming expression migrates target virtual machine
To opposite end, the tcp protocol address of corresponding migration are as follows: 127.0.0.1, corresponding migration port are as follows: 7001.
Further, the thermophoresis of virtual machine process A to virtual machine process B, i.e. the state letter of acquisition virtual machine process A are carried out
Breath, and thermophoresis is into virtual machine process B.
Finally, closing virtual machine process A, the corresponding original document of virtual machine process A is deleted, the heat of target virtual machine is completed
Upgrading.
As it can be seen that the hot upgrade method of virtual machine provided by the embodiment of the present application, same by way of shared storage medium
The heat upgrading of virtual machine is realized in one host, firstly, since this kind of hot upgrading mode is not necessarily to change the operating position of virtual machine
It sets, so that the virtual machine after migration is still run on original host, is not take up network bandwidth and disk io, and to be upgraded
Virtual machine only need to be migrated once, without moving back, greatly reduce hot update time, and then improve the heat upgrading of virtual machine
Efficiency;Secondly as this kind of hot upgrading mode is by the way of shared storage medium, it is corresponding without treating upgrading virtual machine
Storage medium is migrated, and the status information of virtual machine is only migrated, and since the information content of virtual machine state information is smaller,
It can be completed in a short time migration, further improve the heat upgrading efficiency of virtual machine;Further, due to this kind of hot upgrading mode
A host is only needed, the parallel hot upgrading processing of multiple main frames can be realized as a result, greatly improve virtual machine
Heat upgrading efficiency.In addition, realizing the heat upgrading of virtual machine by a host, without occupying additional computer resource, effectively
Avoid the wasting of resources.
The hot update device of virtual machine provided by the embodiments of the present application is introduced below, virtual machine heat liter described below
Stage arrangement can correspond to each other reference with the hot upgrade method of above-described virtual machine.
Referring to FIG. 4, Fig. 4 is a kind of structural schematic diagram of the hot update device of virtual machine provided herein, this is virtual
The hot update device of machine may include:
Virtual machine information determining module 10 determines target virtual machine and target for hot upgrade command based on the received
The corresponding file destination of virtual machine;
Virtual machine state acquisition module 20 carries out state acquisition for the initial virtual machine process to target virtual machine, obtains
Obtain target status information;
Virtual machine process starting module 30, for starting the upgrading virtual machine process of target virtual machine by file destination;
Shared storage medium starting module 40, it is corresponding shared for opening target virtual machine by upgrading virtual machine process
Storage medium;
The hot upgraded module 50 of virtual machine, for target status information to be synchronized in shared storage medium.
The hot update device of virtual machine provided herein, it is real in the same host by way of shared storage medium
The heat upgrading of virtual machine is showed, firstly, since this kind of hot upgrading mode is not necessarily to change the running position of virtual machine, so that after migration
Virtual machine still run on original host, be not take up network bandwidth and disk io, and virtual machine to be upgraded only need to be into
The primary migration of row greatly reduces hot update time, and then improve the heat upgrading efficiency of virtual machine without moving back;Secondly, by
In this kind of hot upgrading mode by the way of shared storage medium, carried out without treating the corresponding storage medium of upgrading virtual machine
Migration only migrates the status information of virtual machine, and since the information content of virtual machine state information is smaller, it can be in a short time
Migration is completed, the heat upgrading efficiency of virtual machine is further improved;Further, since this kind of hot upgrading mode only needs a master
The parallel hot upgrading processing of multiple main frames can be realized in machine as a result, greatly improves the heat upgrading efficiency of virtual machine.
In addition, realizing the heat upgrading of virtual machine by a host, without occupying additional computer resource, resource wave is effectively prevented
Take.
Further, referring to FIG. 5, Fig. 5 is the structural representation of the hot update device of another virtual machine provided herein
Figure.
On the basis of the above embodiments, as a kind of preferred embodiment, virtual machine heat provided herein upgrades dress
In setting, above-mentioned virtual machine information determining module 10 can include:
Virtual machine determination unit to be upgraded, for determining target address information according to hot upgrade command, and according to target
Location information determines target virtual machine;
Alternate file information resolution unit obtains the corresponding mesh of target virtual machine for parsing to hot upgrade command
Mark the file information.
On the basis of the above embodiments, as a kind of preferred embodiment, virtual machine heat provided herein upgrades dress
In setting, above-mentioned shared storage medium starting module 40 can include:
Location information determination unit, for determining the location information of shared memory file according to initial virtual machine process and being total to
Enjoy the location information of disk;
Shared memory file start unit, for the location information according to shared memory file, by upgrading virtual machine into
Journey opens shared memory file;
Shared disk start unit is opened altogether for the location information according to shared disk by upgrading virtual machine process
Enjoy disk.
On the basis of the above embodiments, as a kind of preferred embodiment, virtual machine heat provided herein upgrades dress
In setting, the above-mentioned hot upgraded module 50 of virtual machine can be specifically used for: will be by target status information thermophoresis into shared storage medium.
On the basis of the above embodiments, as a kind of preferred embodiment, virtual machine heat provided herein upgrades dress
In setting, the above-mentioned hot upgraded module 50 of virtual machine can be specifically used for: be deposited target status information thermophoresis to shared by Transmission Control Protocol
In storage media.
On the basis of the above embodiments, as a kind of preferred embodiment, virtual machine heat provided herein upgrades dress
In setting, it may also include initial virtual machine process closedown module 60, for closing the initial virtual machine process of target virtual machine.
On the basis of the above embodiments, as a kind of preferred embodiment, virtual machine heat provided herein upgrades dress
In setting, it may also include original document removing module 70, for deleting the original document for creating initial virtual machine process.
Above method embodiment is please referred to for the introduction of device provided by the present application, this will not be repeated here by the application.
The hot updating apparatus of virtual machine provided by the embodiments of the present application is introduced below, virtual machine heat liter described below
Grade equipment can correspond to each other reference with the hot upgrade method of above-described virtual machine.
Referring to FIG. 6, Fig. 6 is a kind of structural schematic diagram of the hot updating apparatus of virtual machine provided herein, this is virtual
The hot updating apparatus of machine may include:
Memory 1, for storing computer program;
Processor 2 can realize any one of the above virtual machine when for executing the computer program of the above-mentioned storage of memory 1
The step of hot upgrade method.
Above method embodiment is please referred to for the introduction of equipment provided by the present application, this will not be repeated here by the application.
Further, the embodiment of the present application also discloses a kind of computer readable storage medium, for storing computer journey
Sequence, wherein the step of any one of the above virtual machine hot upgrade method can be realized when computer program is executed by processor.
Wherein, which may include: USB flash disk, mobile hard disk, read-only memory (Read-Only
Memory, ROM), random access memory (Random Access Memory, RAM), magnetic or disk etc. is various to deposit
Store up the medium of program code.
Above method embodiment is please referred to for the specific introduction of computer readable storage medium provided by the present application, this Shen
It please this will not be repeated here.
Each embodiment is described in a progressive manner in specification, the highlights of each of the examples are with other realities
The difference of example is applied, the same or similar parts in each embodiment may refer to each other.For device disclosed in embodiment
Speech, since it is corresponded to the methods disclosed in the examples, so being described relatively simple, related place is referring to method part illustration
.
Professional further appreciates that, unit described in conjunction with the examples disclosed in the embodiments of the present disclosure
And algorithm steps, can be realized with electronic hardware, computer software, or a combination of the two, in order to clearly demonstrate hardware and
The interchangeability of software generally describes each exemplary composition and step according to function in the above description.These
Function is implemented in hardware or software actually, the specific application and design constraint depending on technical solution.Profession
Technical staff can use different methods to achieve the described function each specific application, but this realization is not answered
Think beyond scope of the present application.
The step of method described in conjunction with the examples disclosed in this document or algorithm, can directly be held with hardware, processor
The combination of capable software module or the two is implemented.Software module can be placed in random access memory (RAM), memory, read-only deposit
Reservoir (ROM), electrically programmable ROM, electrically erasable ROM, register, hard disk, moveable magnetic disc, CD-ROM or technology
In any other form of storage medium well known in field.
Finally, it is to be noted that, herein, relational terms such as first and second and the like be used merely to by
One entity or operation are distinguished with another entity or operation, without necessarily requiring or implying these entities or operation
Between there are any actual relationship or orders.Moreover, the terms "include", "comprise" or its any other variant meaning
Covering non-exclusive inclusion, so that the process, method, article or equipment for including a series of elements not only includes that
A little elements, but also including other elements that are not explicitly listed, or further include for this process, method, article or
The intrinsic element of equipment.In the absence of more restrictions, the element limited by sentence "including a ...", is not arranged
Except there is also other identical elements in the process, method, article or apparatus that includes the element.
Above to the hot upgrade method of virtual machine, device, equipment and computer readable storage medium provided herein into
It has gone and has been discussed in detail.Specific examples are used herein to illustrate the principle and implementation manner of the present application, the above implementation
The explanation of example is merely used to help understand the present processes and its core concept.It should be pointed out that for the general of the art
For logical technical staff, under the premise of not departing from the application principle, can also to the application, some improvement and modification can also be carried out, this
A little improvement and modification also fall into the protection scope element of the claim of this application.
Claims (10)
1. a kind of hot upgrade method of virtual machine characterized by comprising
Hot upgrade command determines target virtual machine and the corresponding file destination of the target virtual machine based on the received;
State acquisition is carried out to the initial virtual machine process of the target virtual machine, obtains target status information;
Start the upgrading virtual machine process of the target virtual machine by the file destination;
The corresponding shared storage medium of the target virtual machine is opened by the upgrading virtual machine process;
The target status information is synchronized in the shared storage medium.
2. the hot upgrade method of virtual machine as described in claim 1, which is characterized in that the upgrade command hot based on the received is true
Set the goal virtual machine and the corresponding file destination of the target virtual machine, comprising:
Target address information is determined according to the hot upgrade command, and the destination virtual is determined according to the target address information
Machine;
The hot upgrade command is parsed, the corresponding file destination information of the target virtual machine is obtained.
3. the hot upgrade method of virtual machine as described in claim 1, which is characterized in that described to pass through the upgrading virtual machine process
Open the corresponding shared storage medium of the target virtual machine, comprising:
The location information of shared memory file and the location information of shared disk are determined according to the initial virtual machine process;
According to the location information of the shared memory file, the shared drive text is opened by the upgrading virtual machine process
Part;
According to the location information of the shared disk, the shared disk is opened by the upgrading virtual machine process.
4. the hot upgrade method of virtual machine as described in claim 1, which is characterized in that described that the target status information is synchronous
To in the shared storage medium, comprising:
By the target status information thermophoresis into the shared storage medium.
5. the hot upgrade method of virtual machine as claimed in claim 4, which is characterized in that described to move the target status information heat
It moves in the shared storage medium, comprising:
By Transmission Control Protocol by the target status information thermophoresis into the shared storage medium.
6. the hot upgrade method of virtual machine as described in claim 1 to 5 any one, which is characterized in that described to complete the mesh
After the heat upgrading for marking virtual machine, further includes:
Close the initial virtual machine process of the target virtual machine.
7. the hot upgrade method of virtual machine as claimed in claim 6, which is characterized in that the heat for completing the target virtual machine
After upgrading, further includes:
Delete the original document for creating the initial virtual machine process.
8. a kind of hot update device of virtual machine characterized by comprising
Virtual machine information determining module determines that target virtual machine and the target are empty for hot upgrade command based on the received
The quasi- corresponding file destination of machine;
Virtual machine state acquisition module carries out state acquisition for the initial virtual machine process to the target virtual machine, obtains
Target status information;
Virtual machine process starting module, for started by the file destination upgrading virtual machine of the target virtual machine into
Journey;
Shared storage medium starting module, it is corresponding total for opening the target virtual machine by the upgrading virtual machine process
Enjoy storage medium;
The hot upgraded module of virtual machine, for the target status information to be synchronized in the shared storage medium.
9. a kind of hot updating apparatus of virtual machine characterized by comprising
Memory, for storing computer program;
Processor realizes virtual machine heat liter as claimed in any one of claims 1 to 7 when for executing the computer program
The step of grade method.
10. a kind of computer readable storage medium, which is characterized in that be stored with computer on the computer readable storage medium
Program, the computer program realize virtual machine heat as claimed in any one of claims 1 to 7 when being executed by the processor
The step of upgrade method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910792572.0A CN110489150A (en) | 2019-08-26 | 2019-08-26 | A kind of hot upgrade method of virtual machine, device and its relevant device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910792572.0A CN110489150A (en) | 2019-08-26 | 2019-08-26 | A kind of hot upgrade method of virtual machine, device and its relevant device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110489150A true CN110489150A (en) | 2019-11-22 |
Family
ID=68554108
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910792572.0A Pending CN110489150A (en) | 2019-08-26 | 2019-08-26 | A kind of hot upgrade method of virtual machine, device and its relevant device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110489150A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111552489A (en) * | 2020-03-31 | 2020-08-18 | 支付宝(杭州)信息技术有限公司 | User mode file system hot upgrading method, device, server and medium |
CN111722909A (en) * | 2020-06-12 | 2020-09-29 | 浪潮电子信息产业股份有限公司 | Virtual machine migration method, system, equipment and storage medium |
CN112199165A (en) * | 2020-10-28 | 2021-01-08 | 支付宝(杭州)信息技术有限公司 | Method and device for hot upgrading of virtual machine monitoring program of security container |
CN113296802A (en) * | 2020-07-22 | 2021-08-24 | 阿里巴巴集团控股有限公司 | Virtual machine hot upgrading method, host device and storage medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9292332B1 (en) * | 2014-12-11 | 2016-03-22 | Amazon Technologies, Inc. | Live updates for virtual machine monitor |
US20160306649A1 (en) * | 2015-01-19 | 2016-10-20 | Vmware, Inc. | Operating-System Exchanges Using Memory-Pointer Transfers |
CN106293781A (en) * | 2015-05-15 | 2017-01-04 | 阿里巴巴集团控股有限公司 | The method and apparatus of online upgrading machine virtual machine |
CN106502763A (en) * | 2016-11-01 | 2017-03-15 | 上海优刻得信息科技有限公司 | A kind of Oftware updating method and device |
CN106612306A (en) * | 2015-10-22 | 2017-05-03 | 中兴通讯股份有限公司 | Data sharing method and device of virtual machine |
CN108121558A (en) * | 2017-12-29 | 2018-06-05 | 上海优刻得信息科技有限公司 | Oftware updating method, device, storage medium and equipment |
-
2019
- 2019-08-26 CN CN201910792572.0A patent/CN110489150A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9292332B1 (en) * | 2014-12-11 | 2016-03-22 | Amazon Technologies, Inc. | Live updates for virtual machine monitor |
US20160306649A1 (en) * | 2015-01-19 | 2016-10-20 | Vmware, Inc. | Operating-System Exchanges Using Memory-Pointer Transfers |
CN106293781A (en) * | 2015-05-15 | 2017-01-04 | 阿里巴巴集团控股有限公司 | The method and apparatus of online upgrading machine virtual machine |
CN106612306A (en) * | 2015-10-22 | 2017-05-03 | 中兴通讯股份有限公司 | Data sharing method and device of virtual machine |
CN106502763A (en) * | 2016-11-01 | 2017-03-15 | 上海优刻得信息科技有限公司 | A kind of Oftware updating method and device |
CN108121558A (en) * | 2017-12-29 | 2018-06-05 | 上海优刻得信息科技有限公司 | Oftware updating method, device, storage medium and equipment |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111552489A (en) * | 2020-03-31 | 2020-08-18 | 支付宝(杭州)信息技术有限公司 | User mode file system hot upgrading method, device, server and medium |
CN111552489B (en) * | 2020-03-31 | 2022-04-26 | 支付宝(杭州)信息技术有限公司 | User mode file system hot upgrading method, device, server and medium |
CN111722909A (en) * | 2020-06-12 | 2020-09-29 | 浪潮电子信息产业股份有限公司 | Virtual machine migration method, system, equipment and storage medium |
CN113296802A (en) * | 2020-07-22 | 2021-08-24 | 阿里巴巴集团控股有限公司 | Virtual machine hot upgrading method, host device and storage medium |
CN112199165A (en) * | 2020-10-28 | 2021-01-08 | 支付宝(杭州)信息技术有限公司 | Method and device for hot upgrading of virtual machine monitoring program of security container |
CN112199165B (en) * | 2020-10-28 | 2022-07-05 | 支付宝(杭州)信息技术有限公司 | Method and device for hot upgrading of virtual machine monitoring program of security container |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110489150A (en) | A kind of hot upgrade method of virtual machine, device and its relevant device | |
CN107526743B (en) | Method and apparatus for compressing file system metadata | |
US10721332B2 (en) | System and method for process migration in a content centric network | |
US10318194B2 (en) | Method and an apparatus, and related computer-program products, for managing access request in multi-tenancy environments | |
JP2010182302A (en) | Method and apparatus for efficiently removing data duplication by metadata grouping | |
JP2008015984A (en) | Data migration device, method and program | |
CN105589744B (en) | A kind of virtual machine migration method and device | |
CN105740165A (en) | Method and apparatus for managing file system of unified storage system | |
CN109271098A (en) | A kind of data migration method and device | |
US20070050390A1 (en) | Method and Apparatus For The Defragmentation Of A File System | |
CN103647656A (en) | Billing node load control method, data access control method and node | |
CN113138945A (en) | Data caching method, device, equipment and medium | |
US8180985B2 (en) | Storage switch, storage system, and data copying method using bitmaps representing different sized regions | |
CN113272781A (en) | Improving data performance by transferring data between storage tiers using workload characteristics | |
CN114237519A (en) | Method, device, equipment and medium for migrating object storage data | |
CN108255989A (en) | Picture storage method, device, terminal device and computer storage media | |
CN108897868A (en) | Cache synchronization method and device, calculating equipment and storage medium based on trigger | |
CN106383667B (en) | The method and apparatus that LUN is migrated in service operation | |
CN113302602A (en) | Migrating data from a large inter-cell pool to an inter-cell pool | |
US20170255393A1 (en) | Storage device and storage method | |
US20160344810A1 (en) | Data migration | |
JP2014219750A (en) | Virtual library controller and control method | |
US11144243B2 (en) | Method and device for managing redundant array of independent disks and computer program product | |
CN106415539A (en) | Artifact correlation between domains | |
JP4311312B2 (en) | Time series data management method and 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 |