VM Container Image Change Capture via Nested Union Mounts
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In existing container management systems, changes made to a container image within a virtual machine are not efficiently captured and made available for updating the image in a repository, especially when the container runs on a host computer system with a native runtime.
Innovation Solution
The use of a shared file system and union mount, such as in Linux, allows capturing changes made by a running container in a virtual machine by creating a union of folders that reflect these changes, enabling the update of the image on the host system and subsequent commitment to the image registry.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If container changes are stored directly in the VM without union mount, then storage simplicity is maintained, but image change capture and propagation to host becomes inefficient
Solution Approach 1:
The patent implements nested union mounts where guest union folders are contained within host union folders, creating a hierarchical file system structure. The guest OS creates changes in its union folder, which is nested within the host's union folder structure, allowing automatic propagation of changes from guest to host while maintaining organized separation of concerns.
Solution Approach 2:
The union mount structure acts as an intermediary layer between the container file system and the host file system. By introducing union folders that combine read-only base images with writable change layers, the system mediates between the container's need for isolated changes and the host's need to capture and propagate those changes to the registry.
2Speed
If container runtime runs natively on host, then runtime performance is improved, but container image change capture in VM-based containers becomes problematic
Solution Approach 1:
The patent segments the file system into distinct read-only base image layers and writable change layers using union mounts. This segmentation allows the container runtime to execute efficiently on the host while changes are captured in separate writable layers, preventing information loss by maintaining clear boundaries between immutable and mutable file system portions.
Solution Approach 2:
The host union folder structure is pre-configured to receive and store changes before the container runtime executes. By establishing the union mount structure in advance with proper permissions and paths, the system ensures that when the container runs and makes changes, those changes are automatically captured without requiring post-execution processing or risking information loss.
3Productivity
If multiple VMs share host resources, then resource utilization is improved, but isolating and managing individual container image changes becomes complex
Solution Approach 1:
The patent applies local quality by giving each VM/guest its own dedicated union folder structure with unique identifiers. Each guest's changes are isolated in its own namespace within the host's file system, allowing multiple VMs to share host resources efficiently while maintaining clear separation and ease of management for individual container image changes through localized file system paths.
Data Source
AI summary
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.


