Method for virtual machine to dynamically save snapshots

2014 
The invention provides a method for a virtual machine to dynamically save snapshots. The method comprises the following steps of step 1, using a specific structure to initialize a file, wherein the file is used for saving status data and stored data of the virtual machine in a segmented way at the follow-up procedure; step 2, creating a new virtual disk file; step 3, traversing all virtual equipment mounted in the virtual machine; step 4, saving the changed parts of virtual equipment status and virtual machine internal storage to a specified file in a loop iteration way, and counting save data volume and save consumption time per time; step 5, at the beginning of loop iteration each time, firstly counting all dirty data volume to be decided, and locking a virtual machine IO (Input/Output) thread after jumping out of iteration; step 6, unlocking the virtual machine IO thread, and recovering a virtual CPU (Central Processing Unit) thread. According to the method provided by the invention, the virtual machine snapshot operation can be completed without affecting application service in the virtual machine, and the current statuses of a disk and the internal storage of the virtual machine can be fully recovered according to the files saved by the snapshots when required.
    • Correction
    • Source
    • Cite
    • Save
    • Machine Reading By IdeaReader
    0
    References
    0
    Citations
    NaN
    KQI
    []