CN113886008A - Virtual machine management method, system, device and medium - Google Patents

Virtual machine management method, system, device and medium Download PDF

Info

Publication number
CN113886008A
CN113886008A CN202111102444.2A CN202111102444A CN113886008A CN 113886008 A CN113886008 A CN 113886008A CN 202111102444 A CN202111102444 A CN 202111102444A CN 113886008 A CN113886008 A CN 113886008A
Authority
CN
China
Prior art keywords
virtual machine
compiling
virtual machines
installation
virtual
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111102444.2A
Other languages
Chinese (zh)
Inventor
任健
孙明刚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202111102444.2A priority Critical patent/CN113886008A/en
Publication of CN113886008A publication Critical patent/CN113886008A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45562Creating, deleting, cloning virtual machine instances

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a virtual machine management method, which comprises the following steps: registering the virtual machine and filling the system to the virtual machine by using the obtained mirror image packet; mounting the mirror image package to a preset directory of a system of the virtual machine; modifying the configuration file to use the image package as a local yum source; installing a compiling tool and a dependence in the virtual machine by utilizing an yum source to obtain a final template virtual machine; cloning the template virtual machine to obtain a plurality of same virtual machines; one virtual machine is selected from a plurality of identical virtual machines as a management host to manage the other virtual machines. The invention also discloses a system, a computer device and a readable storage medium. The invention takes the compiling virtual machine which comprises a full compiling environment and a full compiling tool as a template, clones to generate a plurality of new compiling virtual machines, and takes one of the compiling virtual machines as a management inlet to carry out secret-free, synchronous and batch management on other virtual machines, thereby greatly improving the maintenance and updating efficiency of the compiling system.

Description

Virtual machine management method, system, device and medium
Technical Field
The present invention relates to the field of virtual machines, and in particular, to a method, system, device, and storage medium for managing a virtual machine.
Background
Nowadays, in the era of the rapid development of the internet industry, the development, delivery frequency and cycle time of software products are getting shorter and shorter.
Software development is also increasingly demanding in terms of development efficiency and product quality. The aim of continuous integration is to allow fast iteration of the product while maintaining high quality. The core measure of the method is that before the code is integrated into the backbone, the code must pass automatic test, and the code cannot be integrated as long as one test case fails. With continued integration, teams can quickly move from one function to another, and in short, a large portion of agile software development is attributed to continued inheritance. At present, for the development of a brand new software product, a completely standardized method for constructing a continuous integration system is not available, and particularly for a new product, a set of efficient and stable continuous integration system is constructed from scratch, so that a long time is consumed.
Disclosure of Invention
In view of the above, in order to overcome at least one aspect of the above problem, an embodiment of the present invention provides a virtual machine management method, including:
registering a virtual machine and filling the virtual machine with the system by using the obtained mirror image packet;
mounting the mirror image package to a preset directory of a system of the virtual machine;
modifying a configuration file to use the image package as a local yum source;
installing a compiling tool and a dependence in the virtual machine by using the yum source to obtain a final template virtual machine;
cloning the template virtual machine to obtain a plurality of same virtual machines;
selecting one virtual machine from the plurality of identical virtual machines as a management host to manage the other virtual machines.
In some embodiments, installing a compilation tool and a dependency in the virtual machine using the yum source to obtain a final template virtual machine further comprises:
in response to receiving a first installation command, acquiring a compiling tool and/or a dependency to be installed from the yum source according to parameters in the first installation command;
and installing the acquired compiling tool and/or the acquired dependencies.
In some embodiments, further comprising:
receiving other compiling tools and/or dependent installation packages downloaded from the outside;
and responding to the received second installation command, and executing an installation flow on the corresponding externally downloaded installation package according to the parameters in the second installation command.
In some embodiments, selecting one virtual machine from the plurality of identical virtual machines as a management host to manage other virtual machines further comprises:
creating a configuration file in the management host;
and carrying out configuration management on other virtual machines according to the configuration information in the configuration file.
In some embodiments, further comprising:
the state of each of the other virtual machines is detected.
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:
the registration module is configured to register the virtual machine and utilize the obtained mirror image package to fill the system for the virtual machine;
the mounting module is configured to mount the mirror image package to a preset directory of a system of the virtual machine;
yum a source module configured to modify a configuration file to treat the image package as a local yum source;
an installation module configured to install a compilation tool and a dependency in the virtual machine using the yum source to obtain a final template virtual machine;
the cloning module is configured to clone the template virtual machine to obtain a plurality of same virtual machines;
a management module configured to select one virtual machine from the plurality of identical virtual machines as a management host to manage the other virtual machines.
In some embodiments, the installation module is further configured to:
in response to receiving a first installation command, acquiring a compiling tool and/or a dependency to be installed from the yum source according to parameters in the first installation command;
and installing the acquired compiling tool and/or the acquired dependencies.
In some embodiments, the apparatus further comprises a receiving module configured to:
receiving other compiling tools and/or dependent installation packages downloaded from the outside;
and responding to the received second installation command, and executing an installation flow on the corresponding externally downloaded installation package according to the parameters in the second installation command.
Based on the same inventive concept, according to another aspect of the present invention, an embodiment of the present invention further provides a computer apparatus, including:
at least one processor; and
a memory storing a computer program operable on the processor, wherein the processor executes the program to perform the steps of:
registering a virtual machine and filling the virtual machine with the system by using the obtained mirror image packet;
mounting the mirror image package to a preset directory of a system of the virtual machine;
modifying a configuration file to use the image package as a local yum source;
installing a compiling tool and a dependence in the virtual machine by using the yum source to obtain a final template virtual machine;
cloning the template virtual machine to obtain a plurality of same virtual machines;
selecting one virtual machine from the plurality of identical virtual machines as a management host to manage the other virtual machines.
In some embodiments, installing a compilation tool and a dependency in the virtual machine using the yum source to obtain a final template virtual machine further comprises:
in response to receiving a first installation command, acquiring a compiling tool and/or a dependency to be installed from the yum source according to parameters in the first installation command;
and installing the acquired compiling tool and/or the acquired dependencies.
In some embodiments, further comprising:
receiving other compiling tools and/or dependent installation packages downloaded from the outside;
and responding to the received second installation command, and executing an installation flow on the corresponding externally downloaded installation package according to the parameters in the second installation command.
In some embodiments, selecting one virtual machine from the plurality of identical virtual machines as a management host to manage other virtual machines further comprises:
creating a configuration file in the management host;
and carrying out configuration management on other virtual machines according to the configuration information in the configuration file.
In some embodiments, further comprising:
the state of each of the other virtual machines is detected.
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 storing a computer program which, when executed by a processor, performs the steps of:
registering a virtual machine and filling the virtual machine with the system by using the obtained mirror image packet;
mounting the mirror image package to a preset directory of a system of the virtual machine;
modifying a configuration file to use the image package as a local yum source;
installing a compiling tool and a dependence in the virtual machine by using the yum source to obtain a final template virtual machine;
cloning the template virtual machine to obtain a plurality of same virtual machines;
selecting one virtual machine from the plurality of identical virtual machines as a management host to manage the other virtual machines.
In some embodiments, installing a compilation tool and a dependency in the virtual machine using the yum source to obtain a final template virtual machine further comprises:
in response to receiving a first installation command, acquiring a compiling tool and/or a dependency to be installed from the yum source according to parameters in the first installation command;
and installing the acquired compiling tool and/or the acquired dependencies.
In some embodiments, further comprising:
receiving other compiling tools and/or dependent installation packages downloaded from the outside;
and responding to the received second installation command, and executing an installation flow on the corresponding externally downloaded installation package according to the parameters in the second installation command.
In some embodiments, selecting one virtual machine from the plurality of identical virtual machines as a management host to manage other virtual machines further comprises:
creating a configuration file in the management host;
and carrying out configuration management on other virtual machines according to the configuration information in the configuration file.
In some embodiments, further comprising:
the state of each of the other virtual machines is detected.
The invention has one of the following beneficial technical effects: the invention takes the compiling virtual machine which comprises a full compiling environment and a full compiling tool as a template, clones to generate a plurality of new compiling virtual machines, and takes one of the compiling virtual machines as a management inlet to carry out secret-free, synchronous and batch management on other virtual machines, thereby greatly improving the maintenance and updating efficiency of the compiling system, effectively reducing the human input and cost and reducing the development period of software products.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other embodiments can be obtained by using the drawings without creative efforts.
Fig. 1 is a schematic flowchart of a virtual machine management method according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a virtual machine management system according to an embodiment of the present invention;
FIG. 3 is a schematic structural diagram of a computer device provided in an embodiment of the present invention;
fig. 4 is a schematic structural diagram of a computer-readable storage medium according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the following embodiments of the present invention are described in further detail with reference to the accompanying drawings.
It should be noted that all expressions using "first" and "second" in the embodiments of the present invention are used for distinguishing two entities with the same name but different names or different parameters, and it should be noted that "first" and "second" are merely for convenience of description and should not be construed as limitations of the embodiments of the present invention, and they are not described in any more detail in the following embodiments.
In embodiments of the present invention, persistent integration is a software development practice, i.e., team development members often integrate their work, usually at least once per member per day, meaning that multiple integrations may occur per day. Each integration is verified by automated build (including compile, release, automated testing) to discover integration errors as early as possible.
According to an aspect of the present invention, an embodiment of the present invention provides a virtual machine management method, as shown in fig. 1, which may include the steps of:
s1, registering the virtual machine and filling the system to the virtual machine by using the obtained mirror image package;
s2, mounting the mirror image package to a preset directory of the system of the virtual machine;
s3, modifying the configuration file to make the mirror image package as a local yum source;
s4, installing a compiling tool and a dependency in the virtual machine by using the yum source to obtain a final template virtual machine;
s5, cloning the template virtual machine to obtain a plurality of same virtual machines;
s6, selecting one virtual machine from the plurality of same virtual machines as a management host to manage other virtual machines.
The invention takes the compiling virtual machine which comprises a full compiling environment and a full compiling tool as a template, clones to generate a plurality of new compiling virtual machines, and takes one of the compiling virtual machines as a management inlet to carry out secret-free, synchronous and batch management on other virtual machines, thereby greatly improving the maintenance and updating efficiency of the compiling system, effectively reducing the human input and cost and reducing the development period of software products.
In some embodiments, in step S1, the virtual machine is registered and the obtained image package is used to install the system in the virtual machine, specifically, since the complete physical machine is directly used to build the compiling system, the cost is too high, and it is not beneficial to solve the problem of conflict in compiling multiple systems and multiple modules. The use of virtual machines may cause one physical machine to generate several subsystems. Thus, the virtual machine can be registered and the full-scale image package can be used as a system installation disk and a local image source of the virtual machine.
In some embodiments, the mirror package is mounted to the virtual machine in step S2 under a preset directory of the system and the configuration file is modified in step S3 to use the mirror package as a local yum source, and the system installation can be performed using the everting package of Centos. After the system is filled, the mirror image package is uploaded to the system, and a/mnt/iso directory can be created to mount the mirror image. While modifying the configuration file under/etc/yum.
In some embodiments, in step S4, the yum source is used to install the compiling tool and the dependency in the virtual machine to obtain a final template virtual machine, specifically, when the system is installed by using the mirror package, since only the fixed system part in the mirror package can be filled, and some compiling tools and dependencies cannot be installed when the system is filled, the mirror package may be used as a local yum source, and then the dependency and the compiling tool are installed through the yum source. That is, various compilation tools and dependencies, etc. required for compilation are installed through yum install via a local yum source.
In some embodiments, for tools or the like missing from a local yum source, the installation package may be downloaded and then copied for offline installation on the same version of the system via yum download, pip3 download, or the like commands over the external public network. A mode of obtaining the installation package offline installation through a local yum source and an external network is used for building a full-scale environment containing all compiling tools and environments, and all compiling modules and all projects can be completely covered.
In some embodiments, installing a compilation tool and a dependency in the virtual machine using the yum source to obtain a final template virtual machine further comprises:
in response to receiving a first installation command, acquiring a compiling tool and/or a dependency to be installed from the yum source according to parameters in the first installation command;
and installing the acquired compiling tool and/or the acquired dependencies.
Specifically, when the compiling tool and the dependencies are installed by using the local yum source, the installation can be realized by an installation command, and the installation of different dependencies and/or compiling tools can be realized by carrying different command parameters in the installation command.
In some embodiments, further comprising:
receiving other compiling tools and/or dependent installation packages downloaded from the outside;
and responding to the received second installation command, and executing an installation flow on the corresponding externally downloaded installation package according to the parameters in the second installation command.
Specifically, when installing other compiling tools and dependencies by using an externally downloaded installation package, the installation can also be realized by an installation command, and the installation of different dependencies and/or compiling tools can be realized by carrying different command parameters in the installation command.
In some embodiments, when the template virtual machine is installed with the dependency and compiling tool, the virtual machine may be planned and configured, for example, the network and disk of the template virtual machine may be planned, and meanwhile, the ssh-keygen may be used to generate the public key, and the public key may be used to complete a secret-free operation with various systems such as a code library and a test platform.
In some embodiments, in step S5, the template virtual machine is cloned to obtain a plurality of identical virtual machines, specifically, the template virtual machine may be derived in ovf or the like, and then the derived ovf or the like is registered as a new virtual machine and named by the IP of the planned configuration. After a plurality of virtual machines are obtained, each virtual machine can be utilized to realize continuous integration.
In some embodiments, selecting one virtual machine from the plurality of identical virtual machines as a management host to manage other virtual machines further comprises:
creating a configuration file in the management host;
and carrying out configuration management on other virtual machines according to the configuration information in the configuration file.
In some embodiments, further comprising:
the state of each of the other virtual machines is detected.
Specifically, each virtual machine is cloned, so that ssh public keys and the like of each virtual machine are the same, and systems such as a code library, a test platform and an ftp can be communicated. Therefore, each virtual machine is the same, any one virtual machine can be used as a management inlet, and only one virtual machine needs to be selected as a management host.
The privacy between the host and each other cloned virtual machine is managed by ssh-copy-id. The basic environment functions such as a disk, a CPU, a memory, a network, time and the like are checked and checked. Setting a timing task, automatically executing the script in the morning and other time every day, traversing the state of each virtual machine, automatically repairing the virtual machines with abnormal states such as network, disk, time and the like, returning to an error code when the virtual machines cannot be repaired, and simultaneously sending a mail or outputting a log and the like for recording and prompting.
For the situations of adding edition of a compiling tool or compiling dependence, the functions of upgrading the edition and adding the compiling dependence are added into a script of the management host, and the management host automatically traverses each virtual machine to carry out the same upgrading and management.
Through the synchronization mechanism, all the virtual machines are in synchronous mirror image with each other, as long as one virtual machine runs normally, data is not lost, other virtual machines can be quickly repaired under the condition that the other virtual machines are damaged, and the influence on research and development work is reduced to the greatest extent.
The invention takes the compiling virtual machine which comprises a full compiling environment and a full compiling tool as a template, clones to generate a plurality of new compiling virtual machines, and takes one of the compiling virtual machines as a management inlet to carry out secret-free, synchronous and batch management on other virtual machines, thereby greatly improving the maintenance and updating efficiency of the compiling system, effectively reducing the human input and cost and reducing the development period of software products.
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, as shown in fig. 2, including:
a registration module 401 configured to register a virtual machine and use the obtained image packet to install a system in the virtual machine;
a mounting module 402 configured to mount the mirror package to a preset directory of a system of the virtual machine;
yum a source module 403 configured to modify a configuration file to treat the image package as a local yum source;
an installation module 404 configured to install a compilation tool and a dependency in the virtual machine using the yum source to obtain a final template virtual machine;
a cloning module 405 configured to clone the template virtual machine to obtain a plurality of identical virtual machines;
a management module 406 configured to select one virtual machine from the plurality of identical virtual machines as a management host to manage the other virtual machines.
The invention takes the compiling virtual machine which comprises a full compiling environment and a full compiling tool as a template, clones to generate a plurality of new compiling virtual machines, and takes one of the compiling virtual machines as a management inlet to carry out secret-free, synchronous and batch management on other virtual machines, thereby greatly improving the maintenance and updating efficiency of the compiling system, effectively reducing the human input and cost and reducing the development period of software products.
In some embodiments, the installation module 404 is further configured to:
in response to receiving a first installation command, acquiring a compiling tool and/or a dependency to be installed from the yum source according to parameters in the first installation command;
and installing the acquired compiling tool and/or the acquired dependencies.
In some embodiments, the apparatus further comprises a receiving module configured to:
receiving other compiling tools and/or dependent installation packages downloaded from the outside;
and responding to the received second installation command, and executing an installation flow on the corresponding externally downloaded installation package according to the parameters in the second installation command.
In some embodiments, the management module 406 is further configured to:
creating a configuration file in the management host;
and carrying out configuration management on other virtual machines according to the configuration information in the configuration file.
In some embodiments, the management module 406 is further configured to:
the state of each of the other virtual machines is detected.
The invention takes the compiling virtual machine which comprises a full compiling environment and a full compiling tool as a template, clones to generate a plurality of new compiling virtual machines, and takes one of the compiling virtual machines as a management inlet to carry out secret-free, synchronous and batch management on other virtual machines, thereby greatly improving the maintenance and updating efficiency of the compiling system, effectively reducing the human input and cost and reducing the development period of software products.
Based on the same inventive concept, according to another aspect of the present invention, as shown in fig. 3, an embodiment of the present invention further provides a computer apparatus 501, comprising:
at least one processor 520; and
a memory 510, the memory 510 storing a computer program 511 executable on the processor, the processor 520 executing the program to perform the steps of:
s1, registering the virtual machine and filling the system to the virtual machine by using the obtained mirror image package;
s2, mounting the mirror image package to a preset directory of the system of the virtual machine;
s3, modifying the configuration file to make the mirror image package as a local yum source;
s4, installing a compiling tool and a dependency in the virtual machine by using the yum source to obtain a final template virtual machine;
s5, cloning the template virtual machine to obtain a plurality of same virtual machines;
s6, selecting one virtual machine from the plurality of same virtual machines as a management host to manage other virtual machines.
The invention takes the compiling virtual machine which comprises a full compiling environment and a full compiling tool as a template, clones to generate a plurality of new compiling virtual machines, and takes one of the compiling virtual machines as a management inlet to carry out secret-free, synchronous and batch management on other virtual machines, thereby greatly improving the maintenance and updating efficiency of the compiling system, effectively reducing the human input and cost and reducing the development period of software products.
In some embodiments, installing a compilation tool and a dependency in the virtual machine using the yum source to obtain a final template virtual machine further comprises:
in response to receiving a first installation command, acquiring a compiling tool and/or a dependency to be installed from the yum source according to parameters in the first installation command;
and installing the acquired compiling tool and/or the acquired dependencies.
In some embodiments, further comprising:
receiving other compiling tools and/or dependent installation packages downloaded from the outside;
and responding to the received second installation command, and executing an installation flow on the corresponding externally downloaded installation package according to the parameters in the second installation command.
In some embodiments, selecting one virtual machine from the plurality of identical virtual machines as a management host to manage other virtual machines further comprises:
creating a configuration file in the management host;
and carrying out configuration management on other virtual machines according to the configuration information in the configuration file.
In some embodiments, further comprising:
the state of each of the other virtual machines is detected.
The invention takes the compiling virtual machine which comprises a full compiling environment and a full compiling tool as a template, clones to generate a plurality of new compiling virtual machines, and takes one of the compiling virtual machines as a management inlet to carry out secret-free, synchronous and batch management on other virtual machines, thereby greatly improving the maintenance and updating efficiency of the compiling system, effectively reducing the human input and cost and reducing the development period of software products.
Based on the same inventive concept, according to another aspect of the present invention, as shown in fig. 4, an embodiment of the present invention further provides a computer-readable storage medium 601, where the computer-readable storage medium 601 stores computer program instructions 610, and the computer program instructions 610, when executed by a processor, perform the following steps:
s1, registering the virtual machine and filling the system to the virtual machine by using the obtained mirror image package;
s2, mounting the mirror image package to a preset directory of the system of the virtual machine;
s3, modifying the configuration file to make the mirror image package as a local yum source;
s4, installing a compiling tool and a dependency in the virtual machine by using the yum source to obtain a final template virtual machine;
s5, cloning the template virtual machine to obtain a plurality of same virtual machines;
s6, selecting one virtual machine from the plurality of same virtual machines as a management host to manage other virtual machines.
The invention takes the compiling virtual machine which comprises a full compiling environment and a full compiling tool as a template, clones to generate a plurality of new compiling virtual machines, and takes one of the compiling virtual machines as a management inlet to carry out secret-free, synchronous and batch management on other virtual machines, thereby greatly improving the maintenance and updating efficiency of the compiling system, effectively reducing the human input and cost and reducing the development period of software products.
In some embodiments, installing a compilation tool and a dependency in the virtual machine using the yum source to obtain a final template virtual machine further comprises:
in response to receiving a first installation command, acquiring a compiling tool and/or a dependency to be installed from the yum source according to parameters in the first installation command;
and installing the acquired compiling tool and/or the acquired dependencies.
In some embodiments, further comprising:
receiving other compiling tools and/or dependent installation packages downloaded from the outside;
and responding to the received second installation command, and executing an installation flow on the corresponding externally downloaded installation package according to the parameters in the second installation command.
In some embodiments, selecting one virtual machine from the plurality of identical virtual machines as a management host to manage other virtual machines further comprises:
creating a configuration file in the management host;
and carrying out configuration management on other virtual machines according to the configuration information in the configuration file.
In some embodiments, further comprising:
the state of each of the other virtual machines is detected.
The invention takes the compiling virtual machine which comprises a full compiling environment and a full compiling tool as a template, clones to generate a plurality of new compiling virtual machines, and takes one of the compiling virtual machines as a management inlet to carry out secret-free, synchronous and batch management on other virtual machines, thereby greatly improving the maintenance and updating efficiency of the compiling system, effectively reducing the human input and cost and reducing the development period of software products.
Finally, it should be noted that, as will be understood by those skilled in the art, all or part of the processes of the methods of the above embodiments may be implemented by a computer program, which may be stored in a computer-readable storage medium, and when executed, may include the processes of the embodiments of the methods described above.
Further, it should be appreciated that the computer-readable storage media (e.g., memory) herein can be either volatile memory or nonvolatile memory, or can include both volatile and nonvolatile memory.
Those of skill would further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the disclosure herein may be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as software or hardware depends upon the particular application and design constraints imposed on the overall system. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the disclosed embodiments of the present invention.
The foregoing is an exemplary embodiment of the present disclosure, but it should be noted that various changes and modifications could be made herein without departing from the scope of the present disclosure as defined by the appended claims. The functions, steps and/or actions of the method claims in accordance with the disclosed embodiments described herein need not be performed in any particular order. Furthermore, although elements of the disclosed embodiments of the invention may be described or claimed in the singular, the plural is contemplated unless limitation to the singular is explicitly stated.
It should be understood that, as used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly supports the exception. It should also be understood that "and/or" as used herein is meant to include any and all possible combinations of one or more of the associated listed items.
The numbers of the embodiments disclosed in the embodiments of the present invention are merely for description, and do not represent the merits of the embodiments.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program instructing relevant hardware, 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 magnetic disk or an optical disk, etc.
Those of ordinary skill in the art will understand that: the discussion of any embodiment above is meant to be exemplary only, and is not intended to intimate that the scope of the disclosure, including the claims, of embodiments of the invention is limited to these examples; within the idea of an embodiment of the invention, also technical features in the above embodiment or in different embodiments may be combined and there are many other variations of the different aspects of the embodiments of the invention as described above, which are not provided in detail for the sake of brevity. Therefore, any omissions, modifications, substitutions, improvements, and the like that may be made without departing from the spirit and principles of the embodiments of the present invention are intended to be included within the scope of the embodiments of the present invention.

Claims (10)

1. A virtual machine management method is characterized by comprising the following steps:
registering a virtual machine and filling the virtual machine with the system by using the obtained mirror image packet;
mounting the mirror image package to a preset directory of a system of the virtual machine;
modifying a configuration file to use the image package as a local yum source;
installing a compiling tool and a dependence in the virtual machine by using the yum source to obtain a final template virtual machine;
cloning the template virtual machine to obtain a plurality of same virtual machines;
selecting one virtual machine from the plurality of identical virtual machines as a management host to manage the other virtual machines.
2. The method of claim 1, wherein installing a compilation tool and dependencies in the virtual machine using the yum source results in a final template virtual machine, further comprising:
in response to receiving a first installation command, acquiring a compiling tool and/or a dependency to be installed from the yum source according to parameters in the first installation command;
and installing the acquired compiling tool and/or the acquired dependencies.
3. The method of claim 1, further comprising:
receiving other compiling tools and/or dependent installation packages downloaded from the outside;
and responding to the received second installation command, and executing an installation flow on the corresponding externally downloaded installation package according to the parameters in the second installation command.
4. The method of claim 1, wherein selecting one virtual machine from the plurality of identical virtual machines as a management host to manage other virtual machines, further comprises:
creating a configuration file in the management host;
and carrying out configuration management on other virtual machines according to the configuration information in the configuration file.
5. The method of claim 4, further comprising:
the state of each of the other virtual machines is detected.
6. A virtual machine management system, comprising:
the registration module is configured to register the virtual machine and utilize the obtained mirror image package to fill the system for the virtual machine;
the mounting module is configured to mount the mirror image package to a preset directory of a system of the virtual machine;
yum a source module configured to modify a configuration file to treat the image package as a local yum source;
an installation module configured to install a compilation tool and a dependency in the virtual machine using the yum source to obtain a final template virtual machine;
the cloning module is configured to clone the template virtual machine to obtain a plurality of same virtual machines;
a management module configured to select one virtual machine from the plurality of identical virtual machines as a management host to manage the other virtual machines.
7. The system of claim 6, wherein the installation module is further configured to:
in response to receiving a first installation command, acquiring a compiling tool and/or a dependency to be installed from the yum source according to parameters in the first installation command;
and installing the acquired compiling tool and/or the acquired dependencies.
8. The system of claim 6, further comprising a receiving module configured to:
receiving other compiling tools and/or dependent installation packages downloaded from the outside;
and responding to the received second installation command, and executing an installation flow on the corresponding externally downloaded installation package according to the parameters in the second installation command.
9. A computer device, comprising:
at least one processor; and
memory storing a computer program operable on the processor, characterized in that the processor executes the program to perform the steps of the method according to any of claims 1-5.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, is adapted to carry out the steps of the method according to any one of claims 1-5.
CN202111102444.2A 2021-09-19 2021-09-19 Virtual machine management method, system, device and medium Pending CN113886008A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111102444.2A CN113886008A (en) 2021-09-19 2021-09-19 Virtual machine management method, system, device and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111102444.2A CN113886008A (en) 2021-09-19 2021-09-19 Virtual machine management method, system, device and medium

Publications (1)

Publication Number Publication Date
CN113886008A true CN113886008A (en) 2022-01-04

Family

ID=79010061

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111102444.2A Pending CN113886008A (en) 2021-09-19 2021-09-19 Virtual machine management method, system, device and medium

Country Status (1)

Country Link
CN (1) CN113886008A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115563910A (en) * 2022-11-24 2023-01-03 英诺达(成都)电子科技有限公司 UPF command execution method, device, equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104679574A (en) * 2013-11-26 2015-06-03 谢蓉 Virtual machine image management system in cloud computing
CN107291525A (en) * 2016-04-01 2017-10-24 华为技术有限公司 A kind of method, host and system for disposing virtual machine
CN107577519A (en) * 2017-09-18 2018-01-12 郑州云海信息技术有限公司 A kind of virtual machine pressure method and device
CN111506389A (en) * 2020-03-25 2020-08-07 新华三大数据技术有限公司 Virtual machine starting method and device

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104679574A (en) * 2013-11-26 2015-06-03 谢蓉 Virtual machine image management system in cloud computing
CN107291525A (en) * 2016-04-01 2017-10-24 华为技术有限公司 A kind of method, host and system for disposing virtual machine
CN107577519A (en) * 2017-09-18 2018-01-12 郑州云海信息技术有限公司 A kind of virtual machine pressure method and device
CN111506389A (en) * 2020-03-25 2020-08-07 新华三大数据技术有限公司 Virtual machine starting method and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115563910A (en) * 2022-11-24 2023-01-03 英诺达(成都)电子科技有限公司 UPF command execution method, device, equipment and storage medium
CN115563910B (en) * 2022-11-24 2023-02-03 英诺达(成都)电子科技有限公司 UPF command execution method, device, equipment and storage medium

Similar Documents

Publication Publication Date Title
US8745585B2 (en) Meta-data for single development test environment
CN108399083B (en) System deployment method, device, electronic equipment and storage medium
CN111309336B (en) Deployment method and device of distributed application
JP5965080B2 (en) System, method and computer program product for software build and load processing using compilation and deployment services
US8533676B2 (en) Single development test environment
CN107608710B (en) Software project construction task configuration method and device based on Jenkins tool
US8677348B1 (en) Method and apparatus for determining least risk install order of software patches
US20090210858A1 (en) Method and apparatus for generating virtual software platform based on component model and validating software platform architecture using the platform
US20130174124A1 (en) Version numbering in single development and test environment
CN111506322B (en) Automatic integrated construction development deployment platform and method
JP2012168948A (en) Methods, apparatus and articles of manufacture for testing batch configurations
CN109324799A (en) A kind of code compiling method, computer installation and computer readable storage medium
CN111198695A (en) Automatic deployment method of micro-service administration management platform and electronic equipment
CN111414169B (en) BMC (baseboard management controller) image upgrading method and related components
WO2011101423A1 (en) Application runtime expert for deployment of an application on multiple computer systems
EP2503449A2 (en) Single development test environment
CN106502713A (en) A kind of method for upgrading software and system
CN106484452B (en) unified configuration management method and device for software platform
CN112506518A (en) Compiling method and device based on configuration file
CN113886008A (en) Virtual machine management method, system, device and medium
CN116048476A (en) Command line tool execution method, device, medium and equipment
CN110321138B (en) Program updating and migration method and device
WO2018083977A1 (en) System construction assisting apparatus, method, and program
EP2503450A2 (en) Version numbering in single development and test environment
CN114185557A (en) Software product deployment method, device, medium and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination