Copy-on-Write Virtual Machine Disk Images
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
The existing virtualization methods in data centers face inefficiencies due to high storage consumption and resource-intensive updates, as multiple disk images are created and maintained for virtual machines, leading to slow read access and poor user experience.
Innovation Solution
The implementation of a copy-on-write (COW) image technique, where a base disk image is used to create primary and secondary COW images, with virtual machines booting from the secondary image, storing writes locally, and reads seeking data through a hierarchical structure of COW images, optimizing storage and access by incremental updates and backups.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If multiple independent disk images are created for each virtual machine, then virtual machine deployment flexibility is improved, but storage consumption increases significantly
Solution Approach 1:
Multiple virtual machine disk images are merged into a single shared base image that contains common operating system files. Each virtual machine maintains only its unique differences through separate COW images, eliminating redundant storage of identical files across multiple VMs while preserving the ability to deploy multiple VMs independently.
Solution Approach 2:
Instead of creating full independent copies of disk images for each virtual machine, the system creates lightweight copy-on-write images that reference the shared base image. These COW images store only the differences from the base image, providing efficient duplication with minimal storage overhead.
2Adaptability or versatility
If multiple disk images are maintained for each virtual machine, then virtual machine independence is improved, but update resource consumption increases
Solution Approach 1:
The update mechanism merges changes from multiple COW images back into the shared base image. When an OS update is applied, it is done once to the base image rather than requiring separate updates to each VM's disk image, significantly reducing the computational resources needed for maintenance while preserving VM independence through the COW mechanism.
3Adaptability or versatility
If multiple disk images are created and maintained, then virtual machine cloning capability is improved, but backup complexity increases
Solution Approach 1:
Cloning a virtual machine becomes a simple operation of creating a new COW image that references the existing base image. The clone instantly has access to all base image contents without requiring duplication of data, and backup operations only need to handle the small COW images rather than entire disk images, reducing backup complexity.
4Quantity of substance
If read access searches through multiple COW image levels, then storage efficiency is improved, but read access speed deteriorates
Solution Approach 1:
The system performs preliminary actions by pre-processing and indexing the contents of the shared base image and COW images. Metadata about file locations and contents is prepared in advance, allowing the read access mechanism to quickly determine whether data exists in the base image or COW images without searching through multiple image levels during actual read operations.
Data Source
AI summary
A method to create virtual machines is provided. An initially empty primary copy-on-write (COW) image of a base disk image is created, and an initially empty secondary COW image of the primary COW image is created. A virtual machine is booted from the secondary COW image. Writes by the virtual machine are stored in the secondary COW image. When the secondary COW image reaches a capacity threshold, data of the secondary COW image is committed into the primary COW image and then the secondary COW is cleared of data.


