A virtual machine management method, system, device and medium

By registering, installing and cloning virtual machines in virtual machines, efficient management of continuous integration systems is achieved, and the problem of long-term construction of continuous integration systems is solved, and development efficiency and quality are improved.

CN113886008BActive Publication Date: 2024-11-22INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111102444.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-19
Publication Date
2024-11-22
Estimated Expiration
2041-09-19

AI Technical Summary

Technical Problem

The existing technology lacks standardized continuous integration system construction methods, especially for new products, it takes a long time to build an efficient and stable continuous integration system from scratch.

Method used

By registering a virtual machine, installing compilation tools and dependencies with the image package, creating a template virtual machine, and generating multiple identical virtual machines by cloning, and selecting one as the management host to achieve password-free, synchronous, and batch management of other virtual machines. .

Benefits of technology

It greatly improves the maintenance and update efficiency of the compilation system, reduces manpower investment and costs, and shortens the development cycle of software products.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113886008B_ABST
    Figure CN113886008B_ABST
Patent Text Reader

Abstract

The present invention discloses a virtual machine management method, comprising the following steps: registering a virtual machine and using an acquired image package to install a system on the virtual machine; mounting the image package to a preset directory of the system of the virtual machine; modifying a configuration file to use the image package as a local yum source; using the yum source to install compilation tools and dependencies in the virtual machine to obtain a final template virtual machine; cloning the template virtual machine to obtain multiple identical virtual machines; selecting a virtual machine from multiple identical virtual machines as a management host to manage other virtual machines. The present invention also discloses a system, a computer device, and a readable storage medium. The present invention uses a compilation virtual machine containing a full compilation environment and tools as a template, clones to generate multiple new compilation virtual machines, and then uses one of them as a management entry to perform secret-free, synchronous, and batch management on other virtual machines, which can greatly improve the maintenance and update efficiency of the compilation system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of virtual machines, and in particular to a virtual machine management method, system, device and storage medium. Background Art

[0002] Nowadays, in the era of rapid development of the Internet industry, the frequency and cycle of software product development and delivery are getting shorter and shorter.

[0003] Software development has higher and higher requirements for development efficiency and product quality. The purpose of continuous integration is to allow products to iterate quickly while maintaining high quality. Its core measure is that the code must pass automated testing before it is integrated into the trunk. As long as one test case fails, it cannot be integrated. Through continuous integration, the team can quickly move from one function to another. In short, a large part of agile software development is due to continuous inheritance. However, there is currently no completely standardized method for building a continuous integration system for the development of a new software product. Especially for new products, it will take a long time to build an efficient and stable continuous integration system from scratch. Summary of the invention

[0004] In view of this, in order to overcome at least one aspect of the above problems, an embodiment of the present invention provides a virtual machine management method, comprising the following steps:

[0005] Registering a virtual machine and installing a system on the virtual machine using the acquired image package;

[0006] Mounting the image package to a preset directory of the system of the virtual machine;

[0007] Modify the configuration file to use the mirror package as a local yum source;

[0008] Using the yum source to install compilation tools and dependencies in the virtual machine to obtain a final template virtual machine;

[0009] Cloning the template virtual machine to obtain multiple identical virtual machines;

[0010] A virtual machine is selected from the multiple identical virtual machines as a management host to manage other virtual machines.

[0011] In some embodiments, using the yum source to install the compilation tool and dependencies in the virtual machine to obtain the final template virtual machine further includes:

[0012] In response to receiving a first installation command, obtaining the compilation tool and / or dependency to be installed from the yum source according to parameters in the first installation command;

[0013] Install the obtained compilation tools and / or dependencies.

[0014] In some embodiments, it also includes:

[0015] Receive other compilation tools and / or dependent installation packages downloaded from outside;

[0016] In response to receiving the second installation command, an installation process is executed for the corresponding externally downloaded installation package according to the parameters in the second installation command.

[0017] In some embodiments, selecting a virtual machine from the plurality of identical virtual machines as a management host to manage other virtual machines further comprises:

[0018] Creating a configuration file in the management host;

[0019] Configuration management is performed on other virtual machines according to the configuration information in the configuration file.

[0020] In some embodiments, it also includes:

[0021] The status of each other virtual machine is checked.

[0022] Based on the same inventive concept, according to another aspect of the present invention, an embodiment of the present invention further provides a virtual machine management system, including:

[0023] A registration module, configured to register a virtual machine and install a system on the virtual machine using the acquired image package;

[0024] A mounting module, configured to mount the image package to a preset directory of the system of the virtual machine;

[0025] A yum source module is configured to modify a configuration file to use the mirror package as a local yum source;

[0026] An installation module is configured to use the yum source to install compilation tools and dependencies in the virtual machine to obtain a final template virtual machine;

[0027] A cloning module, configured to clone the template virtual machine to obtain a plurality of identical virtual machines;

[0028] The management module is configured to select a virtual machine from the multiple identical virtual machines as a management host to manage other virtual machines.

[0029] In some embodiments, the installation module is further configured to:

[0030] In response to receiving a first installation command, obtaining the compilation tool and / or dependency to be installed from the yum source according to parameters in the first installation command;

[0031] Install the obtained compilation tools and / or dependencies.

[0032] In some embodiments, a receiving module is further included, configured to:

[0033] Receive other compilation tools and / or dependent installation packages downloaded from outside;

[0034] In response to receiving the second installation command, an installation process is executed for the corresponding externally downloaded installation package according to the parameters in the second installation command.

[0035] Based on the same inventive concept, according to another aspect of the present invention, an embodiment of the present invention further provides a computer device, including:

[0036] at least one processor; and

[0037] A memory storing a computer program executable on the processor, wherein the processor executes the following steps when executing the program:

[0038] Registering a virtual machine and installing a system on the virtual machine using the acquired image package;

[0039] Mounting the image package to a preset directory of the system of the virtual machine;

[0040] Modify the configuration file to use the mirror package as a local yum source;

[0041] Using the yum source to install compilation tools and dependencies in the virtual machine to obtain a final template virtual machine;

[0042] Cloning the template virtual machine to obtain multiple identical virtual machines;

[0043] A virtual machine is selected from the multiple identical virtual machines as a management host to manage other virtual machines.

[0044] In some embodiments, using the yum source to install the compilation tool and dependencies in the virtual machine to obtain the final template virtual machine further includes:

[0045] In response to receiving a first installation command, obtaining the compilation tool and / or dependency to be installed from the yum source according to parameters in the first installation command;

[0046] Install the obtained compilation tools and / or dependencies.

[0047] In some embodiments, it also includes:

[0048] Receive other compilation tools and / or dependent installation packages downloaded from outside;

[0049] In response to receiving the second installation command, an installation process is executed for the corresponding externally downloaded installation package according to the parameters in the second installation command.

[0050] In some embodiments, selecting a virtual machine from the plurality of identical virtual machines as a management host to manage other virtual machines further comprises:

[0051] Creating a configuration file in the management host;

[0052] Configuration management is performed on other virtual machines according to the configuration information in the configuration file.

[0053] In some embodiments, it also includes:

[0054] The status of each other virtual machine is checked.

[0055] Based on the same inventive concept, according to another aspect of the present invention, an embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are performed:

[0056] Registering a virtual machine and installing a system on the virtual machine using the acquired image package;

[0057] Mounting the image package to a preset directory of the system of the virtual machine;

[0058] Modify the configuration file to use the mirror package as a local yum source;

[0059] Using the yum source to install compilation tools and dependencies in the virtual machine to obtain a final template virtual machine;

[0060] Cloning the template virtual machine to obtain multiple identical virtual machines;

[0061] A virtual machine is selected from the multiple identical virtual machines as a management host to manage other virtual machines.

[0062] In some embodiments, using the yum source to install the compilation tool and dependencies in the virtual machine to obtain the final template virtual machine further includes:

[0063] In response to receiving a first installation command, obtaining the compilation tool and / or dependency to be installed from the yum source according to parameters in the first installation command;

[0064] Install the obtained compilation tools and / or dependencies.

[0065] In some embodiments, it also includes:

[0066] Receive other compilation tools and / or dependent installation packages downloaded from outside;

[0067] In response to receiving the second installation command, an installation process is executed for the corresponding externally downloaded installation package according to the parameters in the second installation command.

[0068] In some embodiments, selecting a virtual machine from the plurality of identical virtual machines as a management host to manage other virtual machines further comprises:

[0069] Creating a configuration file in the management host;

[0070] Configuration management is performed on other virtual machines according to the configuration information in the configuration file.

[0071] In some embodiments, it also includes:

[0072] The status of each other virtual machine is checked.

[0073] The present invention has one of the following beneficial technical effects: the present invention uses a compilation virtual machine that creates a full compilation environment and tools as a template, clones to generate multiple new compilation virtual machines, and then uses one of them as a management entry to perform password-free, synchronous, and batch management on other virtual machines, which can greatly improve the maintenance and update efficiency of the compilation system, effectively reduce manpower investment and costs, and shorten the development cycle of software products. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0075] Figure 1 A schematic diagram of a flow chart of a virtual machine management method provided by an embodiment of the present invention;

[0076] Figure 2 A schematic diagram of the structure of a virtual machine management system provided by an embodiment of the present invention;

[0077] Figure 3 A schematic diagram of the structure of a computer device provided by an embodiment of the present invention;

[0078] Figure 4 A schematic diagram of the structure of a computer-readable storage medium provided for an embodiment of the present invention. DETAILED DESCRIPTION

[0079] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the embodiments of the present invention are further described in detail below in combination with specific embodiments and with reference to the accompanying drawings.

[0080] It should be noted that all expressions using "first" and "second" in the embodiments of the present invention are for distinguishing two non-identical entities with the same name or non-identical parameters. It can be seen that "first" and "second" are only for the convenience of expression and should not be understood as limitations on the embodiments of the present invention. The subsequent embodiments will not explain this one by one.

[0081] In the embodiment of the present invention, continuous integration is a software development practice, that is, team development members frequently integrate their work, usually each member integrates at least once a day, which means that multiple integrations may occur every day. Each integration is verified by automated building (including compilation, release, and automated testing) to discover integration errors as early as possible.

[0082] According to one aspect of the present invention, an embodiment of the present invention provides a virtual machine management method, such as Figure 1 As shown, it may include the steps of:

[0083] S1, registering a virtual machine and using the obtained image package to install the system on the virtual machine;

[0084] S2, mounting the image package to a preset directory of the system of the virtual machine;

[0085] S3, modify the configuration file to use the mirror package as a local yum source;

[0086] S4, using the yum source to install compilation tools and dependencies in the virtual machine to obtain a final template virtual machine;

[0087] S5, cloning the template virtual machine to obtain multiple identical virtual machines;

[0088] S6: Select a virtual machine from the multiple identical virtual machines as a management host to manage other virtual machines.

[0089] The present invention creates a compilation virtual machine that includes a full compilation environment and tools as a template, clones it to generate multiple new compilation virtual machines, and then uses one of them as the management entrance to perform password-free, synchronous, and batch management on other virtual machines, which can greatly improve the maintenance and update efficiency of the compilation system, effectively reduce manpower investment and costs, and shorten the development cycle of software products.

[0090] In some embodiments, in step S1, a virtual machine is registered and the system is installed on the virtual machine using the obtained image package. Specifically, since the compilation system is built directly using a complete physical machine, the cost is too high and it is not conducive to solving the compilation conflict problem of multiple systems and multiple modules. Using a virtual machine can generate several subsystems on a physical machine. Therefore, a virtual machine can be registered and a full image package can be used as the system installation disk and local image source of the virtual machine.

[0091] In some embodiments, in step S2, the image package is mounted to the preset directory of the system of the virtual machine, and in step S3, the configuration file is modified to use the image package as a local yum source, and the Centos everything package can be used to install the system. After the system is installed, the image package is uploaded to the system, and a / mnt / iso directory can be created to mount the image. At the same time, the configuration file under / etc / yum.repos.d is modified to use the image as a local yum source.

[0092] In some embodiments, in step S4, the compilation tools and dependencies are installed in the virtual machine using the yum source to obtain the final template virtual machine. Specifically, when the system is installed using the image package, only the fixed system part in the image package can be installed, and some compilation tools and dependencies cannot be installed when the system is installed. Therefore, the image package can be used as a local yum source, and then the dependencies and compilation tools are installed through the yum source. That is, various compilation tools and dependencies required for compilation are installed through yum install through the local yum source.

[0093] In some embodiments, for tools that are missing from the local yum source, the installation package can be downloaded and copied for offline installation on the same version of the system through commands such as yum downloader and pip3 download on the external public network. By obtaining the installation package for offline installation through the local yum source and the external network, a full version containing all compilation tools and environments can be built, which can cover all compilation modules and all projects.

[0094] In some embodiments, using the yum source to install the compilation tool and dependencies in the virtual machine to obtain the final template virtual machine further includes:

[0095] In response to receiving a first installation command, obtaining the compilation tool and / or dependency to be installed from the yum source according to parameters in the first installation command;

[0096] Install the obtained compilation tools and / or dependencies.

[0097] Specifically, when installing compilation tools and dependencies using a local yum source, the installation can be achieved through an installation command, and different command parameters carried in the installation command can achieve the installation of different dependencies and / or compilation tools.

[0098] In some embodiments, it also includes:

[0099] Receive other compilation tools and / or dependent installation packages downloaded from outside;

[0100] In response to receiving the second installation command, an installation process is executed for the corresponding externally downloaded installation package according to the parameters in the second installation command.

[0101] Specifically, when installing other compilation tools and dependencies using an externally downloaded installation package, the installation can also be achieved through an installation command, and different command parameters carried in the installation command can achieve the installation of different dependencies and / or compilation tools.

[0102] In some embodiments, when the template virtual machine has installed dependencies and compilation tools, the virtual machine can be planned and configured, such as planning the network and disk of the template virtual machine, and using ssh-keygen to generate a public key, and complete password-free operations with various systems such as code libraries and test platforms.

[0103] In some embodiments, in step S5, the template virtual machine is cloned to obtain multiple identical virtual machines. Specifically, the template virtual machine can be exported in the form of ovf, etc., and then the exported ovf, etc. is registered as a new virtual machine and named with the planned and configured IP. After obtaining multiple virtual machines, each virtual machine can be used to implement continuous integration.

[0104] In some embodiments, selecting a virtual machine from the plurality of identical virtual machines as a management host to manage other virtual machines further comprises:

[0105] Creating a configuration file in the management host;

[0106] Configuration management is performed on other virtual machines according to the configuration information in the configuration file.

[0107] In some embodiments, it also includes:

[0108] The status of each other virtual machine is checked.

[0109] Specifically, since each virtual machine is cloned, the ssh public key of each virtual machine is the same, and can connect to the code library, test platform, ftp and other systems. Therefore, each virtual machine is the same, and any virtual machine can be used as the management entrance. We can choose one of them as the management host.

[0110] Use ssh-copy-id to manage the password-free connection between the host and other cloned virtual machines. Run the verification script for basic environmental functions such as disk, CPU, memory, network, time, etc. Set up a scheduled task to automatically execute the script at dawn every day, traverse the status of each virtual machine, and automatically repair the virtual machines with abnormal network, disk, time, etc. If the repair is no longer possible, return an error code, and send an email or output a log to record the prompt.

[0111] For compilation tool versions or compilation dependency addition, add version upgrade and dependency addition functions to the script of the management host, and automatically traverse each virtual machine through the management host to perform the same upgrade and management.

[0112] Through the above synchronization mechanism, all virtual machines can be synchronized with each other. As long as one virtual machine is running normally and data is not lost, other virtual machines can be quickly repaired if they are damaged, thus minimizing the impact on R&D work.

[0113] The present invention creates a compilation virtual machine that includes a full compilation environment and tools as a template, clones it to generate multiple new compilation virtual machines, and then uses one of them as the management entrance to perform password-free, synchronous, and batch management on other virtual machines, which can greatly improve the maintenance and update efficiency of the compilation system, effectively reduce manpower investment and costs, and shorten the development cycle of software products.

[0114] Based on the same inventive concept, according to another aspect of the present invention, an embodiment of the present invention further provides a virtual machine management system 400, such as Figure 2 As shown, including:

[0115] A registration module 401 is configured to register a virtual machine and install a system on the virtual machine using the acquired image package;

[0116] The mounting module 402 is configured to mount the image package to a preset directory of the system of the virtual machine;

[0117] A yum source module 403 is configured to modify a configuration file to use the mirror package as a local yum source;

[0118] An installation module 404 is configured to use the yum source to install the compilation tools and dependencies in the virtual machine to obtain a final template virtual machine;

[0119] A cloning module 405 is configured to clone the template virtual machine to obtain multiple identical virtual machines;

[0120] The management module 406 is configured to select a virtual machine from the multiple identical virtual machines as a management host to manage other virtual machines.

[0121] The present invention creates a compilation virtual machine that includes a full compilation environment and tools as a template, clones it to generate multiple new compilation virtual machines, and then uses one of them as the management entrance to perform password-free, synchronous, and batch management on other virtual machines, which can greatly improve the maintenance and update efficiency of the compilation system, effectively reduce manpower investment and costs, and shorten the development cycle of software products.

[0122] In some embodiments, the installation module 404 is further configured to:

[0123] In response to receiving a first installation command, obtaining the compilation tool and / or dependency to be installed from the yum source according to parameters in the first installation command;

[0124] Install the obtained compilation tools and / or dependencies.

[0125] In some embodiments, a receiving module is further included, configured to:

[0126] Receive other compilation tools and / or dependent installation packages downloaded from outside;

[0127] In response to receiving the second installation command, an installation process is executed for the corresponding externally downloaded installation package according to the parameters in the second installation command.

[0128] In some embodiments, the management module 406 is further configured to:

[0129] Creating a configuration file in the management host;

[0130] Configuration management is performed on other virtual machines according to the configuration information in the configuration file.

[0131] In some embodiments, the management module 406 is further configured to:

[0132] The status of each other virtual machine is checked.

[0133] The present invention creates a compilation virtual machine that includes a full compilation environment and tools as a template, clones it to generate multiple new compilation virtual machines, and then uses one of them as the management entrance to perform password-free, synchronous, and batch management on other virtual machines, which can greatly improve the maintenance and update efficiency of the compilation system, effectively reduce manpower investment and costs, and shorten the development cycle of software products.

[0134] Based on the same inventive concept, according to another aspect of the present invention, Figure 3 As shown, an embodiment of the present invention further provides a computer device 501, including:

[0135] at least one processor 520; and

[0136] The memory 510 stores a computer program 511 that can be run on the processor. When the processor 520 executes the program, the following steps are performed:

[0137] S1, registering a virtual machine and using the obtained image package to install the system on the virtual machine;

[0138] S2, mounting the image package to a preset directory of the system of the virtual machine;

[0139] S3, modify the configuration file to use the mirror package as a local yum source;

[0140] S4, using the yum source to install compilation tools and dependencies in the virtual machine to obtain a final template virtual machine;

[0141] S5, cloning the template virtual machine to obtain multiple identical virtual machines;

[0142] S6: Select a virtual machine from the multiple identical virtual machines as a management host to manage other virtual machines.

[0143] The present invention creates a compilation virtual machine that includes a full compilation environment and tools as a template, clones it to generate multiple new compilation virtual machines, and then uses one of them as the management entrance to perform password-free, synchronous, and batch management on other virtual machines, which can greatly improve the maintenance and update efficiency of the compilation system, effectively reduce manpower investment and costs, and shorten the development cycle of software products.

[0144] In some embodiments, using the yum source to install the compilation tool and dependencies in the virtual machine to obtain the final template virtual machine further includes:

[0145] In response to receiving a first installation command, obtaining the compilation tool and / or dependency to be installed from the yum source according to parameters in the first installation command;

[0146] Install the obtained compilation tools and / or dependencies.

[0147] In some embodiments, it also includes:

[0148] Receive other compilation tools and / or dependent installation packages downloaded from outside;

[0149] In response to receiving the second installation command, an installation process is executed for the corresponding externally downloaded installation package according to the parameters in the second installation command.

[0150] In some embodiments, selecting a virtual machine from the plurality of identical virtual machines as a management host to manage other virtual machines further comprises:

[0151] Creating a configuration file in the management host;

[0152] Configuration management is performed on other virtual machines according to the configuration information in the configuration file.

[0153] In some embodiments, it also includes:

[0154] The status of each other virtual machine is checked.

[0155] The present invention creates a compilation virtual machine that includes a full compilation environment and tools as a template, clones it to generate multiple new compilation virtual machines, and then uses one of them as the management entrance to perform password-free, synchronous, and batch management on other virtual machines, which can greatly improve the maintenance and update efficiency of the compilation system, effectively reduce manpower investment and costs, and shorten the development cycle of software products.

[0156] Based on the same inventive concept, according to another aspect of the present invention, Figure 4 As shown, an embodiment of the present invention further provides a computer-readable storage medium 601, wherein the computer-readable storage medium 601 stores computer program instructions 610, and when the computer program instructions 610 are executed by a processor, the following steps are performed:

[0157] S1, registering a virtual machine and using the obtained image package to install the system on the virtual machine;

[0158] S2, mounting the image package to a preset directory of the system of the virtual machine;

[0159] S3, modify the configuration file to use the mirror package as a local yum source;

[0160] S4, using the yum source to install compilation tools and dependencies in the virtual machine to obtain a final template virtual machine;

[0161] S5, cloning the template virtual machine to obtain multiple identical virtual machines;

[0162] S6: Select a virtual machine from the multiple identical virtual machines as a management host to manage other virtual machines.

[0163] The present invention creates a compilation virtual machine that includes a full compilation environment and tools as a template, clones it to generate multiple new compilation virtual machines, and then uses one of them as the management entrance to perform password-free, synchronous, and batch management on other virtual machines, which can greatly improve the maintenance and update efficiency of the compilation system, effectively reduce manpower investment and costs, and shorten the development cycle of software products.

[0164] In some embodiments, using the yum source to install the compilation tool and dependencies in the virtual machine to obtain the final template virtual machine further includes:

[0165] In response to receiving a first installation command, obtaining the compilation tool and / or dependency to be installed from the yum source according to parameters in the first installation command;

[0166] Install the obtained compilation tools and / or dependencies.

[0167] In some embodiments, it also includes:

[0168] Receive other compilation tools and / or dependent installation packages downloaded from outside;

[0169] In response to receiving the second installation command, an installation process is executed for the corresponding externally downloaded installation package according to the parameters in the second installation command.

[0170] In some embodiments, selecting a virtual machine from the plurality of identical virtual machines as a management host to manage other virtual machines further comprises:

[0171] Creating a configuration file in the management host;

[0172] Configuration management is performed on other virtual machines according to the configuration information in the configuration file.

[0173] In some embodiments, it also includes:

[0174] The status of each other virtual machine is checked.

[0175] The present invention creates a compilation virtual machine that includes a full compilation environment and tools as a template, clones it to generate multiple new compilation virtual machines, and then uses one of them as the management entrance to perform password-free, synchronous, and batch management on other virtual machines, which can greatly improve the maintenance and update efficiency of the compilation system, effectively reduce manpower investment and costs, and shorten the development cycle of software products.

[0176] Finally, it should be noted that a person skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing related hardware through a computer program, and the program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods.

[0177] Furthermore, it should be appreciated that the computer-readable storage medium (eg, memory) herein may be either a volatile memory or a nonvolatile memory, or may include both volatile memory and nonvolatile memory.

[0178] It will also be appreciated by those skilled in the art that various exemplary logic blocks, modules, circuits and algorithm steps described in conjunction with the disclosure herein can be implemented as electronic hardware, computer software or a combination of the two. In order to clearly illustrate this interchangeability of hardware and software, a general description has been given to the functions of various schematic components, blocks, modules, circuits and steps. Whether this function is implemented as software or hardware depends on specific applications and the design constraints imposed on the entire system. Those skilled in the art can implement the function in various ways for each specific application, but this implementation decision should not be interpreted as causing a departure from the disclosed scope of the embodiments of the present invention.

[0179] The above are exemplary embodiments disclosed in the present invention, but it should be noted that various changes and modifications may be made without departing from the scope disclosed in the embodiments of the present invention as defined in the claims. The functions, steps and / or actions of the method claims according to the disclosed embodiments described herein do not need to be performed in any particular order. In addition, although the elements disclosed in the embodiments of the present invention may be described or required in individual form, they may also be understood as multiple unless explicitly limited to the singular.

[0180] It should be understood that, as used herein, the singular forms "a", "an" are intended to include the plural forms as well, unless the context clearly supports an exception. It should also be understood that, as used herein, "and / or" refers to any and all possible combinations including one or more of the associated listed items.

[0181] The serial numbers of the embodiments disclosed in the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0182] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.

[0183] A person skilled in the art should understand that the discussion of any of the above embodiments is only exemplary and is not intended to imply that the scope of the disclosure of the embodiments of the present invention (including the claims) is limited to these examples; under the concept of the embodiments of the present invention, the technical features in the above embodiments or different embodiments can also be combined, and there are many other changes in different aspects of the embodiments of the present invention as above, which are not provided in detail for the sake of simplicity. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present invention should be included in the protection scope of the embodiments of the present invention.

Claims

1. A virtual machine management method, It is characterized in that The following steps are involved: Registering a virtual machine and installing a system on the virtual machine using the acquired image package; Mounting the image package to a preset directory of the system of the virtual machine; Modify the configuration file to use the mirror package as a local yum source; Using the yum source to install the compilation tools and dependencies in the virtual machine to obtain the final template virtual machine, wherein the compilation tools and dependencies required for compilation are installed through yum install through the yum source; Cloning the template virtual machine to obtain multiple identical virtual machines; Selecting a virtual machine from the plurality of identical virtual machines as a management host to manage other virtual machines; The method of using the yum source to install the compilation tool and the dependencies in the virtual machine to obtain the final template virtual machine further includes: In response to receiving a first installation command, obtaining the compilation tool and / or dependency to be installed from the yum source according to parameters in the first installation command; Install the obtained compilation tools and / or dependencies; Among them, different dependencies and / or compilation tools corresponding to the installation are installed based on different command parameters carried in the installation command, and a full set of all compilation tools and environments is built based on the offline installation of the installation package obtained from the yum source and the external network, so as to achieve full coverage of all compilation modules and all projects; After the system is installed, the image package is uploaded to the system to create a / mnt / iso directory to mount the image, and the configuration file under / etc / yum.repos.d is modified to use the image as the local yum source; The step of cloning the template virtual machine to obtain a plurality of identical virtual machines includes: The template virtual machine is exported in ovf mode, and the exported ovf is registered to form a new virtual machine, and is named with the planned configured IP to obtain multiple identical virtual machines, so as to realize continuous integration by using each virtual machine.

2. The method according to claim 1, It is characterized in that Also includes: Receive other compilation tools and / or dependent installation packages downloaded from outside; In response to receiving the second installation command, an installation process is executed for the corresponding externally downloaded installation package according to the parameters in the second installation command.

3. The method according to claim 1, It is characterized in that Selecting a virtual machine from the plurality of identical virtual machines as a management host to manage other virtual machines further includes: Creating a configuration file in the management host; Configuration management is performed on other virtual machines according to the configuration information in the configuration file.

4. The method according to claim 3, It is characterized in that Also includes: The status of each other virtual machine is checked.

5. A virtual machine management system, It is characterized in that include: A registration module, configured to register a virtual machine and install a system on the virtual machine using the acquired image package; A mounting module, configured to mount the image package to a preset directory of the system of the virtual machine; A yum source module is configured to modify a configuration file to use the mirror package as a local yum source; An installation module is configured to use the yum source to install the compilation tools and dependencies in the virtual machine to obtain a final template virtual machine, wherein the compilation tools and dependencies required for compilation are installed through yum install through the yum source; A cloning module, configured to clone the template virtual machine to obtain a plurality of identical virtual machines; A management module, configured to select one virtual machine from the plurality of identical virtual machines as a management host to manage other virtual machines; The installation module is further used to: In response to receiving a first installation command, obtaining the compilation tool and / or dependency to be installed from the yum source according to parameters in the first installation command; Install the obtained compilation tools and / or dependencies; Among them, different dependencies and / or compilation tools corresponding to the installation are installed based on different command parameters carried in the installation command, and a full set of all compilation tools and environments is built based on the offline installation of the installation package obtained from the yum source and the external network, so as to achieve full coverage of all compilation modules and all projects; After the system is installed, the image package is uploaded to the system to create a / mnt / iso directory to mount the image, and the configuration file under / etc / yum.repos.d is modified to use the image as the local yum source; The step of cloning the template virtual machine to obtain a plurality of identical virtual machines includes: The template virtual machine is exported in ovf mode, and the exported ovf is registered to form a new virtual machine, and is named with the planned configured IP to obtain multiple identical virtual machines, so as to realize continuous integration by using each virtual machine.

6. The system according to claim 5, It is characterized in that Also included is a receiving module configured as follows: Receive other compilation tools and / or dependent installation packages downloaded from outside; In response to receiving the second installation command, an installation process is executed for the corresponding externally downloaded installation package according to the parameters in the second installation command.

7. A computer device, include: at least one processor; as well as A memory storing a computer program executable on the processor, wherein the processor executes the steps of the method according to any one of claims 1 to 4 when executing the program.

8. A computer-readable storage medium storing a computer program. It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are performed.