Efficient mass virtual machine (VM) cloning
Abstract
In one set of embodiments, during an initial pre-copying phase, copies of the virtual disks of a VM or VM template can be distributed across one or more datastores, prior to the start of any cloning. This effectively seeds each datastore with a disk pool comprising a certain number of copies of the VM/VM template's virtual disks. Then, at the time of receiving a user request to create k clones from the VM/VM template, up to k copies of the VM/VM template's virtual disks that already reside in the disk pools of one or more target datastores can be moved from those disk pools to the clones' home folders on the target datastores, thereby reducing or eliminating the need to create brand new copies of the virtual disks on demand.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 7 · Forward citations: 0.
Claims (15 — 3 Independent, 12 Dependent)
- Claim 1Independent Claim
On a network environment comprising a management server having a disk pool manager, and a plurality of cluster host environments wherein each cluster host environment comprises a disk pool agent, a method comprising: receiving, by a management server, a registration request for registering a virtual machine (VM) or VM template as a source for future VM cloning operations, wherein the VM or VM template is associated with a virtual disk, and wherein the registration request includes a content distribution policy specifying one or more datastores in a cluster and a desired number of copies of the virtual disk to be created in a disk pool of each of the one or more datastores; identifying, by the disk pool manager, a subset of the plurality of host systems in the cluster with access to the one or more datastores; and transferring, by the disk pool manager, a seed copy of the virtual disk to each of the subset of the plurality of host systems, and operating the seed copy of the virtual disk by a hardware processor of each respective host system of the subset of the plurality of host systems, wherein operating the seed copy for each subset of host systems includes storing the seed copy in a disk pool of a datastore in the one or more datastores and creates, using the seed copy, a plurality of additional local copies of the virtual disk in the disk pool for the respective host system; for each disk pool agent: iteratively comparing, by the respective disk pool agent, a number of available copies in a disk pool, for the respective cluster host environment, to a minimum threshold number specified in a content distribution policy template; wherein if the number of available copies in a disk pool for the respective cluster host environment is less than a minimum threshold number: notifying the management server of the identified respective cluster host environments need for additional clones of the seed copy; and coordinating, by the disk pool manager, for sending of additional clones to the identified cluster host environment from other host environments associated with the one or more data stores.
- Claim 2Depends on #1
The method of claim 1 further comprising, subsequently to the transferring: receiving a clone request for creating k clones of the VM or VM template; identifying a target datastore in the one or more datastores holding at least k copies of the virtual disk in its disk pool; identifying a host system with access to the target datastore; and sending a clone command to the host system with instructions for moving the k copies from the disk pool of the target datastore to VM home folders of the k clones.
- Claim 3Depends on #1
The method of claim 1 wherein the seed copy is transferred to each of the one or more host systems using a network multicast protocol.
- Claim 4Depends on #1
The method of claim 1 wherein the transferring of the seed copy to each of the one or more host systems comprises reading the virtual disk exactly once.
- Claim 5Depends on #1
The method of claim 1 wherein said each host system creates the one or more additional local copies by reading the seed copy exactly once.
- Claim 6Independent Claim
A non-transitory computer readable storage medium comprising nonvolatile memory having stored thereon program code executable by a computer system, the program code embodying a method comprising: receiving, by a management server, a registration request for registering a virtual machine (VM) or VM template as a source for future VM cloning operations, wherein the VM or VM template is associated with a virtual disk, and wherein the registration request includes a content distribution policy specifying one or more datastores in a cluster and a desired number of copies of the virtual disk to be created in a disk pool of each of the one or more datastores; identifying, by the disk pool manager, a subset of the plurality of host systems in the cluster with access to the one or more datastores; and transferring, by the disk pool manager, a seed copy of the virtual disk to each of the subset of the plurality of host systems, and operating the seed copy of the virtual disk by a hardware processor of each respective host system of the subset of the plurality of host systems, wherein operating the seed copy for each subset of host systems includes storing the seed copy in a disk pool of a datastore in the one or more datastores and creates, using the seed copy, a plurality of additional local copies of the virtual disk in the disk pool for the respective host system; for each disk pool agent: iteratively comparing, by the respective disk pool agent, a number of available copies in a disk pool, for the respective cluster host environment, to a minimum threshold number specified in a content distribution policy template; wherein if the number of available copies in a disk pool for the respective cluster host environment is less than a minimum threshold number: notifying the management server of the identified respective cluster host environments need for additional clones of the seed copy; and coordinating, by the disk pool manager, for sending of additional clones to the identified cluster host environment from other host environments associated with the one or more data stores.
- Claim 7Depends on #6
The non-transitory computer readable storage medium of claim 6 wherein the method further comprises, subsequently to the transferring: receiving a clone request for creating k clones of the VM or VM template; identifying a target datastore in the one or more datastores holding at least k copies of the virtual disk in its disk pool; identifying a host system with access to the target datastore; and sending a clone command to the host system with instructions for moving the k copies from the disk pool of the target datastore to VM home folders of the k clones.
- Claim 8Depends on #6
The non-transitory computer readable storage medium of claim 6 wherein the seed copy is transferred to each of the one or more host systems using a network multicast protocol.
- Claim 9Depends on #6
The non-transitory computer readable storage medium of claim 6 wherein the transferring of the seed copy to each of the one or more host systems comprises reading the virtual disk exactly once.
- Claim 10Depends on #6
The non-transitory computer readable storage medium of claim 6 wherein said each host system creates the one or more additional local copies by reading the seed copy exactly once.
- Claim 11Independent Claim
A computer system comprising: a processor; and a non-transitory computer readable medium having stored thereon program code that causes the processor to: receive a registration request for registering a virtual machine (VM) or VM template as a source for future VM cloning operations, wherein the VM or VM template is associated with a virtual disk, and wherein the registration request includes a content distribution policy specifying one or more datastores in a cluster and a desired number of copies of the virtual disk to be created in a disk pool of each of the one or more datastores; identify, by a disk pool manager, a subset of the plurality of systems in the cluster with access to the one or more datastores; and transfer a seed copy of the virtual disk to each of the subset of the plurality of host systems, and operating the seed copy of the virtual disk by a hardware processor of each respective host system of the subset of the plurality of host systems, wherein operating the seed copy for each subset of host systems includes storing the seed copy in a disk pool of a datastore in the one or more datastores and creates, using the seed copy, a plurality of additional local copies of the virtual disk in the disk pool for the respective host system; for each disk pool agent: iteratively comparing, by the respective disk pool agent, a number of available copies in a disk pool, for the respective cluster host environment, to a minimum threshold number specified in a content distribution policy template; wherein if the number of available copies in a disk pool for the respective cluster host environment is less than a minimum threshold number: notifying the management server of the identified respective cluster host environments need for additional clones of the seed copy; and coordinating, by the disk pool manager, for sending of additional clones to the identified cluster host environment from other host environments associated with the one or more data stores.
- Claim 12Depends on #11
The computer system of claim 11 wherein the program code further causes the processor to, subsequently to the transferring: receive a clone request for creating k clones of the VM or VM template; identify a target datastore in the one or more datastores holding at least k copies of the virtual disk in its disk pool; identify a host system with access to the target datastore; and send a clone command to the host system with instructions for moving the k copies from the disk pool of the target datastore to VM home folders of the k clones.
- Claim 13Depends on #11
The computer system of claim 11 wherein the seed copy is transferred to each of the one or more host systems using a network multicast protocol.
- Claim 14Depends on #11
The computer system of claim 11 wherein the transferring of the seed copy to each of the one or more host systems comprises reading the virtual disk exactly once.
- Claim 15Depends on #11
The computer system of claim 11 wherein said each host system creates the one or more additional local copies by reading the seed copy exactly once.
Technical Overview & Description
BACKGROUND Unless otherwise indicated, the subject matter described in this section is not prior art to the claims of the present application and is not admitted as being prior art by inclusion in this section. Virtual machine (VM) cloning is a VM provisioning operation that creates, from an existing VM or VM template, a new VM (i.e., clone) that is an identical and independent copy of the original. This cloning process includes creating copies of the existing VM/VM template's virtual disks for use by the clone. In some virtual infrastructure deployments, several clones are created from a single VM/VM template at a time (referred to herein as mass cloning). However, due to the way in which VM cloning is currently implemented and the need to create separate virtual disk copies for each clone, mass cloning can take a long time to complete. BRIEF DESCRIPTION OF THE DRAWINGS FIG. 1 depicts an example environment. FIG. 2 depicts an enhanced version of the environment of FIG. 1 according to certain embodiments. FIG. 3 depicts a pre-copying workflow according to certain embodiments. FIG. 4 depicts a mass cloning workflow according to certain embodiments. DETAILED DESCRIPTION In the following description, for purposes of explanation, numerous examples and details are set forth in order to provide an understanding of various embodiments. It will be evident, however, to one skilled in the art that certain embodiments can be practiced without some of these details or can be practiced with modifications or equivalents thereof. 1. Overview Embodiments of the present disclosure are directed to techniques for mass cloning VMs from an existing VM/VM template in an efficient manner. In one set of embodiments, during an initial pre-copying phase, copies of the virtual disks of the VM/VM template can be distributed (or in other words, pre-copied) across one or more datastores, prior to the start of any cloning. This pre-copying effectively seeds each datastore with a disk pool compris
Cited By — Indexed Forward Citations (0 of 0 total)
No indexed citing patents in this generation yet. Ingest USPTO/PatentsView bulk citation tables via patents-ingest to expand the local forward citation graph.
References Cited — Backward Prior Art (7)
| Patent | Title | Year | Citations |
|---|---|---|---|
| GB 9,424,065 D0 | Paging receiver | — | 0 |
Non-Patent Literature (3)
- Horacio Andr
- é
- s Lagar-Cavilla et al. 2009. SnowFlock: rapid virtual machine cloning for cloud computing. In Proceedings of the 4th ACM European conference on Computer systems (EuroSys '09). Association for Computing Machinery, New York, NY, USA, pp. 6-7 (Year: 2009).