Method, device, storage medium and computer equipment for creating virtual machine template

By analyzing the installation and deployment configuration information of virtual machines in the production environment, and generating high-value virtual machine templates, it solves the problems of long deployment time and high cost during the virtual machine supply process, and achieves rapid deployment and cost reduction for virtual machine applicants.

CN112328357BActive Publication Date: 2024-12-10CHINA CONSTRUCTION BANK
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202011167231.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-10-26
Publication Date
2024-12-10
Estimated Expiration
2040-10-26

AI Technical Summary

Technical Problem

The existing technology cannot predict business demands during the virtual machine supply process, operating system versions and open source software dependency environments, resulting in long deployment time and high cost, and cannot meet rapidly changing usage scenarios.

Method used

By obtaining the installation and deployment configuration information of virtual machines running in the production environment, analyzing their activity, speciality and novelty, we generate high-value virtual machine templates for rapid deployment of virtual machines that meet the needs.

Benefits of technology

Reduces the usage cost and deployment time of virtual machine applicants, provides personalized, diverse, and adaptable virtual machine templates, and reduces the need to re-customize the virtual machine environment and install environment patches that software depends on.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112328357B_ABST
    Figure CN112328357B_ABST
Patent Text Reader

Abstract

The embodiments of the present invention provide a method, apparatus, storage medium and computer equipment for creating a virtual machine template, and relate to the field of virtual machine supply. The method comprises: obtaining the installation and deployment configuration information of each virtual machine that is operating normally in a production environment; determining the value of each virtual machine as a virtual machine template according to the installation and deployment configuration information of each virtual machine; comparing the value of each virtual machine as a virtual machine template with the average value of each virtual machine, and determining a virtual machine whose value as a virtual machine template is higher than the average value; and generating a virtual machine template according to the installation and deployment configuration information of the virtual machine whose value as a virtual machine template is higher than the average value. Through the virtual machine template provided in this embodiment, a tuned virtual machine can be quickly generated, and there is no need to configure the virtual machine environment according to the software that needs to be installed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of virtual machine provisioning, and in particular to a method, device, storage medium and computer equipment for creating a virtual machine template. Background Art

[0002] VMWARE (Virtual Machine Ware, a virtual machine software) is a data center virtualization solution widely used in the industry today. In the current big data exploration platform, business personnel usually conduct experiments with various big data analysis tools through virtual machines established by VMWARE.

[0003] The current process of exploring the supply of virtual machines on the platform is: receiving business needs, creating virtual machines, installing operating systems, customizing virtual machine environments, and deploying related big data open source software. However, this method cannot predict the operating system version required by the business, and requires users to manually search for resources online and upload them to the virtual machine media library. In addition, it is impossible to predict the dependent environment required by the open source software. Often, after the virtual machine is delivered, the business party will report an error when using it. At this time, it takes a lot of time and energy, and both parties need to communicate to make up for it. In addition, this method has a long deployment cycle, and it often takes more than a week from receiving the demand to deployment. This prolongs the time it takes to go online and cannot meet the rapid changes in usage scenarios. Summary of the invention

[0004] The embodiments of the present invention provide a method, apparatus, storage medium and computer equipment for creating a virtual machine template to solve the above-mentioned problems of high cost and long cycle of using virtual machines.

[0005] In one aspect, an embodiment of the present invention provides a method for creating a virtual machine template, the method comprising:

[0006] Obtain the installation and deployment configuration information of each virtual machine that is running normally in the production environment;

[0007] Determining the value of each virtual machine as a virtual machine template according to the installation deployment configuration information of each virtual machine;

[0008] Compare the value of each virtual machine as a virtual machine template with the average value of each virtual machine, and determine a virtual machine whose value as a virtual machine template is higher than the average value;

[0009] A virtual machine template is generated according to the installation deployment configuration information of the virtual machine having a value higher than the average value as the virtual machine template.

[0010] In an implementation of this embodiment, determining the value of each virtual machine as a virtual machine template according to the installation deployment configuration information of the virtual machine includes:

[0011] Determine the activity value of the virtual machine according to the CPU usage, memory usage and disk usage of the virtual machine;

[0012] Determine the special value of the virtual machine according to the software installation information and system parameters of the virtual machine;

[0013] Determining the novelty value of the virtual machine according to the system creation date of the virtual machine;

[0014] The value of the virtual machine as a virtual machine template is determined according to the activity value, the uniqueness value, and the novelty value.

[0015] In an implementation of this embodiment, determining the uniqueness value of the virtual machine according to the software installation information and system parameters of the virtual machine includes:

[0016] Determining a parameter difference degree value of the virtual machine according to the number of differences between the system parameters of the virtual machine and the default system parameters;

[0017] Determine the difference software on the virtual machine according to the difference between the software installation information of the virtual machine and the default software installation information;

[0018] Determining the software difference degree value of the virtual machine according to the number of the difference software;

[0019] Determining the software association degree value of the virtual machine according to the frequency of occurrence of the difference software;

[0020] The difference value of the virtual machine is determined according to the parameter difference value, the software difference value, and the software association value.

[0021] In an implementation of this embodiment, generating a virtual machine automatic deployment template according to the installation deployment configuration information of the virtual machine having a value higher than an average value as a virtual machine template includes:

[0022] Acquire the installation deployment configuration information of the virtual machine having a value higher than the average value as the virtual machine template;

[0023] Generate a virtual machine self-installation configuration file and an installation script according to the installation deployment configuration information;

[0024] Generate a virtual machine according to the self-installation configuration file and the installation script;

[0025] Installing software on the virtual machine for testing according to the software installation information of the virtual machine;

[0026] If the test is successful, a virtual machine template is generated according to the self-installation configuration file and the installation script.

[0027] In an implementation of this embodiment, generating a virtual machine template according to the installation deployment configuration information of the virtual machine having a value higher than an average value as the virtual machine template further includes:

[0028] The description information corresponding to the virtual machine template is generated according to the software installation information of the virtual machine.

[0029] On the other hand, an embodiment of the present invention provides a device for creating a virtual machine template, the device comprising:

[0030] The configuration management module is used to obtain the installation and deployment configuration information of each virtual machine that is running normally in the production environment;

[0031] A value determination module, used to determine the value of each virtual machine as a virtual machine template according to the installation deployment configuration information of each virtual machine;

[0032] A virtual machine determination module, used to compare the value of each virtual machine as a virtual machine template with the average value of each virtual machine, and determine a virtual machine whose value as a virtual machine template is higher than the average value;

[0033] The template generation module is used to generate a virtual machine template according to the installation deployment configuration information of the virtual machine whose value as the virtual machine template is higher than the average value.

[0034] In one implementation of this embodiment, the value determination module includes:

[0035] An activity value determining unit, configured to determine the activity value of the virtual machine according to the CPU usage, memory usage, and disk usage of the virtual machine;

[0036] A uniqueness value determining unit, configured to determine the uniqueness value of the virtual machine according to software installation information and system parameters of the virtual machine;

[0037] A novelty value determining unit, configured to determine the novelty value of the virtual machine according to a system creation date of the virtual machine;

[0038] A value determination unit determines the value of the virtual machine as a virtual machine template according to the activity value, the uniqueness value and the novelty value.

[0039] In an implementation of this embodiment, the distinctiveness value determining unit includes:

[0040] a parameter difference degree value determining subunit, configured to determine a parameter difference degree value of the virtual machine according to the number of differences between the system parameters of the virtual machine and the default system parameters;

[0041] A special software determination subunit, configured to determine the difference software on the virtual machine according to the difference between the software installation information of the virtual machine and the default software installation information;

[0042] a software difference degree value determining subunit, configured to determine the software difference degree value of the virtual machine according to the amount of the difference software;

[0043] A correlation degree value determining subunit, configured to determine the software correlation degree value of the virtual machine according to the frequency of occurrence of the difference software;

[0044] The special value determination subunit is used to determine the special value of the virtual machine according to the parameter difference degree value, the software difference degree value, and the software association degree value.

[0045] In one implementation of this embodiment, the template generation module includes:

[0046] A configuration information acquisition unit, used to acquire the installation deployment configuration information of the virtual machine having a value higher than the average value as the virtual machine template;

[0047] A self-installation file generating unit, used to generate a virtual machine self-installation configuration file and an installation script according to the installation deployment configuration information;

[0048] A virtual machine generation unit, used to generate a virtual machine according to the self-installation configuration file and the installation script;

[0049] A testing unit, installing software on the virtual machine for testing according to the software installation list information of the virtual machine;

[0050] The template generation unit is used to generate a virtual machine template according to the self-installation configuration file and the installation script after the test is successful.

[0051] In an implementation of this embodiment, the template generation module further includes:

[0052] The description information generating unit is used to generate description information corresponding to the virtual machine template according to the software installation information of the virtual machine.

[0053] On the other hand, an embodiment of the present invention provides a computer storage medium on which computer instructions are stored. The computer instructions can be executed by a processor to implement the method for creating a virtual machine template described in any one of the implementations in the above embodiments.

[0054] In another aspect, an embodiment of the present invention provides a computer device, comprising:

[0055] a memory having a computer program stored thereon;

[0056] The processor is used to execute the computer program to implement the method for creating a virtual machine template described in any one of the implementation modes in the above embodiments.

[0057] The method, device, storage medium and computer device for creating a virtual machine template provided by the embodiments of the present invention have the following beneficial technical effects:

[0058] The embodiment of the present invention collects the installation and deployment configuration information of each virtual machine that is running normally in the production environment, and after performing value analysis on the installation and deployment configuration information, a large number of personalized, diverse, and adaptive virtual machine templates can be output for use by virtual machine applicants. Through the virtual machine template provided by the embodiment of the present invention, the virtual machine applicant can quickly generate a virtual machine that is compatible with the software to be installed, without having to re-customize the virtual machine environment according to the software to be installed and install various environmental patches that the software depends on. Therefore, the virtual machine template provided by the embodiment of the present invention can provide the virtual machine applicant with the greatest platform assistance and reduce the cost of using virtual machines for virtual machine applicants. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only drawings of some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0060] Figure 1 is a flow chart of a method for creating a virtual machine template according to Embodiment 1 of the present invention;

[0061] Figure 2 2 is a schematic diagram of a device for creating a virtual machine template according to Embodiment 2 of the present invention. DETAILED DESCRIPTION

[0062] To make the purpose, technical solution and advantages of the present invention clearer, the embodiments of the present invention will be further described in detail below in conjunction with the accompanying drawings. It should be understood that the following various embodiments are only used for illustration and are not used to limit the scope of protection of the present invention.

[0063] [Example 1]

[0064] Figure 1 1 is a flow chart of a method for creating a virtual machine template according to Embodiment 1 of the present invention. Figure 1 As shown, the method for creating a virtual machine template described in this embodiment may include the following processing:

[0065] S101: Obtaining installation deployment configuration information of each virtual machine that is running normally in a production environment;

[0066] S102: Determine the value of each virtual machine as a virtual machine template according to the installation deployment configuration information of each virtual machine;

[0067] S103: Compare the value of each virtual machine as a virtual machine template with the average value of each virtual machine, and determine a virtual machine whose value as a virtual machine template is higher than the average value;

[0068] S104: Generate a virtual machine template according to the installation deployment configuration information of the virtual machine having a value higher than the average value as the virtual machine template.

[0069] In the prior art, virtual machine applicants need to perform a lot of system platform configuration, deployment and tuning work after obtaining a virtual machine. However, most virtual machine applicants are application developers who lack experience in system platform configuration, deployment and tuning. The system platform administrators who provide assistance also do not have enough understanding of the deployed applications and cannot provide effective assistance. There are a large number of practical cases that have been tuned in the production environment, and many cases have a high degree of similarity with developer needs. This embodiment collects the installation, deployment and configuration information of each virtual machine that is running normally in the production environment, and after performing a value analysis on the installation, deployment and configuration information, it can output a large number of personalized, diverse, and adaptive virtual machine templates for use by virtual machine applicants, which can provide virtual machine applicants with the greatest system platform technical assistance.

[0070] Specifically, in processing S101, the installation and deployment configuration information of each virtual machine that is running normally in the production environment can be obtained through the configuration management system. The configuration management system is a system that collects all server configuration information in the production environment and can be used to collect, count, analyze, predict, and manage existing system resources in the production environment. The installation and deployment configuration information of the virtual machine may include the hardware configuration information and software configuration information of the virtual machine, including but not limited to the system parameter information of the virtual machine's operating system, network and other system levels, software installation information on the virtual machine, CPU usage of the virtual machine, memory usage, disk usage, disk information of the virtual machine, user information, software package information, network information, etc.

[0071] In process S102, data mining and analysis may be performed on the obtained installation deployment configuration information of each virtual machine by using a text analysis tool, and the value of each virtual machine as a virtual machine template may be determined based on the installation deployment configuration information of each virtual machine.

[0072] Among them, the activity value of the virtual machine can be determined according to the CPU usage, memory usage and disk usage of the virtual machine, the uniqueness value of the virtual machine can be determined according to the software installation information and system parameters of the virtual machine, the novelty value of the virtual machine can be determined according to the system creation date of the virtual machine, and the value of the virtual machine as a virtual machine template can be determined according to the activity value, uniqueness value and novelty value of the virtual machine.

[0073] In one implementation of this embodiment, the activity value of the virtual machine may be determined by the following formula:

[0074] At=C*0.5+M*0.3+D*0.2

[0075] Among them, At represents the activity value of the virtual machine, C represents the CPU usage of the virtual machine, M represents the memory usage of the virtual machine, and D represents the disk usage of the virtual machine. 0.5, 0.3, and 0.2 are the weight values ​​of CPU usage, memory usage, and disk usage, respectively, and the weight values ​​are empirical values.

[0076] In one implementation of this embodiment, the uniqueness value of the virtual machine may be determined by the following formula:

[0077] Sp=P*0.5+S*0.3+R*0.2

[0078] Among them, Sp represents the special value of the virtual machine, P represents the parameter difference value of the virtual machine, S represents the software difference value of the virtual machine, R represents the software association value of the virtual machine, 0.5, 0.3, and 0.2 are the weight values ​​of the parameter difference value, software difference value, and software association value respectively, and the weight values ​​are empirical values.

[0079] The parameter difference degree value of the virtual machine can be determined by the number of differences between the system parameters of the virtual machine and the default system parameters. For example, all system parameters on the virtual machine can be listed, compared with the default system parameters, and then the number of different parameters can be calculated, and the parameter difference degree value can be determined according to the number of different parameters. In this implementation, the parameter difference degree value = the number of different parameters between the system parameters of the virtual machine and the default system parameters.

[0080] The software difference degree value of the virtual machine can be determined based on the software installation information of the virtual machine and the default software installation information. The software installation information of the virtual machine may include the software installation list of the virtual machine and the installation configuration information of each software. For example, the software installation information of the virtual machine can be compared with the default software installation information, and the difference software on the virtual machine can be determined based on the difference between the virtual machine software installation information and the default software installation information, and then the software difference degree value of the virtual machine can be determined based on the number of difference software on the virtual machine. In this implementation, the software difference degree value = the number of difference software between the virtual machine's installed software and the default installed software.

[0081] The software association degree value of the virtual machine can be determined according to the frequency of occurrence of the difference software. For example, after determining the difference software on the virtual machine according to the difference between the virtual machine software installation information and the default software installation information, the frequency of the difference software always appearing in all the configuration information of the virtual machine can be counted, and then the frequency of the difference software appearing together is used as the software association degree value of the virtual machine. In this implementation, the software association degree value = the frequency of the difference software appearing together on the virtual machine.

[0082] After determining the parameter difference degree value, software difference degree value, and software association degree value of the virtual machine, these three values ​​can be substituted into the above formula for calculating the special degree value of the virtual machine to determine the special degree value of the virtual machine.

[0083] In one implementation of this embodiment, the novelty value of the virtual machine can be determined according to the system creation date of the virtual machine. For example, the system creation date and the current date of the virtual machine can be obtained, and the creation date is subtracted from the current date. The smaller the date, the newer the system creation date, and the higher the novelty value of the virtual machine. In this implementation, the novelty value of the virtual machine can be determined by the following formula:

[0084] Nt = 1-(current date-creation date) / 365

[0085] Wherein, Nt represents the novelty value of the virtual machine. In this embodiment, only virtual machines created no more than one year may be considered, and virtual machines created more than one year may not be considered, and the novelty value of virtual machines created more than one year is set to 0.

[0086] After determining the activity value At, the special value Sp, and the novelty value Nt of the virtual machine, the value of the virtual machine as a virtual machine template can be determined according to the activity value At, the special value Sp, and the novelty value Nt of the virtual machine. In this embodiment, the value of the virtual machine as a virtual machine template can be determined by the following formula:

[0087] V=W1*At+W2*Sp+W3*Nt

[0088] Among them, V represents the value of the virtual machine as a virtual machine template, At represents the activity value of the virtual machine, Sp represents the special value of the virtual machine, Nt represents the novelty value of the virtual machine, W1 represents the weight of the activity parameter, W2 represents the weight of the special parameter, and W3 represents the weight of the novelty parameter.

[0089] In an implementation of this embodiment, W1, W2, and W3 may be determined by an evolutionary algorithm. The method for determining weights W1, W2, and W3 is described in detail below.

[0090] First, the weight of At can be set to 5, the weight of Sp can be set to 3, and the weight of Nt can be set to 2, thus obtaining Solution 1. The weight of At can be set to 3, the weight of Sp can be set to 5, and the weight of Nt can be set to 2, thus obtaining Solution 2. The weight of At can be set to 2, the weight of Sp can be set to 3, and the weight of Nt can be set to 5, thus obtaining Solution 3. Then, the virtual machine template obtained according to Solution 1 is Result 1. The virtual machine template obtained according to Solution 2 is Result 2. The virtual machine template obtained according to Solution 3 is Result 3.

[0091] Afterwards, the three results can be distributed to business personnel for selection and use, and the usage rate of each result can be counted. If the usage rate of solution 1 is high, the weights are adjusted to 6, 3, and 1 until the usage rate reaches the inflection point. After that, the weight when the usage rate reaches the inflection point is used as the final weight value. The final weight value can be used to obtain the value of each virtual machine as a virtual machine template, which is a stable value.

[0092] After obtaining the value of each virtual machine as a template, a virtual machine with "high value" can be determined according to the value of each virtual machine as a virtual machine template. If the virtual machine has "high value", it means that the virtual machine is suitable as a virtual machine template, and then the virtual machine template can be generated according to the installation configuration information of the virtual machine with "high value". In this embodiment, the value of each virtual machine as a virtual machine template can be compared with the average value of each virtual machine, and the virtual machine with a value higher than the average value can be determined as a virtual machine with "high value", and then the virtual machine template can be generated according to the installation configuration information of the virtual machine with "high value".

[0093] There are a large number of virtual machines in the production environment. Generating a virtual machine template for each virtual machine consumes a large amount of system resources and storage resources. Providing a large number of virtual machine templates is not conducive to the selection of virtual machine applicants. In addition, the use value of generating a virtual machine template based on a "low-value" virtual machine is not high, which will cause a waste of resources. This embodiment generates a virtual machine template based on the installation configuration information of a "high-value" virtual machine, which can save resources, reduce resource consumption, and reduce the selection cost of virtual machine applicants.

[0094] In one implementation of this embodiment, when generating a virtual machine template, the installation and deployment configuration information of a "high-value" virtual machine can be obtained; a virtual machine self-installation configuration file and an installation script are generated based on the installation and deployment configuration information; a virtual machine is generated based on the self-installation configuration file and the installation script; software is installed on the virtual machine for testing based on the software installation information of the virtual machine; if the test is successful, a virtual machine template is generated based on the self-installation configuration file and the installation script.

[0095] Specifically, the installation and deployment configuration information such as disk information, user information, software package information, network information, etc. of the "high-value" virtual machine can be collected, and then the VMWARE rapid deployment tool can be used to make the ks.cfg file required by KickStart (the file is the self-installation configuration file for generating the virtual machine) according to the installation and deployment configuration information of the virtual machine through the background process in the database, and stored in the directory of the KickStart server, and the installation script is generated. After that, the user can run the installation script through the command line (such as the vcenter command) to generate the virtual machine. After the virtual machine is generated, the installation script can obtain a dynamic IP address through DHCP and install the operating system of the virtual machine by accessing the KickStart server. The ks.cfg file records various parameters that need to be filled in manually during the typical installation process. In the subsequent installation process, when there is a situation where parameters are required to be filled in, the installation script will first search for the generated ks.cfg file. When suitable parameters are found in the file, the found parameters are adopted. When suitable parameters are not found, it reminds the installer that manual intervention is required. The ks.cfg file generated according to the installation deployment configuration information of the virtual machine with "high value" in this embodiment can cover all parameters that need to be filled in during the virtual machine installation process. During installation, the installation script can automatically obtain the ks.cfg file for automatic installation. After the installation is completed, the installation program will restart the system according to the restart option set in ks.cfg and end the installation.

[0096] After installation, the software can be installed and deployed on the generated virtual machine according to the software installation information of the virtual machine with "high value" for testing. Once the test is successful, the virtual machine template can be generated according to the self-installation configuration file and installation script generated by the installation and deployment configuration information of the virtual machine with "high value". For example, if the value of virtual machine 1 as a virtual machine template is higher than the average value of all virtual machines, it is determined that virtual machine 1 has "high value", and virtual machine self-installation configuration file 1 and installation script 1 can be generated according to the installation and deployment configuration information of virtual machine 1, and then virtual machine 2 can be generated according to the self-installation configuration file 1 and installation script 1 for testing. In the test, the software installation information of virtual machine 1 can be obtained, and the software installed on virtual machine 1 (such as software A and software B) and related installation information can be obtained from the software installation information of virtual machine 1, and these software can be installed on virtual machine 2 (such as installing software A and software B). If these software can run normally on virtual machine 2, it means that the test is successful. At this time, virtual machine template 1 can be generated according to self-installation configuration file 1 and installation script 1.

[0097] Furthermore, in order to provide the virtual machine applicant with the greatest system platform technical assistance, when generating a virtual machine template, description information corresponding to the virtual machine template can be generated according to the software installation information of the virtual machine, and the description information can include, for example, a brief description of the virtual machine template, the software that can be installed on the virtual machine template, etc. For example, in the above example, when generating virtual machine template 1, description information corresponding to virtual machine template 1 can be generated according to the software installation information of virtual machine 1. For example, if the software installation information of virtual machine 1 includes software A and software B, the description information corresponding to virtual machine template 1 can indicate that virtual machine template 1 can install software A and software B.

[0098] Through the above method, this embodiment can output multiple optimized virtual machine templates and corresponding software descriptions. Virtual machine applicants can select suitable virtual machine templates according to the software descriptions to quickly generate virtual machines that meet business needs. There is no need to reconfigure the environment on which various software depends after the virtual machine is generated. The virtual machine can be quickly installed and deployed, reducing the usage cost of the virtual machine applicant.

[0099] [Example 2]

[0100] Figure 2 FIG. 2 is a schematic diagram of a device for creating a virtual machine template according to Embodiment 2 of the present invention. Figure 2 As shown, the device 10 for creating a virtual machine template in this embodiment may include but is not limited to: a configuration management module 11, a value determination module 12, a virtual machine determination module 13 and a template generation module 14.

[0101] The configuration management module 11 is used to obtain the installation deployment configuration information of each virtual machine that is running normally in the production environment.

[0102] The value determination module 12 is used to determine the value of each virtual machine as a virtual machine template according to the installation deployment configuration information of each virtual machine.

[0103] The virtual machine determination module 13 is used to compare the value of each virtual machine as a virtual machine template with the average value of each virtual machine, and determine a virtual machine whose value as a virtual machine template is higher than the average value.

[0104] The template generation module 14 is used to generate a virtual machine template according to the installation deployment configuration information of the virtual machine having a value higher than the average value as the virtual machine template.

[0105] In one implementation of this embodiment, the value determination module includes:

[0106] An activity value determining unit, configured to determine the activity value of the virtual machine according to the CPU usage, memory usage, and disk usage of the virtual machine;

[0107] A uniqueness value determining unit, configured to determine the uniqueness value of the virtual machine according to software installation information and system parameters of the virtual machine;

[0108] A novelty value determining unit, configured to determine the novelty value of the virtual machine according to a system creation date of the virtual machine;

[0109] A value determination unit determines the value of the virtual machine as a virtual machine template according to the activity value, the uniqueness value and the novelty value.

[0110] In an implementation of this embodiment, the distinctiveness value determining unit includes:

[0111] a parameter difference degree value determining subunit, configured to determine a parameter difference degree value of the virtual machine according to the number of differences between the system parameters of the virtual machine and the default system parameters;

[0112] A special software determination subunit, configured to determine the difference software on the virtual machine according to the difference between the software installation information of the virtual machine and the default software installation information;

[0113] a software difference degree value determining subunit, configured to determine the software difference degree value of the virtual machine according to the amount of the difference software;

[0114] A correlation degree value determining subunit, configured to determine the software correlation degree value of the virtual machine according to the frequency of occurrence of the difference software;

[0115] The special value determination subunit is used to determine the special value of the virtual machine according to the parameter difference degree value, the software difference degree value, and the software association degree value.

[0116] In one implementation of this embodiment, the template generation module includes:

[0117] A configuration information acquisition unit, used to acquire the installation deployment configuration information of the virtual machine having a value higher than the average value as the virtual machine template;

[0118] A self-installation file generating unit, used to generate a virtual machine self-installation configuration file and an installation script according to the installation deployment configuration information;

[0119] A virtual machine generation unit, used to generate a virtual machine according to the self-installation configuration file and the installation script;

[0120] A testing unit, which installs software on the virtual machine for testing according to the software installation information of the virtual machine;

[0121] The template generation unit is used to generate a virtual machine template according to the self-installation configuration file and the installation script after the test is successful.

[0122] In an implementation of this embodiment, the template generation module further includes:

[0123] The description information generating unit is used to generate description information corresponding to the virtual machine template according to the software installation information of the virtual machine.

[0124] The device for creating a virtual machine template provided in this embodiment is a device embodiment corresponding to the method embodiment for creating a virtual machine template described above. The specific working process and processing can be referred to the aforementioned method embodiment, which will not be described in detail here.

[0125] Through the description of the above embodiments, those skilled in the art can clearly understand that the present invention can be implemented by combining software with a hardware platform. Based on such an understanding, all or part of the contribution of the technical solution of the present invention to the background technology can be embodied in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in certain parts of the various embodiments or implementation methods of the present invention.

[0126] [Example 3]

[0127] An embodiment of the present invention provides a computer-readable storage medium, such as a hard disk, an optical disk, a flash memory, a floppy disk, a magnetic tape, etc., on which computer-readable instructions are stored. The computer-readable instructions can be executed by a processor to implement the method of creating a virtual machine template described in Example 1.

[0128] [Example 4]

[0129] An embodiment of the present invention provides a computer-readable storage medium, such as a hard disk, an optical disk, a flash memory, a floppy disk, a magnetic tape, etc., on which computer-readable instructions are stored. The computer-readable instructions can be executed by a processor to implement the method of creating a virtual machine template described in Example 1.

[0130] The terms and expressions used in this specification are for illustration only and are not intended to be limiting. It should be understood by those skilled in the art that various changes may be made to the details of the above embodiments without departing from the basic principles of the disclosed embodiments. Therefore, the scope of protection of the present invention is determined solely by the claims, and in the claims, unless otherwise specified, all terms should be understood in the broadest reasonable sense.

Claims

1. A method for creating a virtual machine template, characterized in that: The method comprises: Obtain the installation and deployment configuration information of each virtual machine that is running normally in the production environment; Determining the value of each virtual machine as a virtual machine template according to the installation deployment configuration information of each virtual machine; Compare the value of each virtual machine as a virtual machine template with the average value of each virtual machine, and determine a virtual machine whose value as a virtual machine template is higher than the average value; Generating a virtual machine template according to the installation deployment configuration information of the virtual machine having a value higher than the average value as the virtual machine template; The determining of the value of each virtual machine as a virtual machine template according to the installation deployment configuration information of the virtual machine includes: Determine the activity value of the virtual machine according to the CPU usage, memory usage and disk usage of the virtual machine; Determine the special value of the virtual machine according to the software installation information and system parameters of the virtual machine; Determining the novelty value of the virtual machine according to the system creation date of the virtual machine; Determining the value of the virtual machine as a virtual machine template according to the activity value, the uniqueness value, and the novelty value; The determining of the special value of the virtual machine according to the software installation information and system parameters of the virtual machine includes: Determining a parameter difference degree value of the virtual machine according to the number of differences between the system parameters of the virtual machine and the default system parameters; Determine the difference software on the virtual machine according to the difference between the software installation information of the virtual machine and the default software installation information; Determining the software difference degree value of the virtual machine according to the number of the difference software; Determining the software association degree value of the virtual machine according to the frequency of occurrence of the difference software; The special value of the virtual machine is determined according to the parameter difference degree value, the software difference degree value, and the software association degree value.

2. The method for creating a virtual machine template according to claim 1, characterized in that: The step of generating a virtual machine automatic deployment template according to the installation deployment configuration information of the virtual machine having a value higher than the average value as the virtual machine template includes: Acquire the installation deployment configuration information of the virtual machine having a value higher than the average value as the virtual machine template; Generate a virtual machine self-installation configuration file and an installation script according to the installation deployment configuration information; Generate a virtual machine according to the self-installation configuration file and the installation script; Installing software on the virtual machine for testing according to the software installation information of the virtual machine; If the test is successful, a virtual machine template is generated according to the self-installation configuration file and the installation script.

3. The method for creating a virtual machine template according to claim 2, characterized in that: The step of generating a virtual machine template according to the installation deployment configuration information of the virtual machine having a value higher than the average value as the virtual machine template further includes: The description information corresponding to the virtual machine template is generated according to the software installation information of the virtual machine.

4. A device for creating a virtual machine template, characterized in that: The device comprises: The configuration management module is used to obtain the installation and deployment configuration information of each virtual machine that is running normally in the production environment; A value determination module, used to determine the value of each virtual machine as a virtual machine template according to the installation deployment configuration information of each virtual machine; A virtual machine determination module, used to compare the value of each virtual machine as a virtual machine template with the average value of each virtual machine, and determine a virtual machine whose value as a virtual machine template is higher than the average value; A template generation module, used to generate a virtual machine template according to the installation deployment configuration information of the virtual machine with a value higher than the average value as the virtual machine template; Wherein, the value determination module includes: An activity value determining unit, configured to determine the activity value of the virtual machine according to the CPU usage, memory usage, and disk usage of the virtual machine; A uniqueness value determining unit, configured to determine the uniqueness value of the virtual machine according to software installation information and system parameters of the virtual machine; A novelty value determining unit, configured to determine the novelty value of the virtual machine according to a system creation date of the virtual machine; a value determination unit, which determines the value of the virtual machine as a virtual machine template according to the activity value, the uniqueness value and the novelty value; Wherein, the distinctiveness value determining unit comprises: a parameter difference degree value determining subunit, configured to determine a parameter difference degree value of the virtual machine according to the number of differences between the system parameters of the virtual machine and the default system parameters; A special software determination subunit, configured to determine the difference software on the virtual machine according to the difference between the software installation information of the virtual machine and the default software installation information; a software difference degree value determining subunit, configured to determine the software difference degree value of the virtual machine according to the amount of the difference software; A correlation degree value determining subunit, configured to determine the software correlation degree value of the virtual machine according to the frequency of occurrence of the difference software; The special value determination subunit is used to determine the special value of the virtual machine according to the parameter difference degree value, the software difference degree value, and the software association degree value.

5. The device for creating a virtual machine template according to claim 4, characterized in that: The template generation module includes: A configuration information acquisition unit, used to acquire the installation deployment configuration information of the virtual machine having a value higher than the average value as the virtual machine template; A self-installation file generating unit, used to generate a virtual machine self-installation configuration file and an installation script according to the installation deployment configuration information; A virtual machine generation unit, used to generate a virtual machine according to the self-installation configuration file and the installation script; A testing unit, installing software on the virtual machine for testing according to the software installation list information of the virtual machine; The template generation unit is used to generate a virtual machine template according to the self-installation configuration file and the installation script after the test is successful.

6. The device for creating a virtual machine template according to claim 5, characterized in that: The template generation module also includes: The description information generating unit is used to generate description information corresponding to the virtual machine template according to the software installation information of the virtual machine.

7. A computer storage medium having computer instructions stored thereon, characterized in that: The computer instructions can be executed by a processor to implement the method for creating a virtual machine template as described in any one of claims 1 to 3.

8. A computer device, characterized in that: include: a memory having a computer program stored thereon; A processor, configured to execute the computer program to implement the method for creating a virtual machine template as described in any one of claims 1 to 3.