Image Number 2 for United States Patent #8151263.
Method and systems for real-time cloning of a virtual machine are described. A virtual machine is running and a clone of the virtual machine is created while the virtual machine continues to run. In one embodiment, the creation of the clone further comprises quiesceing the virtual machine, taking a snapshot S1 (excluding main memory) of the state of the virtual machine, and creating a copy S2 of the snapshot S1. The original VM continues execution off the snapshot S1. The cloned VM restores from snapshot S2. In another embodiment, the cloning of the virtual machine further comprises instructing a vmkernel associated with the virtual machine to mark all pages of main memory of the virtual machine as copy-on-write (COW). The unique ID corresponding to the main memory is provided by the vmkernel and an association between the unique ID and the main memory is made upon restoration of the clone.