CN102902770A - Method and system for assembling mirror image files - Google Patents

Method and system for assembling mirror image files Download PDF

Info

Publication number
CN102902770A
CN102902770A CN2012103647419A CN201210364741A CN102902770A CN 102902770 A CN102902770 A CN 102902770A CN 2012103647419 A CN2012103647419 A CN 2012103647419A CN 201210364741 A CN201210364741 A CN 201210364741A CN 102902770 A CN102902770 A CN 102902770A
Authority
CN
China
Prior art keywords
assembly unit
file
current
software
image 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
CN2012103647419A
Other languages
Chinese (zh)
Other versions
CN102902770B (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.)
Neusoft Corp
Original Assignee
Neusoft Corp
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 Neusoft Corp filed Critical Neusoft Corp
Priority to CN201210364741.9A priority Critical patent/CN102902770B/en
Publication of CN102902770A publication Critical patent/CN102902770A/en
Application granted granted Critical
Publication of CN102902770B publication Critical patent/CN102902770B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a method and a system for assembling mirror image files, wherein the method comprises the following steps: acquiring all assembled files required by current mirror image files according to the assembling requests of the current mirror image files; generating all assembled files to be an orderly assembled file sequence according to preset software dependency relationship and software release dependency relationship; determining the file attribute of each assembled file in the orderly assembled file sequence according to the file layout of the assembled files recorded in the resource library of the assembled files; and assembling each assembled file according to an assembling path in sequence according to the determined file attribute to obtain the current mirror image files. According to the method and the system for assembling mirror image files, the storage of the software dependency relationship and the software release dependency relationship is used for replacing the storage of different mirror image files, and the space required for storing the software dependency relationship and the software release dependency relationship is smaller than the size of a mirror image file; and therefore, a large amount of storage space is saved.

Description

A kind of image file assembling method and system
Technical field
The present invention relates to computer technology, particularly relate to a kind of image file assembling method and system.
Background technology
Under the Visualized data centre environment, virtual machine image file (image file) is the file layout of running software support server running environment on memory device in the virtualized environment.Image file comprises the data that the runtimes such as operating system, software rely on, and image file is large and the structure time is longer.For fear of frequently the copying and making up of image file, those skilled in the art adopt the form that makes up virtual machine image assets storehouse to store the virtual machine image file that different software has been installed usually.The user can store into by the required image file of queries asset library lookup and with described image file and specify operation use on the physical server.
Because the image file size is usually in the 10GB rank, and dissimilar or same type different editions software asset all needs to have corresponding independent virtual machine image file just can directly be stored use by the user, just need two virtual machine image file such as " Tomcat5.5+MySQL5.0+Ubuntu10 " and " Tomcat 6+MySQL5.0+Ubuntu10 ", and the data major part of storing in described two image files is identical, and this has just caused the waste of storage space.
Summary of the invention
Technical matters to be solved by this invention is to realize the compression storage of image file, a kind of image file assembling method and system are provided, to solve in the prior art because the most of identical phenomenon that causes data redundancy of the data of storing in a plurality of image files, and the problem of the waste of the storage space that causes of this phenomenon.
In order to solve the problems of the technologies described above, the invention provides a kind of image file assembling method and system, the invention provides following technical scheme:
A kind of image file assembling method, the method comprises:
All assembly unit files required according to the current image file of assembly unit acquisition request of current image file;
According to default software dependence and software version dependence, with orderly assembly unit file sequence of described all assembly unit file generateds;
According to the assembly unit file layout that records in the assembly unit file resource storehouse, determine the file attribute of each assembly unit file in the orderly assembly unit file sequence;
Successively described each assembly unit file is carried out assembly unit to obtain current image file according to described assembly unit path according to the file attribute of determining.
Preferably, software dependence and software version dependence that described basis is default with orderly assembly unit file sequence of described all assembly unit file generateds, specifically comprise:
According to default software dependence, determine that in-degree is zero or the most approaching zero software type assembly unit file, described in-degree refers to depend on described software type assembly unit file and the number of other assembly unit files of existing;
Determine described software type assembly unit file and the version number of the assembly unit file that relies on according to default software version dependence;
According to default software dependence and described version number, generate the assembly unit path of current image file;
The described assembly unit of foundation path is with orderly assembly unit file sequence of described all assembly unit file generateds.
Preferably, the file attribute of described all assembly unit files comprises in image file, mirror snapshot and the software package one at least.
Preferably, the file attribute that described basis is determined carries out assembly unit to obtain current image file with described each assembly unit file according to described assembly unit path successively, specifically comprises:
Read first assembly unit file in the orderly assembly unit file sequence as current assembly unit file according to described assembly unit path, enter current assembly unit file processing flow process, described current assembly unit file processing flow process comprises:
The file attribute of judging described current assembly unit file is mirror image whether, if mirror image is then searched assembly unit image file corresponding to described current assembly unit file from explorer, and described assembly unit image file is installed in the current image file to be assembled;
If not mirror image, the file attribute of then judging described current assembly unit file is snapshot whether, if snapshot is then searched assembly unit snapshot document corresponding to described current assembly unit file from explorer, and described assembly unit snapshot document is installed in the current image file to be assembled;
If not snapshot is then searched software package corresponding to described current assembly unit file from explorer, and described software package is installed in the current image file to be assembled;
Judge whether the assembly unit file in the described orderly assembly unit file sequence all is read, if not, then according to the assembly unit path, read the next assembly unit file of current assembly unit file described in the described orderly assembly unit file set as current assembly unit file, the file attribute of carrying out the current assembly unit file of described judgement is the step of mirror image whether, until the assembly unit file in the described orderly assembly unit file sequence all is read.
Preferably, the file attribute that described basis is determined carries out assembly unit to obtain current image file with described each assembly unit file according to described assembly unit path successively, afterwards, also comprises:
Described current image file is sent in the server of appointment in the described current image file assembly unit request and move, to start virtual unit corresponding to described current image file.
A kind of image file assembling system, described system comprises:
Acquiring unit is used for root all assembly unit files required according to the current image file of assembly unit acquisition request of current image file;
Sequence generating unit is used for according to default software dependence and software version dependence, with orderly assembly unit file sequence of described all assembly unit file generateds;
Attribute determining unit for the assembly unit file layout that records according to assembly unit file resource storehouse, is determined the file attribute of each assembly unit file in the orderly assembly unit file sequence;
The assembly unit unit is used for successively described each assembly unit file being carried out assembly unit to obtain current image file according to described assembly unit path according to the file attribute of determining.
Preferably, described sequence generating unit comprises:
Determine subelement, be used for according to default software dependence, determine that in-degree is zero or the most approaching zero software type assembly unit file, described in-degree refers to depend on described software type assembly unit file and the number of other assembly unit files of existing;
Version is determined subelement, for the version number of the assembly unit file of determining described software type assembly unit file according to default software version dependence and relying on;
The path generates subelement, is used for generating the assembly unit path of current image file according to default software dependence and described version number;
Generate subelement, be used for according to described assembly unit path orderly assembly unit file sequence of described all assembly unit file generateds.
Preferably, the file attribute of described all assembly unit files comprises in image file, mirror snapshot and the software package one at least.
Preferably, described assembly unit unit comprises:
Read subelement, be used for according to described assembly unit path, read first assembly unit file in the orderly assembly unit file sequence as current assembly unit file;
Process subelement, be used for carrying out current assembly unit file processing flow process, described current assembly unit file processing flow process comprises:
The file attribute of judging described current assembly unit file is mirror image whether, if mirror image is then searched assembly unit image file corresponding to described current assembly unit file from explorer, and described assembly unit image file is installed in the current image file to be assembled;
If not mirror image, the file attribute of then judging described current assembly unit file is snapshot whether, if snapshot is then searched assembly unit snapshot document corresponding to described current assembly unit file from explorer, and described assembly unit snapshot document is installed in the current image file to be assembled;
If not snapshot is then searched software package corresponding to described current assembly unit file from explorer, and described software package is installed in the current image file to be assembled;
Judge whether the assembly unit file in the described orderly assembly unit file sequence all is read, if not, then according to the assembly unit path, read the next assembly unit file of current assembly unit file described in the described orderly assembly unit file sequence as current assembly unit file, the file attribute of carrying out the current assembly unit file of described judgement is the step of mirror image whether, until the assembly unit file in the described orderly assembly unit file sequence all is read.
Preferably, described system also comprises:
The operation unit is for moving in the server that described current image file is sent to described current image file assembly unit request appointment, to start virtual unit corresponding to described current image file.
Among the present invention, default software dependence and software version dependence are according to dissimilar, the general character of the software of different editions, remove after redundant abstract out, so compared with prior art, the present invention does not need storage corresponding to dissimilar, the image file of the software resource of different editions, but with dissimilar, software dependence and the software version dependence of different editions are stored, in needs, generate corresponding to dissimilar according to described dependence assembly unit, the image file of the software resource of different editions, because store dissimilar, the required space of the software dependence of different editions and software version dependence will be far smaller than the size of an image file, so saved a large amount of storage spaces.
Description of drawings
In order to be illustrated more clearly in the embodiment of the present application or technical scheme of the prior art, the below will do to introduce simply to the accompanying drawing of required use in embodiment or the description of the Prior Art, apparently, the accompanying drawing that the following describes only is some embodiment that put down in writing among the application, for those of ordinary skills, under the prerequisite of not paying creative work, can also obtain according to these accompanying drawings other accompanying drawing.
Fig. 1 is the process flow diagram of the assembling method embodiment 1 of a kind of image file of the present invention;
Fig. 2 is the software dependence graph that the present invention adopts;
Fig. 3 is the software version dependence graph that the present invention adopts;
Fig. 4 is the process flow diagram of the assembling method embodiment 2 of a kind of image file of the present invention;
Fig. 5 is the structural representation of the assembling system embodiment of a kind of image file of the present invention;
Fig. 6 is the structural representation of sequence generating unit in the system embodiment;
Fig. 7 is the structural representation of assembly unit unit in the system embodiment of the present invention;
Fig. 8 is the present invention's a kind of structural representation in actual applications.
Embodiment
In order to make those skilled in the art person understand better the present invention program, below in conjunction with the accompanying drawing in the embodiment of the invention, technical scheme in the embodiment of the invention is clearly and completely described, obviously, described embodiment only is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills belong to the scope of protection of the invention not making the every other embodiment that obtains under the creative work prerequisite.
With reference to shown in Figure 1, be the process flow diagram of the assembling method embodiment 1 of a kind of image file of the present invention, the present embodiment specifically can comprise:
Step 101: all assembly unit files required according to the current image file of assembly unit acquisition request of current image file.
The user will generate the image file corresponding to the software of certain type, could use the software of certain type, and if generate image file corresponding to the software of certain type, at first to generate the assembly unit request corresponding to the image file of the type software and version thereof, described assembly unit request comprises required software type and version information by what the user defined as required, message bag with certain format, described assembly unit request can generate by graphical tools or text editor.
Step 102: according to default software dependence and software version dependence, with orderly assembly unit file sequence of described all assembly unit file generateds.
Described software dependence be when installing according to dissimilar software generality abstract out, can represent that dissimilar software needs erection sequence and the dependence of the related software followed when mounted.Take software type as Tomcat and the software dependence during MySQL describe for example, with reference to shown in Figure 2, Fig. 2 is the schematic diagram of software dependence, lines all among Fig. 2 can be called directed edge, described directed edge represents erection sequence and the dependence between the different software resource, such as, the installation of Tomcat and MySQL will rely on Ubuntu, Redhat OS or CentOS.
Each rectangle can be regarded as a node among Fig. 2, different nodes have represented different software resources, wherein out-degree is that the storage class of the software resource of 0 node representative is image file, described out-degree is the number that 0 node refers to originate in the directed edge of described node, such as, originate in node Ubuntu, the number of the directed edge of Redhat OS and CentOS is zero, end at node Ubuntu, the number of the directed edge of Redhat OS and CentOS is 2, so node Ubuntu, Redhat OS and CentOS all are that out-degree is 0 node, finding in-degree in software dependence shown in Figure 2 is the node of zero or nearest connecting to neutral, described in-degree is that node zero or recently connecting to neutral represents software type assembly unit file, described in-degree refers to end at the number of the directed edge of node, according to in-degree be zero or recently the software type assembly unit Archive sit of connecting to neutral search the software version dependence graph, determine the version number of the assembly unit file of software type assembly unit file and dependence thereof, in-degree is that software type assembly unit Archive sit zero or recently connecting to neutral is Tomcat and MySQL among Fig. 2.
Assembly unit file take software type assembly unit file as Tomcat and dependence thereof as Ubuntu as example, with reference to shown in Figure 3, Fig. 3 is the schematic diagram of software version dependence, and the software version dependence can represent the dependence of concrete version between the complementary software.As shown in Figure 3, the version of Tomcat has V5.0, V5.5 and V6.0, wherein the installation of version V5.0 depends on the Ubuntu that version is V10, V11.04, when the user needs mounting software, the version of software is determined, can determine the version of the assembly unit file that software type assembly unit file to be installed relies on according to default software version dependence, if do not comprise the version of the software of this installation in the software version dependence that provides, then determine at random the version of the software that this mounting software relies on according to the software version dependence.
So according to software dependence shown in Figure 2 version number with the assembly unit file of determining, the principle of determining the assembly unit path of an image file is any one and comprises the simple path that out-degree is zero node, to generate as shown in Figure 2 an image file, more than one of the assembly unit path possibility of definite image file that will generate, in actual applications, can in a plurality of assembly units path, select according to actual needs the assembly unit path that conduct is final, in image file of assembly unit, will carry out orderly assembly unit according to described assembly unit path.
Referring to figs. 2 and 3 the principle that generates the assembly unit path, when generating current image file, can determine to generate according to concrete software dependence and software version dependence the assembly unit path of described current image file, and according to the assembly unit path of described current image file with orderly assembly unit file sequence of described all assembly unit file generateds.
Step 103: according to the assembly unit file layout that records in the assembly unit file resource storehouse, determine the file attribute of each assembly unit file in the orderly assembly unit file sequence.
All available assembly unit image files, assembly unit snapshot and assembly unit software package have been recorded in the assembly unit file resource storehouse, the file layout that is to say the assembly unit file is image file, snapshot and software package, with the file layout of the described assembly unit file file attribute as the assembly unit file.
Step 104: successively described each assembly unit file is carried out assembly unit to obtain current image file according to described assembly unit path according to the file attribute of determining.
After determining the file attribute of each assembly unit file, can be according to the assembly unit path of current image file, successively with described each assembly unit file assembly unit in the current image file to obtain current image file.
In the technical scheme of the present embodiment, default software dependence and software version dependence are according to dissimilar, the general character of the software of different editions, remove after redundant abstract out, so compared with prior art, the present invention does not need storage corresponding to dissimilar, the image file of the software resource of different editions, but with dissimilar, software dependence and the software version dependence of different editions are stored, in needs, generate corresponding to dissimilar according to described dependence assembly unit, the image file of the software resource of different editions, because store dissimilar, the required space of the software dependence of different editions and software version dependence will be far smaller than the size of an image file, so saved a large amount of storage spaces.
With reference to shown in Figure 4, be the process flow diagram of a kind of assembling method embodiment 2 of image file, the present embodiment can be regarded as the specific implementation of embodiment 1, and the present embodiment specifically can comprise:
Step 401: all assembly unit files required according to the current image file of assembly unit acquisition request of current image file.
Step 402: determine initial assembly unit path according to default software dependence.
Step 403: according to default software version dependence, determine the version number of the assembly unit file of software type assembly unit file and dependence thereof.
Step 404: the purpose assembly unit path of determining current mirror image assembly unit file according to initial assembly unit path and version number.
Step 405: according to described assembly unit path with orderly assembly unit file sequence of described all assembly unit file generateds.
Step 406: the file attribute that obtains each assembly unit file in the described orderly assembly unit file sequence.The implementation of the step 101 in the realization reference example 1 of step 401 in the present embodiment ~ step 406 ~ step 103, repeat no more herein, wherein after step 401 is obtained all required assembly unit files of current image file, further, can in assembly unit file resource storehouse, search all described assembly unit files, if any one the assembly unit file in all assembly unit files then finishes the assembly unit flow process of current image file not in assembly unit file resource storehouse.
Step 407: according to the file attribute of each assembly unit file, obtain current image file according to the assembly unit of assembly unit path.
The specific implementation of this step can comprise following substep:
Substep A1: read current image file.
Wherein obtaining of current image file is specially: read first assembly unit file in the orderly assembly unit file sequence as current assembly unit file according to described assembly unit path.
Substep A2: the file attribute of judging described current assembly unit file is mirror image whether, if mirror image then enters substep A3, if not mirror image then enters substep A4.
Substep A3: search assembly unit image file corresponding to described current assembly unit file and installation.
The specific implementation of this step is: search assembly unit image file corresponding to described current assembly unit file from explorer, after finding, described assembly unit image file is installed in the current image file to be assembled.
Substep A4: the file attribute of judging described current assembly unit file is snapshot whether, if snapshot then enters substep A5, if not snapshot then enters substep A6.
Substep A5: search assembly unit snapshot document corresponding to described current assembly unit file and installation.
The specific implementation of this step is: from explorer, after finding, described assembly unit snapshot document is installed in the current image file to be assembled.
Substep A6: search software package corresponding to described current assembly unit file and installation.
The specific implementation of this step is: search software package corresponding to described current assembly unit file from explorer, after finding, described software package is installed in the current image file to be assembled.
Substep A7: judge whether the assembly unit file in the described orderly assembly unit file sequence all is read, if, then finish, if not, then enter substep A8.
Substep A8: according to the assembly unit path, read the next assembly unit file of current assembly unit file described in the described orderly assembly unit file set as current assembly unit file, return substep A2.
Execute substep A1 ~ A8, can obtain the current image file of assembly unit.Return again embodiment shown in Figure 42, enter step 408.
Step 408: move current image file.
Described current image file is sent in the server of appointment in the described current image file assembly unit request and move, to start virtual unit corresponding to described current image file.
In the technical scheme of the present embodiment, default software dependence and software version dependence are according to dissimilar, the general character of the software of different editions, remove after redundant abstract out, so compared with prior art, the present invention does not need storage corresponding to dissimilar, the image file of the software resource of different editions, but with dissimilar, software dependence and the software version dependence of different editions are stored, in needs, generate corresponding to dissimilar according to described dependence assembly unit, the image file of the software resource of different editions, because store dissimilar, the required space of the software dependence of different editions and software version dependence will be far smaller than the size of an image file, so saved a large amount of storage spaces.
With reference to shown in Figure 5, Fig. 5 is a kind of structural representation of image file assembling system, and described system comprises:
Acquiring unit 510 is used for all assembly unit files required according to the current image file of assembly unit acquisition request of current image file;
Sequence generating unit 520 is used for according to default software dependence and software version dependence, with orderly assembly unit file sequence of described all assembly unit file generateds;
Attribute determining unit 530 for the assembly unit file layout that records according to assembly unit file resource storehouse, is determined the file attribute of each assembly unit file in the orderly assembly unit file sequence;
Assembly unit unit 540 is used for successively described each assembly unit file being carried out assembly unit to obtain current image file according to described assembly unit path according to the file attribute of determining.
In actual applications, with reference to shown in Figure 6, be the structured flowchart of described sequence generating unit 520, described sequence generating unit 520 specifically can comprise:
Determine subelement 610, be used for according to default software dependence, determine that in-degree is zero or the most approaching zero software type assembly unit file, described in-degree refers to depend on described software type assembly unit file and the number of other assembly unit files of existing;
Version is determined subelement 620, for the version number of the assembly unit file of determining described software type assembly unit file according to default software version dependence and relying on;
The path generates subelement 630, is used for generating the assembly unit path of current image file according to default software dependence and described version number;
Generate subelement 640, be used for according to described assembly unit path orderly assembly unit file sequence of described all assembly unit file generateds.
In actual applications, with reference to shown in Figure 7, be the structured flowchart of described assembly unit unit 540, described assembly unit unit 540 specifically can comprise:
Read subelement 710, be used for according to described assembly unit path, read first assembly unit file in the orderly assembly unit file sequence as current assembly unit file;
Process subelement 720, be used for carrying out current assembly unit file processing flow process, the specific implementation refer step 407 of described front assembly unit file processing flow process repeats no more herein.
Further, described system can also comprise:
The operation unit is for moving in the server that described current image file is sent to described current image file assembly unit request appointment, to start virtual unit corresponding to described current image file.
In actual applications, the specific implementation of the embodiment of the invention can be finished by structure shown in Figure 8, comprising:
Analysis module 810 is used for parsing all required image files of the current image file of assembly unit from the assembly unit request;
Statement of assets 820 is used for providing all available on memory device assembly unit file directorys, for other module provides the document retrieval function;
Meta data manager 830 is used for the metadata that management database is stored, for other module provides resource query and figure search function;
Asset metadata repository 840 is used for the version dependence graph between dependence graph, the complementary resource between all available image files of record, snapshot, software package resource description and the dissimilar resource;
Assembly unit server 850 is used for the current image file of assembly unit;
Explorer 860 is used for image file, snapshot and the software package resource of managed storage on dissimilar memory device, can provide resource query and read functions for other module.
In the technical scheme of the present embodiment, default software dependence and software version dependence are according to dissimilar, the general character of the software of different editions, remove after redundant abstract out, so compared with prior art, the present invention does not need storage corresponding to dissimilar, the image file of the software resource of different editions, but with dissimilar, software dependence and the software version dependence of different editions are stored, in needs, generate corresponding to dissimilar according to described dependence assembly unit, the image file of the software resource of different editions, because store dissimilar, the required space of the software dependence of different editions and software version dependence will be far smaller than the size of an image file, so saved a large amount of storage spaces.
Need to prove, term " comprises ", " comprising " or its any other variant are intended to contain comprising of nonexcludability, thereby not only comprise those key elements so that comprise process, method, article or the equipment of a series of key elements, but also comprise other key elements of clearly not listing, or also be included as the intrinsic key element of this process, method, article or equipment.In the situation that not more restrictions, the key element that is limited by statement " comprising ... ", and be not precluded within process, method, article or the equipment that comprises described key element and also have other identical element.
For system embodiment, because it corresponds essentially to embodiment of the method, so relevant part gets final product referring to the part explanation of embodiment of the method.System embodiment described above only is schematic, wherein said unit as the separating component explanation can or can not be physically to separate also, the parts that show as the unit can be or can not be physical locations also, namely can be positioned at a place, perhaps also can be distributed on a plurality of network element.Can select according to the actual needs wherein some or all of module to realize the purpose of the present embodiment scheme.Those of ordinary skills namely can understand and implement in the situation that do not pay creative work.
The above only is the specific embodiment of the present invention; should be pointed out that for those skilled in the art, under the prerequisite that does not break away from the principle of the invention; can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.

Claims (10)

1. an image file assembling method is characterized in that, comprising:
All assembly unit files required according to the current image file of assembly unit acquisition request of current image file;
According to default software dependence and software version dependence, with orderly assembly unit file sequence of described all assembly unit file generateds;
According to the assembly unit file layout that records in the assembly unit file resource storehouse, determine the file attribute of each assembly unit file in the orderly assembly unit file sequence;
Successively described each assembly unit file is carried out assembly unit to obtain current image file according to described assembly unit path according to the file attribute of determining.
2. method according to claim 1 is characterized in that, software dependence and software version dependence that described basis is default with orderly assembly unit file sequence of described all assembly unit file generateds, specifically comprise:
According to default software dependence, determine that in-degree is zero or the most approaching zero software type assembly unit file, described in-degree refers to depend on described software type assembly unit file and the number of other assembly unit files of existing;
Determine described software type assembly unit file and the version number of the assembly unit file that relies on according to default software version dependence;
According to default software dependence and described version number, generate the assembly unit path of current image file;
The described assembly unit of foundation path is with orderly assembly unit file sequence of described all assembly unit file generateds.
3. method according to claim 1 is characterized in that, the file attribute of described all assembly unit files comprises in image file, mirror snapshot and the software package at least.
4. method according to claim 1 is characterized in that, the file attribute that described basis is determined carries out assembly unit to obtain current image file with described each assembly unit file according to described assembly unit path successively, specifically comprises:
Read first assembly unit file in the orderly assembly unit file sequence as current assembly unit file according to described assembly unit path, enter current assembly unit file processing flow process, described current assembly unit file processing flow process comprises:
The file attribute of judging described current assembly unit file is mirror image whether, if mirror image is then searched assembly unit image file corresponding to described current assembly unit file from explorer, and described assembly unit image file is installed in the current image file to be assembled;
If not mirror image, the file attribute of then judging described current assembly unit file is snapshot whether, if snapshot is then searched assembly unit snapshot document corresponding to described current assembly unit file from explorer, and described assembly unit snapshot document is installed in the current image file to be assembled;
If not snapshot is then searched software package corresponding to described current assembly unit file from explorer, and described software package is installed in the current image file to be assembled;
Judge whether the assembly unit file in the described orderly assembly unit file sequence all is read, if not, then according to the assembly unit path, read the next assembly unit file of current assembly unit file described in the described orderly assembly unit file set as current assembly unit file, the file attribute of carrying out the current assembly unit file of described judgement is the step of mirror image whether, until the assembly unit file in the described orderly assembly unit file sequence all is read.
5. method according to claim 1 is characterized in that, the file attribute that described basis is determined carries out assembly unit to obtain current image file with described each assembly unit file according to described assembly unit path successively, afterwards, also comprises:
Described current image file is sent in the server of appointment in the described current image file assembly unit request and move, to start virtual unit corresponding to described current image file.
6. an image file assembling system is characterized in that, described system comprises:
Acquiring unit is used for root all assembly unit files required according to the current image file of assembly unit acquisition request of current image file;
Sequence generating unit is used for according to default software dependence and software version dependence, with orderly assembly unit file sequence of described all assembly unit file generateds;
Attribute determining unit for the assembly unit file layout that records according to assembly unit file resource storehouse, is determined the file attribute of each assembly unit file in the orderly assembly unit file sequence;
The assembly unit unit is used for successively described each assembly unit file being carried out assembly unit to obtain current image file according to described assembly unit path according to the file attribute of determining.
7. system according to claim 6 is characterized in that, described sequence generating unit comprises:
Determine subelement, be used for according to default software dependence, determine that in-degree is zero or the most approaching zero software type assembly unit file, described in-degree refers to depend on described software type assembly unit file and the number of other assembly unit files of existing;
Version is determined subelement, for the version number of the assembly unit file of determining described software type assembly unit file according to default software version dependence and relying on;
The path generates subelement, is used for generating the assembly unit path of current image file according to default software dependence and described version number;
Generate subelement, be used for according to described assembly unit path orderly assembly unit file sequence of described all assembly unit file generateds.
8. system according to claim 6 is characterized in that, the file attribute of described all assembly unit files comprises in image file, mirror snapshot and the software package at least.
9. system according to claim 6 is characterized in that, described assembly unit unit comprises:
Read subelement, be used for according to described assembly unit path, read first assembly unit file in the orderly assembly unit file sequence as current assembly unit file;
Process subelement, be used for carrying out current assembly unit file processing flow process, described current assembly unit file processing flow process comprises:
The file attribute of judging described current assembly unit file is mirror image whether, if mirror image is then searched assembly unit image file corresponding to described current assembly unit file from explorer, and described assembly unit image file is installed in the current image file to be assembled;
If not mirror image, the file attribute of then judging described current assembly unit file is snapshot whether, if snapshot is then searched assembly unit snapshot document corresponding to described current assembly unit file from explorer, and described assembly unit snapshot document is installed in the current image file to be assembled;
If not snapshot is then searched software package corresponding to described current assembly unit file from explorer, and described software package is installed in the current image file to be assembled;
Judge whether the assembly unit file in the described orderly assembly unit file sequence all is read, if not, then according to the assembly unit path, read the next assembly unit file of current assembly unit file described in the described orderly assembly unit file sequence as current assembly unit file, the file attribute of carrying out the current assembly unit file of described judgement is the step of mirror image whether, until the assembly unit file in the described orderly assembly unit file sequence all is read.
10. system according to claim 6 is characterized in that, also comprises:
The operation unit is for moving in the server that described current image file is sent to described current image file assembly unit request appointment, to start virtual unit corresponding to described current image file.
CN201210364741.9A 2012-09-26 2012-09-26 Method and system for assembling mirror image files Expired - Fee Related CN102902770B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210364741.9A CN102902770B (en) 2012-09-26 2012-09-26 Method and system for assembling mirror image files

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210364741.9A CN102902770B (en) 2012-09-26 2012-09-26 Method and system for assembling mirror image files

Publications (2)

Publication Number Publication Date
CN102902770A true CN102902770A (en) 2013-01-30
CN102902770B CN102902770B (en) 2015-04-15

Family

ID=47575002

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210364741.9A Expired - Fee Related CN102902770B (en) 2012-09-26 2012-09-26 Method and system for assembling mirror image files

Country Status (1)

Country Link
CN (1) CN102902770B (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103942292A (en) * 2014-04-11 2014-07-23 华为技术有限公司 Virtual machine mirror image document processing method, device and system
CN105446757A (en) * 2014-08-21 2016-03-30 阿里巴巴集团控股有限公司 Data packet processing method and device
CN105955674A (en) * 2016-06-16 2016-09-21 北京航空航天大学 Quick modularized assembling method, device and system of virtual machine disk mirror image
CN110427226A (en) * 2019-08-09 2019-11-08 杭州安恒信息技术股份有限公司 A kind of method and apparatus that quick release program relies on
CN113867778A (en) * 2021-09-18 2021-12-31 苏州浪潮智能科技有限公司 Method and device for generating mirror image file, electronic equipment and storage medium
CN114217908A (en) * 2022-02-23 2022-03-22 广州趣丸网络科技有限公司 Container starting method, system, device and equipment

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1514361A (en) * 2002-12-31 2004-07-21 北京科泰世纪科技有限公司 Construction member self description packaging method and method of operation
CN101207633A (en) * 2006-12-21 2008-06-25 英业达股份有限公司 System and method for selecting function customization of network memory system
CN101501637A (en) * 2005-03-25 2009-08-05 索尼株式会社 Modular imaging download system
US20120124355A1 (en) * 2010-11-11 2012-05-17 Sumant Kumar Patro Single volume image file extraction

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1514361A (en) * 2002-12-31 2004-07-21 北京科泰世纪科技有限公司 Construction member self description packaging method and method of operation
CN101501637A (en) * 2005-03-25 2009-08-05 索尼株式会社 Modular imaging download system
CN101207633A (en) * 2006-12-21 2008-06-25 英业达股份有限公司 System and method for selecting function customization of network memory system
US20120124355A1 (en) * 2010-11-11 2012-05-17 Sumant Kumar Patro Single volume image file extraction

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103942292A (en) * 2014-04-11 2014-07-23 华为技术有限公司 Virtual machine mirror image document processing method, device and system
CN105446757A (en) * 2014-08-21 2016-03-30 阿里巴巴集团控股有限公司 Data packet processing method and device
CN105955674A (en) * 2016-06-16 2016-09-21 北京航空航天大学 Quick modularized assembling method, device and system of virtual machine disk mirror image
CN105955674B (en) * 2016-06-16 2019-02-12 北京航空航天大学 The quick assemble method of magnetic disk of virtual machine mirror moduleization, device and system
CN110427226A (en) * 2019-08-09 2019-11-08 杭州安恒信息技术股份有限公司 A kind of method and apparatus that quick release program relies on
CN113867778A (en) * 2021-09-18 2021-12-31 苏州浪潮智能科技有限公司 Method and device for generating mirror image file, electronic equipment and storage medium
CN114217908A (en) * 2022-02-23 2022-03-22 广州趣丸网络科技有限公司 Container starting method, system, device and equipment

Also Published As

Publication number Publication date
CN102902770B (en) 2015-04-15

Similar Documents

Publication Publication Date Title
US8738673B2 (en) Index partition maintenance over monotonically addressed document sequences
CN102932415B (en) Method and device for storing mirror image document
Barmpis et al. Hawk: Towards a scalable model indexing architecture
CN102902770B (en) Method and system for assembling mirror image files
US20070067766A1 (en) Infrastructure for the automation of the assembly of schema maintenance scripts
CN101308471B (en) Method and device for data restoration
CN103562863A (en) Creating a correlation rule defining a relationship between event types
CN110162512B (en) Log retrieval method, device and storage medium
CN104572920A (en) Data arrangement method and data arrangement device
CN103473277A (en) Snapshot method and device for file systems
CN105573859A (en) Data recovery method and device of database
GB2513528A (en) Method and system for backup management of software environments in a distributed network environment
CN103902562A (en) Method and device for upgrading terminal databases
CN112099800A (en) Code data processing method and device and server
CN104679500A (en) Automatic generation realizing method and device for entity classes
CN113760847A (en) Log data processing method, device, equipment and storage medium
CN111684437A (en) Chronologically ordered staggered updated key-value storage system
CN106874343B (en) Data deletion method and system for time sequence database
CN111552438B (en) Method, device, server and storage medium for writing object
CN112000971A (en) File permission recording method, system and related device
CN113918377B (en) Method, device and equipment for positioning C + + program crash and storage medium
EP2819028A2 (en) Content management system
US11281444B2 (en) Application update monitoring computer systems
CN104285221A (en) Efficient in-place preservation of content across content sources
CN113886342A (en) File format conversion method and device, storage medium and processor

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20150415

Termination date: 20210926

CF01 Termination of patent right due to non-payment of annual fee