CN105022656A - Management method and device of virtual machine snapshot - Google Patents

Management method and device of virtual machine snapshot Download PDF

Info

Publication number
CN105022656A
CN105022656A CN201410158924.4A CN201410158924A CN105022656A CN 105022656 A CN105022656 A CN 105022656A CN 201410158924 A CN201410158924 A CN 201410158924A CN 105022656 A CN105022656 A CN 105022656A
Authority
CN
China
Prior art keywords
snapshot
document
virtual machine
snapshot document
file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201410158924.4A
Other languages
Chinese (zh)
Other versions
CN105022656B (en
Inventor
樊勇兵
赖培源
陈天
秦润锋
刘艺
丁圣勇
陈楠
何晓武
李巧玲
黄志兰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Telecom Corp Ltd
Original Assignee
China Telecom Corp 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 China Telecom Corp Ltd filed Critical China Telecom Corp Ltd
Priority to CN201410158924.4A priority Critical patent/CN105022656B/en
Publication of CN105022656A publication Critical patent/CN105022656A/en
Application granted granted Critical
Publication of CN105022656B publication Critical patent/CN105022656B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a management method and device of a virtual machine snapshot. The management method comprises the following steps: generating snapshot files of a current virtual machine state when the virtual machine is snapshotted, wherein the snapshot files comprise a description file of the current snapshot and snapshot data files of the current snapshot; the description file comprises a file list, which is used for descripting the list and types of files included in the snapshot data files of the current snapshot; when the snapshot files of the virtual machine need to be exported, judging whether the current snapshot is a first snapshot aiming at the virtual machine; if the current snapshot is the nth snapshot aiming at the virtual machine, then combining the snapshot data files from the first snapshot file to the nth snapshot file, so as to obtain an export data file; and exporting the export data file and the description file of the nth snapshot files. According to the management method and device of the virtual machine snapshot provided by the invention, the disaster recovery and state roll-back abilities of a virtual machine system can be improved preferentially by adding description files in the snapshot files, and performing flexible and efficient export management on the snapshot files of the virtual machine.

Description

Virtual machine snapshot management method and device
Technical field
The present invention relates to computer realm, particularly a kind of virtual machine snapshot management method and device.
Background technology
In recent years, system virtual machine (System Virtual Machine), because it is solving the advantage had in the problems such as isomerism, mobility and system management, becomes the focus of investigation and application.Due to virtual machine manager VMM(Virtual Machine Monitor, be called for short VMM) to the whole state of virtual machine, there is the ability encapsulating completely and control, therefore can realize the incomparable advantage of classic method at VMM layer, such as, move, fault-tolerant etc.For fault-tolerant, keeper can do snapshot to the state of virtual machine at any time by VMM, and can utilize snapshot that virtual machine is returned to former executing state.This ability utilizing snapshot to carry out state rollback of virtual machine, be very beneficial for solving the problems such as the fault-tolerant and date restoring under High Availabitity environment, therefore, virtual machine snapshot technology also becomes one of hot issue of virtual machine research field in recent years.
Virtual machine state generally includes the states such as processor, internal memory and storage resources, and storage resources mainly refers to the virtual disk of virtual machine, and virtual disk can have polytype, such as based on storage system file, Network Based etc.The snapshot of virtual machine is that a kind of finger preserves the state of a certain moment virtual machine, the state of preserving generally includes all hard disk informations, memory information and CPU(Central Processing Unit, CPU (central processing unit)) information, what have also comprises BIOS(Basic Input Output System, Basic Input or Output System (BIOS)) information.When virtual machine snapshot performed from first time, just virtual machine image file is set to a read states, and based on this image file, records follow-up file change.Because virtual disk general size is comparatively large, the state of storage resources is also the major part of virtual machine state.The virtual machine technique of main flow, as VMware vsphere, VMware Workstation, QEMU etc., all support the function of virtual disk being carried out to snapshot, but snapshot granularity is thicker usually, control dumb, and face the virtual machine that brings after file increases substantially and hang problem of waiting indefinitely.
The disk space of the physical server of carrying virtual machine refers to the local hard drive space of this physical server and distributes to the exterior storage of this physical server.The disk space of virtual machine refers to the disk space that user divides when setting up virtual machine, can set up one with the file of this virtual machine name nominating on the disk of the physical server of carrying virtual machine behind user's partitioning discs space, all virtual machine file of user comprise under space that this virtual machine divides all can be placed on this file.Synchronously a snapshot document and a delta package file can be produced when performing snap-shot action to virtual machine, the state of virtual machine when snapshot document is used for recording execution snap-shot action, delta package file is used for recording the renewal rewards theory such as the additions and deletions amendment performing virtual machine after snapshot, therefore along with the operation of virtual machine, delta package file can constantly increase, until the space that the physical server of carrying virtual machine distributes to this virtual machine exhausts completely, virtual machine is caused to be hung dead.Therefore, in order to the normal operation not allowing additional functionality have influence on virtual machine itself, need some badly and support the method that virtual machine snapshot imports and exports.
At present, importing and exporting of virtual machine snapshot file do not supported by most virtual management software, the situation that indivedual support virtual machine is derived then needs virtual machine image file to derive together, as shown in Figure 1, backup file is caused to take too much storage resources, the vsphere product of such as VMware, in the snapshot derivation of virtual machine, what support is the derivation of whole virtual machine file, after importing, then becomes an other virtual machine.
Along with the development of cloud data center, the application of virtual machine will be more and more extensive, and the lifting required in high reliability virtual machine along with business, the virtual machine backup mode based on snapshot will have wide application scenarios.And the generation of snapshot document to be the disk space occupancy of virtual machine usually double, cause the anxiety of storage space, even may cause cannot normally running of virtual machine because of the deficiency of virtual machine storage space.
Summary of the invention
The embodiment of the present invention provides a kind of virtual machine snapshot management method and device.By to virtual machine snapshot file flexible, import and export management efficiently, preferentially can improve disaster tolerance and the state rollback ability of dummy machine system.
According to an aspect of the present invention, a kind of virtual machine snapshot management method is provided, comprises:
When carrying out snapshot to virtual machine, generate the snapshot document of current virtual machine state, wherein snapshot document comprises the description document of recent snapshot and the snapshot data file of recent snapshot, described description document comprises listed files, the listed files that the snapshot data file for illustration of recent snapshot comprises and type;
When needing the snapshot document of deriving described virtual machine, judge that whether recent snapshot is the 1st snapshot for described virtual machine;
If recent snapshot is n-th snapshot for described virtual machine, then by the snapshot data Piece file mergence in the 1st snapshot document to the n-th time snapshot document, to obtain derived data file, wherein n be greater than 1 natural number;
Description document in described derived data file and n-th snapshot document is derived.
In one embodiment, if recent snapshot is the 1st snapshot for described virtual machine, then the description document in the snapshot data file in the 1st snapshot document and the 1st snapshot document is derived.
In one embodiment, by the snapshot data Piece file mergence in the 1st snapshot document to the n-th time snapshot document, comprise with the step obtaining derived data file:
The disk snapshot Piece file mergence 1st snapshot data file to the n-th time snapshot data file comprised, to obtain data in magnetic disk file;
By the memory image Piece file mergence in described data in magnetic disk file and n-th snapshot document, to obtain derived data file.
In one embodiment, the step that the description document in described derived data file and n-th snapshot document derives is comprised:
Judge whether the 1st snapshot document to the (n-1)th time snapshot document is exported;
If the 1st time snapshot document to the (n-1)th time snapshot document is exported, then the description document in described derived data file and n-th snapshot document is derived;
Delete the 1st snapshot document to the (n-1)th time snapshot document, store described derived data file with the follow-up work of executive system.
In one embodiment, if the 1st snapshot document to the (n-1)th time snapshot document is not exported, then the description document in described derived data file and n-th snapshot document is derived.
In one embodiment, when importing snapshot document, the snapshot document imported is verified;
When verification succeeds, from the description document of the snapshot document of described importing, extract listed files;
Utilize the listed files extracted, the original image file of described virtual machine and importing snapshot document are linked;
When described virtual machine is in halted state, utilizes and import hard disk and the memory information that snapshot document upgrades described virtual machine, thus complete the importing of snapshot document.
In one embodiment, the check code for verifying snapshot document integrality is also comprised in description document;
When importing snapshot document, the step that the snapshot document imported verifies is comprised:
When importing snapshot document, from the description document of the snapshot document of described importing, extract described check code;
Utilize described check code, completeness check is carried out to the snapshot document imported.
According to a further aspect in the invention, provide a kind of virtual machine snapshot management devices, comprise snapshot document generation unit, recognition unit, data combination unit, snapshot document lead-out unit and storage unit, wherein:
Snapshot document generation unit, for when carrying out snapshot to virtual machine, generate the snapshot document of current virtual machine state, wherein snapshot document comprises the description document of recent snapshot and the snapshot data file of recent snapshot, described description document comprises listed files, the listed files that the snapshot data file for illustration of recent snapshot comprises and type;
Recognition unit, for when needing the snapshot document of deriving described virtual machine, judges that whether recent snapshot is the 1st snapshot for described virtual machine;
Data combination unit, for the judged result according to recognition unit, if recent snapshot is n-th snapshot for described virtual machine, then by the snapshot data Piece file mergence in the 1st snapshot document to the n-th time snapshot document, to obtain derived data file, wherein n be greater than 1 natural number;
Snapshot document lead-out unit, for deriving the description document in described derived data file and n-th snapshot document;
Storage unit, for storing the snapshot document that snapshot document generation unit generates.
In one embodiment, snapshot document lead-out unit is also for the judged result according to recognition unit, if recent snapshot is the 1st snapshot for described virtual machine, then the description document in the snapshot data file in the 1st snapshot document and the 1st snapshot document is derived.
In one embodiment, the disk snapshot Piece file mergence that the 1st snapshot data file to the n-th time snapshot data file specifically comprises by data combination unit, to obtain data in magnetic disk file; By the memory image Piece file mergence in described data in magnetic disk file and n-th snapshot document, to obtain derived data file.
In one embodiment, above-mentioned snapshot document lead-out unit comprises judge module, derives module and removing module, wherein:
Judge module, for judging whether the 1st snapshot document to the (n-1)th time snapshot document is exported;
Derive module, for the judged result according to judge module, if the 1st snapshot document to the (n-1)th time snapshot document is exported, then the description document in described derived data file and n-th snapshot document is derived; And indicate removing module to delete the 1st snapshot document to the (n-1)th time snapshot document;
Removing module, for according to the instruction of deriving module, deletes the 1st snapshot document to the (n-1)th time snapshot document, and described in instruction cell stores, derived data file is with the follow-up work of executive system.
In one embodiment, derive module also for the judged result according to judge module, if the 1st snapshot document to the (n-1)th time snapshot document is not exported, then only the description document in described derived data file and n-th snapshot document is derived.
In one embodiment, said apparatus also comprises snapshot document and imports unit, verification unit, extraction unit, link unit and updating block, wherein:
Snapshot document imports unit, for importing snapshot document, and by the snapshot document of importing stored in described storage unit;
Verification unit, during for importing unit importing snapshot document at snapshot document, verifies the snapshot document imported;
Extraction unit, for the check results according to verification unit, if verification succeeds, extracts listed files from the description document of the snapshot document of described importing;
Link unit, the listed files extracted for utilizing extraction unit, links the original image file of described virtual machine and importing snapshot document;
Updating block, for when described virtual machine is in halted state, utilizes and imports hard disk and the memory information that snapshot document upgrades described virtual machine, thus complete the importing of snapshot document.
In one embodiment, the check code for verifying snapshot document integrality is also comprised in description document;
Verification unit specifically when snapshot document imports unit importing snapshot document, extracts described check code from the description document of the snapshot document of described importing; Utilize described check code, completeness check is carried out to the snapshot document imported.
The present invention, by increasing description document in snapshot document, by flexible, the efficient derivation management to virtual machine snapshot file, thus preferentially can improve disaster tolerance and the state rollback ability of dummy machine system.
Description of the invention provides in order to example with for the purpose of describing, and is not exhaustively or limit the invention to disclosed form.Many modifications and variations are obvious for the ordinary skill in the art.Selecting and describing embodiment is in order to principle of the present invention and practical application are better described, and enables those of ordinary skill in the art understand the present invention thus design the various embodiments with various amendment being suitable for special-purpose.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, be briefly described to the accompanying drawing used required in embodiment or description of the prior art below, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
Fig. 1 is the schematic diagram that in prior art, snapshot document derives an embodiment.
Fig. 2 is the schematic diagram of a virtual machine snapshot management method of the present invention embodiment.
Fig. 3 is the schematic diagram that snapshot document of the present invention derives an embodiment.
Fig. 4 is the schematic diagram of another embodiment of virtual machine snapshot management method of the present invention.
Fig. 5 is the schematic diagram that the present invention imports a snapshot document embodiment.
Fig. 6 is the schematic diagram of a virtual machine snapshot management devices of the present invention embodiment.
Fig. 7 is the schematic diagram of a snapshot document lead-out unit of the present invention embodiment.
Fig. 8 is the schematic diagram of another embodiment of virtual machine snapshot management devices of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Illustrative to the description only actually of at least one exemplary embodiment below, never as any restriction to the present invention and application or use.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
Unless specifically stated otherwise, otherwise positioned opposite, the numerical expression of the parts of setting forth in these embodiments and step and numerical value do not limit the scope of the invention.
Meanwhile, it should be understood that for convenience of description, the size of the various piece shown in accompanying drawing is not draw according to the proportionate relationship of reality.
May not discuss in detail for the known technology of person of ordinary skill in the relevant, method and apparatus, but in the appropriate case, described technology, method and apparatus should be regarded as a part of authorizing instructions.
In all examples with discussing shown here, any occurrence should be construed as merely exemplary, instead of as restriction.Therefore, other example of exemplary embodiment can have different values.
It should be noted that: represent similar terms in similar label and letter accompanying drawing below, therefore, once be defined in an a certain Xiang Yi accompanying drawing, then do not need to be further discussed it in accompanying drawing subsequently.
Fig. 2 is the schematic diagram of a virtual machine snapshot management method of the present invention embodiment.As shown in Figure 2, the method step of the present embodiment comprises:
Step 201, when carrying out snapshot to virtual machine, generates the snapshot document of current virtual machine state.
Wherein snapshot document comprises the description document of recent snapshot and the snapshot data file of recent snapshot, and described description document comprises listed files, the listed files that the snapshot data file for illustration of recent snapshot comprises and type.
Preferably, description document can comprise the file name, file layout, MD5, Snapshot time, listed files etc. of snapshot.Wherein file name refers to the preservation file of snapshot document; File layout refers to the file layout that virtual machine snapshot file is preserved, such as delta, raw etc.; MD5 refers to the completeness check code of snapshot document itself; Snapshot time refers to the time that snapshot produces, and preserves with the form of the date Hour Minute Second of standard; Listed files is then that listed files included in snapshot document and type are described, such as, comprise disk snapshot file 1, file 2, file 3, memory image file 1, file 2 etc.
Step 202, when needing the snapshot document of deriving described virtual machine, judges that whether recent snapshot is the 1st snapshot for described virtual machine.
Step 203, if recent snapshot is n-th snapshot for described virtual machine, then by the snapshot data Piece file mergence in the 1st snapshot document to the n-th time snapshot document, to obtain derived data file, wherein n be greater than 1 natural number.
Step 204, derives the description document in described derived data file and n-th snapshot document.
Based on the virtual machine snapshot management method that the above embodiment of the present invention provides, by increasing description document in snapshot document, when needing the snapshot document of deriving described virtual machine, and recent snapshot is n-th snapshot for described virtual machine, wherein n be greater than 1 natural number, then by the snapshot data Piece file mergence in the 1st snapshot document to the n-th time snapshot document, to obtain derived data file, the description document in described derived data file and n-th snapshot document is derived.Thus flexible, the efficient derivation management that can realize virtual machine snapshot file.
In one embodiment, such as n=2, then corresponding snapshot document derives schematic diagram as shown in Figure 3.Compared with embodiment described in Fig. 1, resource utilization of the present invention is higher.
Preferably, above-mentioned steps 203 can comprise:
The disk snapshot Piece file mergence 1st snapshot data file to the n-th time snapshot data file comprised, to obtain data in magnetic disk file.By the memory image Piece file mergence in described data in magnetic disk file and n-th snapshot document, to obtain derived data file.
That is, snapshot data file at least comprises disk snapshot file and memory image file.When merging, only disk snapshot file being merged, also comprising the memory image file of last snapshot.
Fig. 4 is the schematic diagram of another embodiment of virtual machine snapshot management method of the present invention.As shown in Figure 4, the method step of the present embodiment comprises:
Step 401, when carrying out snapshot to virtual machine, generates the snapshot document of current virtual machine state.Wherein generation step is identical with middle corresponding step embodiment illustrated in fig. 2.
Step 402, when needing the snapshot document of deriving described virtual machine, judges that whether recent snapshot is the 1st snapshot for described virtual machine.If recent snapshot is n-th snapshot for described virtual machine, then perform step 403; If recent snapshot is the 1st snapshot for described virtual machine, then perform step 408.
Step 403, by the snapshot data Piece file mergence in the 1st snapshot document to the n-th time snapshot document, to obtain derived data file, wherein n be greater than 1 natural number.
Step 404, judges whether the 1st snapshot document to the (n-1)th time snapshot document is exported.If the 1st time snapshot document to the (n-1)th time snapshot document is exported, then perform step 405; If the 1st time snapshot document to the (n-1)th time snapshot document is not exported, then perform step 407.
Step 405, derives the description document in described derived data file and n-th snapshot document.
Step 406, deletes the 1st snapshot document to the (n-1)th time snapshot document, stores described derived data file with the follow-up work of executive system.Afterwards, other step of the present embodiment is no longer performed.
By this process, the pass coefficient between data in magnetic disk chain can be reduced, make disk read-write efficiency higher, simultaneously can free system resources.
Step 407, derives the description document in described derived data file and n-th snapshot document.Afterwards, other step of the present embodiment is no longer performed.
Step 408, derives the description document in the snapshot data file in the 1st snapshot document and the 1st snapshot document.
Fig. 5 is the schematic diagram that the present invention imports a snapshot document embodiment.As shown in Figure 5, the method step of the present embodiment is:
Step 501, when importing snapshot document, verifies the snapshot document imported.
Preferably, when importing snapshot document, from the description document of the snapshot document of described importing, the check code for verifying snapshot document integrality is extracted, such as MD5.Utilize described check code, completeness check is carried out to the snapshot document imported.
Step 502, when verification succeeds, extracts listed files from the description document of the snapshot document of described importing.
Step 503, utilizes the listed files extracted, and the original image file of described virtual machine and importing snapshot document is linked.
Step 504, when described virtual machine is in halted state, utilizes and imports hard disk and the memory information that snapshot document upgrades described virtual machine, thus complete the importing of snapshot document.
In one embodiment, first snapshot document can be imported to when snapshot imports in the unified storage at virtual machine place, and then carry out link and the state rollback of data, to reduce the time out of virtual machine as far as possible.In addition, the snapshot document due to each virtual machine is all the merging of all snapshot documents above, and therefore, each needs and original image link, can simplify the management process of snapshot document.
Fig. 6 is the schematic diagram of a virtual machine snapshot management devices of the present invention embodiment.As shown in Figure 6, this device can comprise snapshot document generation unit 601, recognition unit 602, data combination unit 603, snapshot document lead-out unit 604 and storage unit 605, wherein:
Snapshot document generation unit 601, for when carrying out snapshot to virtual machine, generates the snapshot document of current virtual machine state.
Wherein snapshot document comprises the description document of recent snapshot and the snapshot data file of recent snapshot, and described description document comprises listed files, the listed files that the snapshot data file for illustration of recent snapshot comprises and type.
Recognition unit 602, for when needing the snapshot document of deriving described virtual machine, judges that whether recent snapshot is the 1st snapshot for described virtual machine.
Data combination unit 603, for the judged result according to recognition unit 602, if recent snapshot is n-th snapshot for described virtual machine, then by the snapshot data Piece file mergence in the 1st snapshot document to the n-th time snapshot document, to obtain derived data file, wherein n be greater than 1 natural number.
Snapshot document lead-out unit 604, for deriving the description document in described derived data file and n-th snapshot document.
Storage unit 605, for storing the snapshot document that snapshot document generation unit generates.
Based on the virtual machine snapshot management devices that the above embodiment of the present invention provides, by increasing description document in snapshot document, when needing the snapshot document of deriving described virtual machine, and recent snapshot is n-th snapshot for described virtual machine, wherein n be greater than 1 natural number, then by the snapshot data Piece file mergence in the 1st snapshot document to the n-th time snapshot document, to obtain derived data file, the description document in described derived data file and n-th snapshot document is derived.Thus flexible, the efficient derivation management that can realize virtual machine snapshot file.
Preferably, snapshot document lead-out unit 604 is also for the judged result according to recognition unit 602, if recent snapshot is the 1st snapshot for described virtual machine, then the description document in the snapshot data file in the 1st snapshot document and the 1st snapshot document is derived.
Preferably, the disk snapshot Piece file mergence that the 1st snapshot data file to the n-th time snapshot data file specifically comprises by data combination unit 604, to obtain data in magnetic disk file; By the memory image Piece file mergence in described data in magnetic disk file and n-th snapshot document, to obtain derived data file.
Fig. 7 is the schematic diagram of a snapshot document lead-out unit of the present invention embodiment.As shown in Figure 7, snapshot document lead-out unit 604 comprises judge module 701, derives module 702 and removing module 703, wherein:
Judge module 701, for judging whether the 1st snapshot document to the (n-1)th time snapshot document is exported.
Derive module 702, for the judged result according to judge module 701, if the 1st snapshot document to the (n-1)th time snapshot document is exported, then the description document in described derived data file and n-th snapshot document is derived; And indicate removing module 703 to delete the 1st snapshot document to the (n-1)th time snapshot document.
Removing module 703, for according to the instruction of deriving module 702, deletes the 1st snapshot document to the (n-1)th time snapshot document, and indicates storage unit 605 to store described derived data file with the follow-up work of executive system.
Preferably, derive module 702 also for the judged result according to judge module 701, if the 1st snapshot document to the (n-1)th time snapshot document is not exported, then only the description document in described derived data file and n-th snapshot document is derived.
Fig. 8 is the schematic diagram of another embodiment of virtual machine snapshot management devices of the present invention.Compare with embodiment illustrated in fig. 7 with Fig. 6, in the embodiment shown in fig. 8, this device also comprises snapshot document and imports unit 801, verification unit 802, extraction unit 803, link unit 804 and updating block 805.Wherein:
Snapshot document imports unit 801, for importing snapshot document, and by the snapshot document of importing stored in described storage unit 605.
Verification unit 802, during for importing unit importing snapshot document at snapshot document, verifies the snapshot document imported.
Preferably, the check code for verifying snapshot document integrality is also comprised in description document, such as MD5.Verification unit 802 specifically when snapshot document imports unit importing snapshot document, extracts described check code from the description document of the snapshot document of described importing; Utilize described check code, completeness check is carried out to the snapshot document imported.
Extraction unit 803, for the check results according to verification unit 802, if verification succeeds, extracts listed files from the description document of the snapshot document of described importing.
Link unit 804, for the listed files utilizing extraction unit 803 to extract, links the original image file of described virtual machine and importing snapshot document.
Updating block 805, for when described virtual machine is in halted state, utilizes and imports hard disk and the memory information that snapshot document upgrades described virtual machine, thus complete the importing of snapshot document.
By implementing the present invention, the independent derivation of virtual machine snapshot file can be supported, and when importing, the description by header file is carried out adaptation with the initial virtual machine image file under a read states and is merged.Thus, virtual machine snapshot file energy and image file can be made independently to store, and the mode that simultaneously can be merged by snapshot, reduces the disk relation chain of virtual machine snapshot, for virtual machine runnability provides higher guarantee.
One of ordinary skill in the art will appreciate that all or part of step realizing above-described embodiment can have been come by hardware, the hardware that also can carry out instruction relevant by program completes, described program can be stored in a kind of computer-readable recording medium, the above-mentioned storage medium mentioned can be ROM (read-only memory), disk or CD etc.

Claims (14)

1. a virtual machine snapshot management method, is characterized in that, comprising:
When carrying out snapshot to virtual machine, generate the snapshot document of current virtual machine state, wherein snapshot document comprises the description document of recent snapshot and the snapshot data file of recent snapshot, described description document comprises listed files, the listed files that the snapshot data file for illustration of recent snapshot comprises and type;
When needing the snapshot document of deriving described virtual machine, judge that whether recent snapshot is the 1st snapshot for described virtual machine;
If recent snapshot is n-th snapshot for described virtual machine, then by the snapshot data Piece file mergence in the 1st snapshot document to the n-th time snapshot document, to obtain derived data file, wherein n be greater than 1 natural number;
Description document in described derived data file and n-th snapshot document is derived.
2. method according to claim 1, is characterized in that,
If recent snapshot is the 1st snapshot for described virtual machine, then the description document in the snapshot data file in the 1st snapshot document and the 1st snapshot document is derived.
3. method according to claim 1, is characterized in that,
By the snapshot data Piece file mergence in the 1st snapshot document to the n-th time snapshot document, comprise with the step obtaining derived data file:
The disk snapshot Piece file mergence 1st snapshot data file to the n-th time snapshot data file comprised, to obtain data in magnetic disk file;
By the memory image Piece file mergence in described data in magnetic disk file and n-th snapshot document, to obtain derived data file.
4. method according to claim 1, is characterized in that,
The step that description document in described derived data file and n-th snapshot document derives is comprised:
Judge whether the 1st snapshot document to the (n-1)th time snapshot document is exported;
If the 1st time snapshot document to the (n-1)th time snapshot document is exported, then the description document in described derived data file and n-th snapshot document is derived;
Delete the 1st snapshot document to the (n-1)th time snapshot document, store described derived data file with the follow-up work of executive system.
5. method according to claim 4, is characterized in that,
If the 1st time snapshot document to the (n-1)th time snapshot document is not exported, then the description document in described derived data file and n-th snapshot document is derived.
6. method according to claim 1, is characterized in that,
When importing snapshot document, the snapshot document imported is verified;
When verification succeeds, from the description document of the snapshot document of described importing, extract listed files;
Utilize the listed files extracted, the original image file of described virtual machine and importing snapshot document are linked;
When described virtual machine is in halted state, utilizes and import hard disk and the memory information that snapshot document upgrades described virtual machine, thus complete the importing of snapshot document.
7. method according to claim 6, is characterized in that,
The check code for verifying snapshot document integrality is also comprised in description document;
When importing snapshot document, the step that the snapshot document imported verifies is comprised:
When importing snapshot document, from the description document of the snapshot document of described importing, extract described check code;
Utilize described check code, completeness check is carried out to the snapshot document imported.
8. a virtual machine snapshot management devices, is characterized in that, comprises snapshot document generation unit, recognition unit, data combination unit, snapshot document lead-out unit and storage unit, wherein:
Snapshot document generation unit, for when carrying out snapshot to virtual machine, generate the snapshot document of current virtual machine state, wherein snapshot document comprises the description document of recent snapshot and the snapshot data file of recent snapshot, described description document comprises listed files, the listed files that the snapshot data file for illustration of recent snapshot comprises and type;
Recognition unit, for when needing the snapshot document of deriving described virtual machine, judges that whether recent snapshot is the 1st snapshot for described virtual machine;
Data combination unit, for the judged result according to recognition unit, if recent snapshot is n-th snapshot for described virtual machine, then by the snapshot data Piece file mergence in the 1st snapshot document to the n-th time snapshot document, to obtain derived data file, wherein n be greater than 1 natural number;
Snapshot document lead-out unit, for deriving the description document in described derived data file and n-th snapshot document;
Storage unit, for storing the snapshot document that snapshot document generation unit generates.
9. device according to claim 8, is characterized in that,
Snapshot document lead-out unit is also for the judged result according to recognition unit, if recent snapshot is the 1st snapshot for described virtual machine, then the description document in the snapshot data file in the 1st snapshot document and the 1st snapshot document is derived.
10. device according to claim 8, is characterized in that,
The disk snapshot Piece file mergence that 1st snapshot data file to the n-th time snapshot data file specifically comprises by data combination unit, to obtain data in magnetic disk file; By the memory image Piece file mergence in described data in magnetic disk file and n-th snapshot document, to obtain derived data file.
11. devices according to claim 8, is characterized in that, snapshot document lead-out unit comprises judge module, derives module and removing module, wherein:
Judge module, for judging whether the 1st snapshot document to the (n-1)th time snapshot document is exported;
Derive module, for the judged result according to judge module, if the 1st snapshot document to the (n-1)th time snapshot document is exported, then the description document in described derived data file and n-th snapshot document is derived; And indicate removing module to delete the 1st snapshot document to the (n-1)th time snapshot document;
Removing module, for according to the instruction of deriving module, deletes the 1st snapshot document to the (n-1)th time snapshot document, and described in instruction cell stores, derived data file is with the follow-up work of executive system.
12. devices according to claim 11, is characterized in that,
Derive module also for the judged result according to judge module, if the 1st snapshot document to the (n-1)th time snapshot document is not exported, then only the description document in described derived data file and n-th snapshot document is derived.
13. devices according to claim 8, is characterized in that, also comprise snapshot document and import unit, verification unit, extraction unit, link unit and updating block, wherein:
Snapshot document imports unit, for importing snapshot document, and by the snapshot document of importing stored in described storage unit;
Verification unit, during for importing unit importing snapshot document at snapshot document, verifies the snapshot document imported;
Extraction unit, for the check results according to verification unit, if verification succeeds, extracts listed files from the description document of the snapshot document of described importing;
Link unit, the listed files extracted for utilizing extraction unit, links the original image file of described virtual machine and importing snapshot document;
Updating block, for when described virtual machine is in halted state, utilizes and imports hard disk and the memory information that snapshot document upgrades described virtual machine, thus complete the importing of snapshot document.
14. devices according to claim 13, is characterized in that,
The check code for verifying snapshot document integrality is also comprised in description document;
Verification unit specifically when snapshot document imports unit importing snapshot document, extracts described check code from the description document of the snapshot document of described importing; Utilize described check code, completeness check is carried out to the snapshot document imported.
CN201410158924.4A 2014-04-21 2014-04-21 virtual machine snapshot management method and device Active CN105022656B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410158924.4A CN105022656B (en) 2014-04-21 2014-04-21 virtual machine snapshot management method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410158924.4A CN105022656B (en) 2014-04-21 2014-04-21 virtual machine snapshot management method and device

Publications (2)

Publication Number Publication Date
CN105022656A true CN105022656A (en) 2015-11-04
CN105022656B CN105022656B (en) 2018-09-14

Family

ID=54412646

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410158924.4A Active CN105022656B (en) 2014-04-21 2014-04-21 virtual machine snapshot management method and device

Country Status (1)

Country Link
CN (1) CN105022656B (en)

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105740042A (en) * 2016-01-15 2016-07-06 北京京东尚科信息技术有限公司 Management method and management system for memories of virtual machines
CN105740049A (en) * 2016-01-27 2016-07-06 杭州华三通信技术有限公司 Control method and apparatus
CN106201656A (en) * 2016-06-30 2016-12-07 无锡华云数据技术服务有限公司 A kind of statistical method to KVM virtual machine snapshot memory space
CN106294018A (en) * 2016-08-11 2017-01-04 浪潮(北京)电子信息产业有限公司 A kind of virtual machine restoration methods and device
CN106445643A (en) * 2016-11-14 2017-02-22 上海云轴信息科技有限公司 Method and device for cloning and updating virtual machine
CN106777219A (en) * 2016-12-23 2017-05-31 北京亚细亚智业科技有限公司 For the data processing method and device of Visualized data centre
CN107203345A (en) * 2017-06-01 2017-09-26 深圳市云舒网络技术有限公司 A kind of many copy storage rapid verification coherence methods and its device
CN107688508A (en) * 2016-08-03 2018-02-13 深圳市深信服电子科技有限公司 A kind of image file space optimization method and system
CN107704554A (en) * 2017-09-27 2018-02-16 广东亿迅科技有限公司 The method and its system that data high-speed based on MPP databases imports
CN107807839A (en) * 2016-09-09 2018-03-16 阿里巴巴集团控股有限公司 A kind of method, apparatus and electronic equipment for changing virtual machine memory data
CN108804248A (en) * 2017-04-28 2018-11-13 南京壹进制信息技术股份有限公司 A kind of automatic Verification method of volume real-time guard data
CN108958888A (en) * 2018-07-04 2018-12-07 联想(北京)有限公司 The data processing method and processing system of electronic equipment
CN109324870A (en) * 2018-09-20 2019-02-12 郑州云海信息技术有限公司 A kind of method and apparatus for deleting the snapshot disk of virtual machine
CN112631830A (en) * 2020-12-16 2021-04-09 福建升腾资讯有限公司 Quick recovery method and device for non-recovery desktop fault under desktop virtualization framework
CN115994120A (en) * 2023-03-23 2023-04-21 北京飞轮数据科技有限公司 Data file merging method, device, electronic equipment and computer readable medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101788934A (en) * 2009-01-23 2010-07-28 英业达集团(天津)电子技术有限公司 Data manipulation method of logical volume manager
CN102520881A (en) * 2011-12-02 2012-06-27 中标软件有限公司 Virtual machine snapshot management method and system of cloud computing platform
CN103019884A (en) * 2012-11-21 2013-04-03 北京航空航天大学 Memory page de-weight method and memory page de-weight device based on virtual machine snapshot
CN103699459A (en) * 2013-12-31 2014-04-02 汉柏科技有限公司 Method and system for incremental backup of virtual machine data based on Qcow2 snapshots

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101788934A (en) * 2009-01-23 2010-07-28 英业达集团(天津)电子技术有限公司 Data manipulation method of logical volume manager
CN102520881A (en) * 2011-12-02 2012-06-27 中标软件有限公司 Virtual machine snapshot management method and system of cloud computing platform
CN103019884A (en) * 2012-11-21 2013-04-03 北京航空航天大学 Memory page de-weight method and memory page de-weight device based on virtual machine snapshot
CN103699459A (en) * 2013-12-31 2014-04-02 汉柏科技有限公司 Method and system for incremental backup of virtual machine data based on Qcow2 snapshots

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
海杰: "设备层多版本快照的设计与实现", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *

Cited By (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105740042A (en) * 2016-01-15 2016-07-06 北京京东尚科信息技术有限公司 Management method and management system for memories of virtual machines
CN105740042B (en) * 2016-01-15 2019-07-02 北京京东尚科信息技术有限公司 The management method and management system of virutal machine memory
CN105740049B (en) * 2016-01-27 2019-05-28 新华三技术有限公司 A kind of control method and device
CN105740049A (en) * 2016-01-27 2016-07-06 杭州华三通信技术有限公司 Control method and apparatus
CN106201656A (en) * 2016-06-30 2016-12-07 无锡华云数据技术服务有限公司 A kind of statistical method to KVM virtual machine snapshot memory space
CN107688508A (en) * 2016-08-03 2018-02-13 深圳市深信服电子科技有限公司 A kind of image file space optimization method and system
CN106294018A (en) * 2016-08-11 2017-01-04 浪潮(北京)电子信息产业有限公司 A kind of virtual machine restoration methods and device
CN106294018B (en) * 2016-08-11 2019-11-01 浪潮(北京)电子信息产业有限公司 A kind of virtual machine restoration methods and device
CN107807839B (en) * 2016-09-09 2022-01-28 阿里巴巴集团控股有限公司 Method and device for modifying memory data of virtual machine and electronic equipment
CN107807839A (en) * 2016-09-09 2018-03-16 阿里巴巴集团控股有限公司 A kind of method, apparatus and electronic equipment for changing virtual machine memory data
CN106445643A (en) * 2016-11-14 2017-02-22 上海云轴信息科技有限公司 Method and device for cloning and updating virtual machine
CN106445643B (en) * 2016-11-14 2019-10-22 上海云轴信息科技有限公司 It clones, the method and apparatus of upgrading virtual machine
CN106777219A (en) * 2016-12-23 2017-05-31 北京亚细亚智业科技有限公司 For the data processing method and device of Visualized data centre
CN106777219B (en) * 2016-12-23 2020-03-03 北京亚细亚智业科技有限公司 Data processing method and device for virtualized data center
CN108804248A (en) * 2017-04-28 2018-11-13 南京壹进制信息技术股份有限公司 A kind of automatic Verification method of volume real-time guard data
CN107203345A (en) * 2017-06-01 2017-09-26 深圳市云舒网络技术有限公司 A kind of many copy storage rapid verification coherence methods and its device
CN107704554A (en) * 2017-09-27 2018-02-16 广东亿迅科技有限公司 The method and its system that data high-speed based on MPP databases imports
CN108958888A (en) * 2018-07-04 2018-12-07 联想(北京)有限公司 The data processing method and processing system of electronic equipment
CN109324870A (en) * 2018-09-20 2019-02-12 郑州云海信息技术有限公司 A kind of method and apparatus for deleting the snapshot disk of virtual machine
CN112631830A (en) * 2020-12-16 2021-04-09 福建升腾资讯有限公司 Quick recovery method and device for non-recovery desktop fault under desktop virtualization framework
CN112631830B (en) * 2020-12-16 2024-02-02 福建升腾资讯有限公司 Rapid recovery method and device for failure of non-restored desktop under desktop virtualization architecture
CN115994120A (en) * 2023-03-23 2023-04-21 北京飞轮数据科技有限公司 Data file merging method, device, electronic equipment and computer readable medium
CN115994120B (en) * 2023-03-23 2023-06-06 北京飞轮数据科技有限公司 Data file merging method, device, electronic equipment and computer readable medium

Also Published As

Publication number Publication date
CN105022656B (en) 2018-09-14

Similar Documents

Publication Publication Date Title
CN105022656A (en) Management method and device of virtual machine snapshot
US11195183B2 (en) Detecting a transaction volume anomaly
US10884870B2 (en) Method and system for implementing consistency groups with virtual machines
US11513926B2 (en) Systems and methods for instantiation of virtual machines from backups
US10713120B2 (en) Unique identifiers for data replication, migration, failover operations and failback operations
CN106980623B (en) Data model determination method and device
US20170124103A1 (en) Method and Apparatus for Creating System Disk Snapshot of Virtual Machine
CN111656326B (en) System and method for performing database backup for repair-free recovery
CN107870845A (en) Towards the management method and system of micro services framework applications
US9256454B2 (en) Determining optimal methods for creating virtual machines
CN103970585A (en) Method and device for creating virtual machine
CN101308471B (en) Method and device for data restoration
CN106951345A (en) A kind of conformance test method and device of magnetic disk of virtual machine data
WO2012003048A1 (en) Systems and methods for sharing the results of analyses among virtual machines
CN103729169B (en) Method and apparatus for determining file extent to be migrated
US11550595B2 (en) Adaptive system for smart boot sequence formation of VMs for disaster recovery
CN104778410B (en) A kind of application integrity verification method
CN106899654A (en) A kind of sequence value generation method, apparatus and system
CN107329806A (en) A kind of development environment construction method and device
CN104375905A (en) Incremental backing up method and system based on data block
CN109857806A (en) The synchronization verification method and device of database table
WO2015084409A1 (en) Nosql database data validation
US20230393825A1 (en) Automated software deployment techniques
CN110109734A (en) A kind of implementation method and device of stateless virtual machine
CN107291439A (en) A kind of target delta data construction method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant