WO2021072880A1 - Method for asynchronously creating internal snapshot of virtual machine, apparatus, system and storage medium - Google Patents

Method for asynchronously creating internal snapshot of virtual machine, apparatus, system and storage medium Download PDF

Info

Publication number
WO2021072880A1
WO2021072880A1 PCT/CN2019/118504 CN2019118504W WO2021072880A1 WO 2021072880 A1 WO2021072880 A1 WO 2021072880A1 CN 2019118504 W CN2019118504 W CN 2019118504W WO 2021072880 A1 WO2021072880 A1 WO 2021072880A1
Authority
WO
WIPO (PCT)
Prior art keywords
snapshot
internal
virtual disk
coroutine
virtual
Prior art date
Application number
PCT/CN2019/118504
Other languages
French (fr)
Chinese (zh)
Inventor
刘仁仕
Original Assignee
平安科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2021072880A1 publication Critical patent/WO2021072880A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1479Generic software techniques for error detection or fault masking
    • G06F11/1482Generic software techniques for error detection or fault masking by means of middleware or OS functionality
    • G06F11/1484Generic software techniques for error detection or fault masking by means of middleware or OS functionality involving virtual machines
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45562Creating, deleting, cloning virtual machine instances
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45579I/O management, e.g. providing access to device drivers or storage
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • This application relates to the technical field of internal snapshots, and in particular to a method, device, system, and storage medium for asynchronously creating an internal snapshot of a virtual machine.
  • qemu-kvm is currently widely used virtualization software in the industry.
  • the so-called virtualization in general, is to simulate hardware through software, so that a physical machine can run multiple sets of heterogeneous OS, which facilitates resource sharing at the IAAS layer.
  • it facilitates the flexible allocation and scheduling of resources, thus promoting the birth and development of the current "cloud" business model.
  • the qemu-kvm virtual machine has been widely used in the cloud computing field due to its good performance and complete functions.
  • the snapshot function is an indispensable part: when the system crashes or an abnormality occurs, the virtual machine disk file system and system storage can be restored by restoring the backup snapshot data.
  • the qcow2 virtual disk format of the qemu-kvm virtual machine is widely used in cloud computing scenarios due to its better performance and support for snapshot, resize, thin provision and other features.
  • the traditional qemu-kvm virtual machine's implementation of the internal snapshot of the virtual disk in the qcow2 virtual disk format only supports the implementation of synchronization, that is, the virtual machine will be busy at first after receiving an external command to create an internal snapshot from the listening interface. Wait for the completion of all disk IO operations currently being processed, and then create the virtual disk internal program.
  • the runtime virtual machine process cannot In response to the IO request event sent by the guest os (virtual system), it cannot respond to the user's out-of-band operation of the virtual machine, such as the IO request from the guest os to the block device, the network device IO, the VNC connection from the user, and the console port login.
  • this application provides a method for asynchronously creating an internal snapshot of a virtual machine, an electronic device, and a computer storage medium.
  • the main purpose of this application is to solve the problem that the internal snapshot of the virtual disk of the traditional traditional virtual machine only supports synchronous implementation and cannot be implemented during the internal snapshot process. Respond to virtual machine IO requests or out-of-band operations.
  • this application provides a method for asynchronously creating an internal snapshot of a virtual machine, which is applied to an electronic device, and includes:
  • the snapshot command information includes the name of the virtual disk to be snapshot and the internal snapshot number
  • Execute the internal snapshot coroutine take an internal snapshot of the virtual disk to be snapshot, and obtain internal snapshot data information of the virtual disk;
  • the internal snapshot data information and the snapshot command information are saved in the snapshot database, and the user is notified of the completion of the internal snapshot task through the monitoring interface.
  • the present application also provides an electronic device, the electronic device comprising: a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that the processor When the computer program is executed, the steps of the method for asynchronously creating an internal snapshot of the virtual machine are implemented.
  • this application also provides an asynchronous creation system for internal snapshots of virtual machines, including:
  • a snapshot command information obtaining unit configured to obtain user snapshot command information through the monitoring interface, where the snapshot command information includes the name of the virtual disk to be snapshot and the internal snapshot number;
  • the parameter validity checking unit is configured to check the parameter validity of the snapshot command information according to the name of the virtual disk to be snapshot and the internal snapshot number. If the snapshot command information passes the parameter validity check, then according to the Snapshot command information to create an internal snapshot coroutine;
  • the coroutine execution unit is used to take an internal snapshot of the virtual disk to be snapshot and obtain the internal snapshot data information of the virtual disk;
  • the data saving unit is configured to save the internal snapshot data information and the snapshot command information to the snapshot database after the internal snapshot coroutine is executed, and notify the user of the completion of the internal snapshot task through the monitoring interface.
  • the present application also provides a computer non-volatile readable storage medium.
  • the computer non-volatile readable storage medium includes a computer program.
  • the virtual When the computer program is executed by a processor, the virtual The steps of the asynchronous creation method of the internal snapshot of the machine.
  • this application proposes a method for asynchronously creating an internal snapshot of a virtual machine, an electronic device, and a computer-readable storage medium.
  • the virtual machine can still perform IO requests or user out-of-band operations during the internal snapshot process, which can significantly improve the work efficiency of the virtual machine; in addition, by setting the parameter validity check for the snapshot command information, it can ensure that the snapshot is to be taken
  • the virtual disk is not currently performing data operations, so as to prevent the internal snapshot coroutine from disrupting the normal operation of the current data operation; finally, by setting the blocking flag and blocking queue for the virtual disk to be snapshot, it can effectively prevent the data formed by the internal snapshot from being inconsistent. The problem of unification.
  • Fig. 1 is a flowchart of a preferred embodiment of a method for asynchronously creating an internal snapshot of a virtual machine according to an embodiment of the present application
  • FIG. 2 is a flowchart of an internal snapshot process of a virtual disk to be snapshot according to an embodiment of the present application
  • FIG. 3 is a schematic diagram of the internal logic of a system for asynchronously creating an internal snapshot of a virtual machine according to an embodiment of the present application
  • FIG. 4 is a schematic structural diagram of a preferred embodiment of an electronic device according to an embodiment of the present application.
  • Fig. 5 is a schematic diagram of the internal logic of a virtual machine asynchronously creating an internal snapshot program according to an embodiment of the present application.
  • FIG. 1 shows a flow of the method for asynchronously creating an internal snapshot of a virtual machine according to an embodiment of the present application.
  • the method for asynchronously creating an internal snapshot of a virtual machine includes:
  • S110 Obtain the snapshot command information of the user request to create an internal snapshot of the virtual disk through the monitor socket in the main loop of the qemu-kvm virtual machine main thread, where the snapshot command information includes the name of the virtual disk to be snapshot, such as (C drive, D drive, E drive, F drive, G drive, etc.) and internal snapshot numbers (such as snap1, snap2, etc.).
  • the snapshot command information includes the name of the virtual disk to be snapshot, such as (C drive, D drive, E drive, F drive, G drive, etc.) and internal snapshot numbers (such as snap1, snap2, etc.).
  • the main loop of the main thread of the virtual machine is used to continuously monitor the io events sent by the guest OS (virtual system), events in the monitor socket, and events related to user out-of-band operations.
  • the event in the monitor socket is the creation of an internal snapshot event of the virtual disk, and the snapshot command information issued by the monitor socket (monitor interface) for the user to request to create an internal snapshot of the virtual disk can be obtained.
  • the names of the virtual disks to be snapshotted and the internal snapshot numbers corresponding to the internal snapshots of different virtual machines under normal circumstances are different. Only by ensuring that the names of the virtual disks to be snapshotted and the internal snapshot numbers correspond to the virtual disks to be snapshotted can the completed virtual machine be guaranteed The correctness, timeliness and completeness of the data in the internal snapshot.
  • S120 Perform parameter validity verification on the snapshot command information according to the name of the virtual disk to be snapshot and the internal snapshot number to ensure the correctness, timeliness and integrity of the data in the completed internal snapshot of the virtual machine. If the snapshot command information passes the parameter validity To verify, create an internal snapshot coroutine based on the snapshot command information.
  • the process of checking the parameter validity of the snapshot command information may include: querying whether the virtual disk to be snapshot corresponding to the name of the virtual disk to be snapshot exists, and querying the internal snapshot number Whether the corresponding internal snapshot coroutine already exists; if the virtual disk to be snapshot corresponding to the name of the virtual disk to be snapshot exists, and the internal snapshot coroutine corresponding to the internal snapshot number does not exist, it is further judged whether the virtual disk to be snapshot currently supports creation Internal snapshot; otherwise, if the virtual disk to be snapshot corresponding to the name of the virtual disk to be snapshot exists, and the internal snapshot coroutine corresponding to the internal snapshot number also exists, or if the virtual disk to be snapshot corresponding to the name of the virtual disk to be snapshot does not exist , The command information to be snapshot is returned to the user through the monitoring interface; if the virtual disk to be snapshot currently supports the creation of internal snapshots, it is determined that the command information of the snapshot passes the parameter validity check.
  • judging whether the virtual disk to be snapshot currently supports the process of creating internal snapshots is to determine whether the virtual disk to be snapshot is currently executing some commands related to data exchange, and only to prevent the virtual disk to be snapshot from performing data exchange during internal snapshots. In order to avoid the confusion of the completed internal snapshot data, the validity of the completed internal snapshot data can be guaranteed.
  • ensuring that the internal snapshot coroutine corresponding to the internal snapshot number does not exist can prevent repeated snapshots of the snapshot virtual disk in the same period of time, avoiding the internal snapshot process from taking too long and reducing the working efficiency of the virtual machine.
  • the process of verifying the validity of the parameters of the snapshot command information may also include, if the virtual disk to be snapshot does not currently support the creation of internal snapshots, saving the snapshot command information to the memo snapshot information database; and after a preset time interval , Judge again whether the virtual disk to be snapshot currently supports the creation of internal snapshots, if the virtual disk to be snapshot currently supports the creation of internal snapshots, create an internal snapshot coroutine according to the snapshot command information; if the virtual disk to be snapshot currently does not support the creation of internal snapshots, then again Continue to save the snapshot command information to the memo snapshot information database. After the preset time, continue to judge whether the virtual disk to be snapshot currently supports the creation of internal snapshots, and judge again after the preset time interval, until the virtual disk to be snapshot currently supports the creation of internal snapshots .
  • S130 Execute the internal snapshot coroutine, the system realizes the internal snapshot of the virtual disk to be snapshotted through the internal snapshot coroutine, and obtains the internal snapshot data information of the virtual disk.
  • a coroutine also known as a microthread
  • the coroutine has its own register context and stack.
  • the coroutine When the coroutine is scheduled to switch, it saves the register context and stack to other places, and restores the previously saved register context and stack when switching back. Therefore, the coroutine can retain the state of the last call, that is, a specific combination of all local states. Each time the process is reentered, it is equivalent to entering the state of the last call.
  • a coroutine is essentially a single process. Compared with multiple processes, a coroutine does not require the overhead of thread context switching.
  • the method of creating an internal snapshot asynchronously by the machine is to use this coroutine feature of the internal snapshot coroutine to realize the execution pointer to jump back and forth between the internal snapshot coroutine and the main loop of the main thread, thereby effectively solving the problem that the execution pointer is busy for a long time And so on.
  • the figure is a specific flowchart of the internal snapshot process of the virtual disk to be snapshot. As shown in Figure 2, the process includes:
  • S132 Perform data analysis on the metadata to obtain the address of the carrier device that carries the virtual disk to be snapshot, and obtain the internal snapshot data information in the carrier device through the address of the carrier device; where the carrier device can be host file or rbd
  • the virtual block device can also be an iscsi virtual block device.
  • the specific model of the bearer device depends on the specific configuration of the virtual machine.
  • S133 Trigger the IO processing module to start reading and writing the internal snapshot data information in the bearer device, and realize the internal snapshot of the virtual disk to be snapshot through the IO processing module.
  • the IO processing thread in the IO processing module reads and writes the internal snapshot data information in the bearer device, and the IO processing thread is parallel to the main thread of the virtual machine, and the two processes can be performed at the same time. , You only need to use the coroutine feature of the internal snapshot coroutine to jump the execution pointer to the main thread to realize the parallel processing of the IO processing thread and the main thread of the virtual machine.
  • the internal snapshot protocol triggers the IO processing module, it will be busy waiting for the IO processing module to read and write the internal snapshot data information in the bearer device until the IO processing module is read and written. During this period, the internal snapshot protocol The process does not do any processing, which seriously affects the work efficiency of the virtual machine.
  • the coroutine feature of the internal snapshot coroutine can be used. While the IO processing module reads and writes the internal snapshot data information, the execution pointer of the internal snapshot coroutine is jumped to the virtual The main loop (main loop) of the main thread of the machine continues to perform loop monitoring. When the monitoring obtains other pending request programs, continue to execute the pending request program; among them, the pending request program can be the IO request event of the guest OS Or user out-of-band operation.
  • the execution pointer jumps to the main thread of the virtual machine to continue executing the pending request program
  • the pending request program will inevitably be related to the data exchange of the virtual disk to be snapshot. If the pending request program is The data exchange of the virtual disk to be snapshot is related. It is very possible that the final internal snapshot data is inconsistent due to the execution of the request program to be processed by the main thread, which causes the internal snapshot to fail.
  • the process of judging whether the request to be processed and the virtual disk to be snapshot are related includes performing data detection on the virtual disk to be snapshot through the IO interface of the virtual disk to be snapshot; if it is detected that there is data exchange between the virtual disk to be snapshot and other devices, It is determined that the pending request program is related to the virtual disk to be snapshotted; otherwise, it is determined that the pending request program is not related to the virtual disk to be snapshotted.
  • the pending request program related to the virtual disk to be snapshot can be saved in time, which can effectively prevent the problem of inconsistency of internal snapshot data.
  • the execution pointer can be directly jumped to the blocking coroutine queue, and the pending request programs stored in the blocking coroutine queue can be executed in turn. In this way, the blocking of the coroutine queue can be prevented. The pending request procedure was missed.
  • the snapshot can be adjusted according to the abnormal information of the abnormal virtual disk, such as the virtual disk name, the abnormal occurrence time of the virtual disk, and the internal snapshot number.
  • the database is inquired to obtain the internal snapshot information corresponding to the abnormal information, and the data recovery of the virtual disk can be realized through the internal snapshot information.
  • the present application also provides a system for creating an asynchronous snapshot inside a virtual machine.
  • FIG. 3 shows the internal logical structure of the system for creating an asynchronous snapshot inside a virtual machine according to an embodiment of the present application.
  • the present application provides an asynchronous creation system for an internal snapshot of a virtual machine, including: a snapshot command information acquisition unit for acquiring user snapshot command information through a monitoring interface, where the snapshot command information includes the name of the virtual disk to be snapshot And the internal snapshot number;
  • the parameter legality checking unit is used to check the parameter legality of the snapshot command information according to the name of the virtual disk to be snapshot and the internal snapshot number. If the snapshot command information passes the parameter legality check, create an internal snapshot coroutine based on the snapshot command information;
  • the coroutine execution unit is used to take internal snapshots of the virtual disk to be snapshot and obtain the internal snapshot data information of the virtual disk;
  • the data saving unit is used to save the internal snapshot data information and the snapshot command information to the snapshot database after the internal snapshot coroutine is executed, and notify the user of the completion of the internal snapshot task through the monitoring interface.
  • the parameter legality checking unit further includes:
  • the virtual disk query unit to be snapshot is used to query whether the virtual disk to be snapshot corresponding to the name of the virtual disk to be snapshot exists, and to query whether the internal snapshot coroutine corresponding to the internal snapshot number already exists;
  • the support judgment unit judges that the virtual disk to be snapshot currently supports the creation of an internal snapshot, it judges that the snapshot command information passes the parameter validity check.
  • the parameter validity checking unit further includes: a snapshot command information memo unit, which is used to save the snapshot command information to the memo snapshot information database when the virtual disk to be snapshot does not currently support the creation of internal snapshots;
  • the support judgment unit judges whether the virtual disk to be snapshot currently supports the creation of internal snapshots. If the support judgment unit judges that the virtual disk to be snapshot currently supports the creation of internal snapshots, it is judged that the snapshot command information passes the parameter validity check;
  • the snapshot command information memo unit will continue to save the snapshot command information to the memo snapshot information base through the snapshot command information memo unit, and judge again after the preset time interval until the virtual disk to be snapshot virtualized The disk currently supports the creation of internal snapshots.
  • the coroutine execution unit includes:
  • the metadata reading unit is used to read and write all metadata in the virtual disk to be snapshotted
  • the metadata parsing unit is used to analyze the metadata to obtain the bearing device that carries the virtual disk to be snapshotted;
  • the internal snapshot data information reading unit is used to trigger the IO processing module to start reading and writing the internal snapshot data information in the bearer device;
  • the execution pointer jump unit is used to jump the execution pointer of the internal snapshot coroutine to the main loop to continue the execution of the pending request program when the IO processing module reads and writes the internal snapshot data information;
  • the execution pointer jumps back to the unit for when the IO processing module reads and writes the internal snapshot data information, the execution pointer jumps from the main loop to the internal snapshot coroutine, and continues to execute the internal snapshot coroutine to complete the subsequent internal of the virtual disk Snapshot operation.
  • the virtual machine internal snapshot asynchronous creation system also includes an initialization unit, which is used to add a blocking coroutine queue and a blocking flag to the virtual disk before executing the internal snapshot coroutine, where the blocking flag is initialized to false and the internal snapshot coroutine is executed.
  • an initialization unit which is used to add a blocking coroutine queue and a blocking flag to the virtual disk before executing the internal snapshot coroutine, where the blocking flag is initialized to false and the internal snapshot coroutine is executed.
  • the blocking flag is converted to true, the blocking flag is converted to false after the execution of the internal snapshot coroutine;
  • the correlation judging unit is used for judging whether the to-be-processed request program is related to the virtual disk to be snapshot when the execution pointer executes the to-be-processed request program in the main loop;
  • the blocking coroutine queue saving unit is used to save the pending program to the blocking coroutine queue when the correlation determining unit determines that the request program to be processed is related to the virtual disk to be snapshot;
  • the correlation determination unit continues to determine whether the request program to be processed is related to the virtual disk to be snapshot.
  • the relevance judgment unit includes;
  • the data detection unit is used to perform data detection on the virtual disk to be snapshot through the IO interface of the virtual disk to be snapshot;
  • the virtual machine internal snapshot asynchronous creation system also includes a blocking coroutine processing unit, which is used to jump the execution pointer to the blocking coroutine queue after the internal snapshot is executed, and sequentially execute the pending requests stored in the blocking coroutine queue program.
  • the virtual machine internal snapshot asynchronous creation system can also include an internal snapshot information application unit for saving internal snapshot data information and snapshot command information to the snapshot database. If the virtual disk of the virtual system is abnormal, the virtual disk will be virtualized according to the abnormality. Query the snapshot database for the abnormal information of the disk, and obtain the internal snapshot information corresponding to the abnormal information; finally, restore the abnormal virtual disk through the internal snapshot information; the abnormal information includes the abnormal virtual disk name and the corresponding abnormal virtual disk name The number of the internal snapshot.
  • the snapshot command information acquisition unit can asynchronously create virtual disk internal snapshots through the cooperation of the parameter validity checking unit, the coroutine execution unit, and the data storage unit. In this way, the execution of the IO request event of the virtual machine or the user out-of-band operation is realized while the process of creating the internal snapshot of the virtual disk is busy.
  • FIG. 4 is a schematic diagram of the logical structure of an electronic device provided by an embodiment of the present application.
  • the electronic device 70 may be a terminal device with arithmetic function, such as a server, a smart phone, a tablet computer, a portable computer, a desktop computer, and the like.
  • the electronic device 70 includes a processor 71 and a memory 72.
  • the memory 72 includes at least one type of readable storage medium.
  • the at least one type of readable storage medium may be a non-volatile storage medium such as flash memory, hard disk, multimedia card, card-type memory, and the like.
  • the readable storage medium may be an internal storage unit of the electronic device 70, such as a hard disk of the electronic device 70.
  • the readable storage medium may also be an external memory of the electronic device 1, such as a plug-in hard disk equipped on the electronic device 70, a smart memory card (Smart Media Card, SMC), and a secure digital (Secure Digital, SD) card, flash card (Flash Card), etc.
  • the readable storage medium of the memory 72 is generally used to store the virtual machine installed in the electronic device 70 to asynchronously create the internal snapshot program 73.
  • the memory 72 can also be used to temporarily store data that has been output or will be output.
  • the processor 72 may be a central processing unit (CPU), microprocessor or other data processing chip in some embodiments, and is used to run program codes or process data stored in the memory 72, for example, a virtual machine is created asynchronously Internal snapshot program 73 etc.
  • CPU central processing unit
  • microprocessor or other data processing chip in some embodiments, and is used to run program codes or process data stored in the memory 72, for example, a virtual machine is created asynchronously Internal snapshot program 73 etc.
  • the electronic device 70 is a terminal device such as a smart phone, a tablet computer, and a portable computer. In other embodiments, the electronic device 70 may be a server.
  • FIG. 4 only shows the electronic device 70 with the components 71-73, but it should be understood that it is not required to implement all the illustrated components, and more or fewer components may be implemented instead.
  • the electronic device 70 may also include a user interface.
  • the user interface may include an input unit such as a keyboard (Keyboard), a voice input device such as a microphone (microphone) and other devices with voice recognition functions, and a voice output device such as audio, earphones, etc.
  • the user interface may also include a standard wired interface and a wireless interface.
  • the electronic device 70 may also include a display, and the display may also be referred to as a display screen or a display unit.
  • the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an organic light-emitting diode (Organic Light-Emitting Diode, OLED) touch device, etc.
  • the display is used for displaying information processed in the electronic device 70 and for displaying a visualized user interface.
  • the electronic device 70 may also include a touch sensor.
  • the area provided by the touch sensor for the user to perform touch operations is called the touch area.
  • the touch sensor here may be a resistive touch sensor, a capacitive touch sensor, or the like.
  • the touch sensor includes not only a contact type touch sensor, but also a proximity type touch sensor and the like.
  • the touch sensor may be a single sensor, or may be, for example, a plurality of sensors arranged in an array.
  • the area of the display of the electronic device 70 may be the same as or different from the area of the touch sensor.
  • the display and the touch sensor are layered to form a touch display screen. The device detects the touch operation triggered by the user based on the touch screen.
  • the electronic device 70 may also include a radio frequency (RF) circuit, a sensor, an audio circuit, etc., which will not be repeated here.
  • RF radio frequency
  • the memory 72 as a computer storage medium may include an operating system and a virtual machine asynchronously creating an internal snapshot program 73; the processor 71 executes the virtual machine stored in the memory 72 to asynchronously create an internal snapshot
  • the program 73 implements the steps in the above-mentioned method for asynchronously creating an internal snapshot of the virtual machine.
  • This embodiment provides a computer non-volatile readable storage medium, the computer non-volatile readable storage medium stores a computer-readable storage medium and a virtual machine asynchronously creates an internal snapshot program 73, as shown in FIG. 5
  • the virtual machine asynchronously creating internal snapshot program 73 can also be divided into one or more modules, and one or more modules are stored in It is stored in the memory 72 and executed by the processor 71 to complete the application.
  • the module referred to in the present invention refers to a series of computer program instruction segments capable of completing specific functions.
  • the virtual machine asynchronous creation of the internal snapshot program 73 can be divided into: a snapshot command information acquisition module 74, a parameter validity verification module 75, a coroutine execution module 76, and a data storage module 77.
  • the functions or operation steps implemented by modules 74-77 are similar to the above, and will not be described in detail here. Illustratively, for example, where:
  • the snapshot command information obtaining module 74 is configured to obtain the user's snapshot command information through the monitoring interface, where the snapshot command information includes the name of the virtual disk to be snapshot and the internal snapshot number.
  • the parameter validity check module 75 is used to check the parameter validity of the snapshot command information according to the name of the virtual disk to be snapshot and the internal snapshot number. If the snapshot command information passes the parameter validity check, create an internal snapshot coroutine based on the snapshot command information.
  • the coroutine execution module 76 is used to take an internal snapshot of the virtual disk to be snapshot and obtain the internal snapshot data information of the virtual disk.
  • the data saving module 77 is used to save the internal snapshot data information and the snapshot command information to the snapshot database after the internal snapshot coroutine is executed, and notify the user of the completion of the internal snapshot task through the monitoring interface.
  • the specific implementation manner of the computer-readable storage medium provided by the present invention is substantially the same as the specific implementation manner of the method, system, and electronic device for asynchronously creating an internal snapshot of a virtual machine, and will not be repeated here.
  • the disclosed device and method may be implemented in other ways.
  • the device embodiments described above are merely illustrative.
  • the division of modules or units is only a logical function division.
  • there may be other division methods for example, multiple units or components may be combined or It can be integrated into another system, or some features can be ignored or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
  • the functional units in the various embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
  • the above-mentioned integrated unit can be implemented in the form of hardware or software functional unit.
  • the integrated module/unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium.
  • this application implements all or part of the processes in the above-mentioned embodiments and methods, and can also be completed by instructing relevant hardware through a computer program.
  • the computer program can be stored in a computer non-volatile readable storage medium. When the computer program is executed by the processor, it can implement the steps of the foregoing method embodiments.
  • the computer program includes computer program code, and the computer program code may be in the form of source code, object code, executable file, or some intermediate forms.
  • the computer-readable medium may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access Memory (RAM, Random Access Memory), electric carrier signal, telecommunications signal, software distribution medium, etc.
  • ROM Read-Only Memory
  • RAM random access Memory
  • electric carrier signal telecommunications signal
  • software distribution medium etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

A method for asynchronously creating an internal snapshot of a virtual machine, a system, an apparatus and a storage medium, which relate to the technical field of internal snapshots. The method comprises: using a monitoring interface to acquire snapshot command information of a user; performing parameter validity verification of the snapshot command information according to the name of a virtual disk to be snapshotted and an internal snapshot number, and if the snapshot command information passes the parameter validity verification, then creating an internal snapshot coroutine according to the snapshot command information; executing the internal snapshot coroutine, taking an internal snapshot of the virtual disk to be snapshotted, and acquiring internal snapshot data information of the virtual disk; and when the execution of the internal snapshot coroutine is complete, saving the internal snapshot data information and the snapshot command information to a snapshot database. The described method is able to solve the problem in which internal snapshots of virtual disks of traditional virtual machines only support synchronous implementation, and an IO request or out-of-band operation of a virtual machine cannot be responded to during the internal snapshot process.

Description

虚拟机内部快照异步创建方法、装置、***及存储介质Asynchronous creation method, device, system and storage medium of internal snapshot of virtual machine
本申请要求申请号为201910978193.0,申请日为2019年10月15日,发明创造名称为“虚拟机异步创建内部快照的方法、装置及存储介质”的专利申请的优先权。This application requires the priority of the patent application whose application number is 201910978193.0, the filing date is October 15, 2019, and the invention-creation title is "Method, Device and Storage Medium for Asynchronously Creating Internal Snapshots of Virtual Machines".
技术领域Technical field
本申请涉及内部快照技术领域,尤其涉及一种虚拟机内部快照异步创建方法、装置、***及存储介质。This application relates to the technical field of internal snapshots, and in particular to a method, device, system, and storage medium for asynchronously creating an internal snapshot of a virtual machine.
背景技术Background technique
qemu-kvm是当前业界广泛使用的虚拟化软件,所谓虚拟化,通俗来说就是通过软件的方式模拟硬件,使得一台物理机可以运行多套异构的OS,一方面便于IAAS层资源共享,另一方面便于资源的灵活分配和调度,从而促进了当前“云”商业模式的诞生和发展。目前云计算环境中,qemu-kvm虚拟机由于其性能好、功能全等特点在云计算领域中获得广泛应用。对于运用qemu-kvm虚拟机的云计算环境,快照功能是其不可或缺的一部分:当***崩溃或出现异常时,可以通过恢复到所备份的快照数据来恢复虚拟机磁盘文件***和***存储。当前,qemu-kvm虚拟机的qcow2虚拟磁盘格式由于其性能较好,支持snapshot、resize、thin provision等特点,在云计算场景中获得广泛应用。qemu-kvm is currently widely used virtualization software in the industry. The so-called virtualization, in general, is to simulate hardware through software, so that a physical machine can run multiple sets of heterogeneous OS, which facilitates resource sharing at the IAAS layer. On the other hand, it facilitates the flexible allocation and scheduling of resources, thus promoting the birth and development of the current "cloud" business model. In the current cloud computing environment, the qemu-kvm virtual machine has been widely used in the cloud computing field due to its good performance and complete functions. For cloud computing environments using the qemu-kvm virtual machine, the snapshot function is an indispensable part: when the system crashes or an abnormality occurs, the virtual machine disk file system and system storage can be restored by restoring the backup snapshot data. Currently, the qcow2 virtual disk format of the qemu-kvm virtual machine is widely used in cloud computing scenarios due to its better performance and support for snapshot, resize, thin provision and other features.
然而,传统的qemu-kvm虚拟机对qcow2虚拟磁盘格式虚拟磁盘内部快照的实现,只支持同步的实现方式,即虚拟机在从监听接口处接收来自外部的创建内部快照的命令后,首先会忙等当前所有正在处理的磁盘IO操作完成,然后创建虚拟磁盘内部程序。在根据虚拟磁盘内部程序创建虚拟磁盘内部快照时,需要读写虚拟磁盘的元数据实现对虚拟磁盘内部的数据进行备份,由于虚拟机内部快照程序处于主线程中而不是处于虚拟机协程运行时环境中,因此,对于外部指令的每个读写IO的请求指令,都要忙等该IO的快照命令 结束,所以,在整个虚拟磁盘内部快照的创建过程中,运行时的虚拟机进程都无法响应guest os(虚拟***)发出的IO请求事件,也无法响应用户对虚拟机的带外操作,如来自guest os对块设备的IO请求、网络设备IO、来自用户VNC连接和console口登陆等。However, the traditional qemu-kvm virtual machine's implementation of the internal snapshot of the virtual disk in the qcow2 virtual disk format only supports the implementation of synchronization, that is, the virtual machine will be busy at first after receiving an external command to create an internal snapshot from the listening interface. Wait for the completion of all disk IO operations currently being processed, and then create the virtual disk internal program. When creating an internal snapshot of a virtual disk according to the internal program of the virtual disk, it is necessary to read and write the metadata of the virtual disk to realize the backup of the data inside the virtual disk, because the internal snapshot program of the virtual machine is in the main thread instead of when the virtual machine coroutine is running In the environment, therefore, for each read/write IO request instruction of an external instruction, it must be busy waiting for the IO snapshot command to end. Therefore, during the creation of the entire virtual disk internal snapshot, the runtime virtual machine process cannot In response to the IO request event sent by the guest os (virtual system), it cannot respond to the user's out-of-band operation of the virtual machine, such as the IO request from the guest os to the block device, the network device IO, the VNC connection from the user, and the console port login.
基于上述问题,申请人意识到,亟需一种能够在创建虚拟磁盘内部快照过程的忙等阶段同时实现虚拟机的IO请求事件或者用户带外操作的虚拟机内部快照异步创建方法。Based on the above problems, the applicant has realized that there is an urgent need for a method for asynchronously creating virtual machine internal snapshots that can simultaneously implement virtual machine IO request events or user out-of-band operations during the busy stage of the process of creating virtual disk internal snapshots.
发明内容Summary of the invention
鉴于上述问题,本申请提供一种虚拟机异步创建内部快照方法、电子装置以及计算机存储介质,其主要目的在于解决传统的传统虚拟机的虚拟磁盘内部快照只支持同步实现,无法在内部快照过程中响应虚拟机IO请求或带外操作的问题。In view of the above problems, this application provides a method for asynchronously creating an internal snapshot of a virtual machine, an electronic device, and a computer storage medium. The main purpose of this application is to solve the problem that the internal snapshot of the virtual disk of the traditional traditional virtual machine only supports synchronous implementation and cannot be implemented during the internal snapshot process. Respond to virtual machine IO requests or out-of-band operations.
第一方面,本申请提供一种虚拟机内部快照异步创建方法,应用于电子装置,包括:In the first aspect, this application provides a method for asynchronously creating an internal snapshot of a virtual machine, which is applied to an electronic device, and includes:
通过监听接口获取用户的快照命令信息,其中,所述快照命令信息包括待快照虚拟磁盘名称以及内部快照编号;Obtain the user's snapshot command information through the monitoring interface, where the snapshot command information includes the name of the virtual disk to be snapshot and the internal snapshot number;
根据所述待快照虚拟磁盘名称以及内部快照编号对所述快照命令信息进行参数合法性检验,若所述快照命令信息通过所述参数合法性检验,则根据所述快照命令信息创建内部快照协程;Perform a parameter validity check on the snapshot command information according to the name of the virtual disk to be snapshot and the internal snapshot number. If the snapshot command information passes the parameter validity check, an internal snapshot coroutine is created according to the snapshot command information ;
执行所述内部快照协程,对所述待快照虚拟磁盘进行内部快照,并获取所述虚拟磁盘的内部快照数据信息;Execute the internal snapshot coroutine, take an internal snapshot of the virtual disk to be snapshot, and obtain internal snapshot data information of the virtual disk;
当所述内部快照协程执行完毕后,将所述内部快照数据信息以及所述快照命令信息保存至快照数据库,并通过所述监听接口通知用户内部快照任务完成。After the internal snapshot coroutine is executed, the internal snapshot data information and the snapshot command information are saved in the snapshot database, and the user is notified of the completion of the internal snapshot task through the monitoring interface.
第二方面,本申请还提供一种电子装置,该电子装置包括:存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时实现如上述虚拟机内部快照异步创建方法的步骤。In a second aspect, the present application also provides an electronic device, the electronic device comprising: a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that the processor When the computer program is executed, the steps of the method for asynchronously creating an internal snapshot of the virtual machine are implemented.
第三方面,本申请还提供一种虚拟机内部快照异步创建***,包括:In the third aspect, this application also provides an asynchronous creation system for internal snapshots of virtual machines, including:
快照命令信息获取单元,用于通过所述监听接口获取用户的快照命令信息,其中,所述快照命令信息包括待快照虚拟磁盘名称以及内部快照编号;A snapshot command information obtaining unit, configured to obtain user snapshot command information through the monitoring interface, where the snapshot command information includes the name of the virtual disk to be snapshot and the internal snapshot number;
参数合法性检验单元,用于根据所述待快照虚拟磁盘名称以及所述内部快照编号对所述快照命令信息进行参数合法性检验,若所述快照命令信息通过参数合法性检验,则根据所述快照命令信息创建内部快照协程;The parameter validity checking unit is configured to check the parameter validity of the snapshot command information according to the name of the virtual disk to be snapshot and the internal snapshot number. If the snapshot command information passes the parameter validity check, then according to the Snapshot command information to create an internal snapshot coroutine;
协程执行单元,用于对所述待快照虚拟磁盘进行内部快照,并获取虚拟磁盘的内部快照数据信息;The coroutine execution unit is used to take an internal snapshot of the virtual disk to be snapshot and obtain the internal snapshot data information of the virtual disk;
数据保存单元,用于当所述内部快照协程执行完毕后,将所述内部快照数据信息以及所述快照命令信息保存至快照数据库,并通过所述监听接口通知用户内部快照任务完成。The data saving unit is configured to save the internal snapshot data information and the snapshot command information to the snapshot database after the internal snapshot coroutine is executed, and notify the user of the completion of the internal snapshot task through the monitoring interface.
第四方面,本申请还提供一种计算机非易失性可读存储介质,所述计算机非易失性可读存储介质中包括计算机程序,所述计算机程序被处理器执行时,实现如上述虚拟机内部快照异步创建方法的步骤。In a fourth aspect, the present application also provides a computer non-volatile readable storage medium. The computer non-volatile readable storage medium includes a computer program. When the computer program is executed by a processor, the virtual The steps of the asynchronous creation method of the internal snapshot of the machine.
从上面的技术方案可知,本申请提出虚拟机异步创建内部快照方法、电子装置及计算机可读存储介质,通过为传统虚拟机内部快照程序设置特定的内部快照协程,实现内部快照的异步创建,保证虚拟机在进行内部快照的过程中仍然能够实现对IO请求或用户带外操作的执行,能够显著提高虚拟机的工作效率;此外,通过为快照命令信息设置参数合法性检验,能够确保待快照虚拟磁盘当前没有进行数据操作,从而避免内部快照协程打乱当前的数据操作的正常运行;最后,通过为待快照虚拟磁盘设置阻塞标识以及阻塞队列,能够有效的防止内部快照形成的数据前后不统一的问题。It can be seen from the above technical solutions that this application proposes a method for asynchronously creating an internal snapshot of a virtual machine, an electronic device, and a computer-readable storage medium. By setting a specific internal snapshot coroutine for the traditional virtual machine internal snapshot program, the asynchronous creation of an internal snapshot is realized. Ensure that the virtual machine can still perform IO requests or user out-of-band operations during the internal snapshot process, which can significantly improve the work efficiency of the virtual machine; in addition, by setting the parameter validity check for the snapshot command information, it can ensure that the snapshot is to be taken The virtual disk is not currently performing data operations, so as to prevent the internal snapshot coroutine from disrupting the normal operation of the current data operation; finally, by setting the blocking flag and blocking queue for the virtual disk to be snapshot, it can effectively prevent the data formed by the internal snapshot from being inconsistent. The problem of unification.
为了实现上述以及相关目的,本申请的一个或多个方面包括后面将详细说明的特征。下面的说明以及附图详细说明了本申请的某些示例性方面。然而,这些方面指示的仅仅是可使用本申请的原理的各种方式中的一些方式。此外,本申请旨在包括所有这些方面以及它们的等同物。In order to achieve the above and related objects, one or more aspects of the present application include features that will be described in detail later. The following description and drawings illustrate some exemplary aspects of the present application in detail. However, these aspects indicate only some of the various ways in which the principles of the present application can be used. Furthermore, this application is intended to include all these aspects and their equivalents.
附图说明Description of the drawings
通过参考以下结合附图的说明,并且随着对本申请的更全面理解,本申请的其它目的及结果将更加明白及易于理解。在附图中:By referring to the following description in conjunction with the accompanying drawings, and with a more comprehensive understanding of the application, the other purposes and results of the application will be clearer and easier to understand. In the attached picture:
图1为根据本申请实施例的虚拟机异步创建内部快照方法的较佳实施例 流程图;Fig. 1 is a flowchart of a preferred embodiment of a method for asynchronously creating an internal snapshot of a virtual machine according to an embodiment of the present application;
图2为根据本申请实施例的对待快照虚拟磁盘进行内部快照过程的流程图;FIG. 2 is a flowchart of an internal snapshot process of a virtual disk to be snapshot according to an embodiment of the present application;
图3为根据本申请实施例的虚拟机异步创建内部快照***的内部逻辑示意图;3 is a schematic diagram of the internal logic of a system for asynchronously creating an internal snapshot of a virtual machine according to an embodiment of the present application;
图4为根据本申请实施例的电子装置的较佳实施例结构示意图;4 is a schematic structural diagram of a preferred embodiment of an electronic device according to an embodiment of the present application;
图5为根据本申请实施例的虚拟机异步创建内部快照程序的内部逻辑示意图。Fig. 5 is a schematic diagram of the internal logic of a virtual machine asynchronously creating an internal snapshot program according to an embodiment of the present application.
本申请目的的实现、功能特点及优点将结合实施例,参照附图做进一步说明。The realization, functional characteristics, and advantages of the purpose of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings.
具体实施方式Detailed ways
在下面的描述中,出于说明的目的,为了提供对一个或多个实施例的全面理解,阐述了许多具体细节。然而,很明显,也可以在没有这些具体细节的情况下实现这些实施例。In the following description, for illustrative purposes, in order to provide a comprehensive understanding of one or more embodiments, many specific details are set forth. However, it is obvious that these embodiments can also be implemented without these specific details.
以下将结合附图对本申请的具体实施例进行详细描述。The specific embodiments of the present application will be described in detail below in conjunction with the accompanying drawings.
实施例1Example 1
为了说明本申请提供的虚拟机内部快照异步创建方法,图1示出了根据本申请实施例的虚拟机内部快照异步创建方法的流程。In order to explain the method for asynchronously creating an internal snapshot of a virtual machine provided by this application, FIG. 1 shows a flow of the method for asynchronously creating an internal snapshot of a virtual machine according to an embodiment of the present application.
如图1所示,本申请提供的虚拟机内部快照异步创建方法包括:As shown in Figure 1, the method for asynchronously creating an internal snapshot of a virtual machine provided by this application includes:
S110:通过qemu-kvm虚拟机主线程的mainloop(主循环)中的monitor socket(监听接口)获取用户请求创建虚拟磁盘内部快照的快照命令信息,其中,该快照命令信息包括待快照虚拟磁盘名称如(C盘、D盘、E盘、F盘、G盘等)以及内部快照编号(如snap1、snap2等)。S110: Obtain the snapshot command information of the user request to create an internal snapshot of the virtual disk through the monitor socket in the main loop of the qemu-kvm virtual machine main thread, where the snapshot command information includes the name of the virtual disk to be snapshot, such as (C drive, D drive, E drive, F drive, G drive, etc.) and internal snapshot numbers (such as snap1, snap2, etc.).
需要说明的是,虚拟机的主线程的mainloop(主循环)用于持续循环监听guest os(虚拟***)发过来的io事件、monitor socket中的事件以及用户带外操作相关事件等,当获取到的monitor socket中的事件为创建虚拟磁盘内部快照事件时即可获取monitor socket(监听接口)下发的用户请求创建虚拟磁盘内部快照的快照命令信息。It should be noted that the main loop of the main thread of the virtual machine is used to continuously monitor the io events sent by the guest OS (virtual system), events in the monitor socket, and events related to user out-of-band operations. The event in the monitor socket is the creation of an internal snapshot event of the virtual disk, and the snapshot command information issued by the monitor socket (monitor interface) for the user to request to create an internal snapshot of the virtual disk can be obtained.
其中,不同的虚拟机内部快照正常情况下对应的待快照虚拟磁盘名称以 及内部快照编号均不同,只有确保待快照虚拟磁盘名称以及内部快照编号均与待快照虚拟磁盘对应,才能保证完成的虚拟机内部快照中数据的正确性、时效性以及完整性。Among them, the names of the virtual disks to be snapshotted and the internal snapshot numbers corresponding to the internal snapshots of different virtual machines under normal circumstances are different. Only by ensuring that the names of the virtual disks to be snapshotted and the internal snapshot numbers correspond to the virtual disks to be snapshotted can the completed virtual machine be guaranteed The correctness, timeliness and completeness of the data in the internal snapshot.
S120:根据待快照虚拟磁盘名称以及内部快照编号对快照命令信息进行参数合法性检验,以确保完成的虚拟机内部快照中数据的正确性、时效性以及完整性,若快照命令信息通过参数合法性检验,则根据快照命令信息创建内部快照协程。S120: Perform parameter validity verification on the snapshot command information according to the name of the virtual disk to be snapshot and the internal snapshot number to ensure the correctness, timeliness and integrity of the data in the completed internal snapshot of the virtual machine. If the snapshot command information passes the parameter validity To verify, create an internal snapshot coroutine based on the snapshot command information.
具体地,为保证参数合法性检验的准确性,对快照命令信息进行参数合法性检验的过程可以包括:查询与待快照虚拟磁盘名称对应的待快照虚拟磁盘是否存在,且,查询与内部快照编号对应的内部快照协程是否已经存在;若与待快照虚拟磁盘名称对应的待快照虚拟磁盘存在,且与内部快照编号对应的内部快照协程不存在,则进一步判断待快照虚拟磁盘当前是否支持创建内部快照;否则,如果与待快照虚拟磁盘名称对应的待快照虚拟磁盘存在,且与内部快照编号对应的内部快照协程也存在,或者如果与待快照虚拟磁盘名称对应的待快照虚拟磁盘不存在,则通过监听接口向用户退回待快照命令信息;若待快照虚拟磁盘当前支持创建内部快照,则判定快照命令信息通过参数合法性检验。Specifically, in order to ensure the accuracy of the parameter validity check, the process of checking the parameter validity of the snapshot command information may include: querying whether the virtual disk to be snapshot corresponding to the name of the virtual disk to be snapshot exists, and querying the internal snapshot number Whether the corresponding internal snapshot coroutine already exists; if the virtual disk to be snapshot corresponding to the name of the virtual disk to be snapshot exists, and the internal snapshot coroutine corresponding to the internal snapshot number does not exist, it is further judged whether the virtual disk to be snapshot currently supports creation Internal snapshot; otherwise, if the virtual disk to be snapshot corresponding to the name of the virtual disk to be snapshot exists, and the internal snapshot coroutine corresponding to the internal snapshot number also exists, or if the virtual disk to be snapshot corresponding to the name of the virtual disk to be snapshot does not exist , The command information to be snapshot is returned to the user through the monitoring interface; if the virtual disk to be snapshot currently supports the creation of internal snapshots, it is determined that the command information of the snapshot passes the parameter validity check.
需要说明的是,判断待快照虚拟磁盘当前是否支持创建内部快照过程就是判断待快照虚拟磁盘当前是否正在执行一些与数据交换有关的命令,只有防止在进行内部快照时待快照虚拟磁盘进行数据交换,才能避免完成的内部快照数据出现混乱,保证完成的内部快照数据的有效性。It should be noted that judging whether the virtual disk to be snapshot currently supports the process of creating internal snapshots is to determine whether the virtual disk to be snapshot is currently executing some commands related to data exchange, and only to prevent the virtual disk to be snapshot from performing data exchange during internal snapshots. In order to avoid the confusion of the completed internal snapshot data, the validity of the completed internal snapshot data can be guaranteed.
此外,保证内部快照编号对应的内部快照协程不存在,能够防止在同一时间段内连续对待快照虚拟磁盘进行重复快照,避免内部快照过程耗时过长,降低虚拟机的工作效率。In addition, ensuring that the internal snapshot coroutine corresponding to the internal snapshot number does not exist can prevent repeated snapshots of the snapshot virtual disk in the same period of time, avoiding the internal snapshot process from taking too long and reducing the working efficiency of the virtual machine.
进一步地,对快照命令信息进行参数合法性检验的过程还可以包括,若待快照虚拟磁盘当前不支持创建内部快照,则将快照命令信息保存至备忘快照信息库;且,间隔预设时间后,再次判断待快照虚拟磁盘当前是否支持创建内部快照,若待快照虚拟磁盘当前支持创建内部快照,则根据快照命令信息创建内部快照协程;若待快照虚拟磁盘当前不支持创建内部快照,则再次将快照命令信息继续保存至备忘快照信息库,待预设时间后,继续判断待快 照虚拟磁盘当前是否支持创建内部快照,间隔预设时间后再次判断,直至待快照虚拟磁盘当前支持创建内部快照。Further, the process of verifying the validity of the parameters of the snapshot command information may also include, if the virtual disk to be snapshot does not currently support the creation of internal snapshots, saving the snapshot command information to the memo snapshot information database; and after a preset time interval , Judge again whether the virtual disk to be snapshot currently supports the creation of internal snapshots, if the virtual disk to be snapshot currently supports the creation of internal snapshots, create an internal snapshot coroutine according to the snapshot command information; if the virtual disk to be snapshot currently does not support the creation of internal snapshots, then again Continue to save the snapshot command information to the memo snapshot information database. After the preset time, continue to judge whether the virtual disk to be snapshot currently supports the creation of internal snapshots, and judge again after the preset time interval, until the virtual disk to be snapshot currently supports the creation of internal snapshots .
通过为快照命令信息设置备忘快照信息库以及预设时间,能够有效避免由于待快照虚拟磁盘当前时间段内一直进行数据交换,从而致使主线程一直忙等或***持续创建快照命令信息,进而降低虚拟机的工作效率。By setting a memo snapshot database and preset time for the snapshot command information, it can effectively avoid data exchange in the current time period of the virtual disk to be snapshot, which will cause the main thread to be busy or the system continue to create snapshot command information, thereby reducing The efficiency of the virtual machine.
S130:执行内部快照协程,***通过内部快照协程实现对待快照虚拟磁盘进行内部快照,并获取虚拟磁盘的内部快照数据信息。S130: Execute the internal snapshot coroutine, the system realizes the internal snapshot of the virtual disk to be snapshotted through the internal snapshot coroutine, and obtains the internal snapshot data information of the virtual disk.
需要提前说明的是,协程,又称微线程,是一种用户态的轻量级线程。协程拥有自己的寄存器上下文和栈,协程调度切换时,将寄存器上下文和栈保存到其他地方,在切回来的时候,恢复先前保存的寄存器上下文和栈。因此协程能保留上一次调用时的状态,即所有局部状态的一个特定组合,每次过程重入时,就相当于进入上一次调用的状态。协程本质上是个单进程,协程相对于多进程来说,无需线程上下文切换的开销,自己即可实现上下文的切换,跳转到所需的上下文进行其他程序地执行;本发明提供的虚拟机异步创建内部快照方法就是利用内部快照协程的这一协程特性,实现执行指针在内部快照协程于主线程的主循环之间实现来回跳转,从而有效地解决了执行指针长时间忙等的问题。What needs to be explained in advance is that a coroutine, also known as a microthread, is a lightweight thread in a user mode. The coroutine has its own register context and stack. When the coroutine is scheduled to switch, it saves the register context and stack to other places, and restores the previously saved register context and stack when switching back. Therefore, the coroutine can retain the state of the last call, that is, a specific combination of all local states. Each time the process is reentered, it is equivalent to entering the state of the last call. A coroutine is essentially a single process. Compared with multiple processes, a coroutine does not require the overhead of thread context switching. It can implement context switching by itself and jump to the required context for execution of other programs; the virtual process provided by the present invention The method of creating an internal snapshot asynchronously by the machine is to use this coroutine feature of the internal snapshot coroutine to realize the execution pointer to jump back and forth between the internal snapshot coroutine and the main loop of the main thread, thereby effectively solving the problem that the execution pointer is busy for a long time And so on.
在本发明的一个具体的实施方式中,图为对待快照虚拟磁盘进行内部快照过程的具体流程图,如图2所示,该过程包括:In a specific embodiment of the present invention, the figure is a specific flowchart of the internal snapshot process of the virtual disk to be snapshot. As shown in Figure 2, the process includes:
S131:读写待快照虚拟磁盘内的所有元数据;其中,待快照虚拟磁盘中的元数据并不是真正需要快照的数据,它是一种中介数据,需要对其进行数据解析才能获取真正需要读写IO的承载该虚拟磁盘真实数据的承载设备的地址。S131: Read and write all metadata in the virtual disk to be snapshot; among them, the metadata in the virtual disk to be snapshot is not the data that really needs to be snapshot, it is a kind of intermediary data, and it needs to be analyzed to obtain the data that really needs to be read. Write the address of the IO carrying device that carries the real data of the virtual disk.
S132:对元数据进行数据解析,以获取承载待快照虚拟磁盘的承载设备的地址,通过承载设备的地址获取承载设备内的内部快照数据信息;其中,承载设备可以是host file,也可以是rbd虚拟块设备,也可以是iscsi虚拟块设备,承载设备具体型号取决于虚拟机的具体配置。S132: Perform data analysis on the metadata to obtain the address of the carrier device that carries the virtual disk to be snapshot, and obtain the internal snapshot data information in the carrier device through the address of the carrier device; where the carrier device can be host file or rbd The virtual block device can also be an iscsi virtual block device. The specific model of the bearer device depends on the specific configuration of the virtual machine.
S133:触发IO处理模块开始对承载设备内的内部快照数据信息进行读写,通过IO处理模块实现对待快照虚拟磁盘的内部快照。S133: Trigger the IO processing module to start reading and writing the internal snapshot data information in the bearer device, and realize the internal snapshot of the virtual disk to be snapshot through the IO processing module.
需要说明的是,对承载设备内的内部快照数据信息进行读写的是IO处理 模块中的IO处理线程,而IO处理线程与虚拟机的主线程是并行的,两个过程可以同时进行,因此,只需要利用内部快照协程的协程特性将执行指针跳转至主线程即可实现IO处理线程与虚拟机的主线程的并行处理。It should be noted that the IO processing thread in the IO processing module reads and writes the internal snapshot data information in the bearer device, and the IO processing thread is parallel to the main thread of the virtual machine, and the two processes can be performed at the same time. , You only need to use the coroutine feature of the internal snapshot coroutine to jump the execution pointer to the main thread to realize the parallel processing of the IO processing thread and the main thread of the virtual machine.
此外,由于内部快照协程对IO处理模块进行触发之后,就会忙等IO处理模块对承载设备内的内部快照数据信息进行读写,直至IO处理模块读写完毕,在此期间,内部快照协程不做任何处理,严重影响虚拟机的工作效率。In addition, after the internal snapshot protocol triggers the IO processing module, it will be busy waiting for the IO processing module to read and write the internal snapshot data information in the bearer device until the IO processing module is read and written. During this period, the internal snapshot protocol The process does not do any processing, which seriously affects the work efficiency of the virtual machine.
S134:为提高虚拟机的工作效率,可以利用内部快照协程的协程特性,在IO处理模块对内部快照数据信息进行读写的同时,所将述内部快照协程的执行指针跳转至虚拟机的主线程的mainloop(主循环)以继续进行循环监听,当监听获取到其他的待处理请求程序时,继续执行该待处理请求程序;其中,待处理请求程序可以是guest os的IO请求事件或者用户带外操作。S134: In order to improve the working efficiency of the virtual machine, the coroutine feature of the internal snapshot coroutine can be used. While the IO processing module reads and writes the internal snapshot data information, the execution pointer of the internal snapshot coroutine is jumped to the virtual The main loop (main loop) of the main thread of the machine continues to perform loop monitoring. When the monitoring obtains other pending request programs, continue to execute the pending request program; among them, the pending request program can be the IO request event of the guest OS Or user out-of-band operation.
S135:当IO处理模块对内部快照数据信息读写完毕后,执行指针从主循环跳转至内部快照协程内,继续执行内部快照协程以完成对虚拟磁盘的后续内部快照操作。S135: After the IO processing module finishes reading and writing the internal snapshot data information, the execution pointer jumps from the main loop to the internal snapshot coroutine, and continues to execute the internal snapshot coroutine to complete subsequent internal snapshot operations on the virtual disk.
需要说明的是,在执行指针跳转至虚拟机的主线程继续执行待处理请求程序的过程中,该待处理请求程序难免会与待快照虚拟磁盘的数据交换有关,若该待处理请求程序与待快照虚拟磁盘的数据交换有关,很有可能由于主线程对该待处理请求程序的执行而导致最终完成的内部快照数据前后不一致,致使本次内部快照失败。It should be noted that when the execution pointer jumps to the main thread of the virtual machine to continue executing the pending request program, the pending request program will inevitably be related to the data exchange of the virtual disk to be snapshot. If the pending request program is The data exchange of the virtual disk to be snapshot is related. It is very possible that the final internal snapshot data is inconsistent due to the execution of the request program to be processed by the main thread, which causes the internal snapshot to fail.
因此,可以在执行内部快照协程之前,可以先对待快照虚拟磁盘进行初始化,为带快照虚拟磁盘增加两个状态栏,用于为虚拟磁盘添加阻塞协程队列以及阻塞标识,其中,阻塞标识初始化为false,在执行内部快照协程时阻塞标识转换为true,在内部快照协程执行完毕后阻塞标识转换为false;在执行指针执行主循环内的待处理请求程序时,先判断待处理请求程序与待快照虚拟磁盘是否相关;若待处理请求程序与待快照虚拟磁盘相关,则将待处理程序保存至阻塞协程队列,并继续执行下一个待处理请求程序;若待处理请求程序与待快照虚拟磁盘无关,则直接执行待处理请求程序。Therefore, you can initialize the virtual disk to be snapshot before executing the internal snapshot coroutine, and add two status bars for the virtual disk with snapshot, which are used to add a blocking coroutine queue and a blocking flag for the virtual disk, where the blocking flag is initialized If false, the blocking flag is converted to true when the internal snapshot coroutine is executed, and the blocking flag is converted to false after the internal snapshot coroutine is executed; when the execution pointer executes the pending request program in the main loop, the pending request program is judged first Whether it is related to the virtual disk to be snapshot; if the request program to be processed is related to the virtual disk to be snapshot, the program to be processed is saved to the blocking coroutine queue, and the next request program to be processed is continued; if the request program to be processed is related to the virtual disk to be snapshot If the virtual disk is irrelevant, the pending request program is executed directly.
具体地,判断待处理请求程序与待快照虚拟磁盘是否相关过程包括,通过待快照虚拟磁盘的IO接口对待快照虚拟磁盘进行数据检测;若检测到待快照虚拟磁盘与其他设备之间存在数据交换,则判定待处理请求程序与待快照 虚拟磁盘相关;否则,判定待处理请求程序与待快照虚拟磁盘无关。Specifically, the process of judging whether the request to be processed and the virtual disk to be snapshot are related includes performing data detection on the virtual disk to be snapshot through the IO interface of the virtual disk to be snapshot; if it is detected that there is data exchange between the virtual disk to be snapshot and other devices, It is determined that the pending request program is related to the virtual disk to be snapshotted; otherwise, it is determined that the pending request program is not related to the virtual disk to be snapshotted.
通过为虚拟磁盘添加阻塞协程队列以及阻塞标识的方式能够及时地将与待快照虚拟磁盘相关的待处理请求程序保存起来,能够有效地防止内部快照数据前后不一致的问题。By adding a blocking coroutine queue and blocking identification for the virtual disk, the pending request program related to the virtual disk to be snapshot can be saved in time, which can effectively prevent the problem of inconsistency of internal snapshot data.
进一步地,在内部快照执行完毕后,可以直接将执行指针跳转至阻塞协程队列,依次执行存储在阻塞协程队列内的待处理请求程序,通过这种方式能够防止阻塞协程队列中的待处理请求程序被遗漏。Further, after the execution of the internal snapshot is completed, the execution pointer can be directly jumped to the blocking coroutine queue, and the pending request programs stored in the blocking coroutine queue can be executed in turn. In this way, the blocking of the coroutine queue can be prevented. The pending request procedure was missed.
S140:当内部快照协程执行完毕后,将内部快照数据信息以及快照命令信息保存至快照数据库,并通过监听接口通知用户内部快照任务完成。S140: After the internal snapshot coroutine is executed, the internal snapshot data information and the snapshot command information are saved to the snapshot database, and the user is notified of the completion of the internal snapshot task through the monitoring interface.
通设置快照数据库的方式,能够在由于一些不确定的因素导致虚拟***崩溃或者出现异常时,根据异常虚拟磁盘的异常信息如虚拟磁盘名称、虚拟磁盘的异常发生时间以及内部快照编号等信息对快照数据库进行查询,获取与该异常信息对应的内部快照信息,通过该内部快照信息可以实现对该虚拟磁盘进行数据恢复。By setting up the snapshot database, when the virtual system crashes or is abnormal due to some uncertain factors, the snapshot can be adjusted according to the abnormal information of the abnormal virtual disk, such as the virtual disk name, the abnormal occurrence time of the virtual disk, and the internal snapshot number. The database is inquired to obtain the internal snapshot information corresponding to the abnormal information, and the data recovery of the virtual disk can be realized through the internal snapshot information.
上述实施例提出的虚拟机内部快照异步创建方法,具备以下优点:The method for asynchronously creating an internal snapshot of a virtual machine proposed in the foregoing embodiment has the following advantages:
1:通过将内部快照程序设置到协程中,实现执行指针在内部快照协程于主线程的主循环之间实现来回跳转,从而有效地解决了执行指针长时间忙等的问题。1: By setting the internal snapshot program into the coroutine, the execution pointer can jump back and forth between the internal snapshot coroutine and the main loop of the main thread, thereby effectively solving the problem of the execution pointer being busy for a long time.
2:通过参数合法性检验的方式能够确保快照命令信息的准确性,避免完成的内部快照数据出现混乱,保证完成的内部快照数据的有效性,。2: The validity of the parameters can be checked to ensure the accuracy of the snapshot command information, avoid confusion in the completed internal snapshot data, and ensure the validity of the completed internal snapshot data.
3:通过添加阻塞协程队列以及阻塞标识的方式,及时地将与待快照虚拟磁盘相关的待处理请求程序保存起来,有效地防止内部快照数据前后不一致的问题。3: By adding the blocking coroutine queue and blocking identification, the pending request programs related to the virtual disk to be snapshot are saved in a timely manner, effectively preventing the inconsistency of internal snapshot data.
应理解,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。It should be understood that the size of the sequence number of each step in the foregoing embodiment does not mean the order of execution. The execution sequence of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application.
实施例2Example 2
与上述方法相对应,本申请还提供一种在虚拟机内部快照异步创建***,图3示出了根据本申请实施例的在虚拟机内部快照异步创建***内部逻辑结构。Corresponding to the above method, the present application also provides a system for creating an asynchronous snapshot inside a virtual machine. FIG. 3 shows the internal logical structure of the system for creating an asynchronous snapshot inside a virtual machine according to an embodiment of the present application.
如图3所示,本申请提供一种虚拟机内部快照异步创建***,包括:快照命令信息获取单元,用于通过监听接口获取用户的快照命令信息,其中,快照命令信息包括待快照虚拟磁盘名称以及内部快照编号;As shown in Figure 3, the present application provides an asynchronous creation system for an internal snapshot of a virtual machine, including: a snapshot command information acquisition unit for acquiring user snapshot command information through a monitoring interface, where the snapshot command information includes the name of the virtual disk to be snapshot And the internal snapshot number;
参数合法性检验单元,用于根据待快照虚拟磁盘名称以及内部快照编号对快照命令信息进行参数合法性检验,若快照命令信息通过参数合法性检验,则根据快照命令信息创建内部快照协程;The parameter legality checking unit is used to check the parameter legality of the snapshot command information according to the name of the virtual disk to be snapshot and the internal snapshot number. If the snapshot command information passes the parameter legality check, create an internal snapshot coroutine based on the snapshot command information;
协程执行单元,用于对待快照虚拟磁盘进行内部快照,并获取虚拟磁盘的内部快照数据信息;The coroutine execution unit is used to take internal snapshots of the virtual disk to be snapshot and obtain the internal snapshot data information of the virtual disk;
数据保存单元,用于当内部快照协程执行完毕后,将内部快照数据信息以及快照命令信息保存至快照数据库,并通过监听接口通知用户内部快照任务完成。The data saving unit is used to save the internal snapshot data information and the snapshot command information to the snapshot database after the internal snapshot coroutine is executed, and notify the user of the completion of the internal snapshot task through the monitoring interface.
优选地,参数合法性检验单元进一步包括:Preferably, the parameter legality checking unit further includes:
待快照虚拟磁盘查询单元,用于查询与待快照虚拟磁盘名称对应的待快照虚拟磁盘是否存在,并查询与内部快照编号对应的内部快照协程是否已经存在;The virtual disk query unit to be snapshot is used to query whether the virtual disk to be snapshot corresponding to the name of the virtual disk to be snapshot exists, and to query whether the internal snapshot coroutine corresponding to the internal snapshot number already exists;
支持判断单元,用于在待快照虚拟磁盘名称对应的待快照虚拟磁盘存在,且与内部快照编号对应的内部快照协程不存在时,则进一步判断待快照虚拟磁盘当前是否支持创建内部快照;A support judging unit for determining whether the virtual disk to be snapshot corresponding to the name of the virtual disk to be snapshot exists, and the internal snapshot coroutine corresponding to the internal snapshot number does not exist, to further determine whether the virtual disk to be snapshot currently supports the creation of internal snapshots;
若支持判断单元判断待快照虚拟磁盘当前支持创建内部快照,则判定快照命令信息通过参数合法性检验。If the support judgment unit judges that the virtual disk to be snapshot currently supports the creation of an internal snapshot, it judges that the snapshot command information passes the parameter validity check.
优选地,参数合法性检验单元还包括:快照命令信息备忘单元,用于当待快照虚拟磁盘当前不支持创建内部快照时,将快照命令信息保存至备忘快照信息库;Preferably, the parameter validity checking unit further includes: a snapshot command information memo unit, which is used to save the snapshot command information to the memo snapshot information database when the virtual disk to be snapshot does not currently support the creation of internal snapshots;
间隔预设时间后,再次通过支持判断单元判断待快照虚拟磁盘当前是否支持创建内部快照,若支持判断单元判断待快照虚拟磁盘当前支持创建内部快照,则判定快照命令信息通过参数合法性检验;After a preset time interval, the support judgment unit judges whether the virtual disk to be snapshot currently supports the creation of internal snapshots. If the support judgment unit judges that the virtual disk to be snapshot currently supports the creation of internal snapshots, it is judged that the snapshot command information passes the parameter validity check;
若支持判断单元判断待快照虚拟磁盘当前不支持创建内部快照,则再次通过快照命令信息备忘单元将快照命令信息继续保存至备忘快照信息库,间隔预设时间后再次判断,直至待快照虚拟磁盘当前支持创建内部快照。If the support judgment unit judges that the virtual disk to be snapshot does not currently support the creation of internal snapshots, the snapshot command information memo unit will continue to save the snapshot command information to the memo snapshot information base through the snapshot command information memo unit, and judge again after the preset time interval until the virtual disk to be snapshot virtualized The disk currently supports the creation of internal snapshots.
优选地,协程执行单元包括:Preferably, the coroutine execution unit includes:
元数据读取单元,用于读写待快照虚拟磁盘内的所有元数据;The metadata reading unit is used to read and write all metadata in the virtual disk to be snapshotted;
元数据解析单元,用于对元数据进行解析,以获取承载待快照虚拟磁盘的承载设备;The metadata parsing unit is used to analyze the metadata to obtain the bearing device that carries the virtual disk to be snapshotted;
内部快照数据信息读取单元,用于触发IO处理模块开始对承载设备内的内部快照数据信息进行读写;The internal snapshot data information reading unit is used to trigger the IO processing module to start reading and writing the internal snapshot data information in the bearer device;
执行指针跳转单元,用于在IO处理模块对内部快照数据信息进行读写的过程中,内部快照协程的执行指针跳转至主循环以继续执行待处理请求程序;The execution pointer jump unit is used to jump the execution pointer of the internal snapshot coroutine to the main loop to continue the execution of the pending request program when the IO processing module reads and writes the internal snapshot data information;
执行指针跳回单元,用于当IO处理模块对内部快照数据信息读写完毕后,执行指针从主循环跳转至内部快照协程内,继续执行内部快照协程以完成对虚拟磁盘的后续内部快照操作。The execution pointer jumps back to the unit for when the IO processing module reads and writes the internal snapshot data information, the execution pointer jumps from the main loop to the internal snapshot coroutine, and continues to execute the internal snapshot coroutine to complete the subsequent internal of the virtual disk Snapshot operation.
此外,虚拟机内部快照异步创建***还包括初始化单元,用于在执行内部快照协程之前,为虚拟磁盘添加阻塞协程队列以及阻塞标识,其中,阻塞标识初始化为false,在执行内部快照协程时阻塞标识转换为true,在内部快照协程执行完毕后阻塞标识转换为false;In addition, the virtual machine internal snapshot asynchronous creation system also includes an initialization unit, which is used to add a blocking coroutine queue and a blocking flag to the virtual disk before executing the internal snapshot coroutine, where the blocking flag is initialized to false and the internal snapshot coroutine is executed. When the blocking flag is converted to true, the blocking flag is converted to false after the execution of the internal snapshot coroutine;
相关性判断单元,用于在执行指针执行主循环内的待处理请求程序时,判断待处理请求程序与待快照虚拟磁盘是否相关;The correlation judging unit is used for judging whether the to-be-processed request program is related to the virtual disk to be snapshot when the execution pointer executes the to-be-processed request program in the main loop;
阻塞协程队列保存单元,用于在相关性判断单元判定待处理请求程序与待快照虚拟磁盘相关时,将待处理程序保存至阻塞协程队列;The blocking coroutine queue saving unit is used to save the pending program to the blocking coroutine queue when the correlation determining unit determines that the request program to be processed is related to the virtual disk to be snapshot;
将待处理程序保存至阻塞协程队列后,继续通过相关性判断单元判断待处理请求程序与待快照虚拟磁盘是否相关。After the program to be processed is saved in the blocking coroutine queue, the correlation determination unit continues to determine whether the request program to be processed is related to the virtual disk to be snapshot.
具体地,相关性判断单元包括;Specifically, the relevance judgment unit includes;
数据检测单元,用于通过待快照虚拟磁盘的IO接口对待快照虚拟磁盘进行数据检测;The data detection unit is used to perform data detection on the virtual disk to be snapshot through the IO interface of the virtual disk to be snapshot;
若检测到待快照虚拟磁盘与其他设备之间存在数据交换,则判定待处理请求程序与待快照虚拟磁盘相关;If it is detected that there is data exchange between the virtual disk to be snapshotted and other devices, it is determined that the pending request program is related to the virtual disk to be snapshotted;
否则,判定待处理请求程序与待快照虚拟磁盘无关。Otherwise, it is determined that the pending request program has nothing to do with the virtual disk to be snapshotted.
另外,虚拟机内部快照异步创建***还包括阻塞协程处理单元,用于在内部快照执行完毕后,将执行指针跳转至阻塞协程队列,依次执行存储在阻塞协程队列内的待处理请求程序。In addition, the virtual machine internal snapshot asynchronous creation system also includes a blocking coroutine processing unit, which is used to jump the execution pointer to the blocking coroutine queue after the internal snapshot is executed, and sequentially execute the pending requests stored in the blocking coroutine queue program.
此外,虚拟机内部快照异步创建***,还可以包括内部快照信息应用单 元,用于在将内部快照数据信息以及快照命令信息保存至快照数据库后,若虚拟***的虚拟磁盘出现异常,则根据异常虚拟磁盘的异常信息对快照数据库进行查询,并获取与异常信息对应的内部快照信息;最后通过内部快照信息对异常虚拟磁盘进行数据恢复;其中,异常信息包括异常虚拟磁盘名称以及与异常虚拟磁盘名称对应的内部快照编号。In addition, the virtual machine internal snapshot asynchronous creation system can also include an internal snapshot information application unit for saving internal snapshot data information and snapshot command information to the snapshot database. If the virtual disk of the virtual system is abnormal, the virtual disk will be virtualized according to the abnormality. Query the snapshot database for the abnormal information of the disk, and obtain the internal snapshot information corresponding to the abnormal information; finally, restore the abnormal virtual disk through the internal snapshot information; the abnormal information includes the abnormal virtual disk name and the corresponding abnormal virtual disk name The number of the internal snapshot.
本申请实施例提供的虚拟机内部快照异步创建******,快照命令信息获取单元通过参数合法性检验单元、协程执行单元、数据保存单元等单元之间的配合能够虚拟磁盘内部快照的异步创建,从而实现在创建虚拟磁盘内部快照过程的忙等阶段的同时对虚拟机的IO请求事件或者用户带外操作的执行。In the system for asynchronous creation of virtual machine internal snapshots provided by the embodiments of the present application, the snapshot command information acquisition unit can asynchronously create virtual disk internal snapshots through the cooperation of the parameter validity checking unit, the coroutine execution unit, and the data storage unit. In this way, the execution of the IO request event of the virtual machine or the user out-of-band operation is realized while the process of creating the internal snapshot of the virtual disk is busy.
实施例3Example 3
图4是本申请一实施例提供的电子装置逻辑结构的示意图。如图4所示,在本实施例中,电子装置70可以是服务器、智能手机、平板电脑、便携计算机、桌上型计算机等具有运算功能的终端设备。FIG. 4 is a schematic diagram of the logical structure of an electronic device provided by an embodiment of the present application. As shown in FIG. 4, in this embodiment, the electronic device 70 may be a terminal device with arithmetic function, such as a server, a smart phone, a tablet computer, a portable computer, a desktop computer, and the like.
该电子装置70包括:处理器71以及存储器72。The electronic device 70 includes a processor 71 and a memory 72.
存储器72包括至少一种类型的可读存储介质。至少一种类型的可读存储介质可为如闪存、硬盘、多媒体卡、卡型存储器等的非易失性存储介质。在一些实施例中,可读存储介质可以是该电子装置70的内部存储单元,例如该电子装置70的硬盘。在另一些实施例中,可读存储介质也可以是电子装置1的外部存储器,例如电子装置70上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。The memory 72 includes at least one type of readable storage medium. The at least one type of readable storage medium may be a non-volatile storage medium such as flash memory, hard disk, multimedia card, card-type memory, and the like. In some embodiments, the readable storage medium may be an internal storage unit of the electronic device 70, such as a hard disk of the electronic device 70. In other embodiments, the readable storage medium may also be an external memory of the electronic device 1, such as a plug-in hard disk equipped on the electronic device 70, a smart memory card (Smart Media Card, SMC), and a secure digital (Secure Digital, SD) card, flash card (Flash Card), etc.
在本实施例中,存储器72的可读存储介质通常用于存储安装于电子装置70的虚拟机异步创建内部快照程序73。存储器72还可以用于暂时地存储已经输出或者将要输出的数据。In this embodiment, the readable storage medium of the memory 72 is generally used to store the virtual machine installed in the electronic device 70 to asynchronously create the internal snapshot program 73. The memory 72 can also be used to temporarily store data that has been output or will be output.
处理器72在一些实施例中可以是一中央处理器(Central Processing Unit,CPU),微处理器或其他数据处理芯片,用于运行存储器72中存储的程序代码或处理数据,例如虚拟机异步创建内部快照程序73等。The processor 72 may be a central processing unit (CPU), microprocessor or other data processing chip in some embodiments, and is used to run program codes or process data stored in the memory 72, for example, a virtual machine is created asynchronously Internal snapshot program 73 etc.
在一些实施例中,电子装置70为智能手机、平板电脑、便携计算机等的终端设备。在其他实施例中,电子装置70可以为服务器。In some embodiments, the electronic device 70 is a terminal device such as a smart phone, a tablet computer, and a portable computer. In other embodiments, the electronic device 70 may be a server.
图4仅示出了具有组件71-73的电子装置70,但是应理解的是,并不要求实施所有示出的组件,可以替代的实施更多或者更少的组件。FIG. 4 only shows the electronic device 70 with the components 71-73, but it should be understood that it is not required to implement all the illustrated components, and more or fewer components may be implemented instead.
可选地,该电子装置70还可以包括用户接口,用户接口可以包括输入单元比如键盘(Keyboard)、语音输入装置比如麦克风(microphone)等具有语音识别功能的设备、语音输出装置比如音响、耳机等,可选地用户接口还可以包括标准的有线接口、无线接口。Optionally, the electronic device 70 may also include a user interface. The user interface may include an input unit such as a keyboard (Keyboard), a voice input device such as a microphone (microphone) and other devices with voice recognition functions, and a voice output device such as audio, earphones, etc. Optionally, the user interface may also include a standard wired interface and a wireless interface.
可选地,该电子装置70还可以包括显示器,显示器也可以称为显示屏或显示单元。在一些实施例中可以是LED显示器、液晶显示器、触控式液晶显示器以及有机发光二极管(Organic Light-Emitting Diode,OLED)触摸器等。显示器用于显示在电子装置70中处理的信息以及用于显示可视化的用户界面。Optionally, the electronic device 70 may also include a display, and the display may also be referred to as a display screen or a display unit. In some embodiments, it may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an organic light-emitting diode (Organic Light-Emitting Diode, OLED) touch device, etc. The display is used for displaying information processed in the electronic device 70 and for displaying a visualized user interface.
可选地,该电子装置70还可以包括触摸传感器。触摸传感器所提供的供用户进行触摸操作的区域称为触控区域。此外,这里的触摸传感器可以为电阻式触摸传感器、电容式触摸传感器等。而且,触摸传感器不仅包括接触式的触摸传感器,也可包括接近式的触摸传感器等。此外,触摸传感器可以为单个传感器,也可以为例如阵列布置的多个传感器。Optionally, the electronic device 70 may also include a touch sensor. The area provided by the touch sensor for the user to perform touch operations is called the touch area. In addition, the touch sensor here may be a resistive touch sensor, a capacitive touch sensor, or the like. Moreover, the touch sensor includes not only a contact type touch sensor, but also a proximity type touch sensor and the like. In addition, the touch sensor may be a single sensor, or may be, for example, a plurality of sensors arranged in an array.
此外,该电子装置70的显示器的面积可以与触摸传感器的面积相同,也可以不同。可选地,将显示器与触摸传感器层叠设置,以形成触摸显示屏。该装置基于触摸显示屏侦测用户触发的触控操作。In addition, the area of the display of the electronic device 70 may be the same as or different from the area of the touch sensor. Optionally, the display and the touch sensor are layered to form a touch display screen. The device detects the touch operation triggered by the user based on the touch screen.
可选地,该电子装置70还可以包括射频(Radio Frequency,RF)电路,传感器、音频电路等等,在此不再赘述。Optionally, the electronic device 70 may also include a radio frequency (RF) circuit, a sensor, an audio circuit, etc., which will not be repeated here.
在图4所示的装置实施例中,作为一种计算机存储介质的存储器72中可以包括操作***、以及虚拟机异步创建内部快照程序73;处理器71执行存储器72中存储虚拟机异步创建内部快照程序73时实现上述虚拟机内部快照异步创建方法中的步骤。In the device embodiment shown in FIG. 4, the memory 72 as a computer storage medium may include an operating system and a virtual machine asynchronously creating an internal snapshot program 73; the processor 71 executes the virtual machine stored in the memory 72 to asynchronously create an internal snapshot The program 73 implements the steps in the above-mentioned method for asynchronously creating an internal snapshot of the virtual machine.
实施例4Example 4
本实施例提供一种计算机非易失性可读存储介质,该计算机非易失性可读存储介质上存储有计算机可读存储介质中存储有虚拟机异步创建内部快照程序73,图5为根据本发明实施例的虚拟机异步创建内部快照程序的内部逻辑示意图,如图5所示,虚拟机异步创建内部快照程序73还可以被分割为一个或者多个模块,一个或者多个模块被存储于存储器72中,并由处理器71 执行,以完成本申请。本发明所称的模块是指能够完成特定功能的一系列计算机程序指令段。例如,虚拟机异步创建内部快照程序73可以被分割为:快照命令信息获取模块74、参数合法性检验模块75、协程执行模块76以及数据保存模块77。模块74-77所实现的功能或操作步骤均与上文类似,此处不再详述,示例性地,例如,其中:This embodiment provides a computer non-volatile readable storage medium, the computer non-volatile readable storage medium stores a computer-readable storage medium and a virtual machine asynchronously creates an internal snapshot program 73, as shown in FIG. 5 The internal logic diagram of the virtual machine asynchronously creating internal snapshot program according to the embodiment of the present invention. As shown in FIG. 5, the virtual machine asynchronously creating internal snapshot program 73 can also be divided into one or more modules, and one or more modules are stored in It is stored in the memory 72 and executed by the processor 71 to complete the application. The module referred to in the present invention refers to a series of computer program instruction segments capable of completing specific functions. For example, the virtual machine asynchronous creation of the internal snapshot program 73 can be divided into: a snapshot command information acquisition module 74, a parameter validity verification module 75, a coroutine execution module 76, and a data storage module 77. The functions or operation steps implemented by modules 74-77 are similar to the above, and will not be described in detail here. Illustratively, for example, where:
快照命令信息获取模块74,用于通过监听接口获取用户的快照命令信息,其中,快照命令信息包括待快照虚拟磁盘名称以及内部快照编号。The snapshot command information obtaining module 74 is configured to obtain the user's snapshot command information through the monitoring interface, where the snapshot command information includes the name of the virtual disk to be snapshot and the internal snapshot number.
参数合法性检验模块75,用于根据待快照虚拟磁盘名称以及内部快照编号对快照命令信息进行参数合法性检验,若快照命令信息通过参数合法性检验,则根据快照命令信息创建内部快照协程。The parameter validity check module 75 is used to check the parameter validity of the snapshot command information according to the name of the virtual disk to be snapshot and the internal snapshot number. If the snapshot command information passes the parameter validity check, create an internal snapshot coroutine based on the snapshot command information.
协程执行模块76,用于对待快照虚拟磁盘进行内部快照,并获取虚拟磁盘的内部快照数据信息。The coroutine execution module 76 is used to take an internal snapshot of the virtual disk to be snapshot and obtain the internal snapshot data information of the virtual disk.
数据保存模块77,用于当内部快照协程执行完毕后,将内部快照数据信息以及快照命令信息保存至快照数据库,并通过监听接口通知用户内部快照任务完成。The data saving module 77 is used to save the internal snapshot data information and the snapshot command information to the snapshot database after the internal snapshot coroutine is executed, and notify the user of the completion of the internal snapshot task through the monitoring interface.
本发明提供的计算机可读存储介质的具体实施方式与上述虚拟机异步创建内部快照方法、***、电子装置的具体实施方式大致相同,在此不再赘述。The specific implementation manner of the computer-readable storage medium provided by the present invention is substantially the same as the specific implementation manner of the method, system, and electronic device for asynchronously creating an internal snapshot of a virtual machine, and will not be repeated here.
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,仅以上述各功能单元、模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能单元、模块完成,即将装置的内部结构划分成不同的功能单元或模块,以完成以上描述的全部或者部分功能。实施例中的各功能单元、模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中,上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。另外,各功能单元、模块的具体名称也只是为了便于相互区分,并不用于限制本申请的保护范围。上述***中单元、模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and conciseness of description, only the division of the above functional units and modules is used as an example. In practical applications, the above functions can be allocated to different functional units and modules as needed. Module completion, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist alone physically, or two or more units can be integrated into one unit. The above-mentioned integrated units can be hardware-based Formal realization can also be realized in the form of software functional units. In addition, the specific names of the functional units and modules are only used to facilitate distinguishing each other, and are not used to limit the protection scope of the present application. For the specific working process of the units and modules in the foregoing system, reference may be made to the corresponding process in the foregoing method embodiment, which will not be repeated here.
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述或记载的部分,可以参见其它实施例的相关描述。In the above-mentioned embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail or recorded in an embodiment, reference may be made to related descriptions of other embodiments.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各 示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的范围。A person of ordinary skill in the art may be aware that the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be implemented by electronic hardware or a combination of computer software and electronic hardware. Whether these functions are performed by hardware or software depends on the specific application and design constraint conditions of the technical solution. Professionals and technicians can use different methods for each specific application to implement the described functions, but such implementation should not be considered beyond the scope of this application.
在本申请所提供的实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个***,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通讯连接可以是通过一些接口,装置或单元的间接耦合或通讯连接,可以是电性,机械或其它的形式。In the embodiments provided in this application, it should be understood that the disclosed device and method may be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods, for example, multiple units or components may be combined or It can be integrated into another system, or some features can be ignored or not implemented. In addition, the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, the functional units in the various embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or software functional unit.
集成的模块/单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请实现上述实施例方法中的全部或部分流程,也可以通过计算机程序来指令相关的硬件来完成,的计算机程序可存储于一计算机非易失性可读存储介质中,该计算机程序在被处理器执行时,可实现上述各个方法实施例的步骤。其中,计算机程序包括计算机程序代码,计算机程序代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。计算机可读介质可以包括:能够携带计算机程序代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、电载波信号、电信信号以及软件分发介质等。需要说明的是,计算机可读介质包含的内容可以根据司法管 辖区内立法和专利实践的要求进行适当的增减,例如在某些司法管辖区,根据立法和专利实践,计算机可读介质不包括是电载波信号和电信信号。If the integrated module/unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium. Based on this understanding, this application implements all or part of the processes in the above-mentioned embodiments and methods, and can also be completed by instructing relevant hardware through a computer program. The computer program can be stored in a computer non-volatile readable storage medium. When the computer program is executed by the processor, it can implement the steps of the foregoing method embodiments. Wherein, the computer program includes computer program code, and the computer program code may be in the form of source code, object code, executable file, or some intermediate forms. The computer-readable medium may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access Memory (RAM, Random Access Memory), electric carrier signal, telecommunications signal, software distribution medium, etc. It should be noted that the content contained in computer-readable media can be appropriately added or deleted in accordance with the requirements of the legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to the legislation and patent practice, computer-readable media does not include It is electric carrier signal and telecommunication signal.
以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围,均应包含在本申请的保护范围之内。The above embodiments are only used to illustrate the technical solutions of the present application, not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still compare the previous embodiments. The recorded technical solutions are modified, or some of the technical features are equivalently replaced; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the application, and shall be included in the application Within the scope of protection.

Claims (20)

  1. 一种虚拟机内部快照异步创建方法,应用于电子装置,其特征在于,包括:A method for asynchronously creating an internal snapshot of a virtual machine, applied to an electronic device, characterized in that it includes:
    通过监听接口获取用户的快照命令信息,其中,所述快照命令信息包括待快照虚拟磁盘名称以及内部快照编号;Obtain the user's snapshot command information through the monitoring interface, where the snapshot command information includes the name of the virtual disk to be snapshot and the internal snapshot number;
    根据所述待快照虚拟磁盘名称以及内部快照编号对所述快照命令信息进行参数合法性检验,若所述快照命令信息通过所述参数合法性检验,则根据所述快照命令信息创建内部快照协程;Perform a parameter validity check on the snapshot command information according to the name of the virtual disk to be snapshot and the internal snapshot number. If the snapshot command information passes the parameter validity check, an internal snapshot coroutine is created according to the snapshot command information ;
    执行所述内部快照协程,对所述待快照虚拟磁盘进行内部快照,并获取所述虚拟磁盘的内部快照数据信息;Execute the internal snapshot coroutine, take an internal snapshot of the virtual disk to be snapshot, and obtain internal snapshot data information of the virtual disk;
    当所述内部快照协程执行完毕后,将所述内部快照数据信息以及所述快照命令信息保存至快照数据库,并通过所述监听接口通知用户内部快照任务完成。After the internal snapshot coroutine is executed, the internal snapshot data information and the snapshot command information are saved in the snapshot database, and the user is notified of the completion of the internal snapshot task through the monitoring interface.
  2. 根据权利要求1所述的虚拟机内部快照异步创建方法,其特征在于,对所述快照命令信息进行参数合法性检验的过程包括:The method for asynchronously creating an internal snapshot of a virtual machine according to claim 1, wherein the process of verifying the validity of the parameters of the snapshot command information comprises:
    查询与所述待快照虚拟磁盘名称对应的待快照虚拟磁盘是否存在,并查询与所述内部快照编号对应的内部快照协程是否已经存在;Query whether the virtual disk to be snapshot corresponding to the name of the virtual disk to be snapshot exists, and query whether the internal snapshot coroutine corresponding to the internal snapshot number already exists;
    若与所述待快照虚拟磁盘名称对应的待快照虚拟磁盘存在,且与所述内部快照编号对应的内部快照协程不存在,则进一步判断所述待快照虚拟磁盘当前是否支持创建内部快照;If the virtual disk to be snapshot corresponding to the name of the virtual disk to be snapshot exists, and the internal snapshot coroutine corresponding to the internal snapshot number does not exist, further determining whether the virtual disk to be snapshot currently supports the creation of internal snapshots;
    若所述待快照虚拟磁盘当前支持创建内部快照,则判定所述快照命令信息通过所述参数合法性检验。If the virtual disk to be snapshot currently supports the creation of internal snapshots, it is determined that the snapshot command information passes the parameter validity check.
  3. 根据权利要求2所述的虚拟机内部快照异步创建方法,其特征在于,The method for asynchronously creating an internal snapshot of a virtual machine according to claim 2, wherein:
    查询与所述待快照虚拟磁盘名称对应的待快照虚拟磁盘是否存在,并查询与所述内部快照编号对应的内部快照协程是否已经存在;Query whether the virtual disk to be snapshot corresponding to the name of the virtual disk to be snapshot exists, and query whether the internal snapshot coroutine corresponding to the internal snapshot number already exists;
    若与所述待快照虚拟磁盘名称对应的待快照虚拟磁盘存在,且与所述内部快照编号对应的内部快照协程也存在,或者若与所述待快照虚拟磁盘名称对应的待快照虚拟磁盘不存在;If the virtual disk to be snapshot corresponding to the name of the virtual disk to be snapshot exists, and the internal snapshot coroutine corresponding to the internal snapshot number also exists, or if the virtual disk to be snapshot corresponding to the name of the virtual disk to be snapshot does not exist exist;
    则通过监听接口向用户退回待快照命令信息。Then, the command information to be snapshot is returned to the user through the monitoring interface.
  4. 根据权利要求2所述的虚拟机内部快照异步创建方法,其特征在于,The method for asynchronously creating an internal snapshot of a virtual machine according to claim 2, wherein:
    若所述待快照虚拟磁盘当前不支持创建内部快照,则将所述快照命令信息保存至备忘快照信息库;且,If the virtual disk to be snapshot does not currently support the creation of internal snapshots, save the snapshot command information to the memo snapshot information database; and,
    间隔预设时间后,再次判断所述待快照虚拟磁盘当前是否支持创建内部快照,若所述待快照虚拟磁盘当前支持创建内部快照,则根据所述快照命令信息创建内部快照协程;After an interval of a preset time, determine again whether the virtual disk to be snapshot currently supports the creation of internal snapshots, and if the virtual disk to be snapshot currently supports the creation of internal snapshots, create an internal snapshot coroutine according to the snapshot command information;
    若所述待快照虚拟磁盘当前不支持创建内部快照,则再次将所述快照命令信息继续保存至所述备忘快照信息库,间隔预设时间后再次判断,直至所述待快照虚拟磁盘当前支持创建内部快照。If the virtual disk to be snapshot does not currently support the creation of internal snapshots, the snapshot command information will continue to be saved to the memo snapshot information base again, and judge again after a preset time interval, until the virtual disk to be snapshot currently supports Create an internal snapshot.
  5. 根据权利要求1所述的虚拟机内部快照异步创建方法,其特征在于,执行所述内部快照协程,对所述待快照虚拟磁盘进行内部快照的过程包括:The method for asynchronously creating an internal snapshot of a virtual machine according to claim 1, wherein the process of executing the internal snapshot coroutine to take an internal snapshot of the virtual disk to be snapshot comprises:
    读写所述待快照虚拟磁盘内的所有元数据;Read and write all metadata in the virtual disk to be snapshot;
    对所述元数据进行解析,以获取承载所述待快照虚拟磁盘的承载设备;Parsing the metadata to obtain a bearing device that bears the virtual disk to be snapshot;
    触发IO处理模块开始对所述承载设备内的所述内部快照数据信息进行读写;Trigger the IO processing module to start reading and writing the internal snapshot data information in the bearer device;
    在所述IO处理模块对所述内部快照数据信息进行读写的过程中,所述内部快照协程的执行指针跳转至主循环以继续执行待处理请求程序;When the IO processing module reads and writes the internal snapshot data information, the execution pointer of the internal snapshot coroutine jumps to the main loop to continue executing the pending request program;
    当所述IO处理模块对所述内部快照数据信息读写完毕后,所述执行指针从所述主循环跳转至所述内部快照协程内,继续执行所述内部快照协程以完成对所述虚拟磁盘的后续内部快照操作。When the IO processing module finishes reading and writing the internal snapshot data information, the execution pointer jumps from the main loop to the internal snapshot coroutine, and continues to execute the internal snapshot coroutine to complete the The subsequent internal snapshot operations of the virtual disk are described.
  6. 根据权利要求5所述的虚拟机内部快照异步创建方法,其特征在于,为所述虚拟磁盘添加阻塞协程队列以及阻塞标识,其中,所述阻塞标识初始化为false,在执行所述内部快照协程时所述阻塞标识转换为true,在所述内部快照协程执行完毕后所述阻塞标识转换为false;The method for asynchronously creating an internal snapshot of a virtual machine according to claim 5, wherein a blocking coroutine queue and a blocking flag are added to the virtual disk, wherein the blocking flag is initialized to false, and the internal snapshot protocol is executed. The blocking flag is converted to true during the process, and the blocking flag is converted to false after the execution of the internal snapshot coroutine is completed;
    在所述执行指针执行所述主循环内的待处理请求程序时,先判断所述待处理请求程序与所述待快照虚拟磁盘是否相关;When the execution pointer executes the request program to be processed in the main loop, first determine whether the request program to be processed is related to the virtual disk to be snapshot;
    若所述待处理请求程序与所述待快照虚拟磁盘相关,则将所述待处理程序保存至阻塞协程队列,并继续判断下一个待处理请求程序与所述待快照虚拟磁盘是否相关;If the request program to be processed is related to the virtual disk to be snapshot, save the program to be processed in the blocking coroutine queue, and continue to determine whether the next request program to be processed is related to the virtual disk to be snapshot;
    若所述待处理请求程序与所述待快照虚拟磁盘无关,则直接执行所述待 处理请求程序。If the pending request program is not related to the to-be-snapshot virtual disk, the pending request program is directly executed.
  7. 根据权利要求6所述的虚拟机内部快照异步创建方法,其特征在于,判断所述待处理请求程序与所述待快照虚拟磁盘是否相关过程包括:The method for asynchronously creating an internal snapshot of a virtual machine according to claim 6, wherein the process of determining whether the request to be processed and the virtual disk to be snapshot are related comprises:
    通过所述待快照虚拟磁盘的IO接口对所述待快照虚拟磁盘进行数据检测;Performing data detection on the virtual disk to be snapshotted through the IO interface of the virtual disk to be snapshotted;
    若检测到所述待快照虚拟磁盘与其他设备之间存在数据交换,则判定所述待处理请求程序与所述待快照虚拟磁盘相关;If it is detected that there is data exchange between the virtual disk to be snapshot and other devices, it is determined that the request program to be processed is related to the virtual disk to be snapshot;
    否则,判定所述待处理请求程序与所述待快照虚拟磁盘无关。Otherwise, it is determined that the pending request program has nothing to do with the virtual disk to be snapshotted.
  8. 根据权利要求7所述的虚拟机内部快照异步创建方法,其特征在于,在所述内部快照执行完毕后,The method for asynchronously creating an internal snapshot of a virtual machine according to claim 7, wherein after the internal snapshot is executed,
    所述执行指针跳转至所述阻塞协程队列,依次执行存储在所述阻塞协程队列内的待处理请求程序。The execution pointer jumps to the blocking coroutine queue, and sequentially executes the pending request programs stored in the blocking coroutine queue.
  9. 根据权利要求1所述的虚拟机内部快照异步创建方法,其特征在于,通过所述监听接口获取用户的快照命令信息的过程包括:The method for asynchronously creating an internal snapshot of a virtual machine according to claim 1, wherein the process of obtaining user snapshot command information through the monitoring interface comprises:
    通过虚拟机的主线程的主循环持续循环监听虚拟***发来所述监听接口中的事件;The main loop of the main thread of the virtual machine continuously monitors the events sent by the virtual system from the monitoring interface;
    若监听到的所述监听接口中的事件为创建虚拟磁盘内部快照事件,则通过所述监听接口直接获取与所述创建虚拟磁盘内部快照事件对应的快照命令信息。If the monitored event in the monitoring interface is a virtual disk internal snapshot creation event, the snapshot command information corresponding to the virtual disk internal snapshot creation event is directly obtained through the monitoring interface.
  10. 根据权利要求1所述的虚拟机内部快照异步创建方法,其特征在于,在将所述内部快照数据信息以及快照命令信息保存至快照数据库后,The method for asynchronously creating an internal snapshot of a virtual machine according to claim 1, wherein after the internal snapshot data information and the snapshot command information are saved in the snapshot database,
    若虚拟***的虚拟磁盘出现异常,则根据所述异常虚拟磁盘的异常信息对所述快照数据库进行查询,并获取与所述异常信息对应的内部快照信息;If the virtual disk of the virtual system is abnormal, query the snapshot database according to the abnormal information of the abnormal virtual disk, and obtain internal snapshot information corresponding to the abnormal information;
    通过所述内部快照信息对所述异常虚拟磁盘进行数据恢复;Performing data recovery on the abnormal virtual disk through the internal snapshot information;
    其中,所述异常信息包括异常虚拟磁盘名称以及与所述异常虚拟磁盘名称对应的内部快照编号。Wherein, the abnormal information includes the name of the abnormal virtual disk and the internal snapshot number corresponding to the name of the abnormal virtual disk.
  11. 一种电子装置,该电子装置包括:存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时实现如权利要求1至10任一项所述虚拟机内部快照异步创建方法的步骤。An electronic device comprising: a memory, a processor, and a computer program stored in the memory and capable of running on the processor, wherein the processor executes the computer program as follows: The steps of the method for asynchronously creating an internal snapshot of a virtual machine according to any one of claims 1 to 10.
  12. 一种虚拟机内部快照异步创建***,其特征在于,包括:An asynchronous creation system for internal snapshots of a virtual machine, which is characterized in that it includes:
    快照命令信息获取单元,用于通过所述监听接口获取用户的快照命令信息,其中,所述快照命令信息包括待快照虚拟磁盘名称以及内部快照编号;A snapshot command information obtaining unit, configured to obtain user snapshot command information through the monitoring interface, where the snapshot command information includes the name of the virtual disk to be snapshot and the internal snapshot number;
    参数合法性检验单元,用于根据所述待快照虚拟磁盘名称以及所述内部快照编号对所述快照命令信息进行参数合法性检验,若所述快照命令信息通过参数合法性检验,则根据所述快照命令信息创建内部快照协程;The parameter validity checking unit is configured to check the parameter validity of the snapshot command information according to the name of the virtual disk to be snapshot and the internal snapshot number. If the snapshot command information passes the parameter validity check, then according to the Snapshot command information to create an internal snapshot coroutine;
    协程执行单元,用于对所述待快照虚拟磁盘进行内部快照,并获取虚拟磁盘的内部快照数据信息;The coroutine execution unit is used to take an internal snapshot of the virtual disk to be snapshot and obtain the internal snapshot data information of the virtual disk;
    数据保存单元,用于当所述内部快照协程执行完毕后,将所述内部快照数据信息以及所述快照命令信息保存至快照数据库,并通过所述监听接口通知用户内部快照任务完成。The data saving unit is configured to save the internal snapshot data information and the snapshot command information to the snapshot database after the internal snapshot coroutine is executed, and notify the user of the completion of the internal snapshot task through the monitoring interface.
  13. 根据权利要求12所述的虚拟机内部快照异步创建***,其特征在于,所述参数合法性检验单元包括:The system for asynchronously creating an internal snapshot of a virtual machine according to claim 12, wherein the parameter validity checking unit comprises:
    待快照虚拟磁盘查询单元,用于查询与所述待快照虚拟磁盘名称对应的待快照虚拟磁盘是否存在,并查询与所述内部快照编号对应的内部快照协程是否已经存在;The virtual disk to be snapshot query unit is configured to query whether the virtual disk to be snapshot corresponding to the name of the virtual disk to be snapshot exists, and query whether the internal snapshot coroutine corresponding to the internal snapshot number already exists;
    支持判断单元,用于在所述待快照虚拟磁盘名称对应的待快照虚拟磁盘存在,且与所述内部快照编号对应的内部快照协程不存在时,则进一步判断所述待快照虚拟磁盘当前是否支持创建内部快照;A supporting judgment unit for determining whether the virtual disk to be snapshot corresponding to the name of the virtual disk to be snapshot exists, and the internal snapshot coroutine corresponding to the internal snapshot number does not exist, to further determine whether the virtual disk to be snapshot is currently Support to create internal snapshots;
    若所述支持判断单元判断所述待快照虚拟磁盘当前支持创建内部快照,则判定所述快照命令信息通过所述参数合法性检验。If the support determination unit determines that the virtual disk to be snapshot currently supports the creation of internal snapshots, it determines that the snapshot command information passes the parameter validity check.
  14. 根据权利要求13所述的虚拟机内部快照异步创建***,其特征在于,The system for asynchronously creating an internal snapshot of a virtual machine according to claim 13, wherein:
    所述参数合法性检验单元还包括:快照命令信息备忘单元,用于当所述待快照虚拟磁盘当前不支持创建内部快照时,将所述快照命令信息保存至备忘快照信息库;The parameter validity checking unit further includes: a snapshot command information memo unit, which is used to save the snapshot command information to the memo snapshot information database when the virtual disk to be snapshot does not currently support the creation of internal snapshots;
    间隔预设时间后,再次通过所述支持判断单元判断所述待快照虚拟磁盘当前是否支持创建内部快照,若所述支持判断单元判断所述待快照虚拟磁盘当前支持创建内部快照,则判定所述快照命令信息通过所述参数合法性检验;After an interval of a preset time, the support judging unit again judges whether the virtual disk to be snapshot currently supports the creation of internal snapshots, and if the support judging unit judges that the virtual disk to be snapshot currently supports the creation of internal snapshots, then it is judged that The snapshot command information passes the parameter validity check;
    若所述支持判断单元判断所述待快照虚拟磁盘当前不支持创建内部快照,则再次通过快照命令信息备忘单元将所述快照命令信息继续保存至所述备忘快照信息库,间隔预设时间后再次判断,直至所述待快照虚拟磁盘当前支持 创建内部快照。If the support judging unit judges that the virtual disk to be snapshot does not currently support the creation of internal snapshots, the snapshot command information memo unit continues to save the snapshot command information to the memo snapshot information base again at an interval of a preset time Then judge again until the virtual disk to be snapshot currently supports the creation of internal snapshots.
  15. 根据权利要求12所述的虚拟机内部快照异步创建***,其特征在于,所述协程执行单元包括:The system for asynchronously creating an internal snapshot of a virtual machine according to claim 12, wherein the coroutine execution unit comprises:
    元数据读取单元,用于读写所述待快照虚拟磁盘内的所有元数据;A metadata reading unit for reading and writing all metadata in the virtual disk to be snapshot;
    元数据解析单元,用于对所述元数据进行解析,以获取承载所述待快照虚拟磁盘的承载设备;A metadata analysis unit, configured to analyze the metadata to obtain a bearing device that bears the virtual disk to be snapshot;
    内部快照数据信息读取单元,用于触发IO处理模块开始对所述承载设备内的所述内部快照数据信息进行读写;The internal snapshot data information reading unit is configured to trigger the IO processing module to start reading and writing the internal snapshot data information in the carrier device;
    执行指针跳转单元,用于在所述IO处理模块对所述内部快照数据信息进行读写的过程中,所述内部快照协程的执行指针跳转至主循环以继续执行待处理请求程序;The execution pointer jump unit is used to jump the execution pointer of the internal snapshot coroutine to the main loop in the process of the IO processing module reading and writing the internal snapshot data information to continue executing the pending request program;
    执行指针跳回单元,用于当所述IO处理模块对所述内部快照数据信息读写完毕后,所述执行指针从所述主循环跳转至所述内部快照协程内,继续执行所述内部快照协程以完成对所述虚拟磁盘的后续内部快照操作。The execution pointer jump-back unit is used for when the IO processing module finishes reading and writing the internal snapshot data information, the execution pointer jumps from the main loop to the internal snapshot coroutine, and continues to execute the The internal snapshot coroutine is used to complete subsequent internal snapshot operations on the virtual disk.
  16. 根据权利要求15所述的虚拟机内部快照异步创建***,其特征在于,The system for asynchronously creating an internal snapshot of a virtual machine according to claim 15, wherein:
    还包括初始化单元,用于在执行所述内部快照协程之前,为所述虚拟磁盘添加阻塞协程队列以及阻塞标识,其中,所述阻塞标识初始化为false,在执行所述内部快照协程时所述阻塞标识转换为true,在所述内部快照协程执行完毕后所述阻塞标识转换为false;It also includes an initialization unit for adding a blocking coroutine queue and a blocking flag to the virtual disk before executing the internal snapshot coroutine, wherein the blocking flag is initialized to false, and when the internal snapshot coroutine is executed The blocking flag is converted to true, and the blocking flag is converted to false after the execution of the internal snapshot coroutine is completed;
    相关性判断单元,用于在所述执行指针执行所述主循环内的待处理请求程序时,判断所述待处理请求程序与所述待快照虚拟磁盘是否相关;The relevance judgment unit is configured to judge whether the request program to be processed is related to the virtual disk to be snapshot when the execution pointer executes the request program to be processed in the main loop;
    阻塞协程队列保存单元,用于在所述相关性判断单元判定所述待处理请求程序与所述待快照虚拟磁盘相关时,将所述待处理程序保存至阻塞协程队列;A blocking coroutine queue saving unit, configured to save the to-be-processed program in the blocking coroutine queue when the correlation determining unit determines that the request program to be processed is related to the virtual disk to be snapshot;
    将所述待处理程序保存至阻塞协程队列后,继续通过所述相关性判断单元判断所述待处理请求程序与所述待快照虚拟磁盘是否相关。After the program to be processed is saved in the blocking coroutine queue, the correlation determination unit continues to determine whether the request program to be processed is related to the virtual disk to be snapshot.
  17. 根据权利要求16所述的虚拟机内部快照异步创建***,其特征在于,所述相关性判断单元包括;The system for asynchronously creating an internal snapshot of a virtual machine according to claim 16, wherein the correlation determining unit comprises;
    数据检测单元,用于通过所述待快照虚拟磁盘的IO接口对所述待快照虚拟磁盘进行数据检测;A data detection unit, configured to perform data detection on the virtual disk to be snapshot through the IO interface of the virtual disk to be snapshot;
    若检测到所述待快照虚拟磁盘与其他设备之间存在数据交换,则判定所述待处理请求程序与所述待快照虚拟磁盘相关;If it is detected that there is data exchange between the virtual disk to be snapshot and other devices, it is determined that the request program to be processed is related to the virtual disk to be snapshot;
    否则,判定所述待处理请求程序与所述待快照虚拟磁盘无关。Otherwise, it is determined that the pending request program has nothing to do with the virtual disk to be snapshotted.
  18. 根据权利要求17所述的虚拟机内部快照异步创建***,其特征在于,The system for asynchronously creating an internal snapshot of a virtual machine according to claim 17, wherein:
    还包括阻塞协程处理单元,用于在所述内部快照执行完毕后,将所述执行指针跳转至所述阻塞协程队列,依次执行存储在所述阻塞协程队列内的待处理请求程序。It also includes a blocking coroutine processing unit, configured to jump the execution pointer to the blocking coroutine queue after the internal snapshot is executed, and sequentially execute the pending request programs stored in the blocking coroutine queue .
  19. 根据权利要求17所述的虚拟机内部快照异步创建***,其特征在于,The system for asynchronously creating an internal snapshot of a virtual machine according to claim 17, wherein:
    还包括内部快照信息应用单元,用于在将所述内部快照数据信息以及快照命令信息保存至快照数据库后,若虚拟***的虚拟磁盘出现异常,则根据所述异常虚拟磁盘的异常信息对所述快照数据库进行查询,并获取与所述异常信息对应的内部快照信息;最后通过所述内部快照信息对所述异常虚拟磁盘进行数据恢复;其中,所述异常信息包括异常虚拟磁盘名称以及与所述异常虚拟磁盘名称对应的内部快照编号。It also includes an internal snapshot information application unit, which is configured to: after saving the internal snapshot data information and the snapshot command information to the snapshot database, if the virtual disk of the virtual system is abnormal, then the abnormal virtual disk will be processed according to the abnormality information of the abnormal virtual disk. Query the snapshot database, and obtain the internal snapshot information corresponding to the abnormal information; finally data recovery is performed on the abnormal virtual disk through the internal snapshot information; wherein the abnormal information includes the name of the abnormal virtual disk and the information related to the abnormal virtual disk. The internal snapshot number corresponding to the abnormal virtual disk name.
  20. 一种计算机非易失性可读存储介质,其特征在于,所述计算机非易失性可读存储介质中包括计算机程序,所述计算机程序被处理器执行时,实现如权利要求1至10中任一项所述的虚拟机内部快照异步创建方法的步骤。A computer non-volatile readable storage medium, wherein the computer non-volatile readable storage medium includes a computer program, and when the computer program is executed by a processor, the implementation is as in claims 1 to 10 Any of the steps of the method for asynchronously creating an internal snapshot of a virtual machine.
PCT/CN2019/118504 2019-10-15 2019-11-14 Method for asynchronously creating internal snapshot of virtual machine, apparatus, system and storage medium WO2021072880A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910978193.0A CN110879742B (en) 2019-10-15 2019-10-15 Method, device and storage medium for asynchronously creating internal snapshot by virtual machine
CN201910978193.0 2019-10-15

Publications (1)

Publication Number Publication Date
WO2021072880A1 true WO2021072880A1 (en) 2021-04-22

Family

ID=69727960

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/118504 WO2021072880A1 (en) 2019-10-15 2019-11-14 Method for asynchronously creating internal snapshot of virtual machine, apparatus, system and storage medium

Country Status (2)

Country Link
CN (1) CN110879742B (en)
WO (1) WO2021072880A1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114090489A (en) * 2021-11-15 2022-02-25 深圳云豹智能有限公司 IO expansion method and device based on virtio
CN114500238A (en) * 2022-01-25 2022-05-13 杭州云备姆科技有限公司 Automatic switching system and method for block-level disaster recovery, electronic device and medium
CN114584500A (en) * 2022-02-25 2022-06-03 网易(杭州)网络有限公司 Asynchronous communication testing method and device and electronic equipment
CN114760312A (en) * 2022-04-27 2022-07-15 泽拓科技(深圳)有限责任公司 Distributed task coordination method, device, equipment and medium
CN117130980A (en) * 2023-10-24 2023-11-28 杭州优云科技有限公司 Virtual machine snapshot management method and device

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113434461A (en) * 2020-03-23 2021-09-24 顺丰科技有限公司 Snapshot creating method and device and snapshot restoring method and device
CN112698913A (en) * 2020-12-29 2021-04-23 ***股份有限公司 Virtual machine snapshot generation method and device, electronic equipment and medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104142858A (en) * 2013-11-29 2014-11-12 腾讯科技(深圳)有限公司 Blocked task scheduling method and device
CN104572248A (en) * 2014-12-17 2015-04-29 中电科华云信息技术有限公司 Method for virtual machine to dynamically save snapshots
US20150378870A1 (en) * 2014-06-30 2015-12-31 Microsoft Corporation Time travel debugging in managed runtime
CN106919471A (en) * 2015-12-25 2017-07-04 中国电信股份有限公司 For the method and system that snapshot is set up
CN107992344A (en) * 2016-10-25 2018-05-04 腾讯科技(深圳)有限公司 One kind association's journey implementation method and device

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9009106B1 (en) * 2011-08-10 2015-04-14 Nutanix, Inc. Method and system for implementing writable snapshots in a virtualized storage environment
US9665386B2 (en) * 2013-06-14 2017-05-30 Nutanix, Inc. Method for leveraging hypervisor functionality for maintaining application consistent snapshots in a virtualization environment
CN105068856A (en) * 2015-07-16 2015-11-18 武汉噢易云计算有限公司 Mirror image snapshooting based on virtual machine backup system and backup method
US20170068469A1 (en) * 2015-09-03 2017-03-09 Microsoft Technology Licensing, Llc Remote Shared Virtual Disk Snapshot Creation
CN105335253B (en) * 2015-10-28 2019-01-15 北京百度网讯科技有限公司 The method and apparatus for creating virtual machine system disk snapshot
CN109032838B (en) * 2018-06-28 2022-07-15 上海爱数信息技术股份有限公司 Automatic verification method for consistency of backup and recovery data of virtual machine
CN110109734B (en) * 2019-05-15 2021-08-06 苏州浪潮智能科技有限公司 Method and device for realizing stateless virtual machine

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104142858A (en) * 2013-11-29 2014-11-12 腾讯科技(深圳)有限公司 Blocked task scheduling method and device
US20150378870A1 (en) * 2014-06-30 2015-12-31 Microsoft Corporation Time travel debugging in managed runtime
CN104572248A (en) * 2014-12-17 2015-04-29 中电科华云信息技术有限公司 Method for virtual machine to dynamically save snapshots
CN106919471A (en) * 2015-12-25 2017-07-04 中国电信股份有限公司 For the method and system that snapshot is set up
CN107992344A (en) * 2016-10-25 2018-05-04 腾讯科技(深圳)有限公司 One kind association's journey implementation method and device

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114090489A (en) * 2021-11-15 2022-02-25 深圳云豹智能有限公司 IO expansion method and device based on virtio
CN114090489B (en) * 2021-11-15 2024-04-12 深圳云豹智能有限公司 IO expansion method and device based on virtio
CN114500238A (en) * 2022-01-25 2022-05-13 杭州云备姆科技有限公司 Automatic switching system and method for block-level disaster recovery, electronic device and medium
CN114500238B (en) * 2022-01-25 2024-02-20 杭州云备姆科技有限公司 Automatic switching system, method, electronic equipment and medium for block-level disaster recovery
CN114584500A (en) * 2022-02-25 2022-06-03 网易(杭州)网络有限公司 Asynchronous communication testing method and device and electronic equipment
CN114584500B (en) * 2022-02-25 2024-03-22 网易(杭州)网络有限公司 Asynchronous communication testing method and device and electronic equipment
CN114760312A (en) * 2022-04-27 2022-07-15 泽拓科技(深圳)有限责任公司 Distributed task coordination method, device, equipment and medium
CN117130980A (en) * 2023-10-24 2023-11-28 杭州优云科技有限公司 Virtual machine snapshot management method and device
CN117130980B (en) * 2023-10-24 2024-02-27 杭州优云科技有限公司 Virtual machine snapshot management method and device

Also Published As

Publication number Publication date
CN110879742B (en) 2023-08-11
CN110879742A (en) 2020-03-13

Similar Documents

Publication Publication Date Title
WO2021072880A1 (en) Method for asynchronously creating internal snapshot of virtual machine, apparatus, system and storage medium
WO2019148722A1 (en) Electronic device, data migrating and calling method and storage medium
US20190095234A1 (en) Performance variability reduction using an opportunistic hypervisor
US11748214B2 (en) Remote snappable linking
EP3451193A1 (en) Electronic device and file data journaling method of electronic device
US20150236799A1 (en) Method and system for quick testing and detecting mobile devices
CN110825419B (en) Firmware refreshing method and device, electronic equipment and storage medium
US11720449B2 (en) Real time database backup status indication and restore
US20230342492A1 (en) Proactive data security using file access permissions
US11861214B2 (en) Memory device forensics and preparation
WO2023185335A1 (en) Crash clustering method and apparatus, electronic device and storage medium
US20120272103A1 (en) Software operability service
US9378230B1 (en) Ensuring availability of data in a set being uncorrelated over time
CN105446785A (en) Method and system for unloading application program
US20190317836A1 (en) Per-request event detection to improve request-response latency
CN115499493A (en) Asynchronous transaction processing method and device, storage medium and computer equipment
CN108984238A (en) Gesture processing method, device and the electronic equipment of application program
CN115237889A (en) Database switching method and device, storage medium and computer equipment
US11036551B2 (en) Durable program execution
CN112434013A (en) Data table migration method and device, electronic equipment and storage medium
WO2019169615A1 (en) Method for accessing code sram, and electronic device
CN110798347A (en) Service state detection method, device, equipment and storage medium
WO2023201648A1 (en) File operation apparatus, computer device and operation device
TWI795950B (en) Hard disk monitoring method, electronic device, and storage medium
US11113179B2 (en) Information processing device, information processing method, and computer readable medium for a trace process

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19949049

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19949049

Country of ref document: EP

Kind code of ref document: A1