Virtual machine management system, method and device based on PVE environment and storage medium

By introducing the backup and recovery module of the virtual machine management system in the PVE environment, the problem of virtual machine backup and incomplete recovery was solved, and the data of high -efficiency isolation and rapid recovery of data was achieved, which improved the reliability and efficiency of the business.

CN119336443APending Publication Date: 2025-01-21WUHAN STONE INFORMATION SERVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411355782.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-27
Publication Date
2025-01-21

AI Technical Summary

Technical Problem

In the prior art, virtual machine backup and recovery are not timely and efficient enough, resulting in difficult to ensure data security and integrity, which may have serious impact on the business.

Method used

Provide a virtual machine management system based on the PVE environment, including backup modules and recovery modules. The backup module is deepened and compressed by obtaining the incremental data of the virtual machine and the full data of the LXC container, and the backup processing is processed according to the backup strategy. The recovery module obtains the recovery data of the virtual machine and the LXC container when receiving the recovery instruction, and performs recovery.

Benefits of technology

It realizes rapid backup and recovery of virtual machine and LXC container data, improves data security and integrity, reduces the space and time required for backup, and improves backup efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119336443A_ABST
    Figure CN119336443A_ABST
Patent Text Reader

Abstract

The invention discloses a virtual machine management system and method based on a PVE environment, electronic equipment and a storage medium, and the system comprises a backup module which is used for obtaining incremental data of a first virtual machine and full data of an LXC container when receiving a backup instruction, and carrying out the backup processing of the first virtual machine according to the incremental data, and performing backup processing on the LXC container according to the total data, and the recovery module is used for obtaining recovery data of the second virtual machine and the LXC container when a recovery instruction is received, and carrying out recovery processing on the second virtual machine and the LXC container according to the recovery data. According to the technical scheme, in the working process of the virtual machine, the incremental data generated during operation of the virtual machine and the full data of the LXC container are obtained and backed up, so that the data of the virtual machine and the LXC container can be effectively isolated and protected, the safety of the data is ensured, and meanwhile, the backup efficiency is improved by reducing the space and time required by backup.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of virtual machine management technology, and in particular to a virtual machine management system, method, electronic device and storage medium based on a PVE environment. Background Art

[0002] In modern computing environments, virtualization technology is widely used to create and manage multiple virtual machines in order to provide isolated operating environments for different applications and workloads to meet different operational requirements. For virtual machines, the security and integrity of their data must be guaranteed. In the event of data loss or a failure, the virtual machine will not be able to operate normally, which may have a serious impact on the business. Usually, the virtual machine can be restored to run again. Therefore, how to quickly back up and restore virtual machines has become an urgent problem to be solved. Summary of the invention

[0003] The purpose of the embodiments of the present application is to provide a virtual machine management system, method, electronic device and storage medium based on a PVE environment to solve the technical problem in the related art that virtual machine backup and recovery are not timely and effective.

[0004] In a first aspect, an embodiment of the present application provides a virtual machine management system based on a PVE environment, including:

[0005] a backup module, configured to, upon receiving a backup instruction, obtain incremental data of the first virtual machine and full data of the LXC container, and perform a backup process on the first virtual machine according to the incremental data, and perform a backup process on the LXC container according to the full data;

[0006] The recovery module is used to obtain recovery data of the second virtual machine and the LXC container when receiving the recovery instruction, and perform recovery processing on the second virtual machine and the LXC container according to the recovery data.

[0007] In a second aspect, an embodiment of the present application provides a virtual machine management method based on a PVE environment, including:

[0008] When a backup policy entry request is received, receiving an input backup policy, and associating the backup policy with a corresponding virtual machine, wherein the backup policy includes at least a backup period and a backup path;

[0009] When receiving the virtual machine backup instruction, identifying a third virtual machine identifier included in the virtual machine backup instruction;

[0010] Acquire virtual machine incremental data corresponding to the third virtual machine identifier, and acquire container data of an LXC container in a PVE environment;

[0011] Deduplication and compression are performed on the virtual machine incremental data and the container data to obtain processed virtual machine incremental data and container data;

[0012] Determine a virtual machine backup path according to the virtual machine identifier, and perform backup processing on the processed virtual machine incremental data and container data according to the virtual machine backup path;

[0013] When receiving the virtual machine recovery instruction, identifying a fourth virtual machine included in the virtual machine recovery instruction;

[0014] Determine the data node to be restored, and obtain the data to be restored according to the data node;

[0015] Performing recovery processing on the fourth virtual machine and the LXC container to be recovered according to the data to be recovered;

[0016] The fourth virtual machine and the LXC container after the recovery process are verified, and the recovery is determined to be successful when the verification passes.

[0017] In a third aspect, an embodiment of the present application provides an electronic device, comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor implements any of the steps in the PVE environment-based virtual machine management method described above when executing the computer program.

[0018] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the steps of any of the above-mentioned virtual machine management methods based on the PVE environment.

[0019] The embodiment of the present application provides a virtual machine management system, method, electronic device and storage medium based on a PVE environment, wherein the system includes a backup module and a recovery module, wherein the backup module is used to obtain the incremental data of the first virtual machine and the full data of the LXC container when receiving a backup instruction, and perform a backup process on the first virtual machine according to the incremental data, and perform a backup process on the LXC container according to the full data; the recovery module is used to obtain the recovery data of the second virtual machine and the LXC container when receiving a recovery instruction, and perform a recovery process on the second virtual machine and the LXC container according to the recovery data. In the process of virtual machine operation, by obtaining and backing up the incremental data and the full data of the LXC container generated when the virtual machine is operating, the data of the virtual machine and the LXC container can be effectively isolated and protected, and the data security is ensured, while the backup efficiency is improved by reducing the space and time required for backup. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 It is a block diagram of a virtual machine management system based on a PVE environment provided in an embodiment of the present application;

[0021] Figure 2 It is a schematic block diagram of a backup module provided in an embodiment of the present application;

[0022] Figure 3 It is a schematic block diagram of a recovery module provided in an embodiment of the present application;

[0023] Figure 4 It is a flow chart of a virtual machine management method based on a PVE environment provided in an embodiment of the present application;

[0024] Figure 5 This is a schematic diagram of the architecture of a virtual machine management system based on a PVE environment provided in an embodiment of the present application;

[0025] Figure 6 is a structural schematic diagram of an electronic device provided in an embodiment of the present application;

[0026] Figure 7 This is another structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0027] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0028] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0029] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.

[0030] In order to solve the technical problems existing in the related art, the embodiment of the present application provides a virtual machine management method based on the PVE environment, see Figure 1 , Figure 1 It is a block diagram of a virtual machine management system based on a PVE environment provided by an embodiment of the present application. The virtual machine management system 100 based on the PVE environment includes a backup module 101 and a recovery module 102, wherein the backup module 101 is used to obtain incremental data of a first virtual machine and full data of an LXC container when receiving a backup instruction, and back up the first virtual machine according to the incremental data, and back up the LXC container according to the full data; the recovery module 102 is used to obtain recovery data of a second virtual machine and an LXC container when receiving a recovery instruction, and recover the second virtual machine and the LXC container according to the recovery data.

[0031] Among them, the PVE environment is Platform-as-a-Service Environment, the LXC container is Linux Containers, the first virtual machine and the second virtual machine are only used to distinguish virtual machines in different processing stages. In the actual processing process, the first virtual machine and the second virtual machine can be the same virtual machine or two different virtual machines.

[0032] In one embodiment, a virtual machine management system 100 based on a PVE environment includes a backup module 101 and a recovery module 102, which are respectively used to back up and restore virtual machines. When performing backup processing of virtual machines, the backup module 101 uses incremental backup and full backup methods to process data that needs to be backed up. Specifically, for a first virtual machine that needs to be backed up, an incremental backup method is used to back up the newly added data between two adjacent backups. For a KXC container, a full backup method is used to back up all data in the LXC container. In addition, when recovery processing is required, recovery data of a second virtual machine and an LXC container that need to be restored are obtained, and then the second virtual machine and the LXC container are restored according to the obtained recovery data.

[0033] Exemplarily, in the entire virtual machine management system based on the PVE environment, a corresponding monitoring module can also be set up to monitor the operating status of the virtual machines and LXC containers based on the PVE environment, so that backup and recovery processing can be performed in a timely manner to ensure the security and integrity of the data. At the same time, for all virtual machines, corresponding backup mechanisms can be set, such as backup cycles, backup conditions, etc., and then when the monitoring module is working, if it detects that one or several virtual machines need to be backed up, the backup processing is performed according to the backup rules or backup strategies of the virtual machines themselves. Similarly, when the monitoring module determines that recovery processing is required, such as when a virtual machine is detected to have a failure or data loss, relevant instruction information can be sent to the recovery module, and then the recovery module operates to recover the virtual machines that need to be recovered.

[0034] Based on the above description, it can be known that when the backup module performs backup processing, different virtual machines have different backup rules or backup strategies. Therefore, it is necessary to formulate backup strategies for all virtual machines in advance, such as formulating a backup cycle, and then when performing backup processing, backup processing can be performed according to the set backup strategy. Furthermore, the virtual machine management system based on the PVE environment also includes: a backup strategy formulation module, which is used to receive the input backup strategy when receiving a strategy formulation request, and associate the backup strategy with the corresponding virtual machine, wherein the backup strategy includes at least a backup cycle and a backup path.

[0035] In one embodiment, the backup strategy formulation module included in the system is used to set the same or different backup strategies for each virtual machine, including at least a backup cycle, such as a time cycle, a backup quantity cycle, etc., wherein the backup cycle is used to determine the interval time between two adjacent backups, and the backup quantity is used to determine the size of the backup quantity allowed during adjacent backups. By pre-setting the backup strategies corresponding to different virtual machines, different and appropriate methods can be used for backup processing for different virtual machines during backup processing.

[0036] In one embodiment, after the backup strategy is pre-set for each virtual machine, during the application process, when it is determined that backup processing is required, the backup module first captures the incremental data of the first virtual machine that needs to be backed up, and the incremental data refers to the data changes of the first virtual machine from the last backup to the current backup, such as file modification, addition or deletion. By backing up only the incremental data, the time and storage space required for backup can be greatly reduced.

[0037] In addition to backing up the incremental data of the first virtual machine, the backup module will also back up the full data of the LXC container, that is, back up all the data of the LXC container, including its operating system, application program and all related data.

[0038] Further, refer to Figure 2 , Figure 2 It is a block diagram of a backup module provided in an embodiment of the present application, wherein the backup module 101 includes: a first receiving unit 1011, a first data acquisition unit 1012, a data processing unit 1013 and a backup unit 1014.

[0039] Specifically, the first receiving unit 1011 is used to receive a backup instruction, identify a first virtual machine identifier contained in the backup instruction, and generate a first data acquisition instruction according to the backup instruction, wherein the first virtual machine identifier corresponds to the first virtual machine; the first data acquisition unit 1012 is used to respond to the first data acquisition instruction to obtain incremental data of the first virtual machine and full data of the LXC container; the data processing unit 1013 is used to deduplicate and compress the incremental data and the full data to obtain processed incremental data and full data; the backup unit 1014 is used to back up the first virtual machine according to the processed incremental data, and to back up the LXC container according to the processed full data.

[0040] In one embodiment, when the backup module 101 is working, the first receiving unit 1011 contained therein receives the corresponding backup instruction, wherein the backup instruction can be generated by the user's manual operation, or can be generated when the system detects that a backup is required. For example, when the time period for backup is reached, the backup instruction is analyzed and processed to identify the first virtual machine identifier contained in the backup instruction, and a first data acquisition instruction is generated based on the backup instruction and the first virtual machine identifier, so that the first data acquisition unit 1012 responds to the first data acquisition instruction to acquire the incremental data of the first virtual machine and the full data of the LXC container. Then, the data processing unit 1013 performs deduplication and compression on the obtained incremental data and full data, which can effectively reduce the size of the backup and improve the backup efficiency. Finally, when performing the backup, the backup unit 1014 performs backup processing based on the processed incremental data and full data.

[0041] In actual applications, the monitoring module can determine whether to perform backup processing, and when it is determined to perform backup processing, the monitoring module sends the corresponding backup instruction to the first receiving unit 1011 in the backup module 101 to perform relevant processing to complete the backup processing of the first virtual machine. In addition, when the monitoring module determines that the backup processing is not required, if a backup instruction input manually is received at this time, the first receiving unit 1011 will also respond to the backup instruction received at this time, and the monitoring module will update the monitoring cycle at the same time, such as recording the time when the current backup is completed as the time of the current backup, and then determining the next backup time based on the time when the current backup is completed.

[0042] Furthermore, when the backup unit 1014 performs backup processing on the first virtual machine and the LXC container according to the processed incremental data and the full data, it is necessary to determine how to perform the backup, including at least the backup path. Therefore, the backup unit 1014 also includes: a backup path determination subunit, which is used to query according to the first virtual machine identifier to obtain the backup path corresponding to the first virtual machine; a backup subunit, which is used to perform backup processing on the first virtual machine according to the backup path and the processed incremental data, and to perform backup processing on the LXC container according to the backup path and the processed full data.

[0043] Specifically, when performing backup processing, the backup path determination subunit queries according to the identified first virtual machine identifier, determines the backup path corresponding to the first virtual machine identifier, and then backs up the processed incremental data and full data according to the determined backup path.

[0044] Furthermore, when the virtual machine is restored, the process is performed according to the data and nodes that need to be restored, that is, it is determined according to the actual situation. Therefore, when the virtual machine is restored, the second virtual machine that needs to be restored is determined according to the received restoration instruction, and then the restoration data for restoring the second virtual machine and all the data of the LXC container are obtained. Figure 3 , Figure 3 It is a block diagram of a recovery module provided in an embodiment of the present application, wherein the recovery module 102 includes a second receiving unit 1021, a second data acquisition unit 1022, a recovery unit 1023 and a verification unit 1024.

[0045] Specifically, the second receiving unit 1021 is used to receive a recovery instruction, identify a second virtual machine identifier included in the recovery instruction, and generate a second data acquisition instruction according to the recovery instruction, wherein the second virtual machine identifier corresponds to the second virtual machine; the second data acquisition unit 1022 is used to respond to the second data acquisition instruction and acquire data to be recovered for recovering the second virtual machine and the LXC container; the recovery unit 1023 is used to perform recovery processing on the second virtual machine and the LXC container according to the data to be recovered; the verification unit 1024 is used to perform verification processing on the second virtual machine and the LXC container after the recovery processing, and issue a verification pass information when the verification passes.

[0046] In one embodiment, the second receiving unit 1021 receives the corresponding recovery instruction, and parses and identifies the second virtual machine identifier contained in the recovery instruction to determine the second virtual machine that needs to be recovered. Then, a second data acquisition instruction is generated according to the recovery instruction to obtain the data required for the recovery of the second virtual machine. When acquiring data, the second data acquisition unit 1022 obtains the recovery data from the corresponding data source by responding to the second data acquisition instruction, including the data for recovering the second virtual machine and the data for recovering the LXC container, such as the configuration file, disk image, container state, etc. of the virtual machine, and then the recovery unit 1023 parses and processes the recovery data to recover it to the second virtual machine and the LXC container, which may include rewriting the disk image of the virtual machine, recovering the state of the container, etc., so as to recover the second virtual machine and the LXC container to the required state, such as a certain time node or version node, wherein the version node is related to the version of the data itself and other related information. Finally, after the recovery operation is completed according to the recovery data, the verification unit 1024 is used to verify the second virtual machine and LXC container after the recovery process to ensure that they can work normally. If the verification passes, a verification pass message can be issued, indicating that the recovery is successful. Otherwise, it may be necessary to redo the recovery operation or perform corresponding troubleshooting before performing the recovery process.

[0047] Furthermore, when it is determined that recovery processing is required, it is necessary to obtain corresponding recovery data. Based on the above description of the backup processing process, the backup paths of data of different virtual machines are different, that is, the locations where the data are stored are different. Therefore, when obtaining the recovery data for subsequent processing, it is necessary to determine the backup path of the relevant data of the backed up second virtual machine, so that the recovery data can be obtained more quickly for subsequent processing. Therefore, the second data acquisition unit 1022 also includes: a recovery path determination subunit, which is used to obtain the second virtual machine identifier of the second virtual machine, and query to obtain the storage path corresponding to the second virtual machine identifier; a data node determination subunit, which is used to receive an input data recovery node, wherein the data recovery node includes a data version identifier; a data acquisition subunit, which is used to respond to the second data acquisition instruction, perform data query according to the data recovery node and the storage path, and obtain the data to be recovered.

[0048] That is, the recovery path determination subunit performs a query according to the second virtual machine identifier, obtains the backup path of the relevant data of the second virtual machine, and generates a second data acquisition instruction, and then the data acquisition subunit obtains data according to the determined backup path by responding to the second data acquisition instruction, and obtains the data required to restore the second virtual machine and the data required to restore the LXC container. When determining the required data, since when performing the recovery, the restored node can be determined according to the actual situation, that is, the state to which the second virtual machine and the LXC container are restored is specifically related to the data used for the recovery, such as the data version, so before the data acquisition subunit performs data acquisition, the data node determination subunit will also determine the data recovery node to determine the data version identifier of the obtained recovery data, and then obtain the corresponding version data to restore the second virtual machine and the LXC container to the corresponding version and state.

[0049] It should be noted that the data recovery node can be the backup time or the version information of the data itself. Different versions of backup data of different virtual machines are stored in the backup path. Since the storage paths of different virtual machines are different and can be independent, and the backup data of the virtual machine is for incremental data backup, there will be no shortage of backup space. Of course, the data backed up in the backup path can also be optimized in a timely manner according to actual conditions, such as data deduplication.

[0050] Based on the above description, since it is necessary to identify the data version during recovery when performing the recovery process of the virtual machine, it is also necessary to timely mark the backed up data when performing the data backup process. Therefore, the backup unit 101 also includes: a data node recording sub-unit, which performs data marking on the processed incremental data and full data to obtain the version identifications corresponding to the processed incremental data and full data respectively.

[0051] After obtaining the incremental data of the first virtual machine to be backed up and the full data of the LXC container, data marking processing is performed on the incremental data and the full data to obtain the version identifiers corresponding to the incremental data and the full data respectively. When performing the marking processing, since the virtual machine is processed in an incremental data backup manner, when performing the marking processing, the marking processing can be performed only on the incremental data, and then when restoring, when determining the data node for data restoration, all data before the data node is obtained as the recovery data for the virtual machine, such as according to the backup time.

[0052] For example, the backup data of a virtual machine includes data 1 (version 1), data 2 (version 2), data 3 (version 3) and data 4 (version 4), and all of them are data backed up based on incremental backup. When the selected data recovery node is "version 3", the recovery data for the virtual machine obtained at this time includes data 1, data 2 and data 3, and then the second virtual machine is recovered based on data 1, data 2 and data 3. That is, after the second virtual machine is successfully recovered, it will be restored to the moment when the backup of data 3 is completed, that is, data 4 is useless data for the recovery of the second virtual machine.

[0053] In order to ensure the consistency between the backup path and the current state of the virtual machine, after the recovery of the second virtual machine is completed, the backup data of the second virtual machine backed up in the backup path may be updated, for example, "data 4" may be deleted.

[0054] In addition, for LXC containers, the corresponding version data is obtained according to the actual demand data node to complete the recovery of the LXC container. The data restored for the virtual machine and the LXC container can be the same version of data, such as data backed up at the same time, or different versions of data, which is not specifically limited and can be determined according to human operations and selections.

[0055] Further, refer to Figure 4 , Figure 4 This is a flow chart of a virtual machine management method based on a PVE environment provided in an embodiment of the present application, wherein the steps include S1 to S9.

[0056] S1. When a backup policy entry request is received, receiving the input backup policy, and associating the backup policy with the corresponding virtual machine, wherein the backup policy at least includes a backup period and a backup path;

[0057] S2. When receiving a virtual machine backup instruction, identifying a third virtual machine identifier included in the virtual machine backup instruction;

[0058] S3, obtaining virtual machine incremental data corresponding to the third virtual machine identifier, and obtaining container data of the LXC container in the PVE environment;

[0059] S4. De-duplicate and compress the virtual machine incremental data and container data to obtain processed virtual machine incremental data and container data;

[0060] S5. Determine a virtual machine backup path according to the third virtual machine identifier, and perform backup processing on the processed virtual machine incremental data and container data according to the virtual machine backup path;

[0061] S6. When receiving the virtual machine recovery instruction, identifying the fourth virtual machine included in the virtual machine recovery instruction;

[0062] S7, determining the data node to be restored, and obtaining the data to be restored according to the data node;

[0063] S8. Perform recovery processing on the fourth virtual machine and the LXC container to be recovered according to the data to be recovered;

[0064] S9: Verify the fourth virtual machine and the LXC container after the recovery process, and determine that the recovery is successful if the verification passes.

[0065] Specifically, when a backup policy entry request is received, the virtual machine management system based on the PVE environment receives and stores the backup policy, which includes at least the backup cycle (such as daily, weekly or monthly backup) and the storage path (i.e., the location where the backup data should be stored). The backup policy is uniquely associated with the virtual machine to ensure that each virtual machine has its corresponding backup settings.

[0066] Then, when a virtual machine backup instruction is received, the virtual machine that needs to be backed up (the third virtual machine) is first identified, so as to obtain the corresponding incremental data (i.e., the changes that have occurred since the last backup) and the data of any LXC (Linux container) container running in the PVE environment according to the identified third virtual machine identifier. Then, when storing, the obtained incremental data and full data are deduplicated and compressed to reduce the storage space occupied and improve the backup efficiency. Finally, the processed incremental data and full data are backed up and stored according to the determined backup path.

[0067] Next, when receiving the virtual machine recovery instruction, the system identifies the virtual machine that needs to be recovered (the fourth virtual machine), and at the same time, determines the recovery data to be recovered based on the identified fourth virtual machine, and specifically obtains the recovery data for backing up the virtual machine and the recovery data for restoring the LXC container in the backup path corresponding to the fourth virtual machine based on the data node determined to be recovered, so as to use these data to restore the fourth virtual machine and the related LXC container.

[0068] Finally, after completing the recovery operation according to the obtained recovery data, the virtual machine management system based on the PVE environment verifies the restored fourth virtual machine and the LXC container to ensure that the recovery process is successful and the data is complete.

[0069] Furthermore, during the implementation process, backup log recording and monitoring can also be implemented. After each successful backup or restore operation, the corresponding log will be recorded, including the time of the operation, the ID of the virtual machine, the amount of data backed up or restored, the results of the operation, etc., to help track historical operations and accurately diagnose problems when they occur. At the same time, the monitoring function provided can display the status of backup and restore, as well as the usage of storage space in real time, so that administrators can understand the operation status of the system in a timely manner.

[0070] In addition, the backup strategy for each virtual machine can also be adjusted and optimized according to the actual situation. Specifically, the system can dynamically adjust the backup strategy based on historical backup data and system usage. For example, if it is found that the data of a virtual machine changes frequently and the incremental data is large, the system can automatically increase the backup frequency of the virtual machine to ensure data security. At the same time, if the storage space is about to reach the upper limit, the system can also prompt the administrator to adjust the backup strategy, such as extending the backup cycle or compressing the backup data.

[0071] Furthermore, in order to ensure the security of backup and recovery operations, user permissions can be managed, and only users with corresponding permissions can initiate backup or recovery operations or modify backup policies. At the same time, backup data can also be encrypted and stored to prevent data leakage or illegal access.

[0072] Furthermore, during the backup or recovery process, if an error or abnormality occurs, the system will record the error information and handle it accordingly. For errors that can be automatically recovered, such as backup failure caused by temporary network interruption, the system will try to re-run the backup or recovery operation, and for errors that cannot be automatically recovered, the system will notify the administrator and provide detailed error information for the administrator to manually handle.

[0073] Further, refer to Figure 5 , Figure 5 Schematic diagram of a virtual machine management system based on a PVE environment provided in an embodiment of the present application. Figure 5 When the architecture shown is used to manage virtual machines, the virtual machines can be backed up and restored.

[0074] Taking backup as an example, the backup process includes:

[0075] 1. User sets backup strategy: Users enter the backup management module through the PVE Web interface and set relevant strategies for virtual machine backup, including parameters such as backup frequency and retention period;

[0076] 2. Triggering automated backup tasks: Based on the backup strategy set by the user, the system triggers automated backup tasks. This may be performed regularly, such as performing a backup task once every morning;

[0077] 3. Incremental backup or containerized backup: For KVM virtual machines, the system performs incremental backup, backing up only the data that has changed in the virtual machine; for LXC containers, the system performs containerized backup, backing up the entire container file system;

[0078] 4. Backup storage optimization: The backup data is compressed and deduplicated to reduce storage space and improve backup efficiency.

[0079] 5. Backup storage: The backup data is stored in the specified backup storage location, which can be local storage, network storage or cloud storage, etc.

[0080] Specifically, the user first logs in to the backup management module through the web interface to set different backup policies for different virtual machines or containers. These policies include but are not limited to: backup frequency: such as daily, weekly, monthly backup, or hourly real-time backup, retention period: how long the backup data should be retained, such as 30 days, 6 months or indefinite retention, backup window: specify the time period for performing backup tasks to avoid running backup tasks during system load peaks.

[0081] Then, the virtual machine management system based on the PVE environment will automatically trigger the backup task at the scheduled time according to the set backup strategy, such as managing and executing it through a task scheduler (such as a Cron job) to ensure that it runs at the specified time and frequency.

[0082] Next, when performing the backup process, back up both the KVM virtual machine and the LXC container. For the KVM (Kernel-based Virtual Machine) virtual machine, an incremental backup strategy is used to back up the data that has changed in the virtual machine since the last backup, rather than the entire virtual machine image. For the LXC container, a containerized backup is performed, that is, the data of the entire LXC container is backed up, including all data and configurations in the container.

[0083] At the same time, in order to effectively reduce the space occupied by backup and improve backup efficiency, the backup data can be deduplicated and compressed to eliminate redundant parts in the backup data. At the same time, the size of the data can be further reduced through compression to save storage space.

[0084] It should be noted that backup data can be stored in a variety of locations to meet different availability, reliability and performance requirements, including: local storage (backup data can be stored on the local server where the virtualization platform or management environment is located), network storage (backup data can also be stored on network storage devices such as network attached storage (NAS) or storage area network (SAN)) and cloud storage (backup data is stored in the storage facilities of cloud service providers), without specific restrictions.

[0085] Taking recovery as an example, the recovery process includes:

[0086] 1. Retrieve backup data: When a virtual machine failure or data loss occurs, the user enters the backup management module through the PVE web interface to retrieve and select the backup data to be restored.

[0087] 2. Select a restore point: The user selects the backup data and restore point to be restored, which can be the most recent backup point or a specific backup version.

[0088] 3. Initiate a recovery operation: The user initiates a recovery operation, and the system performs the recovery operation of the virtual machine or container based on the backup data and recovery point selected by the user.

[0089] 4. Rapid recovery: The system uses snapshots or incremental backup data to quickly restore virtual machines or containers to a running state to minimize business interruption time.

[0090] 5. Verify the recovery results: The user verifies the recovery results to ensure that the virtual machine or container has been successfully recovered and resumes normal operation.

[0091] Specifically, when a virtual machine or container fails, or data is accidentally lost, the user can enter the backup management module through the Web interface. In the backup management module, the user can browse and retrieve the relevant information of the virtual machine to be restored, such as the virtual machine identifier, and the data corresponding to the virtual machine identifier is the backup data obtained.

[0092] However, in the actual recovery process, the virtual machine can be restored to a specific state according to actual needs. Therefore, after determining the virtual machine identifier and the corresponding backup data, you can also select a recovery point to further select data in the backup data, such as selecting the data version required for recovery to restore the virtual machine to a specific state, which can be the latest normal state or the normal state at a previous moment.

[0093] After selecting the backup data and recovery point, the recovery program will be started. The virtual machine management system based on the PVE environment will automatically execute the recovery process of the virtual machine and container according to the virtual machine, backup data and recovery point selected by the user. The process may include downloading backup data, verifying the integrity of the data, stopping the running virtual machine or container (if necessary), replacing or restoring data, and restarting the virtual machine or container.

[0094] Finally, after the recovery operation is completed, the virtual machine can be verified to determine whether the restored virtual machine can operate normally. This process usually includes checking whether the virtual machine or container has been successfully started, whether it can be accessed normally, and whether the relevant data and configuration have been restored to the expected state. Only after confirming that everything is normal, the entire recovery process is completed.

[0095] In summary, the present application discloses a virtual machine management system based on a PVE environment, including a backup module and a recovery module, wherein the backup module is used to obtain the incremental data of the first virtual machine and the full data of the LXC container when receiving a backup instruction, and perform a backup process on the first virtual machine according to the incremental data, and perform a backup process on the LXC container according to the full data; the recovery module is used to obtain the recovery data of the second virtual machine and the LXC container when receiving a recovery instruction, and perform a recovery process on the second virtual machine and the LXC container according to the recovery data. In the process of virtual machine operation, by obtaining and backing up the incremental data and the full data of the LXC container generated when the virtual machine is operating, the data of the virtual machine and the LXC container can be effectively isolated and protected, which ensures the security of the data and improves the backup efficiency by reducing the space and time required for backup.

[0096] Also, see Figure 6 , Figure 6 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application, and the electronic device may be a mobile terminal such as a smart phone, a tablet computer, or the like. Figure 6 As shown, the electronic device 600 includes a processor 601 and a memory 602. The processor 601 is electrically connected to the memory 602.

[0097] The processor 601 is the control center of the electronic device 600. It uses various interfaces and lines to connect various parts of the entire electronic device. It executes various functions of the electronic device 600 and processes data by running or loading applications stored in the memory 602 and calling data stored in the memory 602, thereby monitoring the electronic device 600 as a whole.

[0098] In this embodiment, the processor 601 in the electronic device 600 will load the instructions corresponding to the processes of one or more applications into the memory 602 according to the following steps, and the processor 601 will run the application stored in the memory 602, thereby implementing any step in the virtual machine management method based on the PVE environment provided in the above embodiment.

[0099] The electronic device 600 can implement the steps in any embodiment of the virtual machine management method based on the PVE environment provided in the embodiments of the present application. Therefore, it can achieve the beneficial effects that can be achieved by any virtual machine management method based on the PVE environment provided in the embodiments of the present application. Please see the previous embodiments for details and will not be repeated here.

[0100] See also Figure 7 , Figure 7 is another structural schematic diagram of an electronic device provided in an embodiment of the present application, such as Figure 7 As shown, Figure 7 The specific structural block diagram of the electronic device provided in the embodiment of the present application is shown, and the electronic device can be used to implement the virtual machine management method based on the PVE environment provided in the above embodiment. The electronic device 700 can be a mobile terminal such as a smart phone or a laptop computer.

[0101] The RF circuit 710 is used to receive and send electromagnetic waves, realize the mutual conversion between electromagnetic waves and electrical signals, and thus communicate with a communication network or other devices. The RF circuit 710 may include various existing circuit elements for performing these functions, such as antennas, radio frequency transceivers, digital signal processors, encryption / decryption chips, user identity module (SIM) cards, memories, etc. The RF circuit 710 can communicate with various networks such as the Internet, corporate intranets, wireless networks, or communicate with other devices through wireless networks. The above-mentioned wireless networks may include cellular telephone networks, wireless local area networks, or metropolitan area networks. The above-mentioned wireless networks can use various communication standards, protocols and technologies, including but not limited to Global System for Mobile Communication (GSM), Enhanced Data GSM Environment (EDGE), Wideband Code Division Multiple Access (WCDMA), Code Division Multiple Access (CDMA), Time Division Multiple Access (TDMA), Wireless Fidelity (Wi-Fi) (such as Institute of Electrical and Electronics Engineers standards IEEE 802.11a, IEEE 802.11b, IEEE802.11g and / or IEEE802.11n), Voice over Internet Protocol (VoIP), Worldwide Interoperability for Microwave Access (Wi-Max), other protocols for email, instant messaging and short messages, and any other suitable communication protocols, even those that have not yet been developed.

[0102] The memory 720 can be used to store software programs and modules, such as the program instructions / modules corresponding to the virtual machine management method based on the PVE environment in the above-mentioned embodiment. The processor 780 executes various functional applications and the virtual machine management method based on the PVE environment by running the software programs and modules stored in the memory 720.

[0103] The memory 720 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 720 may further include a memory remotely arranged relative to the processor 780, and these remote memories may be connected to the electronic device 700 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0104] The input unit 730 can be used to receive uploaded digital or character information, and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control. Specifically, the input unit 730 may include a touch-sensitive surface 731 and other input devices 732. The touch-sensitive surface 731, also known as a touch display screen or touchpad, can collect user touch operations on or near it (such as operations performed by users using fingers, styluses, or any other suitable objects or accessories on or near the touch-sensitive surface 731), and drive corresponding connection devices according to a pre-set program. Optionally, the touch-sensitive surface 731 may include a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into touch point coordinates, and then sends it to the processor 780, and can receive and execute commands sent by the processor 780. In addition, the touch-sensitive surface 731 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch-sensitive surface 731, the input unit 730 may further include other input devices 732. Specifically, the other input devices 732 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.

[0105] The display unit 740 can be used to display information input by the user or information provided to the user and various graphical user interfaces of the electronic device 700, which can be composed of graphics, text, icons, videos and any combination thereof. The display unit 740 may include a display panel 741, and optionally, the display panel 741 may be configured in the form of LCD (Liquid Crystal Display), OLED (Organic Light-Emitting Diode), etc. Further, the touch-sensitive surface 731 may cover the display panel 741, and when the touch-sensitive surface 731 detects a touch operation on or near it, it is transmitted to the processor 780 to determine the type of the touch event, and then the processor 780 provides corresponding visual output on the display panel 741 according to the type of the touch event. Although in the figure, the touch-sensitive surface 731 and the display panel 741 are implemented as two independent components to implement input and output functions, in some embodiments, the touch-sensitive surface 731 and the display panel 741 can be integrated to implement input and output functions.

[0106] The electronic device 700 may also include at least one sensor 750, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 741 according to the brightness of the ambient light, and the proximity sensor may generate an interrupt when the flip cover is closed or closed. As a type of motion sensor, the gravity acceleration sensor can detect the magnitude of acceleration in each direction (generally three axes), and can detect the magnitude and direction of gravity when stationary, which can be used for applications that identify the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for other sensors such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc. that can also be configured in the electronic device 700, they will not be repeated here.

[0107] The audio circuit 760, the speaker 761, and the microphone 762 can provide an audio interface between the user and the electronic device 700. The audio circuit 760 can transmit the received audio data to the speaker 761 after converting the received audio data into an electrical signal, which is converted into a sound signal for output by the speaker 761; on the other hand, the microphone 762 converts the collected sound signal into an electrical signal, which is received by the audio circuit 760 and converted into audio data, and then the audio data is output to the processor 780 for processing, and then sent to another terminal through the RF circuit 710, or the audio data is output to the memory 720 for further processing. The audio circuit 760 may also include an earplug jack to provide communication between an external headset and the electronic device 700.

[0108] The electronic device 700 can help the user receive requests, send information, etc. through the transmission module 770 (such as a Wi-Fi module), which provides the user with wireless broadband Internet access. Although the transmission module 770 is shown in the figure, it is understandable that it is not a necessary component of the electronic device 700 and can be omitted as needed without changing the essence of the invention.

[0109] The processor 780 is the control center of the electronic device 700. It uses various interfaces and lines to connect various parts of the entire mobile phone. By running or executing software programs and / or modules stored in the memory 720, and calling data stored in the memory 720, it executes various functions of the electronic device 700 and processes data, thereby monitoring the electronic device as a whole. Optionally, the processor 780 may include one or more processing cores; in some embodiments, the processor 780 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, etc., and the modem processor mainly processes wireless communications. It can be understood that the above-mentioned modem processor may not be integrated into the processor 780.

[0110] The electronic device 700 also includes a power supply 790 (such as a battery) for supplying power to various components. In some embodiments, the power supply can be logically connected to the processor 780 through a power management system, so that the power management system can manage charging, discharging, and power consumption management. The power supply 790 can also include any components such as one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, and power status indicators.

[0111] Although not shown, the electronic device 700 also includes a camera (such as a front camera, a rear camera), a Bluetooth module, etc., which will not be described in detail here. Specifically in this embodiment, the display unit of the electronic device is a touch screen display, and the mobile terminal also includes a memory, and one or more programs, wherein one or more programs are stored in the memory, and are configured to be executed by one or more processors to implement any step of the virtual machine management method based on the PVE environment provided in the above embodiment.

[0112] In specific implementation, the above modules can be implemented as independent entities, or can be arbitrarily combined and implemented as the same or several entities. The specific implementation of the above modules can be found in the previous method embodiments, which will not be repeated here.

[0113] A person skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructions, or by controlling related hardware through instructions, and the instructions can be stored in a computer-readable storage medium and loaded and executed by a processor. To this end, an embodiment of the present application provides a storage medium, which stores multiple instructions, and the instructions can be executed by the processor to implement any step of the virtual machine management method based on the PVE environment provided in the above embodiments.

[0114] The storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0115] Since the instructions stored in the storage medium can execute the steps in any embodiment of the virtual machine management method based on the PVE environment provided in the embodiments of the present application, the beneficial effects that can be achieved by any virtual machine management method based on the PVE environment provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.

[0116] The above is a detailed introduction to a virtual machine management system, method, electronic device and storage medium based on a PVE environment provided by the embodiments of 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 and its core idea of ​​the present application. At the same time, for those skilled in the art, according to the idea of ​​the present application, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as a limitation on the present application. Moreover, for those of ordinary skill in the art, without departing from the principles of the present application, several improvements and modifications can be made, and these improvements and modifications are also regarded as the scope of protection of the present application.

Claims

1. A virtual machine management system based on a PVE environment, characterized in that: include: a backup module, configured to, upon receiving a backup instruction, obtain incremental data of the first virtual machine and full data of the LXC container, and perform a backup process on the first virtual machine according to the incremental data, and perform a backup process on the LXC container according to the full data; The recovery module is used to obtain recovery data of the second virtual machine and the LXC container when receiving the recovery instruction, and perform recovery processing on the second virtual machine and the LXC container according to the recovery data.

2. The system according to claim 1, characterized in that The system further comprises: The backup strategy formulation module is used to receive an input backup strategy when a strategy formulation request is received, and associate the backup strategy with a corresponding virtual machine, wherein the backup strategy at least includes a backup cycle and a backup path.

3. The system according to claim 1, characterized in that The backup module comprises: A first receiving unit, configured to receive a backup instruction, identify a first virtual machine identifier included in the backup instruction, and generate a first data acquisition instruction according to the backup instruction, wherein the first virtual machine identifier corresponds to the first virtual machine; A first data acquisition unit, configured to obtain incremental data of the first virtual machine and full data of the LXC container in response to the first data acquisition instruction; A data processing unit, configured to perform deduplication and compression processing on the incremental data and the full data to obtain processed incremental data and full data; The backup unit is used to perform backup processing on the first virtual machine according to the processed incremental data, and to perform backup processing on the LXC container according to the processed full data.

4. The system according to claim 3, characterized in that The backup unit comprises: a backup path determination subunit, configured to query according to the first virtual machine identifier to obtain a backup path corresponding to the first virtual machine; The backup subunit is used to perform backup processing on the first virtual machine according to the backup path and the processed incremental data, and to perform backup processing on the LXC container according to the backup path and the processed full data.

5. The system according to claim 3, characterized in that The backup unit also includes: The data node recording subunit performs data marking on the processed incremental data and full data to obtain version identifiers corresponding to the processed incremental data and full data, respectively.

6. The system according to claim 1, wherein: The recovery module comprises: a second receiving unit, configured to receive a recovery instruction, identify a second virtual machine identifier included in the recovery instruction, and generate a second data acquisition instruction according to the recovery instruction, wherein the second virtual machine identifier corresponds to the second virtual machine; A second data acquisition unit, configured to respond to the second data acquisition instruction and acquire data to be restored for restoring the second virtual machine and the LXC container; A recovery unit, configured to recover the second virtual machine and the LXC container according to the data to be recovered; The verification unit is used to verify the restored second virtual machine and the LXC container, and send verification pass information when the verification is passed.

7. The system according to claim 6, characterized in that The second data acquisition unit includes: a recovery path determination subunit, configured to obtain a second virtual machine identifier of the second virtual machine, and query to obtain a storage path corresponding to the second virtual machine identifier; A data node determination subunit, configured to receive an input data recovery node, wherein the data recovery node includes a data version identifier; The data acquisition subunit is used to respond to the second data acquisition instruction, perform data query according to the data recovery node and the storage path, and obtain the data to be recovered.

8. A virtual machine management method based on a PVE environment, characterized in that: The method comprises: When a backup policy entry request is received, receiving an input backup policy, and associating the backup policy with a corresponding virtual machine, wherein the backup policy includes at least a backup period and a backup path; When receiving the virtual machine backup instruction, identifying a third virtual machine identifier included in the virtual machine backup instruction; Acquire virtual machine incremental data corresponding to the third virtual machine identifier, and acquire container data of an LXC container in a PVE environment; Deduplication and compression are performed on the virtual machine incremental data and the container data to obtain processed virtual machine incremental data and container data; Determine a virtual machine backup path according to the third virtual machine identifier, and perform backup processing on the processed virtual machine incremental data and container data according to the virtual machine backup path; When receiving the virtual machine recovery instruction, identifying a fourth virtual machine included in the virtual machine recovery instruction; Determine the data node to be restored, and obtain the data to be restored according to the data node; Performing recovery processing on the fourth virtual machine and the LXC container to be recovered according to the data to be recovered; The fourth virtual machine and the LXC container after the recovery process are verified, and the recovery is determined to be successful when the verification passes.

9. An electronic device, characterized in that: The electronic device comprises a processor, a memory, and a computer program stored in the memory and executable on the processor, and the processor implements the steps in the method according to claim 8 when executing the computer program.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the method according to claim 8 are implemented.