System and method to commit container changes on a vm-based container
AssigneeVMware, Inc.
InventorsJunfei WU, Xiang YU, Xiaodong YE, Fangchi WANG, Haitao ZUO
Life of this patent
Estimating the term…
Abstract
Disclosed herein are embodiments for committing changes of an image of a virtual machine-based container running on a host computer system. A starting image for a container is obtained from a guest starting folder, and while the container runs the starting image changes to the image made by the running container are captured in a guest folder that is union mounted with the guest starting folder. Another union folder, which is the union of a new host folder and the starting folder, contains the changed image which can be used for the container or transferred to a different container.
Claims20
A method for committing changes of an image of a container running in a virtual machine (VM) on a host computer system, the method comprising:
- obtaining a guest starting folder containing a starting image for the container;
- while the container is running the starting image, storing changes made by the running container to the starting image in a first union folder to generate a changed image for the container, wherein the first union folder is a union of a new guest folder and the guest starting folder, and wherein the new guest folder reflects the changes in the first union folder;
- and
- forming a second union folder as a union of a new host folder and the guest starting folder, the new host folder containing the changes to the starting image, and the second union folder containing the changed image.
A host computer system comprising:
- one or more CPUs;
- and
- a memory coupled to the CPUs, wherein the memory has loaded therein system software that includes virtualization software for running one or more virtual machines, and a container runtime;
- wherein system software runs the container runtime and one of the virtual machines runs a guest operating system with a container running as an application of the guest operating system;
- and
- wherein the guest operating system is configured to:
- obtain a guest starting folder containing a starting image for the container;
- while the container is running the starting image, store changes made by the running container to the starting image in a first union folder to generate a changed image for the container, wherein the first union folder is a union of a new guest folder and the guest starting folder, and wherein the new guest folder reflects the changes in the first union folder;
- and
- form a second union folder as a union of a new host folder and the guest starting folder, the new host folder containing the changes to the starting image, and the second union folder containing the changed image.
A non-transitory computer-readable medium comprising instructions executable in a computer system, wherein the instructions when executed in the computer system cause the computer system to carry out a method for committing changes of an image of a container running in a virtual machine (VM) on a host computer system, the method comprising:
- obtaining a guest starting folder containing a starting image for the container;
- while the container is running the starting image, storing changes made by the running container to the starting image in a first union folder to generate a changed image for the container, wherein the first union folder is a union of a new guest folder and the guest starting folder, and wherein the new guest folder reflects the changes in the first union folder;
- and
- forming a second union folder as a union of a new host folder and the guest starting folder, the new host folder containing the changes to the starting image, and the second union folder containing the changed image.
Dependencies are inferred from the claim text.