Summary of the invention
Embodiments of the invention provide a kind of update method, server and desktop cloud system of virtual machine image, can after primary mirror looks like to be updated upgrading, rebulid in the dependence of sub-mirror image and described primary mirror picture, preserve the renewal upgrading that the user does described sub-mirror image in client.
Embodiments of the invention adopt following technical scheme:
First aspect, a kind of update method of virtual machine image is provided, is applied to physical host, described primary mirror picture of physical host management and the sub-mirror image that at least one is generated by described primary mirror picture, described sub-mirror image as with the virtual disk of described sub-mirror image corresponding virtual machine, comprising:
When creating virtual desktop architecture environment, create the primary mirror picture, and whole primary mirror is looked like to be divided into a piece district;
When looking like to create sub-mirror image, duplicate the piece plot structure of the piece plot structure of primary mirror picture as described sub-mirror image based on described primary mirror;
When described sub-mirror image is updated, the part after each piece upgrades in the described sub-mirror image is divided into a piece district;
When described primary mirror looks like to be updated, obtain the lap in the piece district, part place after piece district, part place after the renewal of described primary mirror picture and described sub-mirror image upgrade, and merge in the described sub-mirror image according to the part of described lap after with the renewal of described primary mirror picture.
In conjunction with first aspect, in first kind of possible implementation, before the described piece plot structure of piece plot structure that duplicates the primary mirror picture, also comprise as described sub-mirror image:
When described primary mirror looks like to be updated, the part that each piece in the described primary mirror picture is upgraded is divided into a piece district, and generation differential file tabulation in upgrading escalation process, described differential file list records is recorded in upgrading escalation process to be upgraded in the escalation process with respect to newly-increased, the deletion of former primary mirror picture or the file of revising, and described differential file tabulation comprises file path, file type information.
First kind of implementation in conjunction with first aspect or first aspect, in second kind of possible implementation, the lap in the piece district, part place after piece district, part place after the described renewal of obtaining described primary mirror picture and described sub-mirror image upgrade, and merge in the described sub-mirror image according to the part of described lap after with the renewal of described primary mirror picture, comprising:
According to the piece plot structure after piece plot structure after the described primary mirror picture renewal and the described sub-mirror image renewal, obtain the lap in the piece district, part place after piece district, part place after the renewal of described primary mirror picture and described sub-mirror image upgrade, and described sub-mirror image is carried out the heavily division of piece plot structure according to described lap, obtain the piece plot structure after described sub-mirror image is heavily divided, piece plot structure after described sub-mirror image is heavily divided is: the part that described sub-mirror image does not upgrade is piece district independently, described lap is piece district independently, and the part in the part after described sub-mirror image upgrades except that described lap is piece district independently;
Piece plot structure after heavily dividing according to described differentiation listed files and described sub-mirror image, with the part after the renewal of described primary mirror picture in described sub-mirror image, carry out file-level merging, replace or ignore processing.
Second kind of implementation in conjunction with first aspect, in the third possible implementation, described according to the piece plot structure after piece plot structure after the described primary mirror picture renewal and the described sub-mirror image renewal, obtain the lap in the piece district, part place after piece district, part place after the renewal of described primary mirror picture and described sub-mirror image upgrade, and the heavily division that described sub-mirror image carries out the piece plot structure comprised according to described lap:
Part place piece district reference position and final position after determining to upgrade in described primary mirror picture and the described sub-mirror image;
According to part place piece district reference position and the final position after upgrading in described primary mirror picture and the described sub-mirror image, obtain the lap in the piece district, part place after piece district, part place and the described sub-mirror image renewal after the renewal of described primary mirror picture;
When in the scope in the piece district, part place after the renewal of piece district, part place after the renewal of described primary mirror picture at described sub-mirror image, shift out in the scope with the piece district, part place of described lap after the renewal of described sub-mirror image, and described lap is divided into a piece district, obtain the piece plot structure after described sub-mirror image is heavily divided;
When in the scope in the piece district, part place of the piece district, part place after the renewal of described sub-mirror image after the renewal of described primary mirror picture, newly-built district on described sub-mirror image then, make the scope in the piece district, part place after the renewal of scope that the scope in described newly-built district adds the above lap and described primary mirror picture identical, obtain the piece plot structure after described sub-mirror image is heavily divided.
The third implementation in conjunction with first aspect, in the 4th kind of possible implementation, in the time of in the scope in the piece district, part place of described piece district, part place after the renewal of described primary mirror picture after the renewal of described sub-mirror image, shift out in the scope with the piece district, part place of described lap after the renewal of described sub-mirror image, and described lap is divided into a piece district comprises:
If described lap is positioned at the first half in the piece district, part place after the renewal of described sub-mirror image, then the final position of described lap is set to the new reference position in the piece district, part place after the renewal of described sub-mirror image, so that shift out in the scope with the piece district, part place of described lap after the renewal of described sub-mirror image, and described lap be divided into a piece district; Or
If described lap is positioned at the latter half in the piece district, part place after the renewal of described sub-mirror image, then the reference position of described lap is set to the new final position in the piece district, part place after the renewal of described sub-mirror image, so that shift out in the scope with the piece district, part place of described lap after the renewal of described sub-mirror image, and described lap be divided into a piece district; Or
If described lap is positioned at the centre in the piece district, part place after the renewal of described sub-mirror image, then the reference position of described lap is set to the new final position in the piece district, part place after the renewal of described sub-mirror image, and newly-built district, the reference position in described newly-built district is the final position of described lap, the former final position in the piece district, part place after the renewal of the described sub-mirror image of final position in described newly-built district, so that shift out in the scope with the piece district, part place of described lap after the renewal of described sub-mirror image, and described lap be divided into a piece district.
The third possible implementation in conjunction with first aspect, in the 5th kind of possible implementation, when in the scope in the piece district, part place of the piece district, part place after the renewal of described sub-mirror image after the renewal of described primary mirror picture, newly-built district on described sub-mirror image then makes identical comprising of scope in the piece district, part place after the renewal of scope that the scope in described newly-built district adds the above lap and described primary mirror picture:
If lap is positioned at the first half in the piece district, part place after the renewal of primary mirror picture, a then newly-built district, the reference position in newly-built district is the final position of lap, and the final position in the piece district, part place after the renewal of the final position in newly-built district and primary mirror picture is identical;
If described lap is positioned at the latter half in the piece district, part place after the renewal of described primary mirror picture, a then newly-built district, the reference position in the piece district, part place after the renewal of the reference position in described newly-built district and described primary mirror picture is identical, and the final position in described newly-built district is the reference position of described lap;
If described lap is positioned at the centre in the piece district, part place after the renewal of described primary mirror picture, then newly-built first district and second district, the reference position in the piece district, part place after the renewal of the reference position in described first district and described primary mirror picture is identical, and the final position in described first district is the reference position of described lap; The reference position in described second district is the final position of described lap, and the final position in the piece district, part place after the renewal of the final position in described second district and described primary mirror picture is identical.
In conjunction with second kind of first aspect possible implementation, in the 6th kind of possible implementation, described piece plot structure after heavily dividing according to described differentiation listed files and described sub-mirror image, with the part after the renewal of described primary mirror picture in described sub-mirror image, carry out file-level merging, replace or ignore to handle and comprise:
Determine the piece district at the data place in the file in the described differentiation listed files, if the piece district at the described lap place in the piece plot structure after the described sub-mirror image in the piece district at the data place in the file in the described differentiation listed files is heavily divided then comprises:
If the part after the renewal of part after the renewal of the primary mirror picture of described lap and sub-mirror image all need be kept, then the part after the renewal of the primary mirror picture of described lap is merged in the described sub-mirror image;
If the part after the renewal of the primary mirror picture of described lap need be kept, then the part after the renewal of the sub-mirror image of described lap is replaced with the part after the renewal of primary mirror picture of described lap;
As if the part after the renewal of the primary mirror picture of ignoring described lap, then do not handle.
Second aspect provides a kind of server, and described server comprises:
Primary mirror looks like to set up the unit, is used for creating the primary mirror picture, and whole primary mirror being looked like to be divided into a piece district when creating virtual desktop architecture environment;
Sub-mirror image is set up the unit, is used to set up sub-mirror image, and duplicates described primary mirror and look like to set up the piece plot structure of the piece plot structure of the primary mirror picture of creating the unit as described sub-mirror image;
Piece district administrative unit is used for setting up the unit after described sub-mirror image is finished in establishment at described sub-mirror image, when described sub-mirror image is updated, the part after each piece upgrades in the described sub-mirror image is divided into a piece district;
Merge cells, be used for looking like to set up the unit after described primary mirror picture is finished in establishment at described primary mirror, when described primary mirror looks like to be updated, obtain the lap in the piece district, part place after piece district, part place after the renewal of described primary mirror picture and described sub-mirror image upgrade, and merge in the described sub-mirror image according to the part of described lap after with the renewal of described primary mirror picture.
In conjunction with second aspect, in first kind of possible implementation, described primary mirror looks like to set up the unit and also is used for:
When described primary mirror looks like to be updated, the part that each piece in the described primary mirror picture is upgraded is divided into a piece district, and generation differential file tabulation in upgrading escalation process, described differential file list records is recorded in upgrading escalation process to be upgraded in the escalation process with respect to newly-increased, the deletion of former primary mirror picture or the file of revising, and described differential file tabulation comprises file path, file type information.
In conjunction with first kind of second aspect or second aspect possible implementation, in second kind of possible implementation, described merge cells specifically is used for:
When described primary mirror looks like to be updated, according to the piece plot structure after piece plot structure after the described primary mirror picture renewal and the described sub-mirror image renewal, obtain the lap in the piece district, part place after piece district, part place after the renewal of described primary mirror picture and described sub-mirror image upgrade, and described sub-mirror image is carried out the heavily division of piece plot structure according to described lap, obtain the piece plot structure after described sub-mirror image is heavily divided, piece plot structure after described sub-mirror image is heavily divided is: the part that described sub-mirror image does not upgrade is piece district independently, described lap is piece district independently, and the part in the part after described sub-mirror image upgrades except that described lap is piece district independently;
Piece plot structure after heavily dividing according to described differentiation listed files and described sub-mirror image, with the part after the renewal of described primary mirror picture in described sub-mirror image, carry out file-level merging, replace or ignore processing.
In conjunction with second aspect first to or second kind of possible implementation, in the third possible implementation, described merge cells specifically is used for:
When described primary mirror looks like to be updated, part place piece district reference position and final position after determining to upgrade in described primary mirror picture and the described sub-mirror image;
According to part place piece district reference position and the final position after upgrading in described primary mirror picture and the described sub-mirror image, obtain the lap in the piece district, part place after piece district, part place and the described sub-mirror image renewal after the renewal of described primary mirror picture;
When in the scope in the piece district, part place after the renewal of piece district, part place after the renewal of described primary mirror picture at described sub-mirror image, shift out in the scope with the piece district, part place of described lap after the renewal of described sub-mirror image, and described lap is divided into a piece district, obtain the piece plot structure after described sub-mirror image is heavily divided;
When in the scope in the piece district, part place of the piece district, part place after the renewal of described sub-mirror image after the renewal of described primary mirror picture, newly-built district on described sub-mirror image then, make the scope in the piece district, part place after the renewal of scope that the scope in described newly-built district adds the above lap and described primary mirror picture identical, obtain the piece plot structure after described sub-mirror image is heavily divided;
Piece plot structure after heavily dividing according to described differentiation listed files and described sub-mirror image, with the part after the renewal of described primary mirror picture in described sub-mirror image, carry out file-level merging, replace or ignore processing.
In conjunction with the third possible implementation of second aspect, in the 4th kind of possible implementation, described merge cells specifically is used for:
When described primary mirror looks like to be updated, part place piece district reference position and final position after determining to upgrade in described primary mirror picture and the described sub-mirror image;
According to part place piece district reference position and the final position after upgrading in described primary mirror picture and the described sub-mirror image, obtain the lap in the piece district, part place after piece district, part place and the described sub-mirror image renewal after the renewal of described primary mirror picture;
When in the scope in the piece district, part place after the renewal of piece district, part place after the renewal of described primary mirror picture at described sub-mirror image, if described lap is positioned at the first half in the piece district, part place after the renewal of described sub-mirror image, then the final position of described lap is set to the new reference position in the piece district, part place after the renewal of described sub-mirror image, so that shift out in the scope with the piece district, part place of described lap after the renewal of described sub-mirror image, and described lap be divided into a piece district; Or
If described lap is positioned at the latter half in the piece district, part place after the renewal of described sub-mirror image, then the reference position of described lap is set to the new final position in the piece district, part place after the renewal of described sub-mirror image, so that shift out in the scope with the piece district, part place of described lap after the renewal of described sub-mirror image, and described lap be divided into a piece district; Or
If described lap is positioned at the centre in the piece district, part place after the renewal of described sub-mirror image, then the reference position of described lap is set to the new final position in the piece district, part place after the renewal of described sub-mirror image, and newly-built district, the reference position in described newly-built district is the final position of described lap, the former final position in the piece district, part place after the renewal of the described sub-mirror image of final position in described newly-built district, so that shift out in the scope with the piece district, part place of described lap after the renewal of described sub-mirror image, and described lap is divided into a piece district, obtain the piece plot structure after described sub-mirror image is heavily divided;
When in the scope in the piece district, part place of the piece district, part place after the renewal of described sub-mirror image after the renewal of described primary mirror picture, newly-built district on described sub-mirror image then, make the scope in the piece district, part place after the renewal of scope that the scope in described newly-built district adds the above lap and described primary mirror picture identical, obtain the piece plot structure after described sub-mirror image is heavily divided;
Piece plot structure after heavily dividing according to described differentiation listed files and described sub-mirror image, with the part after the renewal of described primary mirror picture in described sub-mirror image, carry out file-level merging, replace or ignore processing.
In conjunction with the third possible implementation of second aspect, in the 5th kind of possible implementation, described merge cells specifically is used for:
When described primary mirror looks like to be updated, part place piece district reference position and final position after determining to upgrade in described primary mirror picture and the described sub-mirror image;
According to part place piece district reference position and the final position after upgrading in described primary mirror picture and the described sub-mirror image, obtain the lap in the piece district, part place after piece district, part place and the described sub-mirror image renewal after the renewal of described primary mirror picture;
When in the scope in the piece district, part place after the renewal of piece district, part place after the renewal of described primary mirror picture at described sub-mirror image, shift out in the scope with the piece district, part place of described lap after the renewal of described sub-mirror image, and described lap is divided into a piece district, obtain the piece plot structure after described sub-mirror image is heavily divided;
When in the scope in the piece district, part place of the piece district, part place after the renewal of described sub-mirror image after the renewal of described primary mirror picture, if described lap is positioned at the first half in the piece district, part place after the renewal of described primary mirror picture, a then newly-built district, the reference position in described newly-built district is the final position of described lap, and the final position in the piece district, part place after the renewal of the final position in described newly-built district and described primary mirror picture is identical;
If described lap is positioned at the latter half in the piece district, part place after the renewal of described primary mirror picture, a then newly-built district, the reference position in the piece district, part place after the renewal of the reference position in described newly-built district and described primary mirror picture is identical, and the final position in described newly-built district is the reference position of described lap;
If described lap is positioned at the centre in the piece district, part place after the renewal of described primary mirror picture, then newly-built first district and second district, the reference position in the piece district, part place after the renewal of the reference position in described first district and described primary mirror picture is identical, and the final position in described first district is the reference position of described lap; The reference position in described second district is the final position of described lap, and the final position in the piece district, part place after the renewal of the final position in described second district and described primary mirror picture is identical, thereby obtains the piece plot structure after described sub-mirror image is heavily divided;
Piece plot structure after heavily dividing according to described differentiation listed files and described sub-mirror image, with the part after the renewal of described primary mirror picture in described sub-mirror image, carry out file-level merging, replace or ignore processing.
In conjunction with second kind of second aspect possible implementation, in the 6th kind of possible implementation, described merge cells specifically is used for:
When described primary mirror looks like to be updated, according to the piece plot structure after piece plot structure after the described primary mirror picture renewal and the described sub-mirror image renewal, obtain the lap in the piece district, part place after piece district, part place after the renewal of described primary mirror picture and described sub-mirror image upgrade, and described sub-mirror image is carried out the heavily division of piece plot structure according to described lap, obtain the piece plot structure after described sub-mirror image is heavily divided, piece plot structure after described sub-mirror image is heavily divided is: the part that described sub-mirror image does not upgrade is piece district independently, described lap is piece district independently, and the part in the part after described sub-mirror image upgrades except that described lap is piece district independently;
Determine the piece district at the data place in the file in the described differentiation listed files, if the piece district at the described lap place in the piece plot structure after the described sub-mirror image in the piece district at the data place in the file in the described differentiation listed files is heavily divided then comprises:
If the part after the renewal of part after the renewal of the primary mirror picture of described lap and sub-mirror image all need be kept, then the part after the renewal of the primary mirror picture of described lap is merged in the described sub-mirror image;
If the part after the renewal of the primary mirror picture of described lap need be kept, then the part after the renewal of the sub-mirror image of described lap is replaced with the part after the renewal of primary mirror picture of described lap;
As if the part after the renewal of the primary mirror picture of ignoring described lap, then do not handle.
The third aspect provides a kind of desktop cloud system, comprising:
Client depends on the sub-mirror image that server is as the aforementioned set up, and described sub-mirror image is set up according to the primary mirror picture by described server, and after described primary mirror looks like to be updated upgrading, will upgrade certain applications after the upgrading in the sub-mirror image of described client correspondence;
Server is used for creating the primary mirror picture when creating virtual desktop architecture environment, and after the primary mirror picture upgrades upgrading, the primary mirror picture mirror image corresponding with described client after upgrading is rebulid dependence as the aforementioned.
Embodiments of the invention provide a kind of update method of virtual machine image, server and desktop cloud system, after setting up sub-mirror image, from the piece plot structure of server replicates primary mirror picture piece plot structure as sub-mirror image, when the group mirror image is updated, part after each piece upgrades in the sub-mirror image is divided into a piece district, server also is divided into a piece district with the part after each piece upgrades in the primary mirror picture when primary mirror looks like to be updated, and obtain the lap in the piece district, part place after piece district, part place after the renewal of primary mirror picture and sub-mirror image upgrade by server, and merge in the sub-mirror image according to the part of lap after with the renewal of primary mirror picture, thereby when can after the primary mirror picture upgrades upgrading, rebulid the dependence of described sub-mirror image and described primary mirror picture, preserve the renewal upgrading that the user does described sub-mirror image in client.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the invention, the 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 is obtained under the creative work prerequisite.
The embodiment of the invention provides a kind of update method of virtual machine image, be applied to physical host, described primary mirror picture of physical host management and the sub-mirror image that at least one is generated by described primary mirror picture, described sub-mirror image as with the virtual disk of described sub-mirror image corresponding virtual machine, as shown in Figure 1, described method comprises:
101, when creating virtual desktop architecture environment, create the primary mirror picture, and whole primary mirror is looked like to be divided into a piece district.
102, set up sub-mirror image, duplicate piece district (Block Region, BR) structure of the piece plot structure of primary mirror picture as described sub-mirror image.
Wherein, above-mentioned primary mirror picture and sub-mirror image are managed by described physical host, and described physical host can be physical server.
103, when described sub-mirror image is updated, the part after each piece upgrades in the described sub-mirror image is divided into a piece district.
104, when described primary mirror looks like to be updated, obtain the lap in the piece district, part place after piece district, part place after the renewal of described primary mirror picture and described sub-mirror image upgrade, and merge in the described sub-mirror image according to the part of described lap after with the renewal of described primary mirror picture.
As seen, embodiments of the invention provide a kind of update method of virtual machine image, after setting up sub-mirror image, from the piece plot structure of server replicates primary mirror picture piece plot structure as sub-mirror image, when the group mirror image is updated, part after each piece upgrades in the sub-mirror image is divided into a piece district, server also is divided into a piece district with the part after each piece upgrades in the primary mirror picture when primary mirror looks like to be updated, and obtain the lap in the piece district, part place after piece district, part place after the renewal of primary mirror picture and sub-mirror image upgrade by client, and merge in the sub-mirror image according to the part of lap after with the renewal of primary mirror picture, thereby when can after the primary mirror picture upgrades upgrading, rebulid the dependence of described sub-mirror image and described primary mirror picture, preserve the renewal upgrading that the user does described sub-mirror image in client.
The embodiment of the invention provides the update method of another kind of virtual machine image, as shown in Figure 2, comprising:
In order to make those skilled in the art can more be expressly understood the technical scheme that the embodiment of the invention provides, below by specific embodiment, the update method of a kind of virtual machine image that another embodiment of the present invention is provided is elaborated, in addition for convenience of description, abbreviate the piece district as BR below.
201, set up the primary mirror picture, and be a BR as the whole magnetic disk spatial division primary mirror.
Exemplary, can realize by the following method:
As shown in Figure 3, when building the virtual desktop architecture, suppose that it is M0 that newly-built primary mirror looks like, M0 is divided into a whole BR, be labeled as BR1, the reference position of BR1 (start) is set to 0, and the size (size) of BR1 is set to total size of primary mirror picture, and the sign (flag) of BR1 is set to P.
202, after primary mirror looks like to be updated, the part that each piece in the primary mirror picture is upgraded is divided into a BR.
Exemplary, suppose that M1 is the primary mirror picture after upgrading, its piece plot structure is a whole BR, i.e. BR1, then " part that each piece in the primary mirror picture is upgraded is divided into a BR " can realize by the following method:
Produce when writing IO when the user looks like to upgrade to primary mirror, suppose that this reference position of writing IO is labeled as " first ", final position is labeled as " last ", then cutting BR according to the following steps:
The first step: judge that the BR1 of primary mirror picture and this write the IO belonging positions whether common factor is arranged.
Second step: when occuring simultaneously, write IO according to this BR1 of primary mirror picture is carried out cutting.
As shown in Figure 3, since set up primary mirror as the time, is a whole BR1 with primary mirror as the whole magnetic disk spatial division, therefore, the user looks like to upgrade this BR1 existence common factor of writing IO and primary mirror picture of generation to primary mirror, and this writes IO in the data area of this BR1, so need carry out cutting to this BR1 of primary mirror picture.
Certainly, in embodiment provided by the invention, set up primary mirror as the time be that a BR only is exemplary with primary mirror as the whole magnetic disk spatial division, be not limited to this, other division methods also can be arranged, do not enumerate one by one at this.
The 3rd step: a newly-built BR2, be used for describing the data of writing in the IO scope, comprise reference position, size, and the mark of BR2 is set to C.Wherein, the reference position of BR2 is identical with the reference position of writing IO " first " position, and the final position of BR2 is identical with the final position of writing IO " last " position, and the size of BR2 is the reference position that the final position of BR2 deducts BR2.
The 4th step: difference newly-built BR3, BR4, be used for respectively describing and write the outer and data in the BR1 scope of IO scope, BR3, BR4 include reference position, size, and the mark of BR3, BR4 is set to P; Wherein, as shown in Figure 4, the reference position of BR3 and the reference position of BR1 are same position, the final position of BR3 and the reference position of BR2 are same position, the size of BR3 is the reference position that the final position of BR3 subtracts BR3, the reference position of BR4 and the final position of BR2 are same position, and the final position of BR4 and the final position of BR1 are same position, and the size of BR4 is the reference position that the final position of BR4 subtracts BR4.
The 5th step: deletion BR1 connects newly-built BR2, BR3 and BR4.
In addition, because in embodiment provided by the invention, set up primary mirror as the time be a BR with primary mirror as the whole magnetic disk spatial division, therefore has only a BR1 in the primary mirror picture, except BR1, there is not remaining BR in the primary mirror picture, therefore here as long as BR2 and BR3, BR4 are coupled together, but if primary mirror looks like to exist two or more BR, then after connecting newly-built BR2, BR3 and BR4, also need and to couple together after the ordering of the residue BR except that BR1 in these 3 BR and the primary mirror picture.
When 203, the group mirror image is set up, from the piece plot structure of server replicates primary mirror picture piece plot structure as sub-mirror image.
Concrete, can realize by the following method:
When we need look like to be applied to the primary mirror of setting up on many virtual machines, then generate a plurality of sub-mirror images that are applied to virtual machine according to described primary mirror picture, all there is the sub-mirror image of a unique correspondence in every virtual machine, when we set up sub-mirror image, corresponding primary mirror is as reference position and the size of each BR, set up the piece plot structure of sub-mirror image self successively, the reference position of the BR that is created and the size of each BR are identical with BR in the primary mirror picture, and the size of the reference position of all BR that created and this BR and all BR in the primary mirror picture are corresponding one by one.
204, after the group mirror image is updated, the part after each piece upgrades in the sub-mirror image is divided into a BR.
If the user used virtual machine that its sub-mirror image is upgraded, the BR partition process after then described sub-mirror image upgrades is identical with BR partition process after the primary mirror picture upgrades, concrete can repeating no more here with reference to the BR partition process after the primary mirror picture renewal in 202.
205, in sub-mirror image, repartition according to the piece plot structure of the part antithetical phrase mirror image after the renewal of part after the renewal of sub-mirror image and primary mirror picture.
Here, the merging of the part after the renewal of part after the renewal of antithetical phrase mirror image and primary mirror picture, promptly be according to the piece plot structure of the sub-mirror image after upgrading and the repartitioning of the RB in the piece plot structure antithetical phrase mirror image of the primary mirror picture after upgrading, thus revise since the sub-mirror image of sub-mirror image and the renewal destruction of primary mirror picture and primary mirror as the dependence between BR.
After sub-mirror image was made renewal to it, the BR after BR after the renewal that we need look like primary mirror to have done and described sub-mirror image upgrade heavily divides, and was concrete, can realize by the following method at virtual machine:
At first, part place BR reference position and the final position after determining to upgrade in the sub-mirror image of primary mirror picture and described virtual machine correspondence;
Then, according to part place BR reference position and the final position after upgrading in primary mirror picture and the described sub-mirror image, obtain the lap in the piece district, part place after piece district, part place and the renewal of sub-mirror image after the renewal of primary mirror picture.Because the scope of the scope of the part after the renewal of primary mirror picture and part after sub-mirror image upgrades may be different, so can carry out different processing according to different situations, and is concrete:
One, when in the scope of the part place BR after the renewal of part place BR after the renewal of primary mirror picture at described sub-mirror image, shift out in the scope with the part place BR of lap after the renewal of described sub-mirror image, and lap is divided into a BR, can realize by following steps:
1) if lap is positioned at the first half of the part place BR after the renewal of described sub-mirror image, then the final position of lap is set to the new reference position of the part place BR after the renewal of described sub-mirror image, so that shift out in the scope with the part place BR of lap after the renewal of described sub-mirror image, and lap be divided into a BR;
Exemplary, the process that above piece district merges can be as shown in Figure 4, and dotted line is represented the cutting of antithetical phrase mirror image V1 among the figure:
It is M1 that primary mirror after the renewal looks like, described sub-mirror image after the renewal is V1, dash area among the figure is exactly the piece district that divides according to the part after primary mirror picture and the renewal separately of described sub-mirror image, and dotted line is represented the repartitioning of the piece district of V1, and is as follows for the heavy partition process in the piece district of V1:
The piece district of V1 and the piece district of M1 are compared one by one, BR1 ' affiliated area among the M1 is included in the first half in zone of the BR1 of V1, a newly-built piece district BR2 in V1 then, the reference position of BR2 is identical with the reference position of BR1, the size of BR2 is big or small identical with BR1's ', and the reference position of original BR1 is set to the final position of BR2;
2) if lap is positioned at the latter half of the part place BR after the renewal of described sub-mirror image, then the reference position of lap is set to the new final position of the part place BR after the renewal of described sub-mirror image, so that shift out in the scope with the part place BR of lap after the renewal of described sub-mirror image, and lap be divided into a BR;
Exemplary, the process that above piece district merges can be as shown in Figure 5, and dotted line is represented the cutting of antithetical phrase mirror image V1 among the figure:
BR3 ' affiliated area among the M1 is included in the latter half in zone of the BR3 of V1, then keep the reference position of BR3 constant, the size that the size of BR3 is set to former BR3 deducts the size of BR3 ' in the primary mirror picture, a newly-built piece district BR4 in V1 then, the reference position setting of BR4 is identical with the reference position of BR3 ' in the primary mirror picture, BR3 ' big or small identical in its size and the primary mirror picture;
3) if lap is positioned at the centre of the part place BR after the renewal of described sub-mirror image, then the reference position of lap is set to the new final position of the part place BR after the renewal of sub-mirror image, and newly-built BR, the reference position of newly-built BR is the final position of lap, and the final position in newly-built district is the former final position in the piece district, part place after the renewal of described sub-mirror image.
Exemplary, the process that above piece district merges can be as shown in Figure 6, and dotted line is represented the cutting of antithetical phrase mirror image V1 among the figure:
BR5 ' affiliated area among the M1 is in the center section in zone of the BR5 of V1, a newly-built BR6 in V1 then, the reference position of BR6 is set to the position at the reference position place of V1 Central Plains BR5, the size of BR6 is set to that the reference position of BR5 ' deducts the scope that is drawn after the reference position of V1 Central Plains BR5 among the M1, a newly-built again BR7 in V1, its reference position is set to the position at the final position place of BR5 ' among the M1, its size is set to the scope of gained behind the final position that V1 Central Plains BR5 final position deducts BR5 ' among the M1, at last with the initial position that is set to the termination place of BR6 of BR5 among the V1, its size be set to M1 in BR5 ' big or small identical;
Two, when in the scope of the part place BR of the part place BR after the renewal of described sub-mirror image after the renewal of primary mirror picture, newly-built BR on described sub-mirror image then, make the scope of the part place BR after the renewal of scope that the scope of newly-built BR adds lap and primary mirror picture identical, specifically can realize by the following method:
1) if lap is positioned at the first half of the part place BR after the renewal of primary mirror picture, then newly-built BR, the reference position of newly-built BR is the final position of lap, the final position of the part place BR after the renewal of the final position of newly-built BR and primary mirror picture is identical;
Exemplary, the process that above piece district merges can be as shown in Figure 7, and dotted line is represented the cutting of antithetical phrase mirror image V1 among the figure:
BR8 affiliated area among the V1 is in the first half in zone of the BR8 ' of M1, a newly-built BR9 in V1 then, the reference position of BR9 is set to the position at the final position place of BR8 among the V1, and its size is set to the size that the size of BR8 ' among the M1 deducts the size back gained of BR8 among the V1;
2) if lap is positioned at the latter half of the part place BR after the renewal of primary mirror picture, then newly-built BR, the reference position of the part place BR after the renewal of the reference position of newly-built BR and primary mirror picture is identical, and the final position of newly-built BR is the reference position of lap;
Exemplary, the process that above piece district merges can be as shown in Figure 8, and dotted line is represented the cutting of antithetical phrase mirror image V1 among the figure:
BR10 affiliated area among the V1 is in the latter half in zone of the BR10 ' of M1, a newly-built BR11 in V1 then, the reference position of BR11 is set to the position at the reference position place of BR10 ' among the M1, and its size is set to the scope of gained after the reference position that the reference position of BR10 among the V1 deducts the BR10 ' among the M1;
3) if lap is positioned at the centre of the part place BR after the renewal of described sub-mirror image, a then newly-built BR and the 2nd BR, the reference position of part place BR after the renewal of the reference position of the one BR and primary mirror picture is identical, and the final position of a BR is the reference position of lap; The reference position of the 2nd BR is the final position of lap, and the final position of the part place BR after the renewal of the final position of the 2nd BR and primary mirror picture is identical.
Exemplary, the process that above piece district merges can be as shown in Figure 9, and dotted line is represented the cutting of antithetical phrase mirror image V1 among the figure:
BR12 affiliated area among the V1 is in the center section in zone of the BR12 ' of M1, a newly-built BR13 in V1 then, the reference position of BR13 is set to the position at the reference position place of BR12 ' among the M1, the reference position that its size is set to BR12 deducts the scope of gained after the reference position of BR12 ', a newly-built again BR14 in V1, the reference position of BR14 is set to the position at the final position place of BR12, and the final position position that its size is set to BR12 ' deducts the scope of gained behind the final position position of BR12;
Certainly, if special circumstances, the piece plot structure of the primary mirror picture after for example upgrading and the piece plot structure of the described sub-mirror image after the renewal are identical, the scope that is the part after the scope of the part after the renewal of primary mirror picture and described sub-mirror image upgrade is identical, does not then need the BR in the described sub-mirror image to be repartitioned again;
Exemplary, as shown in figure 10, dotted line is represented the cutting to described sub-mirror image V1 among the figure:
BR15 ' place among BR15 among the V1 and the M1 regional identical then do not repartitioned the piece plot structure of V1.
206, the part after the renewal of part after the renewal of antithetical phrase mirror image and primary mirror picture merges in sub-mirror image.
Concrete, can realize by the following method:
Can in the renewal escalation process of primary mirror picture, write down file with respect to the newly-increased or modification of former primary mirror picture, and generating the differential file tabulation (can be called diff-file list) of writing down these files, this differential file tabulation comprises file path, file type information.When the user virtual machine that generates from former primary mirror picture restarts, the file of these changes is merged in its sub-mirror image, the merging mode of copy is mainly adopted in the merging of its file, can at first sub-mirror image be mounted on the catalogue, then the file with these changes copies in the respective paths of sub-mirror image one by one, and this process is managed the distribution of blocks of files by the file system in the operating system.Owing in sub-mirror image, also upgrade, when therefore again the updating file of primary mirror picture being merged to sub-mirror image, can carry out according to following combination principle:
If the part after the renewal of part after the renewal of the primary mirror picture of lap and sub-mirror image all need be kept, then the part after the renewal of the primary mirror picture of lap is merged in the sub-mirror image;
If the part after the renewal of the primary mirror picture of lap need be kept, then the part after the renewal of the sub-mirror image of lap is replaced with the part after the renewal of primary mirror picture of lap;
As if the part after the renewal of the primary mirror picture of ignoring lap, then do not handle.
In addition, dependence between mirror image is a multilayer, tree structure as shown in figure 11, descendants's mirror image can generate virtual machine based on any one father's mirror image, not only the renewal of mirror image 0 can be synchronized to its descendants's mirror image, the renewal of any one node in the tree can be updated to its descendants's mirror image, to realize the batch updating of descendants's mirror image.For example, the renewal of mirror image 1 can be synchronized to mirror image 3, mirror image 4, mirror image 6 and mirror image 7, and the renewal of mirror image 4 can be synchronized to mirror image 6 and mirror image 7.Therefore, the method that provides of the embodiment of the invention is upgraded all descendants's virtual machines of this virtual machine after can also being implemented in and upgrading a virtual machine synchronously.
As seen, embodiments of the invention provide a kind of update method of virtual machine image, after setting up sub-mirror image, from the piece plot structure of server replicates primary mirror picture piece plot structure as sub-mirror image, when the group mirror image is updated, part after each piece upgrades in the sub-mirror image is divided into a piece district, server also is divided into a piece district with the part after each piece upgrades in the primary mirror picture when primary mirror looks like to be updated, and obtain the lap in the piece district, part place after piece district, part place after the renewal of primary mirror picture and sub-mirror image upgrade by server, and merge in the sub-mirror image according to the part of lap after with the renewal of primary mirror picture, thereby when can after the primary mirror picture upgrades upgrading, rebulid the dependence of described sub-mirror image and described primary mirror picture, preserve the renewal upgrading that the user does described sub-mirror image in client.
The embodiment of the invention provides a kind of server 01, as shown in figure 12, comprising:
Primary mirror looks like to set up unit 011, is used for creating the primary mirror picture, and whole primary mirror being looked like to be divided into a piece district when creating virtual desktop architecture environment;
Sub-mirror image is set up unit 012, is used to set up sub-mirror image, and duplicates primary mirror and look like to set up the piece plot structure of the piece plot structure of the primary mirror picture of being created unit 011 as sub-mirror image;
Piece district administrative unit 013 is used for setting up unit 012 after sub-mirror image is finished in establishment at sub-mirror image, when sub-mirror image is updated, the part after each piece upgrades in the sub-mirror image is divided into a piece district;
Merge cells 014, be used for looking like to set up unit 011 after the primary mirror picture is finished in establishment at primary mirror, when primary mirror looks like to be updated, obtain the lap in the piece district, part place after piece district, part place after the renewal of primary mirror picture and sub-mirror image upgrade, and merge in the sub-mirror image according to the part of lap after with the renewal of primary mirror picture.
Further, primary mirror looks like to set up unit 011 and also is used for:
When primary mirror looks like to be updated, the part that each piece in the primary mirror picture is upgraded is divided into a piece district, and generation differential file tabulation in upgrading escalation process, the differential file list records is recorded in upgrading escalation process to be upgraded in the escalation process with respect to newly-increased, the deletion of former primary mirror picture or the file of revising, and the differential file tabulation comprises file path, file type information.
Further again, merge cells 014 specifically is used for:
When primary mirror looks like to be updated, according to the piece plot structure after piece plot structure after the renewal of primary mirror picture and the renewal of sub-mirror image, obtain the lap in the piece district, part place after piece district, part place after the renewal of primary mirror picture and sub-mirror image upgrade, and carry out the heavily division of piece plot structure according to lap antithetical phrase mirror image, piece plot structure after obtaining sub-mirror image and heavily dividing, piece plot structure after sub-mirror image is heavily divided is: the part that sub-mirror image does not upgrade is piece district independently, lap is piece district independently, and the part in the part after sub-mirror image upgrades except that lap is piece district independently;
Piece plot structure after heavily dividing according to differentiation listed files and sub-mirror image, with the part after the renewal of primary mirror picture in sub-mirror image, carry out file-level merging, replace or ignore processing.
Further again, merge cells 014 specifically is used for:
When primary mirror looks like to be updated, part place piece district reference position and final position after determining to upgrade in primary mirror picture and the sub-mirror image;
According to part place piece district reference position and the final position after upgrading in primary mirror picture and the sub-mirror image, obtain the lap in the piece district, part place after piece district, part place and the renewal of sub-mirror image after the renewal of primary mirror picture;
When in the scope in the piece district, part place after the renewal of piece district, part place after the renewal of primary mirror picture at sub-mirror image, shift out in the scope with the piece district, part place of lap after the renewal of sub-mirror image, and lap is divided into a piece district, the piece plot structure after obtaining sub-mirror image and heavily dividing;
In the time of in the scope in the piece district, part place of the piece district, part place after the renewal of group mirror image after the renewal of primary mirror picture, newly-built district on sub-mirror image then, make the scope in the piece district, part place after the renewal of scope that the scope in newly-built district adds lap and primary mirror picture identical, the piece plot structure after obtaining sub-mirror image and heavily dividing;
Piece plot structure after heavily dividing according to differentiation listed files and sub-mirror image, with the part after the renewal of primary mirror picture in sub-mirror image, carry out file-level merging, replace or ignore processing.
Further again, merge cells 014 specifically is used for:
When primary mirror looks like to be updated, part place piece district reference position and final position after determining to upgrade in primary mirror picture and the sub-mirror image;
According to part place piece district reference position and the final position after upgrading in primary mirror picture and the sub-mirror image, obtain the lap in the piece district, part place after piece district, part place and the renewal of sub-mirror image after the renewal of primary mirror picture;
When in the scope in the piece district, part place after the renewal of piece district, part place after the renewal of primary mirror picture at sub-mirror image, if lap is positioned at the first half in the piece district, part place after the renewal of sub-mirror image, then the final position of lap is set to the new reference position in the piece district, part place after the renewal of sub-mirror image, so that shift out in the scope with the piece district, part place of lap after the renewal of sub-mirror image, and lap be divided into a piece district; Or
If lap is positioned at the latter half in the piece district, part place after the renewal of sub-mirror image, then the reference position of lap is set to the new final position in the piece district, part place after the renewal of sub-mirror image, so that shift out in the scope with the piece district, part place of lap after the renewal of sub-mirror image, and lap be divided into a piece district; Or
If lap is positioned at the centre in the piece district, part place after the renewal of sub-mirror image, then the reference position of lap is set to the new final position in the piece district, part place after the renewal of sub-mirror image, and newly-built district, the reference position in newly-built district is the final position of lap, the former final position in the piece district, part place after the renewal of the sub-mirror image of final position in newly-built district, so that shift out in the scope with the piece district, part place of lap after the renewal of sub-mirror image, and lap is divided into a piece district, thereby the piece plot structure after obtaining sub-mirror image and heavily dividing;
In the time of in the scope in the piece district, part place of the piece district, part place after the renewal of group mirror image after the renewal of primary mirror picture, newly-built district on sub-mirror image then, make the scope in the piece district, part place after the renewal of scope that the scope in newly-built district adds lap and primary mirror picture identical, the piece plot structure after obtaining sub-mirror image and heavily dividing;
Piece plot structure after heavily dividing according to differentiation listed files and sub-mirror image, with the part after the renewal of primary mirror picture in sub-mirror image, carry out file-level merging, replace or ignore processing.
Further, merge cells 014 specifically is used for:
When primary mirror looks like to be updated, part place piece district reference position and final position after determining to upgrade in primary mirror picture and the sub-mirror image;
According to part place piece district reference position and the final position after upgrading in primary mirror picture and the sub-mirror image, obtain the lap in the piece district, part place after piece district, part place and the renewal of sub-mirror image after the renewal of primary mirror picture;
When in the scope in the piece district, part place after the renewal of piece district, part place after the renewal of primary mirror picture at sub-mirror image, shift out in the scope with the piece district, part place of lap after the renewal of sub-mirror image, and lap is divided into a piece district, the piece plot structure after obtaining sub-mirror image and heavily dividing;
In the time of in the scope in the piece district, part place of the piece district, part place after the renewal of group mirror image after the renewal of primary mirror picture, if lap is positioned at the first half in the piece district, part place after the renewal of primary mirror picture, a then newly-built district, the reference position in newly-built district is the final position of lap, and the final position in the piece district, part place after the renewal of the final position in newly-built district and primary mirror picture is identical;
If lap is positioned at the latter half in the piece district, part place after the renewal of primary mirror picture, a then newly-built district, the reference position in the piece district, part place after the renewal of the reference position in newly-built district and primary mirror picture is identical, and the final position in newly-built district is the reference position of lap;
If lap is positioned at the centre in the piece district, part place after the renewal of primary mirror picture, then newly-built first district and second district, the reference position in the piece district, part place after the renewal of the reference position in first district and primary mirror picture is identical, and the final position in first district is the reference position of lap; The reference position in second district is the final position of lap, and the final position in the piece district, part place after the renewal of the final position in second district and primary mirror picture is identical, thus the piece plot structure after obtaining sub-mirror image and heavily dividing;
Piece plot structure after heavily dividing according to differentiation listed files and sub-mirror image, with the part after the renewal of primary mirror picture in sub-mirror image, carry out file-level merging, replace or ignore processing.
Further again, in the merging of the part after the renewal of primary mirror picture being carried out file-level in sub-mirror image, replace or ignore when handling, merge cells 014 specifically is used for:
When primary mirror looks like to be updated, according to the piece plot structure after piece plot structure after the renewal of primary mirror picture and the renewal of sub-mirror image, obtain the lap in the piece district, part place after piece district, part place after the renewal of primary mirror picture and sub-mirror image upgrade, and carry out the heavily division of piece plot structure according to lap antithetical phrase mirror image, piece plot structure after obtaining sub-mirror image and heavily dividing, piece plot structure after sub-mirror image is heavily divided is: the part that sub-mirror image does not upgrade is piece district independently, lap is piece district independently, and the part in the part after sub-mirror image upgrades except that lap is piece district independently;
Determine the piece district at the data place in the file in the differentiation listed files, if the piece district at the lap place in the piece plot structure after the sub-mirror image in piece district at the data place in the file in the differentiation listed files is heavily divided then comprises:
If the part after the renewal of part after the renewal of the primary mirror picture of lap and sub-mirror image all need be kept, then the part after the renewal of the primary mirror picture of lap is merged in the sub-mirror image;
If the part after the renewal of the primary mirror picture of lap need be kept, then the part after the renewal of the sub-mirror image of lap is replaced with the part after the renewal of primary mirror picture of lap;
As if the part after the renewal of the primary mirror picture of ignoring lap, then do not handle.
As seen, embodiments of the invention provide a kind of server, after setting up sub-mirror image, from the piece plot structure of server replicates primary mirror picture piece plot structure as sub-mirror image, when the group mirror image is updated, part after each piece upgrades in the sub-mirror image is divided into a piece district, server also is divided into a piece district with the part after each piece upgrades in the primary mirror picture when primary mirror looks like to be updated, and obtain the lap in the piece district, part place after piece district, part place after the renewal of primary mirror picture and sub-mirror image upgrade by server, and merge in the sub-mirror image according to the part of lap after with the renewal of primary mirror picture, thereby when can after the primary mirror picture upgrades upgrading, rebulid the dependence of sub-mirror image and primary mirror picture, preserve the renewal upgrading that the user is done at client antithetical phrase mirror image.
The embodiment of the invention also provides another kind of server 02, as shown in figure 13, and server 02 bus 024; And be connected to interface 021, storer 022 and processor 023 on the bus 024, and wherein storer 022 is used for storage instruction, and this processor 023 is used to carry out this instruction and is used for:
When creating virtual desktop architecture environment, create the primary mirror picture by interface 021, and whole primary mirror is looked like to be divided into a piece district;
When looking like to create sub-mirror image based on primary mirror, duplicate the piece plot structure of the piece plot structure of primary mirror picture as sub-mirror image by interface 021;
When the group mirror image is updated, the part after each piece upgrades in the sub-mirror image is divided into a piece district by interface 021;
When primary mirror looks like to be updated, obtain the lap in the piece district, part place after piece district, part place after the renewal of primary mirror picture and sub-mirror image upgrade by interface 021, and merge in the sub-mirror image according to the part of lap after with the renewal of primary mirror picture.
Optionally, processor 023 can also be used to carry out this instruction and is used for:
When primary mirror looks like to be updated, the part that each piece in the primary mirror picture is upgraded is divided into a piece district, and generation differential file tabulation in upgrading escalation process, the differential file list records is recorded in upgrading escalation process to be upgraded in the escalation process with respect to newly-increased, the deletion of former primary mirror picture or the file of revising, and the differential file tabulation comprises file path, file type information.
Optionally, processor 023 can also be used to carry out this instruction and is used for:
When primary mirror looks like to be updated, according to the piece plot structure after piece plot structure after the renewal of primary mirror picture and the renewal of sub-mirror image, obtain the lap in the piece district, part place after piece district, part place after the renewal of primary mirror picture and sub-mirror image upgrade, and carry out the heavily division of piece plot structure according to lap antithetical phrase mirror image, piece plot structure after obtaining sub-mirror image and heavily dividing, piece plot structure after sub-mirror image is heavily divided is: the part that sub-mirror image does not upgrade is piece district independently, lap is piece district independently, and the part in the part after sub-mirror image upgrades except that lap is piece district independently;
Piece plot structure after heavily dividing according to differentiation listed files and sub-mirror image, with the part after the renewal of primary mirror picture in sub-mirror image, carry out file-level merging, replace or ignore processing.
Optionally, processor 023 can also be used to carry out this instruction and is used for:
When primary mirror looks like to be updated, part place piece district reference position and final position after determining to upgrade in primary mirror picture and the sub-mirror image;
According to part place piece district reference position and the final position after upgrading in primary mirror picture and the sub-mirror image, obtain the lap in the piece district, part place after piece district, part place and the renewal of sub-mirror image after the renewal of primary mirror picture;
When in the scope in the piece district, part place after the renewal of piece district, part place after the renewal of primary mirror picture at sub-mirror image, shift out in the scope with the piece district, part place of lap after the renewal of sub-mirror image, and lap is divided into a piece district, the piece plot structure after obtaining sub-mirror image and heavily dividing;
In the time of in the scope in the piece district, part place of the piece district, part place after the renewal of group mirror image after the renewal of primary mirror picture, newly-built district on sub-mirror image then, make the scope in the piece district, part place after the renewal of scope that the scope in newly-built district adds lap and primary mirror picture identical, the piece plot structure after obtaining sub-mirror image and heavily dividing;
Piece plot structure after heavily dividing according to differentiation listed files and sub-mirror image, with the part after the renewal of primary mirror picture in sub-mirror image, carry out file-level merging, replace or ignore processing.
Optionally, processor 023 can also be used to carry out this instruction and is used for:
When primary mirror looks like to be updated, part place piece district reference position and final position after determining to upgrade in primary mirror picture and the sub-mirror image;
According to part place piece district reference position and the final position after upgrading in primary mirror picture and the sub-mirror image, obtain the lap in the piece district, part place after piece district, part place and the renewal of sub-mirror image after the renewal of primary mirror picture;
When in the scope in the piece district, part place after the renewal of piece district, part place after the renewal of primary mirror picture at sub-mirror image, if lap is positioned at the first half in the piece district, part place after the renewal of sub-mirror image, then the final position of lap is set to the new reference position in the piece district, part place after the renewal of sub-mirror image, so that shift out in the scope with the piece district, part place of lap after the renewal of sub-mirror image, and lap be divided into a piece district; Or
If lap is positioned at the latter half in the piece district, part place after the renewal of sub-mirror image, then the reference position of lap is set to the new final position in the piece district, part place after the renewal of sub-mirror image, so that shift out in the scope with the piece district, part place of lap after the renewal of sub-mirror image, and lap be divided into a piece district; Or
If lap is positioned at the centre in the piece district, part place after the renewal of sub-mirror image, then the reference position of lap is set to the new final position in the piece district, part place after the renewal of sub-mirror image, and newly-built district, the reference position in newly-built district is the final position of lap, the former final position in the piece district, part place after the renewal of the sub-mirror image of final position in newly-built district, so that shift out in the scope with the piece district, part place of lap after the renewal of sub-mirror image, and lap is divided into a piece district, thereby the piece plot structure after obtaining sub-mirror image and heavily dividing;
In the time of in the scope in the piece district, part place of the piece district, part place after the renewal of group mirror image after the renewal of primary mirror picture, newly-built district on sub-mirror image then, make the scope in the piece district, part place after the renewal of scope that the scope in newly-built district adds lap and primary mirror picture identical, the piece plot structure after obtaining sub-mirror image and heavily dividing;
Piece plot structure after heavily dividing according to differentiation listed files and sub-mirror image, with the part after the renewal of primary mirror picture in sub-mirror image, carry out file-level merging, replace or ignore processing.
Optionally, processor 023 can also be used to carry out this instruction and is used for:
When primary mirror looks like to be updated, part place piece district reference position and final position after determining to upgrade in primary mirror picture and the sub-mirror image;
According to part place piece district reference position and the final position after upgrading in primary mirror picture and the sub-mirror image, obtain the lap in the piece district, part place after piece district, part place and the renewal of sub-mirror image after the renewal of primary mirror picture;
When in the scope in the piece district, part place after the renewal of piece district, part place after the renewal of primary mirror picture at sub-mirror image, shift out in the scope with the piece district, part place of lap after the renewal of sub-mirror image, and lap is divided into a piece district, the piece plot structure after obtaining sub-mirror image and heavily dividing;
In the time of in the scope in the piece district, part place of the piece district, part place after the renewal of group mirror image after the renewal of primary mirror picture, if lap is positioned at the first half in the piece district, part place after the renewal of primary mirror picture, a then newly-built district, the reference position in newly-built district is the final position of lap, and the final position in the piece district, part place after the renewal of the final position in newly-built district and primary mirror picture is identical;
If lap is positioned at the latter half in the piece district, part place after the renewal of primary mirror picture, a then newly-built district, the reference position in the piece district, part place after the renewal of the reference position in newly-built district and primary mirror picture is identical, and the final position in newly-built district is the reference position of lap;
If lap is positioned at the centre in the piece district, part place after the renewal of primary mirror picture, then newly-built first district and second district, the reference position in the piece district, part place after the renewal of the reference position in first district and primary mirror picture is identical, and the final position in first district is the reference position of lap; The reference position in second district is the final position of lap, and the final position in the piece district, part place after the renewal of the final position in second district and primary mirror picture is identical, thus the piece plot structure after obtaining sub-mirror image and heavily dividing;
Piece plot structure after heavily dividing according to differentiation listed files and sub-mirror image, with the part after the renewal of primary mirror picture in sub-mirror image, carry out file-level merging, replace or ignore processing.
Optionally, in the merging of the part after the renewal of primary mirror picture being carried out file-level in sub-mirror image, replace or ignore when handling, processor 023 can also be used to carry out this instruction and be used for:
When primary mirror looks like to be updated, according to the piece plot structure after piece plot structure after the renewal of primary mirror picture and the renewal of sub-mirror image, obtain the lap in the piece district, part place after piece district, part place after the renewal of primary mirror picture and sub-mirror image upgrade, and carry out the heavily division of piece plot structure according to lap antithetical phrase mirror image, piece plot structure after obtaining sub-mirror image and heavily dividing, piece plot structure after sub-mirror image is heavily divided is: the part that sub-mirror image does not upgrade is piece district independently, lap is piece district independently, and the part in the part after sub-mirror image upgrades except that lap is piece district independently;
Determine the piece district at the data place in the file in the differentiation listed files, if the piece district at the lap place in the piece plot structure after the sub-mirror image in piece district at the data place in the file in the differentiation listed files is heavily divided then comprises:
If the part after the renewal of part after the renewal of the primary mirror picture of lap and sub-mirror image all need be kept, then the part after the renewal of the primary mirror picture of lap is merged in the sub-mirror image;
If the part after the renewal of the primary mirror picture of lap need be kept, then the part after the renewal of the sub-mirror image of lap is replaced with the part after the renewal of primary mirror picture of lap;
As if the part after the renewal of the primary mirror picture of ignoring lap, then do not handle.
Embodiments of the invention provide a kind of server, after setting up sub-mirror image, from the piece plot structure of server replicates primary mirror picture piece plot structure as sub-mirror image, when the group mirror image is updated, part after each piece upgrades in the sub-mirror image is divided into a piece district, server also is divided into a piece district with the part after each piece upgrades in the primary mirror picture when primary mirror looks like to be updated, and obtain the lap in the piece district, part place after piece district, part place after the renewal of primary mirror picture and sub-mirror image upgrade by server, and merge in the sub-mirror image according to the part of lap after with the renewal of primary mirror picture, thereby when can after the primary mirror picture upgrades upgrading, rebulid the dependence of sub-mirror image and primary mirror picture, preserve the renewal upgrading that the user is done at client antithetical phrase mirror image.
Another embodiment of the present invention provides a kind of desktop cloud system 03, comprises client 031 and server 02, as shown in figure 14:
Client 031 is used to depend on the sub-mirror image that server 02 is created, and sub-mirror image is set up according to the primary mirror picture by server 02, and after primary mirror looks like to be updated upgrading, will upgrade certain applications after the upgrading in the sub-mirror image of client correspondence.
Server 02 is used for creating the primary mirror picture when creating virtual desktop architecture environment, and after the primary mirror picture upgrades upgrading, and the primary mirror picture after upgrading and client 031 corresponding sub-mirror image is rebulid dependence.
Embodiments of the invention provide a kind of desktop cloud system, after setting up sub-mirror image, from the piece plot structure of server replicates primary mirror picture piece plot structure as sub-mirror image, when the group mirror image is updated, part after each piece upgrades in the sub-mirror image is divided into a piece district, server also is divided into a piece district with the part after each piece upgrades in the primary mirror picture when primary mirror looks like to be updated, and obtain the lap in the piece district, part place after piece district, part place after the renewal of primary mirror picture and sub-mirror image upgrade by server, and merge in the sub-mirror image according to the part of lap after with the renewal of primary mirror picture, thereby when can after the primary mirror picture upgrades upgrading, rebulid the dependence of sub-mirror image and primary mirror picture, preserve the renewal upgrading that the user is done at client antithetical phrase mirror image.
In several embodiment that the application provided, should be understood that disclosed methods, devices and systems can be realized by other mode.For example, device embodiment described above only is schematic, for example, the division of described unit, only be that a kind of logic function is divided, during actual the realization other dividing mode can be arranged, for example a plurality of unit or assembly can in conjunction with or can be integrated into another system, or some features can ignore, or do not carry out.Another point, the shown or coupling each other discussed or directly to be coupled or to communicate to connect can be by some interfaces, the indirect coupling of device or unit or communicate to connect can be electrically, machinery or other form.
Described unit as separating component explanation can or can not be physically to separate also, and the parts that show as the unit can be or can not be physical locations also, promptly can be positioned at a place, perhaps also can be distributed on a plurality of network element.Can select wherein some or all of unit to realize the purpose of present embodiment scheme according to the actual needs.
In addition, each functional unit in each embodiment of the present invention can be integrated in the processing unit, also can be that the independent physics in each unit comprises, also can be integrated in the unit two or more unit.Above-mentioned integrated unit both can adopt the form of hardware to realize, the form that also can adopt hardware to add SFU software functional unit realizes.
The above-mentioned integrated unit of realizing with the form of SFU software functional unit can be stored in the computer read/write memory medium.Above-mentioned SFU software functional unit is stored in the storage medium, comprise some instructions with so that computer equipment (can be personal computer, server, the perhaps network equipment etc.) carry out the part steps of the described method of each embodiment of the present invention.And aforesaid storage medium comprises: USB flash disk, portable hard drive, ROM (read-only memory) (Read-Only Memory, abbreviation ROM), various media that can be program code stored such as random access memory (Random Access Memory is called for short RAM), magnetic disc or CD.
The above; only be the specific embodiment of the present invention, but protection scope of the present invention is not limited thereto, anyly is familiar with those skilled in the art in the technical scope that the present invention discloses; can expect easily changing or replacing, all should be encompassed within protection scope of the present invention.Therefore, protection scope of the present invention should be as the criterion with the protection domain of described claim.