Restoration method and apparatus for virtual machine system, storage medium and electronic device
By using the replacement method of system disk image files and target image files in the virtual machine system, the problems of long restoration time and large storage space in the prior art are solved, and rapid restoration and storage space savings are achieved.
Patent Information
- Application Number
- PCT/CN2024/138182
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-12-13
- Filing Date
- 2024-12-10
- Publication Date
- 2025-06-19
AI Technical Summary
The restore technology of existing virtual machine systems is long and has poor user experience. It also occupies a large amount of storage space when restoring large quantities of virtual machines.
By using the system disk image file, including the first image file and the second image file, the first image file contains the data required for the virtual machine to create, and the second image file is used to store user data, obtain the target image file to replace the second image file, so as to realize the rapid restoration of the virtual machine system.
There is no need to recreate a new virtual machine, which significantly improves the restore speed of the virtual machine system, reduces the time-consuming system restoration, improves user experience, and saves storage space.
Smart Images

Figure CN2024138182_19062025_PF_FP_ABST
Abstract
Description
Method, device, storage medium and electronic device for restoring virtual machine system
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims priority to the Chinese patent application filed with the China Patent Office on December 13, 2023, with application number 202311712866.0 and invention name “Method, device, storage medium and electronic device for restoring a virtual machine system”, the entire contents of which are incorporated by reference into this application. Technical Field
[0003] The present application relates to the field of computer technology, and in particular to a method, device, storage medium, and electronic device for restoring a virtual machine system. Background Art
[0004] Cloud desktop is a virtualization technology that separates the user's desktop environment (including the operating system, applications, and data) from the local computer and moves it to a cloud server for processing and storage. Users can access their cloud desktops over the Internet, providing a consistent working environment anytime, anywhere, and on any device.
[0005] In some application scenarios, a system restore is required on a cloud desktop to restore the system to a previous state. However, existing system restore technologies typically delete the old virtual machine and then create a new one based on the original master disk image. This technology is simple to implement, but takes a long time and provides a poor user experience. Summary of the Invention
[0006] The technical problem to be solved by this application is to provide a virtual machine system restoration method, device, storage medium and electronic device that can improve the restoration speed of the virtual machine system. The specific solution is as follows:
[0007] A method for restoring a virtual machine system, comprising:
[0008] In response to a restore instruction, determining a virtual machine to be restored; the virtual machine is created based on a system disk image file; the system disk image file is composed of a first image file and a second image file; the first image file includes data required to create the virtual machine, and the second image file is used to store data generated by the user during the use of the virtual machine;
[0009] Obtaining a target image file, wherein the target image file is a blank image file or an image file that backs up data generated by the user using the virtual machine at a historical time point; the target image file has the same format as the second image file;
[0010] The second image file is replaced with the target image file to perform system restoration on the virtual machine to be restored.
[0011] Optionally, in the above method, the process of composing the system image file from the first image file and the second image file includes:
[0012] Obtaining the first image file and the second image file that were created in advance, wherein the first image file includes a shared image file and a differential configuration image file of the shared image file; the shared image file includes a program required for running the virtual machine; the differential configuration image file includes configuration data of the virtual machine; and the second image file is a differential user image file of the first image file;
[0013] The shared image file, the differential configuration image file, and the second image file in the first image file are combined into the system image file through an image chain.
[0014] Optionally, the method described above, wherein replacing the second image file with the target image file to perform system restoration on the virtual machine to be restored, includes:
[0015] Controlling the virtual machine to be restored to be in a shutdown state;
[0016] When the virtual machine to be restored is in a shut down state, replacing the second image file with the target image file;
[0017] The virtual machine to be restored is started by using the target image file to complete the system restoration of the virtual machine to be restored.
[0018] In the above method, optionally, determining the virtual machine to be restored includes:
[0019] Obtaining a virtual machine identifier contained in the restore instruction;
[0020] A virtual machine corresponding to the virtual machine identifier among the candidate virtual machines is determined as the virtual machine to be restored.
[0021] The above method may optionally further include:
[0022] When an image upgrade instruction is received, determining a virtual machine to be upgraded and a target first image file in each candidate virtual machine; the program version in the target first image file is different from the program version of the first image file;
[0023] The first image file is replaced with the target first image file.
[0024] A virtual machine system restoration device, comprising:
[0025] a determining unit, configured to determine, in response to a restore instruction, a virtual machine to be restored; the virtual machine being created based on a system disk image file; the system disk image file being composed of a first image file and a second image file; the first image file including data required to create the virtual machine, and the second image file being used to store data generated by a user during use of the virtual machine;
[0026] an acquiring unit, configured to acquire a target image file, wherein the target image file is a blank image file or an image file that backs up data generated by the user using the virtual machine at a historical point in time; the target image file has the same format as the second image file;
[0027] The restoration unit is configured to replace the second image file with the target image file to perform system restoration on the virtual machine to be restored.
[0028] The above-mentioned device, optionally, the determining unit includes:
[0029] an acquisition unit, configured to obtain a pre-created first image file and a second image file, wherein the first image file includes a shared image file and a differential configuration image file of the shared image file; the shared image file includes a program required for running the virtual machine; the differential configuration image file includes configuration data of the virtual machine; and the second image file is a differential user image file of the first image file;
[0030] An execution unit is configured to combine the shared image file, the differential configuration image file, and the second image file in the first image file into the system image file through an image chain.
[0031] In the above device, optionally, the reduction unit includes:
[0032] A control subunit, configured to control the virtual machine to be restored to be in a shutdown state;
[0033] a replacement subunit, configured to replace the second image file with the target image file when the virtual machine to be restored is in a shut down state;
[0034] The restoration subunit is configured to start the virtual machine to be restored by using the target image file to complete system restoration of the virtual machine to be restored.
[0035] A storage medium includes storage instructions, wherein when the instructions are executed, the device where the storage medium is located is controlled to execute the above-mentioned virtual machine system restoration method.
[0036] An electronic device includes a memory and one or more instructions, wherein the one or more instructions are stored in the memory and configured to be executed by one or more processors to perform the above-mentioned virtual machine system restoration method.
[0037] Based on the above-mentioned implementation of the present application, a method, device, storage medium and electronic device for restoring a virtual machine system are provided. The method includes: in response to a restore instruction, determining a virtual machine to be restored; the virtual machine is created based on a system disk image file; the system disk image file is composed of a first image file and a second image file; the first image file includes data required to create the virtual machine, and the second image file is used to store data generated by the user when using the virtual machine; obtaining a target image file, the target image file is a blank image file, or a backed-up image file of data generated by the user using the virtual machine at a historical time point; the format of the target image file is consistent with that of the second image file; the target image file is used to replace the second image file to perform a system restore on the virtual machine to be restored. By applying the method provided in the embodiment of the present application, there is no need to recreate a new virtual machine, which can improve the restore speed of the virtual machine system, reduce the time consumed by the system restore of the virtual machine, and improve the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are merely embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without any creative work.
[0039] FIG1 is a flowchart of a method for restoring a virtual machine system provided by the present application;
[0040] FIG2 is a flowchart of a process of composing a system image file from a first image file and a second image file provided by the present application;
[0041] FIG3 is a flowchart of a process of performing system restoration on a virtual machine to be restored provided by the present application;
[0042] FIG4 is a flowchart of a restoration process of a virtual machine system provided by the present application;
[0043] FIG5 is a schematic diagram of a process of replacing an image file provided by the present application;
[0044] FIG6 is a schematic structural diagram of a restoration device for a virtual machine system provided by the present application;
[0045] FIG7 is a schematic structural diagram of an electronic device provided in this application. DETAILED DESCRIPTION
[0046] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0047] In this application, the terms "comprises," "comprising," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus that includes a list of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not preclude the presence of additional identical elements in the process, method, article, or apparatus that includes the element.
[0048] Existing virtual machine system restoration technologies typically involve directly deleting the old virtual machine and then recreating a new one based on the original master disk image. This technology is simple to implement, but takes a long time and results in a poor user experience.
[0049] In some feasible methods, you can create a complete image backup for the virtual machine and replace the current virtual machine image with the backup image during restoration. However, in some scenarios, such as Internet cafes and computer classrooms, when there are a large number of virtual machines that need to be restored, it is necessary to create an image backup for each virtual machine, which will take up a large amount of storage space.
[0050] Based on this, an embodiment of the present application provides a method for restoring a virtual machine system, which can be applied to an electronic device. The method flow chart of the method is shown in FIG1 , and specifically includes:
[0051] S101: In response to a restore instruction, determine a virtual machine to be restored; the virtual machine is created based on a system disk image file; the system disk image file consists of a first image file and a second image file; the first image file includes data required to create the virtual machine, and the second image file is used to store data generated by the user during the use of the virtual machine.
[0052] In this embodiment, the system disk image files in different virtual machines may be different, and the first image file may include programs required for the virtual machine to run and configuration data of the virtual machine.
[0053] Optionally, the restore instruction may be an instruction triggered by a user clicking a preset button or virtual control, or may be an instruction automatically triggered during the automatic running of an application program. The restore instruction is used to instruct to restore the virtual machine.
[0054] Optionally, the number of virtual machines to be restored may be one or more.
[0055] Optionally, the first image file is configured as the read-only part of the virtual machine and will not be affected by the user's operations in the virtual machine. The second image file is configured as the read-write part of the virtual machine and can perform data read or write operations on the second image file in response to user operations.
[0056] S102: Obtain a target image file, where the target image file is a blank image file or an image file that backs up data generated by the user using the virtual machine at a historical time point; the target image file has the same format as the second image file.
[0057] In this embodiment, the target image file can be used to store data generated by the user when using the virtual machine.
[0058] Optionally, the second image file and the target image file use an image format that supports dynamic allocation, and the storage space occupied when they are created is smaller than that of files in an image format that does not support dynamic allocation.
[0059] Optionally, the blank target image file may be generated in advance, or may be generated after receiving a restore instruction.
[0060] S103: Using the target image file to replace the second image file, so as to perform system restoration on the virtual machine to be restored.
[0061] Optionally, the second image file is replaced with the target image file, and the target image file is used as a new second image file to store data generated by the user during the use of the virtual machine, thereby completing the system restoration of the virtual machine to be restored.
[0062] By applying the method provided in the embodiments of the present application, there is no need to recreate a new virtual machine, which can improve the restoration speed of the virtual machine system, reduce the time consumption of system restoration of the virtual machine, and improve the user experience; when there are a large number of virtual machines that need to be restored, there is no need to back up the entire system disk image file for each virtual machine to achieve system restoration for each virtual machine, saving storage space.
[0063] In the method provided in the embodiment of the present application, based on the above solution, optionally, the process of composing the system image file from the first image file and the second image file, as shown in FIG2 , includes:
[0064] S201: Obtain the first image file and the second image file created in advance, where the first image file includes a shared image file and a differential configuration image file of the shared image file; the shared image file includes a program required for the virtual machine to run; the differential configuration image file includes configuration data of the virtual machine; and the second image file is a differential user image file of the first image file.
[0065] Optionally, the shared image file may include one or more of an operating system, a driver, a system application, and a user-preinstalled application, and the shared image files of different virtual machines may be the same.
[0066] In this embodiment, the differential configuration image file may include one or more of the following: host name, user configuration, network configuration, and configuration data of some pre-installed applications. Different virtual machines may have different differential configuration image files.
[0067] In some embodiments, the first image file may further include a differential program image file of the shared image file, and the differential program image file may include an application program that distinguishes one virtual machine from other virtual machines.
[0068] S202: The shared image file, the differential configuration image file, and the second image file in the first image file are combined into the system image file through an image chain.
[0069] In some embodiments, after the system image file is formed, data generated during the operation of the virtual machine is stored in the second image file.
[0070] In the method provided in the embodiment of the present application, based on the above solution, optionally, the process of replacing the second image file with the target image file to perform system restoration on the virtual machine to be restored, as shown in FIG3 , includes:
[0071] S301: Control the virtual machine to be restored to be in a shutdown state.
[0072] In this embodiment, when determining whether the virtual machine to be restored is in a shutdown state, if the virtual machine to be restored is not in a shutdown state, a shutdown instruction may be sent to the virtual machine to be restored, so that the virtual machine to be restored is in a shutdown state.
[0073] S302: When the virtual machine to be restored is in a shutdown state, the second image file is replaced with the target image file.
[0074] In this embodiment, the target image file may be used to overwrite the second image file. Specifically, the second image file may be deleted, and the target image file may be used as a new second image file.
[0075] S303: Start the virtual machine to be restored by using the target image file to complete the system restoration of the virtual machine to be restored.
[0076] In this embodiment, after the virtual machine to be restored is started through the target image file, if the target image file is a blank file, the virtual machine can be restored to its initial state; if the target image file stores the data generated by the user using the virtual machine at a historical time point, the virtual machine can be restored to the state at the historical time point.
[0077] In the method provided in the embodiment of the present application, based on the above solution, optionally, determining the virtual machine to be restored includes:
[0078] Obtain the virtual machine identifier contained in the restore instruction.
[0079] A virtual machine corresponding to the virtual machine identifier among the candidate virtual machines is determined as the virtual machine to be restored.
[0080] In this embodiment, the restore instruction may be parsed to obtain the virtual machine identifier in the restore instruction.
[0081] Optionally, the virtual machine identifier can be matched with the identifiers of each alternative virtual machine. If there is an identifier consistent with the virtual machine identifier among the identifiers of each alternative virtual machine, the alternative virtual machine to which the identifier consistent with the virtual machine identifier belongs is determined as the virtual machine corresponding to the virtual machine identifier, and the virtual machine is determined as the virtual machine to be restored.
[0082] In the method provided in the embodiment of the present application, based on the above solution, optionally, the method further includes:
[0083] When an image upgrade instruction is received, determining a virtual machine to be upgraded and a target first image file in each candidate virtual machine; the program version in the target first image file is different from the program version of the first image file;
[0084] The first image file is replaced with the target first image file.
[0085] In some embodiments, the first image file may include a differential program image file. When an application upgrade instruction is received, a target differential program image file corresponding to the application upgrade instruction can be obtained, and the differential program image file in the first image file can be replaced using the target differential program image file; the program in the target differential program image file is different from the program in the differential program image file.
[0086] In one embodiment provided in this application, a virtual machine system disk image can be created based on a three-level image. The specific process is shown in FIG4 and is as follows:
[0087] Step 1: Create a first-level base image file for the virtual machine usage scenario. The first-level base image is a shared image file that contains the operating system, drivers, system applications, and user-preinstalled applications.
[0088] In some embodiments, a separate differential image may be created for the pre-installed application.
[0089] Step 2: Create a secondary differential configuration image file for each virtual machine based on the primary base image file. In this embodiment, the secondary differential configuration image includes independent configuration data that distinguishes a virtual machine from other virtual machines, mainly including host name, user configuration, network configuration and configuration data of some pre-installed applications.
[0090] In some embodiments, a separate differential image may be created for the configuration data of the pre-installed application.
[0091] Step 3: Create a third-level differential user image (the second image file mentioned above) for each virtual machine based on the first-level basic image and the second-level differential configuration image. The third-level differential user image is a blank image that initially does not contain any data and is used to store data generated by the user during the use of the virtual machine.
[0092] In this embodiment, the three-level differential user image uses an image format that supports dynamic allocation and occupies only a small storage space when created.
[0093] In this embodiment, after the three-level image of the virtual machine system disk is created, the three-level image is integrated into the system disk image of the virtual machine through the image chain technology. The data generated during the operation of the virtual machine is only saved in the three-level differential user image. The first-level basic image and the second-level differential configuration image are read-only parts for the virtual machine and will not be affected by user operations.
[0094] In this embodiment, all virtual machines share a read-only first-level base image, which can effectively achieve cache acceleration.
[0095] The first-level basic image and the second-level configuration image in this embodiment occupy a fixed small amount of storage space and can be stored on a solid-state hard disk to achieve acceleration.
[0096] Step 4: Start the virtual machine using the three-level differential user image.
[0097] Step 5: Store the data generated during the user's use of the virtual machine into the third-level differential user image.
[0098] Step 6: Control the virtual machine to shut down.
[0099] Step 7: Create a blank three-level differential user image, which can be the blank target image file mentioned above.
[0100] Step 8: Overwrite the original three-level differential user image with a blank three-level differential user image.
[0101] In some embodiments, since blank three-level differential user images occupy very little storage space, a large number of blank three-level differential user images can be created in advance to reduce the time consumption during batch restoration.
[0102] In some embodiments, as shown in FIG5 , if there is a virtual machine that needs to be restored, a blank three-level differential user image can be recreated when the virtual machine is shut down or started normally, overwriting the original three-level differential user image. When the virtual machine is started again, it will not contain the previous user data, thereby achieving system restoration.
[0103] By using the methods provided in the embodiments of this application, shared base images and differential configuration images can reduce virtual machine system disk image storage space and accelerate base image caching during batch virtual machine restores. New blank differential user images can be used for rapid restores, and blank user images can be pre-generated. Image chains can be used to accelerate batch virtual machine system restores.
[0104] Corresponding to the method shown in FIG1 , the embodiment of the present application further provides a virtual machine system restoration device for implementing the method shown in FIG1 . The structural diagram thereof is shown in FIG6 , and specifically includes:
[0105] Determining unit 601 is configured to determine, in response to a restore instruction, a virtual machine to be restored; the virtual machine is created based on a system disk image file; the system disk image file is composed of a first image file and a second image file; the first image file includes data required to create the virtual machine, and the second image file is used to store data generated by the user during use of the virtual machine;
[0106] An acquiring unit 602 is configured to acquire a target image file, wherein the target image file is a blank image file or an image file that backs up data generated by the user using the virtual machine at a historical point in time; the target image file has the same format as the second image file;
[0107] The restoration unit 603 is configured to replace the second image file with the target image file to perform system restoration on the virtual machine to be restored.
[0108] In an embodiment provided in the present application, based on the above solution, optionally, the determining unit 601 includes:
[0109] an acquisition subunit, configured to obtain a pre-created first image file and a second image file, wherein the first image file includes a shared image file and a differential configuration image file of the shared image file; the shared image file includes a program required for running the virtual machine; the differential configuration image file includes configuration data of the virtual machine; and the second image file is a differential user image file of the first image file;
[0110] The execution subunit is configured to combine the shared image file, the differential configuration image file, and the second image file in the first image file into the system image file through an image chain.
[0111] In an embodiment provided in the present application, based on the above solution, optionally, the restoring unit 603 includes:
[0112] A control subunit, configured to control the virtual machine to be restored to be in a shutdown state;
[0113] a replacement subunit, configured to replace the second image file with the target image file when the virtual machine to be restored is in a shut down state;
[0114] The restoration subunit is configured to start the virtual machine to be restored by using the target image file to complete system restoration of the virtual machine to be restored.
[0115] In an embodiment provided in the present application, based on the above solution, optionally, the determining unit 601 includes:
[0116] A processing subunit, configured to obtain a virtual machine identifier contained in the restore instruction;
[0117] The first determining subunit is configured to determine a virtual machine corresponding to the virtual machine identifier among the candidate virtual machines as the virtual machine to be restored.
[0118] The above method may optionally further include:
[0119] a second determining subunit, configured to, upon receiving an image upgrade instruction, determine a virtual machine to be upgraded and a target first image file from among the candidate virtual machines; wherein the program version in the target first image file is different from the program version in the first image file;
[0120] The upgrading subunit is configured to replace the first image file with the target first image file.
[0121] The specific principles and execution processes of each unit and module in the restoration device of the virtual machine system disclosed in the above embodiment of the present application are the same as those of the restoration method of the virtual machine system disclosed in the above embodiment of the present application. Please refer to the corresponding parts of the restoration method of the virtual machine system provided in the above embodiment of the present application, and no further details will be given here.
[0122] An embodiment of the present application further provides a storage medium, which includes stored instructions, wherein when the instructions are executed, the device where the storage medium is located is controlled to execute the above-mentioned virtual machine system restoration method.
[0123] An embodiment of the present application further provides an electronic device, the structure of which is shown in FIG7 . The electronic device includes a memory 701 and one or more instructions 702 . The one or more instructions 702 are stored in the memory 701 and are configured to be executed by one or more processors 703 to perform the following operations:
[0124] In response to a restore instruction, determining a virtual machine to be restored; the virtual machine is created based on a system disk image file; the system disk image file is composed of a first image file and a second image file; the first image file includes data required to create the virtual machine, and the second image file is used to store data generated by the user during the use of the virtual machine;
[0125] Obtaining a target image file, wherein the target image file is a blank image file or an image file that backs up data generated by the user using the virtual machine at a historical time point; the target image file has the same format as the second image file;
[0126] The second image file is replaced with the target image file to perform system restoration on the virtual machine to be restored.
[0127] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Similarities between the various embodiments can be referred to in conjunction with each other. For device embodiments, since they are generally similar to method embodiments, their description is relatively simple, and for relevant details, reference can be made to the description of the method embodiments.
[0128] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are merely used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations.
[0129] For the convenience of description, the above devices are described as being divided into various units according to their functions. Of course, when implementing this application, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0130] Through the description of the above embodiments, it can be seen that those skilled in the art can clearly understand that the present application can be implemented by means of software plus a necessary general hardware platform. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in various embodiments of the present application or certain parts of the embodiments.
[0131] The above is a detailed introduction to a virtual machine system restoration method provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for general technical personnel in this field, based on the ideas of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A method for restoring a virtual machine system, characterized in that: include: In response to the restore instruction, determining a virtual machine to be restored; The virtual machine is created based on the system disk image file; The system disk image file is composed of a first image file and a second image file; the first image file includes data required to create a virtual machine, and the second image file is used to store data generated by the user when using the virtual machine; Obtaining a target image file, where the target image file is a blank image file or an image file that backs up data generated by the user using the virtual machine at a historical time point; The target image file has the same format as the second image file; The target image file is used to replace the second image file, so as to perform system restoration on the virtual machine to be restored.
2. The method according to claim 1, characterized in that The process of forming the system image file from the first image file and the second image file includes: Obtaining the first image file and the second image file created in advance, wherein the first image file includes a shared image file and a differential configuration image file of the shared image file; the shared image file includes a program required for the virtual machine to run; the differential configuration image file includes configuration data of the virtual machine; and the second image file is a differential user image file of the first image file; The shared image file, the differential configuration image file and the second image file in the first image file are combined into the system image file through an image chain.
3. The method according to claim 1, characterized in that The step of replacing the second image file with the target image file to perform system restoration on the virtual machine to be restored includes: Controlling the virtual machine to be restored to be in a shutdown state; When the virtual machine to be restored is in a shutdown state, replacing the second image file with the target image file; The virtual machine to be restored is started by using the target image file to complete the system restoration of the virtual machine to be restored.
4. The method according to claim 1, characterized in that The step of determining the virtual machine to be restored includes: Obtaining a virtual machine identifier contained in the restore instruction; A virtual machine corresponding to the virtual machine identifier among the candidate virtual machines is determined as the virtual machine to be restored.
5. The method according to claim 4, characterized in that: Also includes: When receiving an image upgrade instruction, determining a virtual machine to be upgraded and a target first image file from among the candidate virtual machines; The program version in the target first image file is different from the program version in the first image file; The first image file is replaced with the target first image file.
6. A virtual machine system restoration device, characterized in that: include: A determination unit, configured to determine a virtual machine to be restored in response to a restore instruction; The virtual machine is created based on the system disk image file; The system disk image file is composed of a first image file and a second image file; the first image file includes data required to create a virtual machine, and the second image file is used to store data generated by the user when using the virtual machine; an acquisition unit, configured to acquire a target image file, wherein the target image file is a blank image file or an image file having a backup of data generated by the user using the virtual machine at a historical time point; The target image file has the same format as the second image file; The restoration unit is used to replace the second image file with the target image file to perform system restoration on the virtual machine to be restored.
7. The device according to claim 6, characterized in that Identify units, including: an acquisition unit, configured to obtain a pre-created first image file and a second image file, wherein the first image file includes a shared image file and a differential configuration image file of the shared image file; the shared image file includes a program required for the virtual machine to run; the differential configuration image file includes configuration data of the virtual machine; and the second image file is a differential user image file of the first image file; The execution unit is used to combine the shared image file, the differential configuration image file and the second image file in the first image file into the system image file through an image chain.
8. The device according to claim 6, characterized in that The reduction unit comprises: A control subunit, used for controlling the virtual machine to be restored to be in a shutdown state; a replacement subunit, configured to replace the second image file with the target image file when the virtual machine to be restored is in a shutdown state; The restoration subunit is used to start the virtual machine to be restored through the target image file to complete the system restoration of the virtual machine to be restored.
9. A storage medium, characterized in that: The storage medium includes storage instructions, wherein when the instructions are executed, the device where the storage medium is located is controlled to execute the method for restoring the virtual machine system according to any one of claims 1 to 5.
10. An electronic device, characterized in that: The system comprises a memory and one or more instructions, wherein the one or more instructions are stored in the memory and configured to be executed by one or more processors to perform the method for restoring a virtual machine system as claimed in any one of claims 1 to 5.
Citation Information
Patent Citations
Method for creating virtual machine in cloud computing system and cloud computing system
CN102185928A
Method for backing up and restoring Windows virtual machine system disk
CN103729264A
Method for performing system restoring on virtual machine according to mirror image
CN105279011A
Virtual machine system restoration method and device, storage medium and electronic equipment
CN117850963A
The assignment of data agent proxies for executing virtual-machine secondary copy operations including streaming backup jobs
US20160373291A1