A cross-platform virtual machine cloning method

By determining the source virtual machine, selecting cloning type, building prediction models, setting error handling mechanisms and analyzing logs during the virtual machine cloning process, the problems of low efficiency and low degree of automation in the existing technology are solved, and an efficient and automated virtual machine cloning process is achieved.

CN119883523BActive Publication Date: 2025-06-17HUANENG INFORMATION TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510378674.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-28
Publication Date
2025-06-17
Estimated Expiration
2045-03-28

AI Technical Summary

Technical Problem

The existing virtual machine cloning technology has shortcomings in resource allocation efficiency, error handling and optimization analysis, and it relies on a simple error recovery mechanism that relies on manual intervention, and urgently needs intelligent and automated solutions.

Method used

By determining the source virtual machine, selecting cloning types, building a prediction model to estimate resource requirements, requesting resources from the target platform and allocating it; starting the cloning process and setting up an error handling mechanism; finally verifying the cloning results and analyzing the logs, optimizing cloning efficiency, reducing manual intervention, and improving the automation level of the cloning process.

Benefits of technology

It realizes efficient and automation of resource allocation, improves the reliability and efficiency of the cloning process, reduces manual intervention, and improves the automation level of the cloning process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119883523B_ABST
    Figure CN119883523B_ABST
Patent Text Reader

Abstract

The present invention provides a cross-platform virtual machine cloning method, belonging to the field of virtualization technology. The method includes determining the source virtual machine to be cloned, the virtualization platform where the source virtual machine is located, and the target virtualization platform for cloning, and selecting a cloning type; selecting a cloning method according to the cloning type, determining the cloning process, constructing a prediction model to estimate the resources required for the cloning process, making a resource request to the target virtualization platform, and obtaining a resource allocation plan according to the request result; based on the resource allocation plan, starting the cloning process, and at the same time setting an error handling mechanism for the cloning process; verifying the integrity of the cloning result, analyzing the logs during the cloning process, finding out potential optimization points in the cloning process, optimizing the cloning efficiency, reducing manual intervention, and improving the automation level of the cloning process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of virtualization technology, and particularly to a cross-platform virtual machine cloning method. Background Art

[0002] With the expansion of cloud computing and data center scale, virtual machine cloning has become a key technology for rapid deployment and resource expansion. However, existing cloning technologies have deficiencies in resource allocation efficiency, error handling, and optimization analysis, and rely on a simple error recovery mechanism that requires manual intervention. There is an urgent need for intelligent and automated solutions.

[0003] Therefore, the present invention provides a cross-platform virtual machine cloning method. Summary of the Invention

[0004] A cross-platform virtual machine cloning method provided by the present invention determines a source virtual machine, selects a cloning type, constructs a prediction model to estimate resource requirements, requests resources from a target platform and allocates them; starts the cloning process and sets an error handling mechanism; finally verifies the cloning result and analyzes the log to optimize the cloning efficiency, reduce manual intervention, and improve the automation level of the cloning process.

[0005] The present invention provides a cross-platform virtual machine cloning method, including:

[0006] Step 1: Determine the source virtual machine to be cloned, the virtualization platform where the source virtual machine is located, and the target virtualization platform for cloning, and select a cloning type;

[0007] Step 2: Select a cloning method according to the cloning type, determine the cloning process, construct a prediction model to estimate the resources required for the cloning process, request resources from the target virtualization platform, and obtain a resource allocation plan according to the request result;

[0008] Step 3: Based on the resource allocation plan, start the cloning process, and at the same time set an error handling mechanism for the cloning process;

[0009] Step 4: Verify the integrity of the cloning result, analyze the log during the cloning process, and find potential optimization points in the cloning process.

[0010] The present invention provides a cross-platform virtual machine cloning method, which determines the source virtual machine to be cloned, the virtualization platform where the source virtual machine is located, and the target virtualization platform for cloning, and selects a cloning type, including:

[0011] Determine the source virtual machine to be cloned, confirm the status of the source virtual machine to obtain a status confirmation result, and record the virtual machine configuration information at the same time;

[0012] Determine the virtualization platform where the source virtual machine is located according to the virtual machine information;

[0013] Obtain user requirements, perform matching analysis on the user requirements and the source virtual machine, and determine the target virtualization platform;

[0014] Determine the screening conditions based on the status confirmation result, user requirements, and the expected target virtualization platform, and select the cloning type based on the screening conditions.

[0015] The present invention provides a cross-platform virtual machine cloning method. Determine the screening conditions based on the status confirmation result, user requirements, and the expected target virtualization platform, and select the cloning type based on the screening conditions, including:

[0016] Determine the first screening condition by judging the storage space of the target virtualization platform, decompose the user requirements to obtain the cloning time limit, obtain the second screening condition according to the cloning time limit, and obtain the third screening condition according to the status confirmation result;

[0017] Judge the compatibility between the virtualization platform where the source virtual machine is located and the target virtualization platform, and obtain the fourth screening condition according to the compatibility judgment result;

[0018] Comprehensively select the cloning type based on the first screening condition, the second screening condition, the third screening condition, and the fourth screening condition.

[0019] The present invention provides a cross-platform virtual machine cloning method. Select the cloning method according to the cloning type, determine the cloning process, construct a prediction model to estimate the resources required for the cloning process, request resources from the target virtualization platform, and obtain the resource allocation plan according to the request result, including:

[0020] Determine the cloning method from the cloning type - method table according to the cloning type, and determine the cloning process;

[0021] Collect the historical cloning data of the source virtual machine and the parameter information of the current cloning task, construct a prediction model, and predict the resources required for cloning;

[0022] Request the required resources from the target virtualization platform, and at the same time obtain the running information of the target virtualization platform. Calculate the task priority by combining the running information, the required resources, and the parameter information of the current cloning task, and obtain the resource allocation plan.

[0023] The present invention provides a cross-platform virtual machine cloning method. Request the required resources from the target virtualization platform, and at the same time obtain the running information of the target virtualization platform. Calculate the task priority by combining the running information, the required resources, and the parameter information of the current cloning task, and perform intelligent allocation of the required resources, including:

[0024] , wherein, Represents the task priority that varies with space x and time t; Represents the propagation function of the task priority in space; v represents the propagation speed; Represents the dynamic weight coefficient of the resource requirement; Represents the fuzzy variable of the resource requirement for the i-th task; Represents the fuzzy variable of the platform state for the i-th task; Represents the dynamic weight coefficient of the platform state; Represents the dynamic weight coefficient of the task parameters; Represents the fuzzy variable of the task parameters for the i-th task; Represents the random noise; , , Represents the total resource upper limit; n represents the total number of tasks; i represents the task index;

[0025] Based on the required resources and the calculated task priority, request resources from the virtualization platform, and according to the resource allocation plan formulated based on the request result, intelligently allocate the required resources.

[0026] The present invention provides a cross-platform virtual machine cloning method. Based on the resource allocation plan, start the cloning process to obtain a virtual machine, and at the same time set an error handling mechanism for the cloning process, including:

[0027] Before starting the cloning, confirm again whether the resources to be allocated corresponding to the target virtualization platform obtained from the resource allocation plan are sufficient, and check whether the resource status of the resources to be allocated is normal. According to the confirmation result and the confirmation result, execute the cloning process to obtain a virtual machine;

[0028] Based on the cloning process and the virtual machine, determine monitoring metrics, match the error types and handling strategies corresponding to each monitoring metric from the metric - handling strategy table, and thus form an error handling mechanism.

[0029] The present invention provides a cross-platform virtual machine cloning method. Based on the cloning process and the virtual machine, determine monitoring metrics, match the error types and handling strategies corresponding to each monitoring metric from the metric - handling strategy table, and thus form an error handling mechanism, including:

[0030] Conduct the first monitoring on the resource consumption situation during the cloning process, conduct the second monitoring on the progress of the cloning process, and conduct the third monitoring on the health status and running state of the underlying infrastructure corresponding to the virtual machine;

[0031] Obtain the first monitoring metric according to the first monitoring, obtain the second monitoring metric according to the second monitoring, and obtain the third monitoring metric according to the third monitoring;

[0032] Match the error types and processing strategies corresponding to each monitoring metric from the metric - processing strategy table;

[0033] Conduct correlation analysis on the first monitoring metric, the second monitoring metric, and the third monitoring metric to obtain a correlation analysis result;

[0034] Adjust the error types and corresponding processing strategies based on the correlation analysis result, and then form an error handling mechanism.

[0035] The present invention provides a cross - platform virtual machine cloning method, which verifies the integrity of the cloning result, analyzes the logs during the cloning process, and finds potential optimization points in the cloning process, including:

[0036] Confirm that the cloned virtual machine can be started and run normally, determine whether the resource allocation situation of the virtual machine is consistent with the preset resource allocation plan, and compare it with the source virtual machine to obtain a first verification result;

[0037] Use a file system checking tool to check whether there are errors in the file system of the cloned virtual machine to obtain a second verification result;

[0038] Based on the target virtualization platform and the virtualization platform where the source virtual machine is located, verify the integrity of the virtual disk file itself to obtain a third verification result;

[0039] Determine the integrity verification result of the virtual machine by synthesizing the first verification result, the second verification result, and the third verification result;

[0040] Analyze the logs during the cloning process based on the integrity verification result to identify potential optimization points.

[0041] Compared with the prior art, the beneficial effects of the present application are as follows: By determining the source virtual machine, selecting the cloning type, constructing a prediction model to estimate resource requirements, requesting resources from the target platform and allocating them; starting the cloning process and setting up an error handling mechanism; finally verifying the cloning result and analyzing the logs, the cloning efficiency is optimized, manual intervention is reduced, and the automation level of the cloning process is improved.

[0042] Other features and advantages of the present invention will be described in the subsequent specification, and part of them will become obvious from the specification or be understood by implementing the present invention. The objectives and other advantages of the present invention can be achieved and obtained through the structures specifically pointed out in the written specification and the drawings.

[0043] The technical solutions of the present invention will be further described in detail below through the drawings and embodiments. Brief Description of the Drawings

[0044] The accompanying drawings are used to provide a further understanding of the present invention, and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention, and do not constitute a limitation to the present invention. In the accompanying drawings:

[0045] Figure 1 is a schematic flowchart of a cross-platform virtual machine cloning method provided by an embodiment of the present invention. Detailed implementation manners

[0046] The following describes the preferred embodiments of the present invention with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.

[0047] Embodiment 1:

[0048] An embodiment of the present invention provides a cross-platform virtual machine cloning method, as Figure 1 shown, including:

[0049] Step 1: Determine the source virtual machine to be cloned, the virtualization platform where the source virtual machine is located, and the target virtualization platform for cloning, and select the cloning type;

[0050] Step 2: Select a cloning method according to the cloning type, determine the cloning process, build a prediction model to estimate the resources required for the cloning process, request resources from the target virtualization platform, and obtain a resource allocation plan according to the request result;

[0051] Step 3: Based on the resource allocation plan, start the cloning process, and at the same time set an error handling mechanism for the cloning process;

[0052] Step 4: Verify the integrity of the cloning result, analyze the logs during the cloning process, and find potential optimization points in the cloning process.

[0053] In this embodiment, the source virtual machine is the virtual machine to be cloned, which is an existing virtual machine instance, including an operating system, application software, and data. For example, a virtual machine named "WebServer_01" runs the CentOS 7 operating system and hosts a website application.

[0054] In this embodiment, the virtualization platform is a software or hardware platform for running and managing virtual machines, such as VMware vSphere, Microsoft Hyper-V, Oracle VirtualBox, KVM, etc. For example, "WebServer_01" runs on the VMware vSphere 7.0 platform.

[0055] In this embodiment, the target virtualization platform is the virtualization platform to which the cloned virtual machine is desired to be deployed. For example, the target virtualization platform is AWS EC2.

[0056] In this embodiment, the cloning types include full cloning, which creates an exact copy of the source virtual machine, including all data and configurations, taking a relatively long time and occupying a large amount of storage space; incremental cloning, which only clones the changed parts of the source virtual machine since the last snapshot, taking a shorter time and occupying less storage space; linked cloning, where the cloned virtual machine shares some disk space with the source virtual machine, saving storage space but depending on the source virtual machine, and if the source virtual machine is deleted, the linked clone will also be affected; and snapshot cloning, which creates a clone based on a snapshot of the source virtual machine. Since "WebServer_01" is powered off and the target platform AWS EC2 supports snapshot cloning, "snapshot cloning" is selected as the cloning type.

[0057] In this embodiment, by collecting the status, configuration, and user requirements of the source virtual machine, performing matching analysis, the appropriate cloning type and target platform are determined to ensure the cloning process is efficient, reliable, and meets user requirements, which helps reduce IT operation costs, quickly deploy new virtual machines, and enhance business continuity.

[0058] In this embodiment, the cloning method is the specific cloning technology determined from the cloning type - method table according to the cloning type. For example, if the cloning type is "snapshot cloning", the cloning method is "copy based on snapshot".

[0059] In this embodiment, the cloning process is the specific steps of executing the cloning method, such as creating a snapshot, copying disks, configuring the network, etc. For example, for the "copy based on snapshot" cloning method, the cloning process includes: 1. Create a snapshot of the source virtual machine; 2. Create a new virtual disk based on the snapshot; 3. Create a new virtual machine configuration and associate the new virtual disk; 4. Start the new virtual machine.

[0060] In this embodiment, the prediction model input is the input data of the model used to predict the resources required for cloning, usually including the parameter information of the current cloning task and historical cloning data. For example, the input data includes: the disk size of the source virtual machine, the operating system type, the cloning type, the time and resource consumption of historical cloning of the same type, etc. The prediction model output is the result predicted by the prediction model, including resources such as the time, CPU, memory, and storage space required for cloning. For example, the prediction result: cloning time: 5 minutes, CPU: 2 vCPUs, memory: 4GB, storage space: 10GB.

[0061] In this embodiment, the required resources are the resources required for the cloning process determined according to the output of the prediction model. For example, the required resources: 2 vCPUs, 4GB of memory, 10GB of storage space.

[0062] In this embodiment, the resource allocation scheme is a scheme for allocating resources to cloning tasks according to task priorities and available resources. For example, the resource allocation scheme: allocate 2 vCPUs, 4GB of memory, and 10GB of storage space to the cloning task.

[0063] In this embodiment, according to the cloning type, look up the table to determine the cloning method and process, then use historical data and current parameters to build a prediction model to estimate resource requirements, and calculate in combination with the target platform running information and task priorities to formulate a resource allocation scheme.

[0064] In this embodiment, the error handling mechanism is a mechanism that automatically detects and handles errors that occur during the cloning process and the virtual machine running process based on monitoring metrics and the metric - handling strategy table, and involves functions such as alarm, automatic recovery, and logging. For example, when the CPU utilization rate exceeds 90%, the system will automatically send an alarm email to the administrator and record the error log. If the virtual machine shuts down unexpectedly, the system will attempt to automatically restart the virtual machine.

[0065] In this embodiment, before starting the cloning, first verify the feasibility of the resource allocation scheme, confirm that the resources of the target platform are sufficient and the status is normal, and only after the resource verification passes, execute the cloning process and create a virtual machine. At the same time, establish a perfect monitoring and error handling mechanism.

[0066] In this embodiment, the integrity verification result is to comprehensively judge whether the cloned virtual machine has completely and accurately replicated the source virtual machine based on the first, second, and third verification results. For example, the first verification result: the resource allocation is correct; the second verification result: the file system is complete; the third verification result: the virtual disk file is complete. Integrity verification result: the cloned virtual machine is complete. Another example: an error is detected in the file system, integrity verification result: the cloned virtual machine is incomplete.

[0067] In this embodiment, the potential optimization points are to analyze the bottlenecks and areas for improvement in the cloning process based on the integrity verification results and the logs during the cloning process. For example, the log shows that the disk replication takes too long, potential optimization point: consider using a faster storage device or optimizing disk I / O operations; the log shows that there are multiple small errors but are finally automatically repaired, potential optimization point: check the error handling mechanism and improve the error handling strategy.

[0068] The working principle and beneficial effects of the above - mentioned technical solution are: by determining the source virtual machine, selecting the cloning type, building a prediction model to estimate resource requirements, requesting resources from the target platform and allocating them; starting the cloning process and setting up an error handling mechanism; finally verifying the cloning result and analyzing the logs to optimize the cloning efficiency, reduce manual intervention, and improve the automation level of the cloning process.

[0069] Embodiment 2:

[0070] An embodiment of the present invention provides a cross - platform virtual machine cloning method, which determines the source virtual machine to be cloned, the virtualization platform where the source virtual machine is located, and the target virtualization platform for cloning, and selects a cloning type, including:

[0071] Determine the source virtual machine to be cloned, confirm the status of the source virtual machine to obtain a status confirmation result, and record the virtual machine configuration information at the same time;

[0072] Determine the virtualization platform where the source virtual machine is located according to the virtual machine information;

[0073] Obtain user requirements, perform a matching analysis on the user requirements and the source virtual machine, and determine the target virtualization platform;

[0074] Determine screening conditions according to the status confirmation result, user requirements, and the expected target virtualization platform, and select a cloning type based on the screening conditions.

[0075] In this embodiment, the status confirmation is to check the running status of the source virtual machine to ensure the smooth progress of the cloning process, including checking whether the virtual machine is running, in a shutdown state, or a paused state, and whether there are any errors or warnings. For example, view the status of "WebServer_01" through the virtualization platform management interface and confirm that it is in the "shutdown" state.

[0076] In this embodiment, the status confirmation result is the result of the status confirmation, usually a simple description, such as "shutdown", "running", "paused", etc., and possible error information. For example, WebServer_01 status: shutdown, no error.

[0077] In this embodiment, the configuration information is the hardware and software configuration of the source virtual machine, such as the number of CPUs, memory size, hard disk capacity, operating system version, network configuration, etc. For example, "WebServer_01 configuration information: CPU is 2 cores, memory is 4GB, hard disk is 50GB, operating system is CentOS 7.9, network is 192.168.1.100".

[0078] In this embodiment, the user requirements are the target environment that the user hopes to have after cloning the virtual machine, including the target virtualization platform, resource requirements (CPU, memory, storage, etc.), network configuration, etc. For example, the user needs to clone "WebServer_01" to the AWS cloud platform and keep the same configuration.

[0079] In this embodiment, the matching analysis compares the user requirements with the configuration of the source virtual machine to determine whether the target platform meets the requirements and whether adjustments are needed. For example, the analysis finds that the AWS cloud platform can meet the resource requirements of "WebServer_01" and can be configured with the same network as the source virtual machine.

[0080] In this embodiment, the screening conditions are the conditions for determining the cloning type based on the status confirmation result, user requirements, and target virtualization platform. For example, the status of the source virtual machine must be powered off, and the target platform supports snapshot cloning, etc. For example, the screening conditions are: the source virtual machine must be in a powered-off state; the target platform must support snapshot-based cloning; the target platform must have sufficient resources.

[0081] The working principle and beneficial effects of the above technical solution are: by collecting the status, configuration, and user requirements of the source virtual machine, performing matching analysis, so as to determine the appropriate cloning type and target platform, ensuring the efficiency, reliability of the cloning process, and meeting user requirements, which helps to reduce IT operation costs, quickly deploy new virtual machines, and enhance business continuity.

[0082] Embodiment 3:

[0083] An embodiment of the present invention provides a cross-platform virtual machine cloning method, which determines screening conditions according to the status confirmation result, user requirements, and target virtualization platform, and selects a cloning type based on the screening conditions, including:

[0084] Determine the first screening condition by performing storage space determination on the target virtualization platform, decompose the user requirements to obtain the cloning time limit, obtain the second screening condition according to the cloning time limit, and obtain the third screening condition according to the status confirmation result;

[0085] Perform compatibility judgment on the virtualization platform where the source virtual machine is located and the target virtualization platform, and obtain the fourth screening condition according to the compatibility judgment result;

[0086] Select the cloning type by synthesizing the first screening condition, the second screening condition, the third screening condition, and the fourth screening condition.

[0087] In this embodiment, the storage space determination is to evaluate whether the available storage space on the target virtualization platform is sufficient to accommodate the cloned virtual machine, and it is necessary to consider the disk size of the source virtual machine and potential incremental data. For example, the EBS volume of the target AWS EC2 instance has 100 GB of available space, while the disk size of the source virtual machine is 50 GB. Judgment result: The target platform has sufficient storage space.

[0088] In this embodiment, the first screening condition is the result determined based on the storage space to determine whether the cloning type is feasible. If the space is insufficient, some cloning types (such as full cloning) may be excluded. For example, the first screening condition: available storage space ≥ 50GB (source virtual machine disk size).

[0089] In this embodiment, the cloning time limit is determined by decomposing the user requirements to clarify the maximum time allowed for the cloning process, which may be determined by business continuity requirements or maintenance windows. For example, after decomposing the user requirements, it is determined that the cloning must be completed within 30 minutes, otherwise it will affect business operations.

[0090] In this embodiment, requirement decomposition is to refine the user requirements into specific metrics, such as time limits, resource limits, etc., in order to better guide the selection of cloning types. For example, the user requirements are decomposed into: cloning time ≤ 30 minutes, minimizing resource consumption.

[0091] In this embodiment, the second screening condition is based on the cloning time limit to exclude those cloning types with too long cloning times. For example, if the time limit is very short, full cloning may need to be excluded. For example, the second screening condition: cloning time ≤ 30 minutes.

[0092] In this embodiment, the third screening condition is based on the status confirmation result of the source virtual machine. If the source virtual machine is in a running state, some cloning types (such as snapshot-based cloning) may be unavailable or require additional steps. For example, the status confirmation result: the source virtual machine is powered off. The third screening condition: the source virtual machine must be in a powered-off state.

[0093] In this embodiment, compatibility judgment is to determine whether the virtualization platform where the source virtual machine is located is compatible with the target virtualization platform, including compatibility in aspects such as operating system, virtualization technology, and storage format. Incompatibility may require virtual machine conversion or data migration, increasing complexity. For example, the source virtual machine runs on VMware vSphere, and the target platform is AWS EC2. Compatibility judgment: It is necessary to consider converting the VMware virtual disk format to the format supported by AWS, which may require additional conversion steps.

[0094] In this embodiment, the fourth screening condition is based on the result of the compatibility judgment to determine whether additional data conversion steps are required and select the corresponding cloning type. For example, the fourth screening condition: support for the conversion of VMware virtual disk format to AWS EBS volume is required.

[0095] The working principle and beneficial effects of the above technical solution are as follows: According to the storage space of the target platform, the user's cloning time limit, the state of the source virtual machine, and the compatibility between the source and target platforms, multi-dimensional screening conditions are used to intelligently select the cloning type (full clone or incremental clone). If the storage space is insufficient, incremental cloning is preferred; if the time limit is tight, incremental cloning is preferred; if the state of the source virtual machine is poor, full cloning is preferred; if the platforms are incompatible, only full cloning is possible, which improves the cloning efficiency and reliability and reduces the storage consumption and time cost.

[0096] Embodiment 4:

[0097] The embodiment of the present invention provides a cross-platform virtual machine cloning method, which selects a cloning method according to the cloning type, determines the cloning process, constructs a prediction model to estimate the resources required for the cloning process, requests resources from the target virtualization platform, and obtains a resource allocation plan according to the request result, including:

[0098] Determine the cloning method from the cloning type-method table according to the cloning type, and determine the cloning process;

[0099] Collect the historical cloning data of the source virtual machine and the parameter information of the current cloning task, construct a prediction model, and predict the resources required for cloning;

[0100] Request the required resources from the target virtualization platform, and at the same time obtain the running information of the target virtualization platform, calculate the task priority by combining the running information, the required resources, and the parameter information of the current cloning task, and obtain a resource allocation plan.

[0101] In this embodiment, the cloning type-method table is a predefined table that maps different cloning types to specific cloning methods and defines the technologies and steps used for each cloning type. For example, if the cloning type is snapshot cloning, the cloning method is snapshot-based replication, and the corresponding method is to create a clone using the snapshot of the virtual machine.

[0102] In this embodiment, the parameter information of the current cloning task is the various parameters describing the current cloning task, such as the disk size of the source virtual machine, the operating system type, the target virtualization platform, etc. For example, the disk size of the source virtual machine: 50GB, the operating system: CentOS 7, the target platform: AWS EC2, and the cloning type: incremental cloning.

[0103] In this embodiment, the running information is the current running status of the target virtualization platform, such as CPU utilization, memory utilization, storage space usage, etc. For example, CPU utilization: 60%, memory utilization: 70%, and available storage space: 200GB.

[0104] In this embodiment, the task priority is a task priority calculated based on the running information of the target virtualization platform, the required resources, and the parameter information of the current cloning task, which determines the priority of the cloning task relative to other tasks. Some algorithms can be used for calculation. For example, considering the resource shortage degree and task importance. For instance, according to the resource utilization rate and the user-defined priority, the priority of the cloning task is set to "high".

[0105] The working principle and beneficial effects of the above technical solution are as follows: Determine the cloning method and process by looking up the table according to the cloning type, then use historical data and current parameters to construct a prediction model to estimate the resource requirements, combine with the running information of the target platform and task priority calculation to formulate a resource allocation plan, improve the accuracy of resource estimation through the prediction model, optimize resource allocation, reduce resource waste and cloning time, and improve cloning efficiency and success rate.

[0106] Embodiment 5:

[0107] The embodiment of the present invention provides a cross-platform virtual machine cloning method, requests the required resources from the target virtualization platform, and at the same time obtains the running information of the target virtualization platform, calculates the task priority by combining the running information, required resources, and parameter information of the current cloning task, and performs intelligent allocation of the required resources, including:

[0108] where, represents the task priority varying with space x and time t; represents the propagation function of the task priority in space; v represents the propagation speed; represents the dynamic weight coefficient of resource requirements; represents the fuzzy variable of the resource requirements of the i-th task; represents the fuzzy variable of the platform state of the i-th task; represents the dynamic weight coefficient of the platform state; represents the dynamic weight coefficient of task parameters; represents the fuzzy variable of the task parameters of the i-th task; represents random noise; represents the total resource upper limit; n represents the total number of tasks; i represents the task index;

[0109] Based on the required resources and the calculated task priority, request resources from the virtualization platform, and perform intelligent allocation of the required resources according to the resource allocation plan formulated based on the request result.

[0110] ​​The working principle and beneficial effects of the above technical solution are as follows: By means of a dynamic priority calculation model that takes into account space, time, resource requirements, platform status, and task parameters, the resources of the virtualization platform are intelligently allocated. The model synthesizes multiple factors and adds random noise to simulate uncertainty, and finally determines the task priority and performs resource requests and allocations, improving resource utilization, shortening task waiting time, and enhancing the dynamics and adaptability of resource allocation.

[0111] Embodiment 6:

[0112] The embodiment of the present invention provides a cross-platform virtual machine cloning method. Based on the resource allocation scheme, the cloning process is started to obtain a virtual machine. At the same time, an error handling mechanism is set for the cloning process, including:

[0113] Before starting the cloning, confirm again whether the resources to be allocated corresponding to the target virtualization platform obtained from the resource allocation scheme are sufficient, and check whether the resource status of the resources to be allocated is normal. According to the confirmation result, execute the cloning process to obtain a virtual machine;

[0114] Based on the cloning process and the virtual machine, monitor metrics are determined, and the error types and handling strategies corresponding to each monitoring metric are matched from the metric - handling strategy table, thereby forming an error handling mechanism.

[0115] In this embodiment, the resources to be allocated are the resources on the target virtualization platform that are prepared to be allocated to the cloning task, including CPU, memory, storage space, etc. For example, the resources to be allocated: 2 vCPUs, 4GB of memory, 10GB of storage space.

[0116] In this embodiment, the resource status is the running status of the resources to be allocated, such as whether they are available, whether they are healthy, etc. For example, the resource status: all resources are available and in normal status. Or, the resource status: part of the storage space is unavailable due to a disk failure.

[0117] In this embodiment, the virtual machine is a new virtual machine instance generated after the cloning process is completed. For example, after cloning is completed, a new virtual machine named "WebServer_02" is generated.

[0118] In this embodiment, the monitoring metrics are metrics used to monitor the cloning process and the running status of the new virtual machine, including CPU utilization, memory utilization, disk I / O, network traffic, virtual machine status, etc.

[0119] In this embodiment, the metric - handling strategy table is a predefined table that associates monitoring metrics with possible error types and corresponding handling strategies, defining the actions to be taken when a certain metric is abnormal. For example, when the monitoring metric is CPU utilization, the error type is that the CPU utilization exceeds 90%, and the handling strategy is to send an alarm email and consider increasing CPU resources.

[0120] The working principle and beneficial effects of the above - mentioned technical solution are as follows: Before starting the cloning, first verify the feasibility of the resource allocation plan, confirm that the resources of the target platform are sufficient and the status is normal. Only after the resource verification passes, the cloning process is executed and virtual machines are created. At the same time, a perfect monitoring and error - handling mechanism is established to monitor the cloning process in real - time and handle exceptions according to the preset strategy, ensuring the reliability of the cloning process and resource utilization rate, and reducing cloning failures caused by insufficient resources or exceptions.

[0121] Embodiment 7:

[0122] An embodiment of the present invention provides a cross - platform virtual machine cloning method. Based on the cloning process and the virtual machine, monitoring metrics are determined, and the error types and handling strategies corresponding to each monitoring metric are matched from the metric - handling strategy table, thereby forming an error - handling mechanism, including:

[0123] Perform a first monitoring on the resource consumption situation during the cloning process, perform a second monitoring on the progress of the cloning process, and perform a third monitoring on the health status and running state of the underlying infrastructure corresponding to the virtual machine;

[0124] Obtain a first monitoring metric according to the first monitoring, obtain a second monitoring metric according to the second monitoring, and obtain a third monitoring metric according to the third monitoring;

[0125] Match the error types and handling strategies corresponding to each monitoring metric from the metric - handling strategy table;

[0126] Perform an association analysis on the first monitoring metric, the second monitoring metric, and the third monitoring metric to obtain an association analysis result;

[0127] Adjust the error types and corresponding handling strategies based on the association analysis result, thereby forming an error - handling mechanism.

[0128] In this embodiment, the resource consumption situation refers to the usage of resources such as CPU, memory, storage I / O, and network bandwidth during the cloning process; the first monitoring is to monitor the resource consumption situation during the cloning process in real time; the progress situation refers to the progress of the cloning process, such as the percentage completed, remaining time, etc.; the second monitoring is to monitor the progress of the cloning process in real time; the health status and operating status refer to the health status and operating status of the underlying infrastructure (such as physical servers, network devices, storage devices) where the target virtual machine is located; the third monitoring is to monitor the health status and operating status of the virtual machine's underlying infrastructure.

[0129] In this embodiment, the first monitoring metrics are the data collected from the first monitoring, such as average CPU utilization, peak memory usage, disk I / O throughput, etc. For example, average CPU utilization: 75%, peak memory usage: 3.8 GB, average disk I / O wait time: 10 ms.

[0130] In this embodiment, the second monitoring metrics are the data collected from the second monitoring, such as the percentage of cloning completed, estimated remaining time, time taken for each stage, etc. For example, percentage of cloning completed: 80%, estimated remaining time: 2 minutes, time taken for disk replication: 3 minutes.

[0131] In this embodiment, the third monitoring metrics are the data collected from the third monitoring, such as server CPU utilization, memory usage, network latency, storage device status, etc. For example, server CPU utilization: 60%, server memory usage: 50%, network latency: 5 ms, storage device status: normal.

[0132] In this embodiment, the correlation analysis is to analyze the first, second, and third monitoring metrics to find the relationships and potential dependencies between them. The purpose is to identify potential bottlenecks and problems.

[0133] The correlation analysis result is the output of the correlation analysis. For example, the correlation analysis found that when the server CPU utilization exceeds 70%, the progress of the cloning process will decrease significantly, and the disk I / O wait time will increase, indicating that the server CPU has become a bottleneck in the cloning process, and the decrease in the I / O performance of the storage device has led to an extension of the cloning time.

[0134] In this embodiment, the adjustment is to adjust the error types and handling strategies in the metric - handling strategy table according to the correlation analysis result to optimize the error handling mechanism. For example, according to the correlation analysis result, adjust the metric - handling strategy table: original strategy: when the CPU utilization exceeds 90%, send an alarm email; adjusted strategy: when the server CPU utilization exceeds 70%, send an alarm email and recommend adjusting the priority of the cloning task or increasing server resources.

[0135] In this embodiment, the error handling mechanism is an improved one, which can more effectively detect and handle problems during the cloning process. It can, based on the results of correlation analysis, more accurately identify the root causes of problems and take more effective measures.

[0136] The working principle and beneficial effects of the above technical solution are as follows: By monitoring the resource consumption, progress, and underlying infrastructure of the cloning process from multiple dimensions, the first, second, and third monitoring metrics are collected. The error types and handling strategies are matched according to the metric - handling strategy table, and the strategies are dynamically adjusted based on the correlation analysis results among the monitoring metrics, realizing real - time monitoring and intelligent error handling of the cloning process, and improving the reliability and efficiency of cloning.

[0137] Embodiment 8:

[0138] The embodiment of the present invention provides a cross - platform virtual machine cloning method, which verifies the integrity of the cloning result, analyzes the logs during the cloning process, and finds potential optimization points in the cloning process, including:

[0139] Confirm that the cloned virtual machine can be started and run normally, determine whether the resource allocation situation of the virtual machine is consistent with the preset resource allocation plan, and compare it with the source virtual machine to obtain the first verification result;

[0140] Use a file system checking tool to check whether there are errors in the file system of the cloned virtual machine to obtain the second verification result;

[0141] Based on the target virtualization platform and the virtualization platform where the source virtual machine is located, verify the integrity of the virtual disk file itself to obtain the third verification result;

[0142] Comprehensively determine the integrity verification result of the virtual machine based on the first verification result, the second verification result, and the third verification result;

[0143] Analyze the logs during the cloning process based on the integrity verification result to identify potential optimization points.

[0144] In this embodiment, the resource allocation situation refers to the resources such as CPU, memory, and storage space actually allocated to the cloned virtual machine.

[0145] In this embodiment, the first verification result is to compare whether the resource allocation of the cloned virtual machine is consistent with the preset resource allocation plan and compare it with the resource configuration of the source virtual machine. For example, the preset resource allocation plan: 2 vCPUs, 4GB of memory, and 50GB of storage space. The actual resource allocation of the cloned virtual machine: 2 vCPUs, 4GB of memory, and 50GB of storage space. The resource configuration of the source virtual machine: 2 vCPUs, 4GB of memory, and 50GB of storage space. The first verification result: The resource allocation is consistent with the preset plan and the source virtual machine. Another example: Only 1 vCPU is allocated to the cloned virtual machine, and other resources are the same. The first verification result: The resource allocation is inconsistent with the preset plan.

[0146] In this embodiment, the third verification result is to verify the integrity of the virtual disk file of the cloned virtual machine, which usually involves checking the checksum or hash value of the virtual disk file to ensure that the file is not damaged during the cloning process. The verification needs to consider the virtual disk formats of the source virtual machine and the target virtualization platform. For example, use a checksum tool to check the integrity of the VMDK file or VHDX file (Hyper-V) of the cloned virtual machine. The third verification result: The integrity check of the virtual disk file passes. Another example: The checksum does not match, indicating that the file is damaged during the cloning process.

[0147] In this embodiment, the log during the cloning process is a log file recorded during the execution of the cloning process, which includes timestamps, operation steps, error messages, etc.

[0148] In this embodiment, the second verification result is to use a file system checking tool (such as fsck) to check whether there are errors in the file system of the cloned virtual machine, such as missing inodes, damaged data blocks, etc. For example, use the command "fsck -y / dev / sda1" to check the ext4 file system. The second verification result: No errors are found in the file system check. Another example: Errors are found in the file system check and have been repaired.

[0149] The working principle and beneficial effects of the above technical solution are as follows: By verifying the integrity of the cloned virtual machine from multiple dimensions: checking the virtual machine startup status, file system integrity, and virtual disk integrity, and finally obtaining the integrity verification result. Based on the verification result and the cloning process log, analyze and identify potential optimization points in the cloning process, ensure the reliability of the cloned virtual machine, and provide data support for subsequent optimization of the cloning process, thereby improving the cloning efficiency and resource utilization rate.

[0150] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the various embodiments of the present invention.

Claims

1. A cross-platform virtual machine cloning method, characterized in that: include: Step 1: Determine the source virtual machine to be cloned, the virtualization platform where the source virtual machine is located, and the target virtualization platform for cloning, and select the cloning type; Step 2: Select a cloning method based on the cloning type, determine the cloning process, build a prediction model to estimate the resources required for the cloning process, make a resource request to the target virtualization platform, and derive a resource allocation plan based on the request result; Step 3: Based on the resource allocation scheme, start the cloning process and set an error handling mechanism for the cloning process; Step 4: Verify the integrity of the cloning results, analyze the logs during the cloning process, and find potential optimization points for the cloning process; Wherein, step 1 includes: Determine a source virtual machine to be cloned, confirm the state of the source virtual machine, obtain a state confirmation result, and record the virtual machine configuration information; Determine the virtualization platform where the source virtual machine is located according to the virtual machine information; Obtain user requirements, perform matching analysis between the user requirements and the source virtual machine, and determine the target virtualization platform; Determining a screening condition according to the status confirmation result and the target virtualization platform predicted by the user, and selecting a clone type based on the screening condition, including: Determine the storage space of the target virtualization platform to obtain a first screening condition, decompose the user demand to obtain a cloning time limit, obtain a second screening condition based on the cloning time limit, and obtain a third screening condition based on the status confirmation result; Performing a compatibility judgment on the virtualization platform where the source virtual machine is located and the target virtualization platform, and obtaining a fourth screening condition according to the compatibility judgment result; selecting a clone type based on the first screening condition, the second screening condition, the third screening condition and the fourth screening condition; Wherein, step 2 includes: Determine a cloning method from a cloning type-method table according to the cloning type, and determine a cloning process; Collect historical clone data of the source virtual machine and parameter information of the current clone task, build a prediction model, and predict the resources required for cloning; Requesting the required resources from the target virtualization platform, obtaining the operation information of the target virtualization platform, calculating the task priority in combination with the operation information, the required resources and the parameter information of the current clone task, and obtaining a resource allocation plan, including: ,in, represents the task priority that changes with space x and time t; represents the propagation function of task priority in space; v represents the propagation speed; Dynamic weight coefficient representing resource demand; The fuzzy variable representing the resource requirement of the i-th task; The fuzzy variable representing the platform state of the i-th task; Dynamic weight coefficient representing the platform status; Represents the dynamic weight coefficient of the task parameters; fuzzy variables representing the task parameters of the i-th task; represents random noise; , , Indicates the total resource limit; n indicates the total number of tasks; i indicates the index of the task; Based on the required resources and the calculated task priority, the virtualization platform is requested for resources, and the required resources are intelligently allocated according to the resource allocation plan formulated according to the request result; The prediction model input is the input data of the model used to predict the resources required for cloning, including parameter information of the current cloning task and historical cloning data. The prediction model output is the result predicted by the prediction model, including the time, CPU, memory and storage space required for cloning.

2. A cross-platform virtual machine cloning method according to claim 1, characterized in that: Based on the resource allocation scheme, a cloning process is started to obtain a virtual machine, and an error handling mechanism is set for the cloning process, including: Before starting the cloning, confirm again whether the resources to be allocated corresponding to the target virtualization platform obtained by the resource allocation plan are sufficient, and check whether the resource status of the resources to be allocated is normal, and execute the cloning process according to the confirmation result to obtain the virtual machine; Based on the cloning process and the virtual machine, the monitoring index is determined, and the error type and processing strategy corresponding to each monitoring index are matched from the index-processing strategy table, thereby forming an error processing mechanism.

3. A cross-platform virtual machine cloning method according to claim 1, characterized in that: Based on the cloning process and the virtual machine, the monitoring indicators are determined, and the error type and processing strategy corresponding to each monitoring indicator are matched from the indicator-processing strategy table, thereby forming an error handling mechanism, including: Performing a first monitoring of resource consumption during the cloning process, performing a second monitoring of the progress of the cloning process, and performing a third monitoring of the health status and operating status of the underlying infrastructure corresponding to the virtual machine; A first monitoring indicator is obtained according to the first monitoring, a second monitoring indicator is obtained according to the second monitoring, and a third monitoring indicator is obtained according to the third monitoring; Match the error type and processing strategy corresponding to each monitoring indicator from the indicator-processing strategy table; Performing correlation analysis on the first monitoring indicator, the second monitoring indicator, and the third monitoring indicator to obtain a correlation analysis result; Based on the association analysis result, the error type and the corresponding processing strategy are adjusted to form an error processing mechanism.

4. The cross-platform virtual machine cloning method according to claim 1, characterized in that: Verify the integrity of the cloning results, analyze the logs during the cloning process, and find potential optimization points for the cloning process, including: Confirm that the cloned virtual machine can start and run normally, determine whether the resource allocation of the virtual machine is consistent with the preset resource allocation plan, and compare it with the source virtual machine to obtain a first verification result; Use a file system check tool to check whether there is an error in the file system of the cloned virtual machine, and obtain a second verification result; Based on the target virtualization platform and the virtualization platform where the source virtual machine is located, verify the integrity of the virtual disk file itself to obtain a third verification result; Determine the integrity verification result of the virtual machine by combining the first verification result, the second verification result and the third verification result; The logs in the cloning process are analyzed based on the integrity verification results to identify potential optimization points.

Citation Information

Patent Citations

  • Virtual computing resource dynamic management system of cloud computing service platform

    CN102681899A

  • Cross-virtual platform virtual machine migration method and apparatus

    CN107656797A