The present application is a national stage filing under 35 U.S.C. §371 of PCT application number PCT/CN2013/084270, having an international filing date of Sep. 26, 2013, which claims priority to Chinese patent application number 201310042901.2, having a filing date of Jan. 31, 2013, the disclosures of which are hereby incorporated by reference in their entireties.
Virtualization is used to increase server hardware utilization and reduce costs in data centers. A hypervisor is virtualization software for creating virtual machines, which function like physical computers with operating systems and applications.
In the drawings:
Use of the same reference numbers in different figures indicates similar or identical elements.
As used herein, the term “includes” means includes but not limited to, the term “including” means including but not limited to. The terms “a” and “an” are intended to denote at least one of a particular element. The term “based on” means based at least in part on.
Using a hypervisor, a virtual machine boots from a disk image with an operating system (OS). Multiple virtual machines of the same configuration may be created by cloning a template disk image to obtain independent disk images, and then booting the virtual machines from the disk images.
The above described deployment of virtual machines may consume a large amount of storage space and operate inefficiently. If each disk image uses four (4) gigabyte (GB), then 1,000 virtual machines would use 4,000 GB. The template disk image is cloned again and again to create the independent disk images. Updating of the OS in the disk images or cloning the disk images are resource intensive due to the sheer number of the disk images.
One way to address the disadvantages this is to use the backing file technique. In the backing file technique, a read-only base disk image is created, and copy-on-write (COW) images of the base disk image are created. Each virtual machine is booted from an independent COW image, which only contains private data different from the base disk image. Writes by the virtual machine are stored in the COW image and reads by the virtual machine are first sought out in the COW image and then in the base disk image. Cloning or backing up the virtual machine involves copying the incremental data in the COW image as the data in the base disk image does not change.
Each time the OS in the base disk image is updated, a new COW image may be added to store the changes. In other words, a new level of COW image is added. However, without limiting the total number of levels, the number of COW images may become large (e.g., 10 or more) when there are many OS updates. The large number of levels may result in poor user experience as reads by the virtual machine is slowed by a search through the levels (e.g. 10 levels) of COW images for the requested data.
A primary COW image 106 (also known as “primary incremental mirror image file”) of base disk image 104 is created. Primary COW image 106 may be initially empty. A secondary COW image 108 (also known as “secondary incremental mirror image file”) of primary COW image 106 is created. Secondary COW image 108 may be initially empty. Virtual machine 102 with a guest operating system is booted from secondary COW image 108.
As virtual machine 102 is booted from secondary COW image 108, writes by virtual machine 102 are stored in secondary COW image 108. In other words, secondary COW image 108 holds the private data of virtual machine 102. Reads by virtual machine 102 that are not found in secondary COW image 108 are retrieved from its parent, the primary COW image 106. Reads by virtual machine 102 that are not found in primary COW image 106 are retrieved from its parent, the base disk image 104. Thus base disk image 104, primary COW image 106, and secondary COW image 108 form a virtual machine disk 110 for virtual machine 102.
In block 302, the processor creates an initially empty primary COW image 106 (
In block 304, the processor boots virtual machine 102 from secondary COW image 108. As discussed before, writes by virtual machine 102 are stored in secondary COW image 108 and reads by virtual machine 102 may be retrieved from secondary COW image 108, primary COW image 106, or base disk image 104. Block 304 may be followed by block 306.
In block 306, the processor determines if secondary COW image 108 has reached a capacity threshold. The capacity threshold may be selected to allow fast incremental backup of virtual machine 102. If secondary COW image 108 has reached the capacity threshold, block 306 may be followed by block 310. Otherwise block 306 may be followed by block 308.
In block 308, the processor determines if virtual machine 102 is to be backed up. Virtual machine 102 may backed up periodically or based on the amount of access. If virtual machine 102 is to be backed up, block 308 may be followed by block 310. Otherwise method 300 may loop back to block 306.
In block 310, the processor may determine if this is the very first time secondary COW image 108 has been backed up. If so, block 310 may be followed by block 314. Otherwise block 310 may be followed by block 312.
In block 312, the processor may back up base disk image 104. For example, the processor saves a copy of base disk image 104 in another local hard disk, in a local computer, or in a remote computer. Block 312 may be followed by block 314.
In block 314, the processor may back up secondary COW image 108. For example, the processor saves a copy of secondary COW image 108 in another local hard disk, in a local computer, or in a remote computer. Before saving a copy of secondary COW image 108, the processor may stop or suspend virtual machine 102 when virtual machine 102 is operating so virtual machine 102 may reach a consistent state. Block 314 may be followed by block 316.
In block 316, the processor commits data 202 (
A new primary COW image 106′ of backup base disk image 104's is created, and data from backup copies 402, 404, and 406 of secondary COW image are committed into new primary COW image 106′ in chronological order. Thus
In block 502, the processor may delete base disk image 104, primary COW image 106, and secondary COW image 108. Before base disk image 104, deleting primary COW image 106, and secondary COW image 108, the processor may shut down or turn off virtual machine 102 when virtual machine 102 is operating. Block 502 may be followed by block 504.
In block 504, the processor may retrieve copies of backup base disk image 104′ and backup copies of secondary COW image 108 (e.g., backup copies 402, 404, and 406 in
In block 506, the processor creates an initially empty new primary COW image 106′ (
In block 508, the processor commits data from backup copies 402, 404, and 406 of secondary COW image 108 (
In block 510, the processor boots new virtual machine 102′ (
Referring back to
A modification and storage module 604 is to store writes 202 by virtual machine 102 (
A COW image processor module 606 is to commit data from secondary COW image 108 to primary COW images 106, and clear secondary COW image 108.
Apparatus 600 may include a COW backup module 608 is to back up secondary COW image 108 when it has reached a capacity threshold or when virtual machine 102 is to be backed up.
Apparatus 600 may include a base disk image backup module 610 is to back up a base disk image 104 (
Apparatus 600 may include a virtual machine recovery module 612 is to recover virtual machine disk 110 (
In examples of the present disclosure, virtual machines of the same initial configuration may be deployed efficiently as one base disk image is shared by the virtual machines and two empty COW images are generated for each virtual machine. Read access by each virtual machine is fast as there are only two levels of COW images to search for data. Backing up each virtual machine is also fast as it is performed incrementally by backing up the secondary COW image when it reaches a capacity threshold and before committing the data from the secondary COW image into the primary COW image. Customer private data are better protected as each virtual machine only stores private data in its own COW images, which cannot be accessed by other virtual machines.
In examples of the present disclosure, fast cloning and offline migration of virtual machines are realized. As the base disk image may be stored in a shared storage that can be accessed by all physical hosts, cloning a virtual machine locally or remotely may be accomplished by cloning of the primary and the secondary COW images. Similarly, migrating a virtual machine to a destination host offline may be accomplished by migrating the primary and the secondary COW images.
Various other adaptations and combinations of features of the examples disclosed are within the scope of the invention.
Number | Date | Country | Kind |
---|---|---|---|
2013 1 0042901 | Jan 2013 | CN | national |
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/CN2013/084270 | 9/26/2013 | WO | 00 |
Publishing Document | Publishing Date | Country | Kind |
---|---|---|---|
WO2014/117533 | 8/7/2014 | WO | A |
Number | Name | Date | Kind |
---|---|---|---|
5838968 | Culbert | Nov 1998 | A |
8060703 | Desai et al. | Nov 2011 | B1 |
8190574 | Barnes et al. | May 2012 | B2 |
8407301 | Pendharkar | Mar 2013 | B1 |
20090300076 | Friedman | Dec 2009 | A1 |
20100049929 | Nagarkar et al. | Feb 2010 | A1 |
20100153617 | Miroshnichenko | Jun 2010 | A1 |
20100174943 | Liu et al. | Jul 2010 | A1 |
20120117342 | Karonde et al. | May 2012 | A1 |
20120221612 | Zachariassen | Aug 2012 | A1 |
Number | Date | Country |
---|---|---|
101072541 | Nov 2007 | CN |
102214118 | Oct 2011 | CN |
102521083 | Jun 2012 | CN |
102821158 | Dec 2012 | CN |
Entry |
---|
Srirama et al., “Direct Migration of Scientific Computing Experiments to the Cloud”, 2013. |
International Search Report and Written Opinion dated Jan. 9, 2014 issued on PCT Patent Application No. PCT/CN2013/084270 dated Sep. 26, 2013, the State Intellectual Property Office, P.R. China. |
Cavalli et al, “VMWare Snapshots”, Sep. 22, 2008, pp. 8-17; http://phyweb.lbl.gov/atlaswiki/images/a/ac/VML-report-off-print.pdf. |
Number | Date | Country | |
---|---|---|---|
20150339148 A1 | Nov 2015 | US |