摘要 |
A hypervisor uses a disc image emulator 22 to manage a disc image for a virtual machine 20. The emulator provides a first image 26, which is written to by the virtual machine, and a second image 28, which permanently stores the data. A cleaning process 24 copies blocks from the first image to the second image and unused blocks are deleted from the images. The process uses knowledge of the file system metadata on the disc images to determine which blocks are not being used. When the files are copied, the blocks still in use are copied into an allocation area. Once all the blocks that are in use have been copied, the rest of the allocation area may be freed. The copying may be carried out as an asynchronous background process at the hypervisor level. |