WO2019056931A1 - 一种镜像升级方法及设备 - Google Patents

一种镜像升级方法及设备 Download PDF

Info

Publication number
WO2019056931A1
WO2019056931A1 PCT/CN2018/102728 CN2018102728W WO2019056931A1 WO 2019056931 A1 WO2019056931 A1 WO 2019056931A1 CN 2018102728 W CN2018102728 W CN 2018102728W WO 2019056931 A1 WO2019056931 A1 WO 2019056931A1
Authority
WO
WIPO (PCT)
Prior art keywords
file
layer
sub
mirror layer
updated
Prior art date
Application number
PCT/CN2018/102728
Other languages
English (en)
French (fr)
Inventor
程宝传
杨坚锐
林乐
崔高生
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Priority to EP18859214.1A priority Critical patent/EP3678019B1/en
Publication of WO2019056931A1 publication Critical patent/WO2019056931A1/zh
Priority to US16/824,391 priority patent/US11249745B2/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • G06F8/658Incremental updates; Differential updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • G06F8/63Image based installation; Cloning; Build to order
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/5055Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering software capabilities, i.e. software resources associated or available to the machine
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • the present invention relates to the field of container technologies, and in particular, to a mirror upgrade method and device.
  • container technology As container technology matures, container technology is becoming more common in various fields. In the Internet of Things, for the sake of power consumption and cost considerations, the hardware resources of IoT devices are relatively small, so as a lightweight virtualization technology, container technology is very suitable for IoT devices. Compared to container technologies such as Docker and Linux container (LXC), Linux containers are lighter and more suitable for IoT.
  • LXC Docker and Linux container
  • a container is a lite Linux operating system. Mirroring is the software that is loaded into this container.
  • Mirroring is the software that is loaded into this container.
  • Docker provides a method of image management. Combined with DockerHub, it is very convenient to implement the management of the image of the Docker container and the incremental upgrade of the image.
  • the image management method of the Docker container is not suitable for IoT devices.
  • LXC does not currently support incremental upgrades of images. To upgrade a Linux container image, you need to download a complete image to the device. This wastes bandwidth and wastes disk resources on the device. The upgrade is also time-consuming and inefficient.
  • the present invention is used to solve the problem that the bandwidth of the image upgrade and the disk resource is wasted when the image upgrade is not supported by the Linux container in the prior art, and the upgrade efficiency is low.
  • a first aspect of the embodiments of the present invention provides a mirroring upgrade method, where the method is applied to a container, where the container includes a view layer, a container data layer, and an original mirror layer.
  • the original mirror layer includes a first sub-layer to an n-th sub-layer;
  • the container data layer, the first sub-layer to the n-th sub-layer are sequentially located in the container, n ⁇ 1;
  • the method comprises: receiving the incremental image file of the container;
  • the incremental image file includes: a newly added file, a modified file, and The information of the deleted file, wherein the information of the deleted file includes: a file name of each deleted file and a storage path of the deleted file; and the original mirror layer is updated according to the incremental image file to obtain an updated mirror layer;
  • the state of the deleted file is set to a hidden state; the file in the updated mirror layer and the file in the container data layer are superimposed, and an updated unified view is formed in the view layer for the container;
  • updating the original image layer includes: using the incremental image file as the new first sub-layer file to form the first sub-layer of the updated mirror layer, and the first mirror layer
  • the m sub-layer file forms the m+1th sub-layer of the updated mirror layer as a new m+1th sub-layer file, 1 ⁇ m ⁇ n.
  • updating the original mirroring layer includes: using the incremental mirror file as the new first sub-layer file to form the first sub-layer of the updated mirror layer, and the first mirror layer
  • the m sub-layer file is used as the new m+1th sub-layer file to form the m+1th sub-layer of the updated mirror layer, and the n-1th sub-layer file of the original mirror layer and the n-th sub-layer file of the original mirror layer are merged.
  • the new nth sublayer file the nth sublayer of the updated mirror layer is formed, 1 ⁇ m ⁇ n-2.
  • the n-1th sublayer file of the original mirror layer and the nth sublayer file of the original mirror layer are merged as a new nth
  • the sub-layer file forms the nth sub-layer of the updated mirror layer, including: comparing the n-1th sub-layer file of the original mirror layer with the n-th sub-layer file of the original mirror layer, when the n-1th sub-layer of the original mirror layer
  • the file of the same name in the first file in the nth sublayer of the original mirror layer is deleted, and the n-1 of the original mirror layer is merged.
  • the sub-layer file and the remaining files of the nth sub-layer of the original mirror layer, and the new n-th sub-layer file is formed to form the n-th sub-layer of the updated mirror layer.
  • the n-1th sublayer file of the original mirror layer and the nth sublayer file of the original mirror layer are merged as a new nth
  • the sub-layer file forms the nth sub-layer of the updated mirror layer: when the n-1th sub-layer file of the original mirror layer includes the hidden state description file, the hidden state description file is deleted, and the n-th sub-layer from the original mirror layer Delete the file corresponding to the file name in the hidden state description file, merge the n-1th sub-layer file of the original mirror layer and the remaining files of the nth sub-layer of the original mirror layer to obtain a new n-th sub-layer file to form an update.
  • the nth sublayer of the mirror layer after.
  • the state of the specified file is set to a hidden state, so that the specified file is for the container.
  • the data layer and view layer are not visible, and the specified file is any file.
  • the method further includes: determining an object file in the updated mirror layer, the priority of the target file being higher than the file of the same name of the target file in the container data layer. Priority; when superimposing files in the mirrored layer and files in the container data layer, the state of the file with the same name of the target file in the container data layer is set to the hidden state, and the target is rendered in the updated unified view. file.
  • the method further includes: deleting the first sub-layer of the updated mirror layer; and using the m-th sub-layer file of the updated mirror layer as the rollback
  • the m-1th sub-layer file of the mirror layer forms the m-1th sub-layer of the mirrored layer after the retreat, 2 ⁇ m ⁇ n; superimposes the files in the mirror layer after the fallback and the files in the data layer of the container,
  • the unified view after the rollback is formed in the view layer is used by the container; wherein the unified view after the rollback is the same as the unified view obtained by superimposing the files of the original mirror layer and the files of the container data layer.
  • a mirroring upgrade method provided by the first aspect of the present invention implements layered management of a container mirroring layer.
  • the container image is upgraded, only the incremental part of the container is downloaded, which saves download time and network bandwidth, and saves equipment.
  • the disk space of the container image is saved, and the mechanism guarantees that the container data will not be lost after being upgraded.
  • the problem that the bandwidth is saved and the disk resources are wasted when the image upgrade is not supported by the incremental upgrade of the Linux container in the prior art, and the upgrade efficiency is low.
  • a second aspect of the embodiments of the present invention provides a device, which includes a memory and a processor, the memory is used to store a container, and the processor is configured to execute the method in the first aspect and the implementation manners of the first aspect.
  • a third aspect of the embodiments of the present invention provides a computer program product comprising instructions for causing a computer to perform the methods of the first aspect and the implementations of the first aspect when the computer program product is run on a computer.
  • a fourth aspect of the embodiments of the present invention provides a computer readable storage medium.
  • the computer readable storage medium stores a computer program.
  • the computer program is executed by the processor, the first aspect and the method in each implementation manner of the first aspect are implemented. .
  • FIG. 1 is a schematic diagram of a file system structure of a Linux container
  • FIG. 2 is a schematic structural diagram of a file system of a Linux container with a hidden state of a mirror layer file according to an embodiment of the present disclosure
  • FIG. 3 is a schematic structural diagram of a file system of a Linux container for setting a priority attribute of a mirror layer file according to an embodiment of the present disclosure
  • FIG. 4 is a flowchart of a method for upgrading a Linux container image according to an embodiment of the present invention
  • FIG. 5 is a schematic diagram of a Linux container image upgrade according to an embodiment of the present invention.
  • FIG. 6 is a schematic diagram of a Linux container image upgrade according to an embodiment of the present invention.
  • FIG. 7 is a schematic diagram of a Linux container image rewinding according to an embodiment of the present invention.
  • FIG. 8 is a schematic diagram of a method for adding a file in a mirror layer of a Linux container according to Embodiment 1 of the present invention.
  • FIG. 9 is a schematic diagram of a method for modifying a file of a Linux container mirroring layer according to Embodiment 2 of the present invention.
  • FIG. 10 is a schematic diagram of a method for deleting a file in a mirror layer of a Linux container according to Embodiment 1 of the present invention.
  • FIG. 11 is a schematic structural diagram of a device according to an embodiment of the present invention.
  • the Linux container includes: a view layer, a container data layer, and a mirror layer; the mirror layer includes n sub-layers; the view layer, the container data layer, the first sub-layer to the n-th sub-layer are sequentially located in the container, and n is greater than or equal to 1.
  • the container data layer can be read and written, the mirror layer is read-only, and the view layer is a unified view formed by superimposing the container data layer and the mirror layer, which is also called a merged point.
  • the mirroring layer includes n sub-layers, and n is 3 as an example.
  • the n sub-layers include: a first sub-layer, a second sub-layer, and a third sub-layer.
  • the view layer, the container data layer, the first sub-layer, the second sub-layer, and the third sub-layer are sequentially located in the container.
  • the structure of the container mentioned in the embodiment of the present invention actually refers to the structure of the file system of the container.
  • the file system may be a root file system (English: root file system, referred to as: rootfs).
  • the unified view is used to present the superimposed files belonging to the container to the container.
  • OverlayFS2 When the Linux container is upgraded, it is superimposed according to the OverlayFS2 superposition principle, and all the files in the container data layer and the mirror layer are superimposed, and a unified view is formed in the view layer for the container to use.
  • OverlayFS uses two directories, placing one directory on top of the other and providing a single, unified view. These two directories are often called layers, and this layered technique is called union mount. In the terminology, the lower directory is called lowerdir, and the upper layer is called upperdir. The unified view of the external display is called merged.
  • OverlayFS2 adds multiple lowerdirs.
  • the mirror layer corresponds to lowerdir
  • the container data layer corresponds to upperdir
  • the view layer corresponds to merged
  • the mirror layer includes n sub-layers corresponding to n lowerdirs.
  • OverlayFS2 follows three principles: First, the upper and lower merge, the merged directory is the union of the files in the upper and lower directories; Second, the same name covers, when the upper directory contains the same name file of the lower directory, the upper file covers the lower file, the merged directory The file in the upper directory is presented, wherein the file with the same name is a file with the same name but different storage paths, for example, the file A in the upper directory, the file A in the lower directory, and the file A and the lower directory in the upper directory.
  • the files A are mutually the same name files, and the contents of the same name files may be different; third, copy-on-write, in the superimposed file system (merged directory), the created files are created in the upper directory.
  • merged directory the superimposed file system
  • FIG. 1 is a schematic diagram of a file system structure of a Linux container.
  • the Linux container includes a view layer, a container data layer, and a mirror layer, and the mirror layer includes three sub-layers.
  • File 1 is in the third sub-layer. There is no file with the same name of file 1 on the third sub-layer. File 1 is displayed directly in the view layer.
  • File 2 is in the second sub-layer, and a file of the same name of file 2 is located in the third sub-layer. According to the concealing principle of the same name, the file 2 in the second sub-layer covers the file 2 in the third sub-layer, in the view layer. Only file 2 in the second sublayer is displayed.
  • file 3 is in the third sub-layer, and a file with the same name of file 3 is located in the first sub-layer, and only the file 3 in the first sub-layer is displayed in the view layer.
  • File 4 is displayed directly in the view layer in the container data layer.
  • the file 5 is in the third sublayer, and the file 5 is set to the hidden state in the container data layer (indicated by "file name + rm" in the drawing), the file 5 is not displayed in the view layer, but the file 5 is not Really deleted, the file 5 in the third sublayer actually still exists. All the files in the file system are superimposed according to the overlay principle of overlayfs2 to form a unified view in the view layer for the container to use. As shown in FIG.
  • the files that the container can use include file 1 in the third sublayer, file 2 in the second sublayer, file 3 in the first sublayer, and file 4 in the container data layer. , does not include file 5 in the third sublayer set to the hidden state. Among them, the file set to the hidden state will not be presented in the unified view.
  • FIG. 2 is a schematic structural diagram of a file system of a Linux container in which a mirroring layer file is hidden in a state according to an embodiment of the present invention.
  • the file system structure of the Linux container in Figure 1 can only set the hidden state of the mirror layer file in the container data layer, and the container data layer hides the state description file to hide the files in the mirror layer.
  • the hidden state of the file in the mirroring layer can be set in the mirroring layer, that is, the state information is allowed to be added to the mirroring layer file that needs to be hidden, and the state information is used to indicate that the state of the mirroring layer file is hidden.
  • the default state of the mirror layer file is public and no additional settings are required.
  • the mirror file When the image is deleted and deleted, the mirror file is a read-only file. You cannot delete the original file directly. You need to set the hidden state of the file to achieve the same effect as deleting the file.
  • the first sub-layer file in the mirror layer can hide the second sub-layer and the third sub-layer file, and the second sub-layer file can hide the third sub-layer file instead of actually deleting the file.
  • file 2 is set to a hidden state in the second sub-layer, but file 2 is not actually deleted, but the file 2 is not visible in the container data layer and the view layer.
  • the file 2 in the third sublayer is not displayed in the view layer.
  • the file 3 is set to the hidden state in the first sublayer, but the file 3 in the third sublayer is not actually deleted, and is superimposed by overlayfs2. , file 3 is not displayed in the view layer.
  • a hidden state description file may be separately set in the first to n-1th sublayers of the mirror layer, and the hidden state description file is used for recording to be set.
  • the file name of the file to hide the state and the storage path of the file.
  • the hidden state needs to be deleted during the merging process.
  • the mirror layer file may be hidden in the mirror layer, but also the priority attribute may be added to the mirror layer file, and the priority of the mirror layer file is set higher than the priority of the container data layer file.
  • FIG. 3 is a schematic structural diagram of a file system of a Linux container for setting a priority attribute of a mirror layer file according to an embodiment of the present invention.
  • a file in a container data layer covers a file of the same name in a mirror layer.
  • the container is used.
  • a file with the same name in the data layer overwrites the updated file in the mirror layer, causing the update to fail.
  • the embodiment of the present invention provides a file system of a Linux container to set a priority attribute for a mirror layer file, so as to record a priority of the image layer file, so that the updated image layer file has a higher priority than the container data layer.
  • the file name of the same name of the mirror layer file is prioritized, so that when the updated image layer file is superimposed with the container data layer file, the updated image layer file overwrites the file of the same name in the container data layer.
  • a file of the same name named File 1 exists in the container data layer, the second sublayer, and the third sublayer, and the file 1 in the second sublayer is the third sublayer.
  • the update of the file 1 covers the file 1 of the third sub-layer according to the file 1 of the second sub-layer of the same name covering principle.
  • the updated file 1 in the second sub-layer is set to have a higher priority than the file 1 in the container data layer (indicated by ⁇ ).
  • the view layer displays the file 1 in the second sublayer, so that the updated file 1 can be successfully displayed in the view layer.
  • the view layer displays the file 4 in the container data layer.
  • FIG. 4 is a flowchart of a method for upgrading a Linux container image according to an embodiment of the present invention.
  • the method is applied to the container shown in FIG. 2 or FIG. 3, and the image is upgraded when the container is set to a stop state, and the method is performed by the host where the container is located. Or a hypervisor on the host, the container comprising a view layer, a container data layer and an original mirror layer, the original mirror layer comprising a first sub-layer to an n-th sub-layer; the view layer, the container data layer, the The first sub-layer to the n-th sub-layer are sequentially located in the container, n ⁇ 1.
  • the method includes:
  • Step 401 Receive an incremental image file of the container; the incremental image file includes: a newly added file, a modified file, and information of the deleted file; wherein the deleted file information includes: each deleted file name and is The storage path of the deleted file.
  • the incremental image file is generated by the image file provider.
  • Step 402 Update the original mirror layer according to the incremental image file to obtain an updated mirror layer; wherein the state of the deleted file is set to a hidden state in the updated mirror layer.
  • the setting of the deleted file to the hidden state in the updated mirror layer is implemented by setting a hidden state description file in the mirror sublayer.
  • Step 403 Superimpose the file in the updated mirror layer and the file in the container data layer, and form an updated unified view in the view layer for the container to use; wherein the updated unified view does not include the deleted state that is set to the hidden state. file.
  • updating the original image layer includes: using the incremental image file as a new first sub-layer file to form a first sub-layer of the updated mirror layer, and using the m-th sub-layer file of the original mirror layer as a new m-th.
  • the +1 sub-layer file forms the m+1th sub-layer of the updated mirror layer, 1 ⁇ m ⁇ n.
  • updating the original mirror layer includes: forming the incremental mirror file as the first first sub-layer file to form the first sub-layer of the updated mirror layer, and using the m-th sub-layer file of the original mirror layer as the new The m+1 sub-layer file forms the m+1th sub-layer of the updated mirror layer, and merges the n-1th sub-layer file of the original mirror layer with the n-th sub-layer file of the original mirror layer as the new n-th sub-layer file. Forming the nth sublayer of the updated mirror layer, 1 ⁇ m ⁇ n-2.
  • the incremental image file includes information of the deleted file
  • a hidden state description file needs to be created in the new first sub-layer generated by the incremental image file
  • the hidden state description file is used for Recording the deleted file and the storage path of the deleted file.
  • the original mirror layer of the container includes only one sub-layer, and the incremental image file is used as the new first sub-layer file to form the first sub-layer of the updated mirror layer, and the first sub-layer of the original mirror layer
  • the layer file is used as the new second sub-layer file to form the second sub-layer of the updated mirror layer, and a mirror update is completed.
  • the incremental image file is used as a new first sub-layer file to form a first sub-layer of the updated mirror layer
  • the first sub-layer file of the original mirror layer is used as a new
  • the second sub-layer file forms a second sub-layer of the updated mirror layer, and merges the second sub-layer file of the original mirror layer and the third sub-layer file of the original mirror layer into a new third sub-layer file to form an updated mirror layer.
  • the third sub-layer forms a file system structure of the updated Linux container composed of three sub-layer mirror layers as shown in FIG. 6. According to the application, the Linux container can be upgraded multiple times.
  • the number of sub-layers in the mirroring layer is generally less than 5 layers.
  • the number of sub-layers in the mirroring layer is multi-layer, you can apply the above two methods to mirror. Layer update.
  • the first sub-layer (nth layer) may be deleted, and the hidden state description file in the penultimate sub-layer (n-1th layer) may be deleted to reduce the occupation of the container. space.
  • the mirrored upgrade container can also fall back to the previous image and start mirroring rollback when the container is set to the stop state.
  • This method is performed by the host or the hypervisor on the host.
  • the method includes: deleting the updated The first sub-layer of the mirroring layer; the m-th sub-layer file of the mirrored layer of the updated mirror layer is formed as the m-1th sub-layer of the mirrored layer after the back-off mirror layer, 2 ⁇ m ⁇ n; superimpose the file in the mirror layer after the rollback and the file in the container data layer, and form a unified view after the rollback in the view layer for the container; wherein, the unified view and the original mirror layer after the rollback The file is the same as the unified view obtained by superimposing the files in the container data layer.
  • the updated container mirroring layer includes a first sublayer, a second sublayer, and a third sublayer, and the first layer of the updated mirror layer is deleted.
  • the sub-layer; the second sub-layer file of the updated mirror layer is used as the first sub-layer file of the back-off mirror layer to form the first sub-layer of the mirror layer after the rollback, and the third layer of the updated mirror layer
  • the sub-layer file is used as the second sub-layer file of the mirror layer after the rollback to form the second sub-layer of the mirror layer after the rollback; the file in the mirror layer after the rollback is superimposed and the file in the data layer of the container is in the view layer. Form a unified view after rollback for the container to use.
  • the mirror image upgrade of the container has three cases: adding, modifying, and deleting the existing image.
  • the minimum unit for processing the Linux container image upgrade according to the embodiment of the present invention is a file, and the incremental image includes: a newly added file, a modified file.
  • the mirror upgrade of the container shown in FIG. 3 will be described in detail below in three cases.
  • FIG. 8 is a schematic diagram of a method for adding a file to a mirroring layer of a Linux container according to Embodiment 1 of the present invention. It is assumed that the original mirroring layer is the mirroring layer shown in FIG. 3, and the incremental image file includes a newly added file 6, and the file is added. 6 as the new first sub-layer file forms the first sub-layer of the updated mirror layer, and the file 3 of the first sub-layer of the original mirror layer is used as the new second sub-layer file to form the second sub-layer of the updated mirror layer.
  • the second sublayer of the original mirror layer has the file 1, and the file with the same name of the file 1 exists in the third sublayer of the original mirror layer, and the file 1 in the third sublayer of the original mirror layer is deleted, and at the same time, the original mirror layer
  • there is a hidden state description file 2-rm of the file 2 in the third sublayer the hidden state description file 2-rm is deleted, and the hidden state description file 2-rm is deleted from the third sublayer of the original mirror layer.
  • Corresponding file 2 merges the second sub-layer file 1 of the original mirror layer with the file 3, file 4, and file 5 of the third sub-layer of the original mirror layer to obtain a new third sub-layer file, forming an updated mirror layer.
  • Third sublayer, updated mirror layer The third sub-layer includes file 1, file 3, file 4 and file 5.
  • the container of the update mirror layer there is a file 1 in the third sub-layer and is an updated file, and a file with the same name in the container data layer and an unupdated file is set, and the third sub-layer is set.
  • File 1 has a higher priority than file 1 of the container data layer, and file 1 of the third sublayer is displayed at the view layer.
  • a file 3 of the same name exists in the second sub-layer and the third sub-layer.
  • the file 3 of the third sub-layer is not visible to the view layer, and the file 3 of the second mirror layer is displayed in the view layer.
  • the file 4 of the same name exists in the container data layer, and the file 4 in the container data layer has a higher priority than the file 4 in the third sub-layer.
  • File 4 in the data layer is displayed in the view layer. Since the container data layer has a file 5-rm recording the hidden state of the file 5 in the third sublayer, the file 5 in the third sublayer is not displayed in the view layer.
  • a unified view of the file 1 including the third sub-layer, the file 3 of the second sub-layer, the file 4 of the container data layer, and the file 6 of the first sub-layer is formed by superimposing in the view layer for use by the container.
  • FIG. 9 is a schematic diagram of a method for modifying a file of a Linux container mirroring layer according to Embodiment 2 of the present invention. It is assumed that the original mirroring layer is the mirroring layer shown in FIG. 3, and the incremental mirroring file includes a file 1 of the original second sublayer.
  • the modified file is named as file 1, and the file 1 is used as the new first sub-layer file to form the first sub-layer of the updated mirror layer. Since the file 1 in the incremental image file is the updated file, the incremental mirror is set.
  • the priority of file 1 in the file is higher than the priority of file 1 in the container data layer (indicated by ⁇ ), and the file 3 of the first sub-layer of the original mirror layer is used as the new second sub-layer file to form the updated mirror layer.
  • the second sub-layer, the second sub-layer of the original mirror layer has the file 1, and the file with the same name of the file 1 exists in the third sub-layer of the original mirror layer, and the file 1 in the third sub-layer of the original mirror layer is deleted.
  • the second sublayer of the original mirror layer has a hidden state description file 2-rm of the file 2 in the third sublayer, deletes the hidden state description file 2-rm, and deletes the hidden state from the third sublayer of the original mirror layer.
  • Description file 2-rm corresponding text 2.
  • the file 1 in the container of the update mirror layer, the file 1 exists in the first sublayer, and the file 1 of the same name exists in the third sublayer.
  • the file 1 of the first sublayer covers the third sublayer.
  • File 1 because the file 1 of the first sub-layer is the updated file, and the file of the same name exists in the container data layer and is an unupdated file, the file 1 of the first sub-layer is set to have a higher priority than the container data layer.
  • the priority of file 1 is displayed in the view layer.
  • a file 3 of the same name exists in the second sub-layer and the third sub-layer.
  • the file 3 of the third sub-layer is not visible to the view layer, and the file 3 of the second mirror layer is displayed in the view layer.
  • the file 4 of the same name exists in the container data layer, and the file 4 in the container data layer has a higher priority than the file 4 in the third sub-layer.
  • File 4 in the data layer is displayed in the view layer. Since the container data layer has a file 5-rm recording the hidden state of the file 5 in the third sublayer, the file 5 in the third sublayer is not displayed in the view layer.
  • a unified view of the file 4 including the first sub-layer, the file 3 of the second sub-layer, and the file 4 of the container data layer is superimposed in the view layer for use by the container.
  • FIG. 10 is a schematic diagram of a method for deleting a file in a mirroring layer of a Linux container according to Embodiment 3 of the present invention. It is assumed that the original mirroring layer is a mirroring layer as shown in FIG. 3, and the incremental mirroring file includes information of the deleted file: the original mirroring layer A sub-layer of file 3.
  • the hidden state description file is used as a new first sub-layer file to form a first sub-layer of the updated mirror layer, and the file 3 of the first sub-layer of the original mirror layer is used as a new second sub-layer file to form an updated mirror layer.
  • the second sub-layer, the second sub-layer of the original mirror layer has the file 1, and the file with the same name of the file 1 exists in the third sub-layer of the original mirror layer, and the file 1 in the third sub-layer of the original mirror layer is deleted, and
  • the hidden state description file 2-rm of the file 2 in the third sublayer there is a hidden state description file 2-rm of the file 2 in the third sublayer, the hidden state description file 2-rm is deleted, and the hidden state description is deleted from the third sublayer of the original mirror layer.
  • the file 2 corresponding to the file 2-rm merges the second sub-layer file 1 of the original mirror layer with the file 3, file 4, and file 5 of the third sub-layer of the original mirror layer to obtain a new third sub-layer file, forming an update.
  • a third sub-layer mirror layer including the updated file 1, file 3, file 4 and file 5.
  • the container of the update mirror layer there is a file 1 in the third sub-layer and is an updated file, and a file with the same name in the container data layer and an unupdated file is set, and the third sub-layer is set.
  • File 1 has a higher priority than file 1 of the container data layer (indicated by ⁇ ), and file 1 of the third sublayer is displayed at the view layer.
  • the file 3 of the same name exists in the second sub-layer and the third sub-layer.
  • the file 3 of the third sub-layer is invisible to the view layer, and the first sub-layer includes the first sub-record for recording the original mirror layer.
  • File 3 in the layer hides the file of the attribute, and file 3 of the second mirror layer is not visible to the view layer.
  • File 4 in the third sub-layer is an unupdated file.
  • the file 4 of the same name exists in the container data layer, and the file 4 in the container data layer has a higher priority than the file 4 in the third sub-layer.
  • File 4 in the data layer is displayed in the view layer. Since the container data layer has a file 5-rm recording the hidden state of the file 5 in the third sublayer, the file 5 in the third sublayer is not displayed in the view layer.
  • a unified view of the file 4 including the file 1 including the third sub-layer and the container data layer superimposed in the view layer is used by the container.
  • the upgraded Linux container formed by the above FIG. 8, FIG. 9, and FIG. After that, the first sub-layer of the updated mirror layer can be deleted; the second sub-layer file of the updated mirror layer is used as the first sub-layer file of the back-up mirror layer to form the back mirror layer. a sub-layer; the second sub-layer file of the updated mirror layer is used as the second sub-layer file of the reversed mirror layer to form the second sub-layer of the back-supplied mirror layer, and is superimposed on the back-up mirror layer
  • the file and the file in the container data layer form the same unified view in the view layer as shown in Figure 3 for the container to use.
  • the Linux container mirroring layer provided by the embodiment of the present invention can perform multiple upgrades and multiple rollbacks.
  • FIG. 11 is a schematic structural diagram of a device according to an embodiment of the present invention.
  • the device includes: a processor and a memory.
  • the memory can be connected to the processor via a bus.
  • the memory may be a non-volatile memory such as a hard disk drive and a flash memory in which software programs and device drivers are stored.
  • the software program can perform various functions of the above method provided by the embodiments of the present invention; the device driver can be a network and an interface driver.
  • the processor is configured to execute a software program, and when the software program is executed, the method provided by the embodiment of the present invention can be implemented.
  • the embodiment of the present invention further provides a computer readable storage medium.
  • the computer readable storage medium stores a computer program that, when executed by the processor, implements the method provided by the embodiments of the present invention.
  • Embodiments of the present invention also provide a computer program product comprising instructions.
  • the processor is caused to perform the above method.
  • the image upgrade method and device provided by the embodiment of the present invention implement layered management of the container mirroring layer.
  • the container image is upgraded, only the incremental part of the container is downloaded, which saves download time and network bandwidth, and saves equipment.
  • the disk space of the container image is saved, and the mechanism guarantees that the container data will not be lost after being upgraded.
  • the problem that the bandwidth is saved and the disk resources are wasted when the image upgrade is not supported by the incremental upgrade of the Linux container in the prior art, and the upgrade efficiency is low.
  • the image upgrade method provided by the foregoing embodiment is not limited to the Linux container in the overlayfs2 application scenario.
  • the scenario of changing the upgrade file and all the superimposed file system scenarios that require the underlying changes affect the upper layer can be applied.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

一种镜像升级方法,该方法包括:接收容器的增量镜像文件(401);增量镜像文件包括:新增的文件,修改的文件以及被删除文件的信息;其中,被删除文件的信息包括:每个被删除的文件名以及被删除的文件的存储路径;根据增量镜像文件更新原始镜像层,得到更新后的镜像层(402),其中,在更新后的镜像层中将被删除文件的状态设置为隐藏状态;叠加更新后的镜像层中的文件与容器数据层中的文件,在视图层形成更新后的统一视图供容器使用(403);其中,更新后的统一视图不包括被设置为隐藏状态的被删除文件。

Description

一种镜像升级方法及设备
本申请要求于2017年9月22日提交中国专利局、申请号为201710868013.4、发明名称为“一种镜像升级方法及设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本发明涉及容器技术领域,尤其涉及一种镜像升级方法及设备。
背景技术
随着容器技术越来越成熟,容器技术在各个领域运用的越来越普遍。在物联网中,为了功耗,成本的考虑,物联网设备的硬件资源比较少,所以作为轻量级的虚拟化技术,容器技术非常适合物联网设备。Docker、Linux容器(Linux container,LXC)等容器技术相比,Linux容器更轻便,更适合应用于物联网。
通俗来说,容器是一个精简版的Linux操作系统,镜像是加载到这个容器的软件,当需要增强容器的功能时,需要升级该容器对应的镜像。目前,Docker提供了一种镜像管理的方法,结合DockerHub,可以很方便的实现Docker容器的镜像的管理以及镜像的增量升级,但是Docker容器的镜像管理方法并不适合物联网设备。LXC当前不支持镜像的增量升级,升级Linux容器镜像,需要全部下载一个完整的镜像到设备,这样既浪费带宽,又浪费设备上的磁盘资源,升级也非常耗时,效率低下。
发明内容
本发明用于解决现有技术中Linux容器不支持镜像的增量升级导致的镜像升级时浪费带宽和磁盘资源,升级效率低下的问题。
本发明实施例第一方面提供了一种镜像升级方法,该方法应用于容器,容器包括视图层、容器数据层和原始镜像层,原始镜像层包括第一子层至第n子层;视图层、容器数据层、第一子层至第n子层依次位于容器中,n≥1;该方法包括:接收容器的增量镜像文件;增量镜像文件包括:新增的文件,修改的文件以及被删除文件的信息;其中,被删除文件的信息包括:每个被删除的文件名以及被删除的文件的存储路径;根据增量镜像文件更新原始镜像层,得到更新后的镜像层;其中,在更新后的镜像层中将被删除文件的状态设置为隐藏状态;叠加更新后的镜像层中的文件与容器数据层中的文件,在视图层形成更新后的统一视图供容器使用;其中,更新后的统一视图不包括被设置为隐藏状态的被删除文件。
在所述第一方面的第一种实施方式中,更新原始镜像层包括:将增量镜像文件作为新第一子层文件形成更新后的镜像层的第一子层,将原始镜像层的第m子层文件作为新第m+1子层文件形成更新后的镜像层的第m+1子层,1≤m≤n。
在所述第一方面的第二种实施方式中,更新原始镜像层包括:将增量镜像文件作为新第一子层文件形成更新后的镜像层的第一子层,将原始镜像层的第m子层文件作为新第m+1子层文件形成更新后的镜像层的第m+1子层,将原始镜像层的第n-1子层文件和 原始镜像层的第n子层文件合并作为新第n子层文件形成更新后的镜像层的第n子层,1≤m≤n-2。
基于所述第二种实施方式,在所述第一方面的第三种实施方式中,将原始镜像层的第n-1子层文件和原始镜像层的第n子层文件合并作为新第n子层文件形成更新后的镜像层的第n子层包括:比较原始镜像层的第n-1子层文件和原始镜像层的第n子层文件,当原始镜像层的第n-1子层存在第一文件且原始镜像层的第n子层中存在第一文件的同名文件时,删除原始镜像层的第n子层中的第一文件的同名文件,合并原始镜像层的第n-1子层文件和原始镜像层的第n子层的剩余文件,得到新的第n子层文件形成更新后的镜像层的第n子层。
基于所述第二种实施方式,在所述第一方面的第四种实施方式中,将原始镜像层的第n-1子层文件和原始镜像层的第n子层文件合并作为新第n子层文件形成更新后的镜像层的第n子层包括:当原始镜像层的第n-1子层文件包括隐藏状态描述文件时,删除隐藏状态描述文件,并从原始镜像层的第n子层中删除隐藏状态描述文件中的文件名对应的文件,合并原始镜像层的第n-1子层文件和原始镜像层的第n子层的剩余文件,得到新的第n子层文件形成更新后的镜像层的第n子层。
基于所述第一方面及第一方面的任意一种实现方式,当从更新后的镜像层的任一子层中删除指定文件时,将指定文件的状态设置为隐藏状态,使得指定文件对于容器数据层和视图层不可见,其中指定文件为任意文件。
基于所述第一方面及第一方面的任意一种实现方式,该方法还包括:确定更新后的镜像层中的目标文件,目标文件的优先级高于容器数据层中目标文件的同名文件的优先级;在叠加更新后的镜像层中的文件与容器数据层中的文件时,将容器数据层中的目标文件的同名文件的状态设置为隐藏状态,并在更新后的统一视图中呈现目标文件。
基于所述第一方面及第一方面的任意一种实现方式,该方法还包括:删除更新后的镜像层的第一子层;将更新后的镜像层的第m子层文件作为回退后的镜像层的第m-1子层文件形成回退后的镜像层的第m-1子层,2≤m≤n;叠加回退后的镜像层中的文件与容器数据层中的文件,在视图层形成回退后的统一视图供容器使用;其中,回退后的统一视图与原始镜像层的文件和容器数据层的文件叠加后得到的统一视图相同。
本发明实施例第一方面提供的一种镜像升级方法实现了容器镜像层的分层管理,在容器镜像升级时,只需下载容器的增量部分,节省了下载时间及网络宽带,节约了设备上保存容器镜像的磁盘空间,并且在机制上保证了容器数据升级后不会丢失。解决了现有技术中Linux容器不支持镜像的增量升级导致的镜像升级时浪费带宽和磁盘资源,升级效率低下的问题。
本发明实施例第二方面提供了一种设备,该设备包括存储器和处理器,存储器用于存储容器,处理器用于执行第一方面及第一方面的各实现方式中的方法。
本发明实施例第三方面提供了一种包含指令的计算机程序产品,当计算机程序产品在计算机上运行时,使得计算机执行第一方面及第一方面的各实现方式中的方法。
本发明实施例第四方面提供了一种计算机可读存储介质,计算机可读存储介质上存储有计算机程序,计算机程序被处理器执行时实现第一方面及第一方面的各实现方式中的方法。
附图说明
图1为一种Linux容器的文件系统结构示意图;
图2为本发明实施例提供的一种镜像层文件设置隐藏状态的Linux容器的文件系统结构示意图;
图3为本发明实施例提供的一种镜像层文件设置优先级属性的Linux容器的文件系统结构示意图;
图4为本发明实施例提供的一种Linux容器镜像升级方法流程图;
图5为本发明实施例提供的一种Linux容器镜像升级示意图;
图6为本发明实施例提供的一种Linux容器镜像升级示意图;
图7为本发明实施例提供的一种Linux容器镜像回退示意图;
图8为本发明实施例一提供的一种Linux容器镜像层新增文件方法示意图;
图9为本发明实施例二提供的一种Linux容器镜像层修改文件方法示意图;
图10为本发明实施例一提供的一种Linux容器镜像层删除文件方法示意图;
图11为本发明实施例提供的一种设备结构示意图。
具体实施方式
为了使本发明实施例的目的、技术方案和优点更加清楚,下面结合附图对本发明实施例具体实施方式做进一步的详细描述。
Linux容器包括:视图层、容器数据层和镜像层;镜像层包括n个子层;视图层、容器数据层、第一子层至第n子层依次位于容器中,n大于等于1。容器数据层可以读写,镜像层只读,视图层为容器数据层与镜像层叠加后形成的统一视图,又称为合并点(merged point)。在本发明实施例提供的Linux容器中,镜像层包括n个子层,以n为3为例,则n个子层包括:第一子层、第二子层和第三子层。视图层、容器数据层、第一子层、第二子层和第三子层依次位于容器中。其中,本发明实施例中所提到的容器的结构,实际是指容器的文件系统的结构。所述文件系统可以为根文件系统(英文:root file system,简称:rootfs)。所述统一视图用于向容器呈现叠加后的属于所述容器的文件。
Linux容器升级时,根据OverlayFS2叠加原则进行叠加,将容器数据层和镜像层所有文件进行叠加,在视图层形成统一的视图供容器使用。OverlayFS使用两个目录,把一个目录置放于另一个之上,并且对外提供单个统一的视角。这两个目录通常被称作层,这个分层的技术被称作union mount。术语上,下层的目录叫做lowerdir,上层的叫做upperdir。对外展示的统一视图称作merged。OverlayFS2增加了多个lowerdir。在本发明实施例中镜像层对应lowerdir,容器数据层对应upperdir,视图层对应merged,镜像层包括n个子层对应n个lowerdir。OverlayFS2遵循三个原则:一、上下合并,merged目录里面是上下层目录中文件的并集;二、同名遮盖,当上层目录中含有下层目录的同名文件时,上层文件覆盖下层文件,merged目录里面呈现上层目录中的文件,其中,同名文件是名称相同但存储路径不同的多个文件,例如,上层目录中有文件A,下层目录有也有文件A,则上层目录中的文件A和下层目录中的文件A互为同名文件,同 名文件的内容可以不相同;三、写时拷贝,在叠加后的文件系统(merged目录)中,创建文件都是创建在上层目录。修改文件时,如果该文件是来自上层目录则直接修改该文件,如果该文件来自下层目录,则先将该文件拷贝到上层目录再修改该文件。删除文件时如果该文件来自上层目录则直接删除,如果该文件来自下层目录则隐藏该文件,让该文件在merged目录里面看不到。
图1为一种Linux容器的文件系统结构示意图,该Linux容器包括视图层,容器数据层和镜像层,该镜像层包括三个子层。文件1在第三子层中,第三子层之上无文件1的同名文件,文件1直接在视图层中显示。文件2在第二子层中,并且文件2的一个同名文件位于第三子层中,根据同名遮盖原则,第二子层中的文件2覆盖第三子层中的文件2,在视图层中只显示第二子层中的文件2。同理,文件3在第三子层中,并且文件3的一个同名文件位于第一子层中,则视图层中只显示第一子层中的文件3。文件4在容器数据层中,直接在视图层中显示。文件5在第三子层中,并且,文件5在容器数据层中被设置为隐藏状态(附图中用“文件名+rm”表示),视图层中不显示文件5,但是文件5未被真正删除,第三子层中的文件5实际上还是存在的。该文件系统中的所有文件按照overlayfs2的叠加原则进行叠加后在视图层形成统一的视图,供容器使用。如图1所示,经过叠加后,容器可以使用的文件包括第三子层中的文件1,第二子层中的文件2,第一子层中的文件3和容器数据层中的文件4,不包括被设置为隐藏状态的第三子层中的文件5。其中,被设置为隐藏状态的文件不会被呈现在统一视图中。
图2为本发明实施例提供的一种镜像层文件设置隐藏状态的Linux容器的文件系统结构示意图。图1中的Linux容器的文件系统结构只能在容器数据层设置镜像层文件的隐藏状态,容器数据层隐藏状态描述文件隐藏镜像层中的文件。图2中,可以在镜像层中设置镜像层中文件的隐藏状态,即允许为需要隐藏的镜像层文件添加状态信息,该状态信息用于指示该镜像层文件的状态为隐藏状态。镜像层文件的默认状态为公开状态,不需要额外设置。当镜像升级删除文件时,由于镜像层文件为只读文件,不能将原有文件进行直接删除,需要设置该文件的隐藏状态来达到与删除文件同样的效果。镜像层中的第一子层文件可以隐藏第二子层和第三子层文件,第二子层文件可以隐藏第三子层文件,而不是真正的删除文件。在一个具体的例子中,如图2所示,文件2在第二子层中被设置为隐藏状态,但是并没有实际删除文件2,只是容器数据层和视图层中看不到该文件2,视图层中不显示第三子层中的文件2,同理,文件3在第一子层中被设置为隐藏状态,但第三子层中的文件3并没有被实际删除,通过overlayfs2叠加后,文件3在视图层不显示。
为了在镜像层中为镜像层文件设置隐藏状态,可选地,可以在镜像层的第1到第n-1个子层中分别设置隐藏状态描述文件,所述隐藏状态描述文件用于记录被设置为隐藏状态的文件的文件名和该文件的存储路径。
在本发明实施例中,如果需要将镜像层的第n-1子层与第n子层合并,且第n-1子层存在隐藏状态描述文件,则在合并过程中,需要删除该隐藏状态描述文件以及第n层中该隐藏状态描述文件中记录为文件名对应的文件。例如,当需要将图2中的第二子层文件合并到第三子层中时,原第二子层中的隐藏状态描述文件(记录了文件2的隐藏状态)以及原第三子层中的文件2被真正删除。
本申请中,不仅可以在镜像层中隐藏镜像层文件,还可以为镜像层文件添加优先级属性,设置该镜像层文件的优先级高于容器数据层文件的优先级。
图3为本发明实施例提供的一种镜像层文件设置优先级属性的Linux容器的文件系统的结构示意图,现有技术中容器数据层中的文件覆盖镜像层中的同名文件。然而,如果在镜像升级过程中对镜像层中的文件进行了更新,而容器数据层中存在更新后镜像层文件的同名文件,容器数据层中的同名文件为更新前的文件,那么,用容器数据层中的同名文件覆盖镜像层中的更新后的文件,会导致更新失败。为了避免上述问题,本发明实施例提供Linux容器的文件系统为镜像层文件设置优先级属性,以记录该镜像层文件的优先级,使更新后的镜像层文件的优先级高于容器数据层中该镜像层文件的同名文件优先级,这样,当更新后的镜像层文件与容器数据层文件叠加时,更新后的镜像层文件覆盖容器数据层中的同名文件。
在一个具体地例子中,如图3所示,容器数据层、第二子层和第三子层中存在名称为文件1的同名文件,第二子层中的文件1是对第三子层文件1的更新,根据同名遮盖原则第二子层的文件1覆盖第三子层的文件1。为了使第二子层中的文件1能够覆盖容器数据层中的文件1,设置第二子层中的被更新的文件1的优先级高于容器数据层中的文件1(用▲表示),则根据overlayfs2叠加原则叠加后,视图层显示第二子层中的文件1,这样可以在视图层成功显示更新过的文件1。类似的,容器数据层和第三子层中存在名称为文件4的同名文件,而第三子层中的文件4未进行过更新,则不对第三子层中的文件4的设置优先级属性,通过overlayfs2叠加容器数据层和镜像层后,视图层显示容器数据层中的文件4。
图4为本发明实施例提供的一种Linux容器镜像升级方法流程图,应用于图2或图3所示的容器,该容器设置为停止状态时开始进行镜像升级,该方法由容器所在的主机或者主机上的hypervisor执行,该容器包括视图层、容器数据层和原始镜像层,所述原始镜像层包括第一子层至第n子层;所述视图层、所述容器数据层、所述第一子层至第n子层依次位于所述容器中,n≥1。该方法包括:
步骤401:接收容器的增量镜像文件;增量镜像文件包括:新增的文件,修改的文件以及被删除文件的信息;其中,被删除文件的信息包括:每个被删除的文件名以及被删除的文件的存储路径。
其中,增量镜像文件是由镜像文件提供商生成的。
步骤402:根据增量镜像文件更新原始镜像层,得到更新后的镜像层;其中,在更新后的镜像层中将被删除文件的状态设置为隐藏状态。
其中,在更新后的镜像层中将被删除的文件设置为隐藏状态是通过在镜像子层中设置隐藏状态描述文件实现的。
步骤403:叠加更新后的镜像层中的文件与容器数据层中的文件,在视图层形成更新后的统一视图供容器使用;其中,更新后的统一视图不包括被设置为隐藏状态的被删除文件。
在一个实现方式中,更新原始镜像层包括:将增量镜像文件作为新第一子层文件形成更新后的镜像层的第一子层,将原始镜像层的第m子层文件作为新第m+1子层文件形成更新后的镜像层的第m+1子层,1≤m≤n。
在另一个实现方式中,更新原始镜像层包括:将增量镜像文件作为新第一子层文件形成更新后的镜像层的第一子层,将原始镜像层的第m子层文件作为新第m+1子层文件形成更新后的镜像层的第m+1子层,将原始镜像层的第n-1子层文件和原始镜像层的第n子层文件合并作为新第n子层文件形成更新后的镜像层的第n子层,1≤m≤n-2。
无论是上述哪种方式,如果增量镜像文件包括被删除文件的信息,则需要在由增量镜像文件生成的新的第一子层中建立隐藏状态描述文件,所述隐藏状态描述文件用于记录所述被删除的文件以及所述被删除的文件的存储路径。
Linux容器在发布之初,容器的原始镜像层只包括一个子层,将增量镜像文件作为新第一子层文件形成更新后的镜像层的第一子层,将原始镜像层的第一子层文件作为新第二子层文件形成更新后的镜像层的第二子层,完成一次镜像更新。在本发明实施例提供的一个具体的例子中,将增量镜像文件作为新第一子层文件形成更新后的镜像层的第一子层,将原始镜像层的第一子层文件作为新第二子层文件形成更新后的镜像层的第二子层,将原始镜像层的第二子层文件和原始镜像层的第三子层文件合并作为新第三子层文件形成更新后的镜像层的第三子层,形成如图6所示的由三个子层镜像层构成的更新后的Linux容器的文件系统结构。根据应用情况Linux容器可进行多次升级,为了节约容器占用空间,镜像层中子层的数目一般不超过5层,当镜像层中子层数目为多层时,可以应用上述两种方式进行镜像层更新。当镜像层中子层数目过多时,可以将倒数第一子层(第n层)删除,并删除倒数第二子层(第n-1层)中的隐藏状态描述文件,以减少容器占用的空间。
经过镜像升级的容器还可以回退到之前的镜像,在该容器设置为停止状态时开始进行镜像回退,该方法由容器所在的主机或者主机上的hypervisor执行,该方法包括:删除更新后的镜像层的第一子层;将更新后的镜像层的第m子层文件作为回退后的镜像层的第m-1子层文件形成回退后的镜像层的第m-1子层,2≤m≤n;叠加回退后的镜像层中的文件与容器数据层中的文件,在视图层形成回退后的统一视图供容器使用;其中,回退后的统一视图与原始镜像层的文件和容器数据层的文件叠加后得到的统一视图相同。
在本发明实施例提供的一个具体的例子中,如图7所示,更新后的容器镜像层包括第一子层、第二子层、第三子层,删除更新后的镜像层的第一子层;将更新后的镜像层的第二子层文件作为回退后的镜像层的第一子层文件形成回退后的镜像层的第一子层,将更新后的镜像层的第三子层文件作为回退后的镜像层的第二子层文件形成回退后的镜像层的第二子层;叠加回退后的镜像层中的文件与容器数据层中的文件,在视图层形成回退后的统一视图供容器使用。
容器的镜像升级有三种情况:对已有镜像新增、修改和删除,本发明实施例提供的Linux容器镜像升级对应处理的最小单位就是文件,增量镜像就包括:新增的文件,修改的文件以及被删除文件的信息;其中,所述被删除文件的信息包括:每个被删除的文件名以及所述被删除的文件的存储路径。下面对照三种情况对如图3所示的容器的镜像升级进行详细描述。
图8为本发明实施例一提供的一种Linux容器镜像层新增文件方法示意图,假设原始镜像层为图3所示的镜像层,增量镜像文件包括一个新增的文件6,则将文件6作为 新第一子层文件形成更新后的镜像层的第一子层,将原始镜像层的第一子层的文件3作为新第二子层文件形成更新后的镜像层的第二子层,原始镜像层的第二子层存在文件1,且原始镜像层的第三子层中存在文件1的同名文件,删除原始镜像层的第三子层中的文件1,同时,原始镜像层的第二子层中存在第三子层中文件2的隐藏状态描述文件2-rm,删除隐藏状态描述文件2-rm,并从原始镜像层的第三子层中删除隐藏状态描述文件2-rm对应的文件2,合并原始镜像层的第二子层文件1和原始镜像层的第三子层的文件3、文件4和文件5,得到新的第三子层文件,形成更新后的镜像层的第三子层,更新后的镜像层的第三子层中包括文件1、文件3、文件4和文件5。
根据overlayfs2文件叠加原则,更新镜像层的容器中,第三子层中存在文件1且为更新过的文件,容器数据层中存在同名文件1且为未经过更新的文件,设置第三子层的文件1优先级高于容器数据层的文件1的优先级,第三子层的文件1在视图层显示。第二子层和第三子层中存在同名文件3,根据同名遮盖原则,第三子层的文件3对于视图层不可见,第二镜像层的文件3在视图层中显示。第三子层中存在文件4且为未经过更新的文件,容器数据层中存在同名文件4,容器数据层中的文件4的优先级高于第三子层中的文件4的优先级,容器数据层中的文件4在视图层中显示。由于容器数据层存在记录第三子层中文件5隐藏状态的文件5-rm,第三子层中的文件5在视图层中不显示。通过叠加在视图层中形成包括第三子层的文件1、第二子层的文件3、容器数据层的文件4和第一子层的文件6的统一视图供容器使用。
图9为本发明实施例二提供的一种Linux容器镜像层修改文件方法示意图,假设原始镜像层为图3所示的镜像层,增量镜像文件包括一个对原有第二子层的文件1修改的文件并命名为文件1,将文件1作为新第一子层文件形成更新后的镜像层的第一子层,由于增量镜像文件中的文件1为更新后的文件,设置增量镜像文件中的文件1的优先级高于容器数据层中文件1的优先级(用▲表示),将原始镜像层的第一子层的文件3作为新第二子层文件形成更新后的镜像层的第二子层,原始镜像层的第二子层存在文件1,且原始镜像层的第三子层中存在文件1的同名文件,删除原始镜像层的第三子层中的文件1,同时,原始镜像层的第二子层中存在第三子层中文件2的隐藏状态描述文件2-rm,删除隐藏状态描述文件2-rm,并从原始镜像层的第三子层中删除隐藏状态描述文件2-rm对应的文件2,合并原始镜像层的第二子层文件1和原始镜像层的第三子层的文件3、文件4和文件5,得到新的第三子层文件,形成更新后的镜像层的第三子层,更新后的镜像层的第三子层中包括文件1、文件3、文件4和文件5。
根据overlayfs2文件叠加原则,更新镜像层的容器中,第一子层中存在文件1,第三子层中存在同名文件1,根据同名遮盖原则,第一子层的文件1覆盖第三子层的文件1,由于第一子层的文件1为本次更新的文件,容器数据层中存在同名文件1且为未经过更新的文件,设置第一子层的文件1优先级高于容器数据层的文件1的优先级,第一子层的文件1在视图层显示。第二子层和第三子层中存在同名文件3,根据同名遮盖原则,第三子层的文件3对于视图层不可见,第二镜像层的文件3在视图层中显示。第三子层中存在文件4且为未经过更新的文件,容器数据层中存在同名文件4,容器数据层中的文件4的优先级高于第三子层中的文件4的优先级,容器数据层中的文件4在视图层中显示。由于容器数据层存在记录第三子层中文件5隐藏状态的文件5-rm,第三子层 中的文件5在视图层中不显示。通过叠加在视图层中形成包括第一子层的文件1、第二子层的文件3和容器数据层的文件4的统一视图供容器使用。
图10为本发明实施例三提供的一种Linux容器镜像层删除文件方法示意图,假设原始镜像层为图3所示的镜像层,增量镜像文件包括被删除文件的信息:原始镜像层中第一子层的文件3。则在由增量镜像文件生成的第一子层中生成隐藏状态描述文件,用于记录文件3的名称以及存储路径(即文件3真正的存储路径,通过该存储路径,可以找到文件3),该隐藏状态描述文件作为新第一子层文件形成更新后的镜像层的第一子层,将原始镜像层的第一子层的文件3作为新第二子层文件形成更新后的镜像层的第二子层,原始镜像层的第二子层存在文件1,且原始镜像层的第三子层中存在文件1的同名文件,删除原始镜像层的第三子层中的文件1,同时,原始镜像层的第二子层中存在第三子层中文件2的隐藏状态描述文件2-rm,删除隐藏状态描述文件2-rm,并从原始镜像层的第三子层中删除隐藏状态描述文件2-rm对应的文件2,合并原始镜像层的第二子层文件1和原始镜像层的第三子层的文件3、文件4和文件5,得到新的第三子层文件,形成更新后的镜像层的第三子层,更新后的镜像层的第三子层中包括文件1、文件3、文件4和文件5。
根据overlayfs2文件叠加原则,更新镜像层的容器中,第三子层中存在文件1且为更新过的文件,容器数据层中存在同名文件1且为未经过更新的文件,设置第三子层的文件1优先级高于容器数据层的文件1的优先级(用▲表示),第三子层的文件1在视图层显示。第二子层和第三子层中存在同名文件3,根据同名遮盖原则,第三子层的文件3对于视图层不可见,同时,第一子层中包括用于记录原始镜像层第一子层中文件3隐藏属性的文件,第二镜像层的文件3对于视图层不可见。第三子层中存在文件4且为未经过更新的文件,容器数据层中存在同名文件4,容器数据层中的文件4的优先级高于第三子层中的文件4的优先级,容器数据层中的文件4在视图层中显示。由于容器数据层存在记录第三子层中文件5隐藏状态的文件5-rm,第三子层中的文件5在视图层中不显示。通过叠加在视图层中形成包括第三子层的文件1和容器数据层的文件4的统一视图供容器使用。
上述图8、图9、图10形成的升级后的Linux容器。此后,可以通过删除更新后的镜像层的第一子层;将更新后的镜像层的第二子层文件作为回退后的镜像层的第一子层文件形成回退后的镜像层的第一子层;将更新后的镜像层的第三子层文件作为回退后的镜像层的第二子层文件形成回退后的镜像层的第二子层,叠加回退后的镜像层中的文件与容器数据层中的文件,在视图层形成与图3所示相同的统一视图供容器使用。本发明实施例提供的Linux容器镜像层可进行多次升级和多次回退。
图11为本发明实施例提供的一种设备结构示意图,该设备包括:处理器和存储器。存储器可通过总线与处理器连接。存储器可以是非易失存储器,例如硬盘驱动器和闪存,存储器中存储有软件程序和设备驱动程序。软件程序能够执行本发明实施例提供的上述方法的各种功能;设备驱动程序可以是网络和接口驱动程序。处理器用于执行软件程序,该软件程序被执行时,能够实现本发明实施例提供的方法。
需要说明的是,本发明实施例还提供了一种计算机可读存储介质。该计算机可读存储介质上存储有计算机程序,该计算机程序被处理器执行时,能够实现本发明实施例提 供的方法。
本发明实施例还提供了一种包含指令的计算机程序产品。当该计算机程序产品在计算机上运行时,使得处理器执行上述方法。
本发明实施例提供的一种镜像升级方法及设备实现了容器镜像层的分层管理,在容器镜像升级时,只需下载容器的增量部分,节省了下载时间及网络宽带,节约了设备上保存容器镜像的磁盘空间,并且在机制上保证了容器数据升级后不会丢失。解决了现有技术中Linux容器不支持镜像的增量升级导致的镜像升级时浪费带宽和磁盘资源,升级效率低下的问题。
上述实施例提供的镜像升级的方法不只局限于overlayfs2应用场景下的Linux容器,在资源有限的设备中,变更升级文件的场景及所有需要底层变更影响上层的叠加文件系统场景中都可应用。
以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以所述权利要求的保护范围为准。

Claims (11)

  1. 一种镜像升级方法,其特征在于,所述方法应用于容器,所述容器包括视图层、容器数据层和原始镜像层,所述原始镜像层包括第一子层至第n子层;所述视图层、所述容器数据层、所述第一子层至第n子层依次位于所述容器中,n≥1;所述方法包括:
    接收所述容器的增量镜像文件;所述增量镜像文件包括:新增的文件,修改的文件以及被删除文件的信息;其中,所述被删除文件的信息包括:每个被删除的文件名以及所述被删除的文件的存储路径;
    根据所述增量镜像文件更新所述原始镜像层,得到更新后的镜像层;其中,在所述更新后的镜像层中将所述被删除文件的状态设置为隐藏状态;
    叠加所述更新后的镜像层中的文件与所述容器数据层中的文件,在视图层形成更新后的统一视图供所述容器使用;其中,所述更新后的统一视图不包括所述被设置为隐藏状态的被删除文件。
  2. 根据权利要求1所述的方法,其特征在于,所述更新所述原始镜像层包括:将所述增量镜像文件作为新第一子层文件形成所述更新后的镜像层的第一子层,将所述原始镜像层的第m子层文件作为新第m+1子层文件形成所述更新后的镜像层的第m+1子层,1≤m≤n。
  3. 根据权利要求1所述的方法,其特征在于,所述更新所述原始镜像层包括:将所述增量镜像文件作为新第一子层文件形成所述更新后的镜像层的第一子层,将所述原始镜像层的第m子层文件作为新第m+1子层文件形成所述更新后的镜像层的第m+1子层,将所述原始镜像层的第n-1子层文件和所述原始镜像层的第n子层文件合并作为新第n子层文件形成所述更新后的镜像层的第n子层,1≤m≤n-2。
  4. 根据权利要求3所述的方法,其特征在于,所述将所述原始镜像层的第n-1子层文件和所述原始镜像层的第n子层文件合并作为新第n子层文件形成所述更新后的镜像层的第n子层包括:比较所述原始镜像层的第n-1子层文件和所述原始镜像层的第n子层文件,当所述原始镜像层的第n-1子层存在第一文件且所述原始镜像层的第n子层中存在所述第一文件的同名文件时,删除所述原始镜像层的第n子层中的所述第一文件的同名文件,合并所述原始镜像层的第n-1子层文件和所述原始镜像层的第n子层的剩余文件,得到所述新的第n子层文件形成所述更新后的镜像层的第n子层。
  5. 根据权利要求3所述的方法,其特征在于,所述将所述原始镜像层的第n-1子层文件和所述原始镜像层的第n子层文件合并作为新第n子层文件形成所述更新后的镜像层的第n子层包括:当所述原始镜像层的第n-1子层文件包括隐藏状态描述文件时,删除所述隐藏状态描述文件,并从所述原始镜像层的第n子层中删除所述隐藏状态描述文件中的文件名对应的文件,合并所述原始镜像层的第n-1子层文件和所述原始镜像层的第n子层的剩余文件,得到所述新的第n子层文件形成所述更新后的镜像层的第n子层。
  6. 根据权利要求1-5中任意一项所述的方法,其特征在于,当从所述更新后的镜像层的任一子层中删除指定文件时,将所述指定文件的状态设置为隐藏状态,使得所述指定文件对于所述容器数据层和所述视图层不可见,其中所述指定文件为任意文件。
  7. 根据权利要求1-6中任意一项所述的方法,其特征在于,所述方法还包括:
    确定所述更新后的镜像层中的目标文件,所述目标文件的优先级高于所述容器数据层中所述目标文件的同名文件的优先级;
    在叠加所述更新后的镜像层中的文件与所述容器数据层中的文件时,将所述容器数据层中的所述目标文件的同名文件的状态设置为隐藏状态,并在所述更新后的统一视图中呈现所述目标文件。
  8. 根据权利要求1-7中任意一项所述的方法,其特征在于,所述方法还包括:
    删除所述更新后的镜像层的第一子层;
    将所述更新后的镜像层的第m子层文件作为回退后的镜像层的第m-1子层文件形成回退后的镜像层的第m-1子层,2≤m≤n;
    叠加所述回退后的镜像层中的文件与所述容器数据层中的文件,在视图层形成回退后的统一视图供所述容器使用;其中,所述回退后的统一视图与所述原始镜像层的文件和所述容器数据层的文件叠加后得到的统一视图相同。
  9. 一种设备,包括存储器和处理器,其特征在于,所述存储器用于存储容器,所述处理器用于执行如权利要求1-8所述的方法。
  10. 一种包含指令的计算机程序产品,其特征在于,当所述计算机程序产品在计算机上运行时,使得所述计算机执行如权利要求1-8任一权利要求所述的方法。
  11. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1-8任一权利要求所述的方法。
PCT/CN2018/102728 2017-09-22 2018-08-28 一种镜像升级方法及设备 WO2019056931A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP18859214.1A EP3678019B1 (en) 2017-09-22 2018-08-28 Mirror image upgrading method and device
US16/824,391 US11249745B2 (en) 2017-09-22 2020-03-19 Image upgrade method and device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710868013.4A CN109542493A (zh) 2017-09-22 2017-09-22 一种镜像升级方法及设备
CN201710868013.4 2017-09-22

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US16/824,391 Continuation US11249745B2 (en) 2017-09-22 2020-03-19 Image upgrade method and device

Publications (1)

Publication Number Publication Date
WO2019056931A1 true WO2019056931A1 (zh) 2019-03-28

Family

ID=65811066

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/102728 WO2019056931A1 (zh) 2017-09-22 2018-08-28 一种镜像升级方法及设备

Country Status (4)

Country Link
US (1) US11249745B2 (zh)
EP (1) EP3678019B1 (zh)
CN (1) CN109542493A (zh)
WO (1) WO2019056931A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11429596B2 (en) 2020-04-20 2022-08-30 International Business Machines Corporation Update for configuration file
US20230325169A1 (en) * 2022-04-06 2023-10-12 Red Hat, Inc. Rebasing image layers utilising a repository-based strategy

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109542493A (zh) * 2017-09-22 2019-03-29 华为技术有限公司 一种镜像升级方法及设备
CN110008703B (zh) * 2019-04-08 2020-01-24 四川大学 一种容器内恶意软件静态检测系统及方法
WO2021163838A1 (en) * 2020-02-17 2021-08-26 Arris Enterprises Llc Method and system for rollback validation based on wireless connectivity
CN112383606B (zh) * 2020-11-09 2023-12-19 福建亿榕信息技术有限公司 一种桌面容器镜像增量p2p分发方法及设备
CN112463191A (zh) * 2020-11-26 2021-03-09 北京沃东天骏信息技术有限公司 一种文件更新方法及装置、设备、存储介质
CN113326805B (zh) * 2021-06-24 2024-04-05 杭州海康威视数字技术股份有限公司 一种人体封面更新方法、装置、电子设备及存储介质
CN113342378B (zh) * 2021-06-25 2022-08-02 浪潮通用软件有限公司 一种基于文件系统更新的镜像生成方法、设备及介质
CN113553091A (zh) * 2021-07-28 2021-10-26 恒安嘉新(北京)科技股份公司 增量镜像数据包的自动生成方法、装置、设备及存储介质
CN114721699B (zh) * 2022-05-19 2022-08-26 龙芯中科技术股份有限公司 一种镜像升级方法、装置、电子设备及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102193807A (zh) * 2010-03-19 2011-09-21 联想(北京)有限公司 一种镜像文件升级的方法、服务器及计算机网络系统
CN106227579A (zh) * 2016-07-12 2016-12-14 深圳市中润四方信息技术有限公司 一种Docker容器构建方法及Docker管理控制台
CN106528224A (zh) * 2016-11-03 2017-03-22 腾讯科技(深圳)有限公司 一种Docker容器的内容更新方法、服务器及系统
CN107015995A (zh) * 2016-01-28 2017-08-04 华为技术有限公司 一种镜像文件的修改方法和装置

Family Cites Families (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7814478B2 (en) * 2005-11-09 2010-10-12 Texas Instruments Norway As Methods and apparatus for use in updating application programs in memory of a network device
CN101271425A (zh) * 2007-03-23 2008-09-24 国际商业机器公司 基于磁盘映像概要的应用程序服务器预配置系统和方法
US8386733B1 (en) * 2008-02-15 2013-02-26 Symantec Corporation Method and apparatus for performing file-level restoration from a block-based backup file stored on a sequential storage device
WO2011022388A1 (en) * 2009-08-17 2011-02-24 Virtual Computer, Inc. Layered virtual file system
CN103092648B (zh) * 2013-01-07 2016-08-24 华为终端有限公司 一种镜像升级方法、系统及用户设备和个人计算机
JP6036852B2 (ja) * 2013-01-24 2016-11-30 富士通株式会社 携帯情報端末、制御方法、制御プログラム
CN105404521B (zh) * 2014-05-30 2017-05-31 广州市动景计算机科技有限公司 一种增量升级方法及相关装置
CN104361556B (zh) * 2014-10-22 2017-11-28 华为技术有限公司 一种图像合成方法和图像芯片以及图像设备
CN107431720B (zh) * 2015-12-31 2019-11-29 华为技术有限公司 镜像部署方法和装置
US10540147B2 (en) * 2016-02-26 2020-01-21 Red Hat, Inc. Add-on image for a platform-as-a-service system
US10324696B2 (en) * 2016-03-28 2019-06-18 International Business Machines Corporation Dynamic container deployment with parallel conditional layers
US10255054B2 (en) * 2016-04-13 2019-04-09 International Business Machines Corporation Enforcing security policies for software containers
US10496987B2 (en) * 2016-09-13 2019-12-03 Verizon Patent And Licensing Inc. Containerization of network services
US20180088926A1 (en) * 2016-09-27 2018-03-29 Ca, Inc. Container image management using layer deltas
US10303657B2 (en) * 2016-09-30 2019-05-28 International Business Machines Corporation Docker layer deduplication with layer referencing
US10169209B2 (en) * 2016-11-04 2019-01-01 Red Hat, Inc. Container images by composition
US10152387B1 (en) * 2016-12-23 2018-12-11 EMC IP Holding Company LLC Instant start of virtual machine from archive copy on backup media
US20180285210A1 (en) * 2017-03-28 2018-10-04 Commvault Systems, Inc. Container image generation process
US10120671B1 (en) * 2017-08-08 2018-11-06 International Business Machines Corporation Multi-level image extraction
CN109542493A (zh) * 2017-09-22 2019-03-29 华为技术有限公司 一种镜像升级方法及设备

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102193807A (zh) * 2010-03-19 2011-09-21 联想(北京)有限公司 一种镜像文件升级的方法、服务器及计算机网络系统
CN107015995A (zh) * 2016-01-28 2017-08-04 华为技术有限公司 一种镜像文件的修改方法和装置
CN106227579A (zh) * 2016-07-12 2016-12-14 深圳市中润四方信息技术有限公司 一种Docker容器构建方法及Docker管理控制台
CN106528224A (zh) * 2016-11-03 2017-03-22 腾讯科技(深圳)有限公司 一种Docker容器的内容更新方法、服务器及系统

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
LI JINBANG ET AL.: "Passage, [LEARNING DOCKER STEP BY STEP DOCKER]", [LEARNING DOCKER STEP BY STEP DOCKER], 30 November 2016 (2016-11-30), pages 74 - 78, XP009519790, ISBN: 978-7-111-54854-6 *
See also references of EP3678019A4

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11429596B2 (en) 2020-04-20 2022-08-30 International Business Machines Corporation Update for configuration file
US20230325169A1 (en) * 2022-04-06 2023-10-12 Red Hat, Inc. Rebasing image layers utilising a repository-based strategy
US12020016B2 (en) * 2022-04-06 2024-06-25 Red Hat, Inc. Rebasing image layers utilising a repository-based strategy

Also Published As

Publication number Publication date
EP3678019B1 (en) 2022-07-27
EP3678019A1 (en) 2020-07-08
US20200218529A1 (en) 2020-07-09
CN109542493A (zh) 2019-03-29
EP3678019A4 (en) 2020-11-11
US11249745B2 (en) 2022-02-15

Similar Documents

Publication Publication Date Title
WO2019056931A1 (zh) 一种镜像升级方法及设备
US9465642B1 (en) Systems and methods for instant provisioning of virtual machine files
US11741046B2 (en) Method and apparatus for creating system disk snapshot of virtual machine
CN103365743B (zh) 用于在计算环境中处理快照的方法和系统
US9940064B2 (en) Live migration of virtual disks
US9235474B1 (en) Systems and methods for maintaining a virtual failover volume of a target computing system
US20180373434A1 (en) Managing digital assets stored as components and packaged files
US8495351B2 (en) Preparing and preserving a system configuration during a hot upgrade
US10656845B2 (en) System and method for managing container image
US20210255846A1 (en) Cognitively determining updates for container based solutions
US9110709B2 (en) Preserving changes to a configuration of a running virtual machine
US8639973B2 (en) System reset
US20090259993A1 (en) Sandbox Support for Metadata in Running Applications
US20190340083A1 (en) Configurable recovery states
US8561056B2 (en) Automated installation of operating systems on virtual machines using checksums of screenshots
US20120272236A1 (en) Mechanism for host machine level template caching in virtualization environments
EP3721353A1 (en) Enhanced techniques for copying cloud stored files
US20150067005A1 (en) Path resolver for client access to distributed file systems
CN113076170A (zh) 一种远程协助方法、系统、装置、计算设备及存储介质
US8630982B2 (en) Individual object restore
US9459883B2 (en) Modifying disk images
US20120266161A1 (en) Mechanism For Host Machine Level Template Caching In Virtualization Environments
US9026565B2 (en) Real-time data transformation to access foreign data sources
US8819657B1 (en) Method and apparatus for maintaining data consistency in a virtualized application during software update installation
US10303782B1 (en) Method to allow multi-read access for exclusive access of virtual disks by using a virtualized copy of the disk

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18859214

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2018859214

Country of ref document: EP

Effective date: 20200331