Method and device for automatically deploying virtual machine software environment and readable storage medium
By pre-stored virtual machine-related resources in the resource repository of the management node and using automated deployment scripts, the automated deployment of virtual machine software environment is realized to industrial controllers, solving the problems of inefficient deployment efficiency and susceptibility to human factors in the existing technology, and improving deployment efficiency and production efficiency.
Patent Information
- Application Number
- CN202411662709.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-20
- Publication Date
- 2025-03-14
AI Technical Summary
In the prior art, the process of deploying a virtual machine software environment to an industrial controller takes a long time, has low deployment efficiency, and is susceptible to human factors that lead to a deviation in the deployment status or fail to operate normally, affecting production efficiency.
By pre-stored virtual machine system image resources, virtual machine software resources, virtual machine configuration files and software configuration files in the resource repository of the management node, respond to the connection request of the controller to be deployed, issue target resources, and control the controller to be deployed to perform an automated deployment process through preset automated deployment scripts.
It realizes the automated deployment of virtual machine software environment, shortens deployment time, improves deployment efficiency, reduces deployment status deviations caused by human factors, and improves subsequent production efficiency.
Smart Images

Figure CN119621081A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, device and readable storage medium for automatically deploying a virtual machine software environment. Background Art
[0002] In a virtualization platform, the deployment of a virtual machine software environment to a controller (such as an industrial controller) generally includes deploying a host environment responsible for running the virtualization software, deploying a virtual machine operating system, and deploying a virtual machine user application.
[0003] In the prior art, a virtual machine software environment is mainly deployed to a controller (such as an industrial controller) by manual deployment. However, the above-mentioned deployment links involve many complicated operation steps, which not only places high technical requirements on the operator (needs to have a certain computer foundation and be able to interact and configure with the virtualization software through the command line), but is also easily affected by human factors, resulting in deviations in the deployment status of the industrial controller or even failure to operate normally, resulting in the need for rework. Therefore, the entire deployment process takes a long time, has low deployment efficiency, and reduces subsequent production efficiency. Summary of the invention
[0004] In view of this, the embodiments of the present application provide a method, device and readable storage medium for automatically deploying a virtual machine software environment to solve the problem in the prior art of deploying a virtual machine software environment to a controller by manual deployment, the entire deployment process is time-consuming, the deployment efficiency is low, and the subsequent production efficiency is reduced.
[0005] In a first aspect of an embodiment of the present application, a method for automatically deploying a virtual machine software environment is provided, which is applied to a management node, wherein a resource repository is deployed in the management node, and the resource repository stores virtual machine system image resources, virtual machine software resources, virtual machine configuration files, and software configuration files;
[0006] The method comprises the following steps:
[0007] In response to a connection request initiated by the controller to be deployed, based on the virtual machine system image resources, virtual machine software resources, virtual machine configuration files and software configuration files in the resource repository, determine and send target virtual machine system image resources, target virtual machine software resources, target virtual machine configuration files and target software configuration files to the controller to be deployed;
[0008] Based on the preset automated deployment script, the controller to be deployed is controlled to execute the process of automated deployment of the virtualized software environment based on the target virtual machine system image resources, target virtual machine software resources, target virtual machine configuration file and target software configuration file.
[0009] A second aspect of an embodiment of the present application provides another method for automatically deploying a virtual machine software environment, which is applied to a controller to be deployed, wherein the controller to be deployed is provided with a plug-in portion, the plug-in portion is plugged and matched with a mobile boot medium, and the mobile boot medium stores a root operating system installation image suitable for the controller to be deployed, a target virtual machine system image resource, a target virtual machine software resource, a target virtual machine configuration file, and a target software configuration file;
[0010] The method comprises the following steps:
[0011] In the case where a mobile boot medium is plugged into the plug-in portion of the controller to be deployed, a root operating system installation image and a virtual machine operating system installation image are read from the mobile boot medium based on a preset automatic installation script, and the root operating system is deployed locally based on the root operating system installation image, and the virtual machine operating system is deployed locally based on the virtual machine operating system installation image;
[0012] When the root operating system and the virtual machine operating system are installed, based on a preset automatic installation script, the target virtual machine system image resources and target virtual machine configuration parameters are read from the mobile boot medium, and the virtual machine is deployed locally based on the target virtual machine system image resources and target virtual machine configuration parameters;
[0013] When the virtual machine deployment is completed, start the virtual machine, read the target virtual machine software resources and target software configuration file from the mobile boot medium based on the preset automatic installation script, install the application software in the virtual machine based on the target virtual machine software resources, and update the initial software configuration of the application software based on the target software configuration file to complete the automated deployment of the virtual machine software environment.
[0014] According to a third aspect of the embodiments of the present application, there is provided a device for automatically deploying a virtual machine software environment, including:
[0015] A response module is configured to respond to a connection request initiated by a controller to be deployed, determine and send a target virtual machine system image resource, a target virtual machine software resource, a target virtual machine configuration file, and a target software configuration file to the controller to be deployed based on the virtual machine system image resource, the virtual machine software resource, the virtual machine configuration file, and the software configuration file in the resource repository;
[0016] The control module is configured to control the controller to be deployed to execute the process of automatically deploying the virtualized software environment based on the target virtual machine system image resources, target virtual machine software resources, target virtual machine configuration file and target software configuration file based on a preset automated deployment script.
[0017] According to a fourth aspect of the embodiments of the present application, another device for automatically deploying a virtual machine software environment is provided, comprising:
[0018] The first deployment module is configured to read the root operating system installation image and the virtual machine operating system installation image from the mobile boot medium based on a preset automatic installation script when the plug-in portion of the controller to be deployed is plugged with a mobile boot medium, and to locally deploy the root operating system based on the root operating system installation image and to locally deploy the virtual machine operating system based on the virtual machine operating system installation image;
[0019] The second deployment module is configured to read the target virtual machine system image resources and target virtual machine configuration parameters from the mobile boot medium based on a preset automatic installation script when the root operating system and the virtual machine operating system are installed, and to deploy the virtual machine locally based on the target virtual machine system image resources and the target virtual machine configuration parameters;
[0020] The third deployment module is configured to start the virtual machine when the virtual machine deployment is completed, read the target virtual machine software resources and the target software configuration file from the mobile boot medium based on the preset automatic installation script, install the application software in the virtual machine based on the target virtual machine software resources, and update the initial software configuration of the application software based on the target software configuration file to complete the automated deployment of the virtual machine software environment.
[0021] According to a fifth aspect of an embodiment of the present application, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the computer program.
[0022] In a sixth aspect of an embodiment of the present application, a readable storage medium is provided, which stores a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.
[0023] Compared with the prior art, the beneficial effects of the embodiments of the present application include at least: by pre-storing the virtual machine system image resources, virtual machine software resources, virtual machine configuration files and software configuration files required for deploying the virtual machine software environment to the industrial controller in the resource repository of the management node, and then responding to the connection request initiated by the controller to be deployed through the management node, sending the target virtual machine system image resources, target virtual machine software resources, target virtual machine configuration files and target software configuration files to the controller to be deployed, and then controlling the controller to be deployed to execute the process of automatically deploying the virtualized software environment through a preset automated deployment script, thereby realizing automated deployment of the virtual machine software environment to the industrial controller, shortening the deployment time, and improving the deployment efficiency. At the same time, it can minimize the problems of deviations in the deployment status of the controller due to human factors, or even failure to operate normally, resulting in the need for rework, which is conducive to improving subsequent production efficiency. At the same time, the automated deployment scheme of the embodiments of the present application can be applied to deploy virtual machine software environments to one or more industrial controllers in various application scenarios, and has good flexibility and universality. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0025] Figure 1 It is a schematic diagram of an application scenario of an embodiment of the present application;
[0026] Figure 2 It is a flowchart of a method for automatically deploying a virtual machine software environment provided by an embodiment of the present application;
[0027] Figure 3 is an example diagram of a remote interface supported by the virtualization software and management software provided in an embodiment of the present application;
[0028] Figure 4 It is a flowchart of another method for automatically deploying a virtual machine software environment provided by an embodiment of the present application;
[0029] Figure 5 is a flowchart of the interaction between the management node and the controller to be deployed provided in an embodiment of the present application;
[0030] Figure 6 It is a flowchart of another method for automatically deploying a virtual machine software environment provided in an embodiment of the present application;
[0031] Figure 7It is a structural diagram of a device for automatically deploying a virtual machine software environment provided in an embodiment of the present application;
[0032] Figure 8 It is a structural diagram of another device for automatically deploying a virtual machine software environment provided in an embodiment of the present application;
[0033] Fig. 9 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0034] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0035] A method and apparatus for automatically deploying a virtual machine software environment according to an embodiment of the present application will be described in detail below with reference to the accompanying drawings.
[0036] Figure 1 1 is a schematic diagram of an application scenario of an embodiment of the present application. The application scenario may include a management node 101, a controller to be deployed 102, and a controller to be deployed 103. The management node 101 and the controller to be deployed 102 and the controller to be deployed 103 may communicate through a network port (network interface).
[0037] The management node 101 may be any electronic device having a display screen and supporting communication with the controllers to be deployed 102 and 103, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers.
[0038] The controllers to be deployed 102 and 103 may both be industrial controllers. An industrial controller is an electronic device used to control and monitor equipment and machines in an industrial production process.
[0039] It should be noted that the specific types, quantities and combinations of the management node 101, the controller to be deployed 102 and the controller to be deployed 103 can be adjusted according to the actual needs of the application scenario, and the embodiments of the present application do not limit this.
[0040] Unlike traditional controller devices (each controller device only needs to burn a bare metal program or an operating system), industrial controllers (controller devices) based on virtualization platforms usually contain one or more, different or the same operating systems, as well as virtualization software for managing these operating systems. Therefore, in the production tooling stage, it is often necessary to burn more programs, have more complicated operating processes, and take longer.
[0041] Due to the technical limitations of production personnel, the manual deployment method requires many steps to deploy a virtualized software environment to an industrial controller, which is too complicated and often requires a lot of additional training and practice before you can officially start operating. According to feedback from the production trial process, the production burning process of traditional controller equipment can generally be completed by production personnel and professional technicians within 10 minutes; however, through manual deployment, the deployment of a virtual machine software environment to a controller device (industrial controller) can be completed by professional technicians within 20 minutes, but production personnel (with poor computer skills) often need more than 1 hour or even longer to correctly complete the operation, which greatly affects the deployment efficiency of the virtual machine software environment to the controller device, and also affects the subsequent production efficiency.
[0042] In addition, for different application scenarios (application sites), one or more industrial controllers may need to be deployed, and the configuration parameters and status required by each industrial controller may be slightly different. However, these differences are often numerous and small. If these configuration parameters, status, etc. are integrated into the virtual machine system image, a large number of different versions of virtual machine system images with extremely high similarity need to be released, which requires a lot of manpower and material resources, and has low deployment efficiency, and will also affect subsequent production efficiency.
[0043] In view of this, the embodiment of the present application provides a method for automatically deploying a virtual machine software environment, which automatically selects and combines virtual machine system image resources, virtual machine software resources, virtual machine configuration files and software configuration files in a resource repository according to actual needs (user needs or production needs) through a management node, and uses these resources and configuration files to automatically deploy the virtual machine software environment to an industrial controller, thereby improving the deployment efficiency of the virtual machine software environment of the industrial controller and improving subsequent production efficiency. At the same time, the automatic deployment solution of the embodiment of the present application has good flexibility and universality.
[0044] Furthermore, the embodiment of the present application also provides a method for automatically deploying a virtual machine software environment, by pre-storing the virtual machine system image resources, virtual machine software resources, virtual machine configuration files, and software configuration files required for deploying the virtual machine software environment to the industrial controller in the resource repository of the management node, and then responding to the connection request initiated by the controller to be deployed through the management node, sending the target virtual machine system image resources, target virtual machine software resources, target virtual machine configuration files, and target software configuration files to the controller to be deployed, and then controlling the controller to be deployed to execute the process of automatically deploying the virtualized software environment through a preset automated deployment script, thereby realizing automated deployment of the virtual machine software environment to the industrial controller, shortening the deployment time, and improving the deployment efficiency. At the same time, it can minimize the problem of deviations in the deployment status of the controller due to human factors, or even failure to operate normally, resulting in the need for rework, which is conducive to improving subsequent production efficiency. At the same time, the automated deployment scheme of the embodiment of the present application can be applied to deploy virtual machine software environments to one or more industrial controllers in various application scenarios, and has good flexibility and universality.
[0045] Figure 2 It is a flowchart of a method for automatically deploying a virtual machine software environment provided in an embodiment of the present application. Figure 2 The method for automatically deploying the virtual machine software environment can be Figure 1 The management node 101 is executed. The management node 101 includes a network port (also called a network interface) and a resource repository (also called a resource library); the resource repository stores virtual machine system image resources, virtual machine software resources, virtual machine configuration files and software configuration files required for automatic deployment of virtualized software environments.
[0046] The virtual machine system image resources include the operating environment of resources such as the CPU (Central Processing Unit), memory disk, and graphics card (display interface card) required to create the virtual machine.
[0047] Virtual machine software resources include application files that can be installed and deployed in the virtual machine.
[0048] The virtual machine configuration file includes the virtual machine configuration process and virtual machine configuration parameters required to create a virtual machine instance in the virtualization software. The virtualization software can be Xen, KVM, ARCN, etc.
[0049] The software configuration file includes the software configuration process and software configuration parameters required to install and deploy application software (also called user software or user application) in a virtual machine.
[0050] In some implementations, a folder may be created, a remote access service such as HTTP (HyperText Transfer Protocol), FTP (File Transfer Protocol), or SMB (Server Message Block) may be enabled for the folder, and the folder may be used as a resource repository and deployed in the management node 101. For different general-purpose operating systems, the methods for enabling remote access permissions for folders may vary.
[0051] See also Figure 2 The method for automatically deploying a virtual machine software environment comprises the following steps:
[0052] Step S201, in response to a connection request initiated by the controller to be deployed, based on the virtual machine system image resources, virtual machine software resources, virtual machine configuration files and software configuration files in the resource repository, determine and send the target virtual machine system image resources, target virtual machine software resources, target virtual machine configuration files and target software configuration files to the controller to be deployed.
[0053] The controller to be deployed is an industrial controller that needs to deploy a virtual machine software environment.
[0054] First, a computer with certain processing performance can be selected as the management node 101; then, a general operating system is installed and deployed in the management node 101. Specifically, Windows, Linux operating system, etc. can be selected as the general operating system according to the usage habits of production personnel. Next, the deployment management software is installed in the management node 101. The management software can remotely access and operate the virtualization software in the controller to be deployed based on the RPC (remote procedure call) technology, so that the relevant deployment process of deploying the virtual machine software environment to the controller to be deployed can be transferred from the controller to be deployed to the management node 101, which is convenient for integrating the function of automatic deployment in the management node 101.
[0055] Management software can support access or control of a variety of different virtualization software by adapting to the remote interfaces of different virtualization software; at the same time, virtualization software can also provide different types of remote interfaces to support different management software.
[0056] Figure 3 This is an example diagram of the remote interface supported by the virtualization software and management software provided in the embodiment of the present application.
[0057] Figure 3 In, XCP-ng, is a high-performance enterprise-level virtualization platform.
[0058] Xen is a software layer that runs directly on computer hardware to replace the operating system. It can run multiple client operating systems (Guest OS) concurrently on the computer hardware.
[0059] CloudStack is an open source cloud computing platform with high availability and scalability. It supports the management of most mainstream hypervisors, such as KVM, XenServer, VMware, Oracle VM, Xen, etc.
[0060] OpenStack is a cloud computing operating system that manages all computing resource pools, storage resource pools, network resource pools and other hardware resources of one or more data centers simply through a control panel (Dashboard) using a Web interactive interface.
[0061] xl(CLI), xl command line interface. The CLI tool provides a powerful and flexible way to install and manage virtual machines.
[0062] xe(CLI), xe command line interface. xe can be described as an extended version of xl, or conversely, xl is a streamlined version of xe.
[0063] virsh(CLI), virsh command line. Virsh is a command line tool used to manage clients and hypervisors in a virtualized environment. It is open source software in the libvirt project.
[0064] XAPI is a general term for a set of management interfaces in Xen Server. It is the core of Xen Server management and consists of a series of toolstacks.
[0065] LibVirt is a free, open source C library that supports mainstream virtualization tools under Linux. It aims to provide a convenient and reliable programming interface for various virtualization tools including Xen, and supports binding with multiple mainstream development languages such as C, C++, Ruby, Python, etc.
[0066] libxl, a lightweight reading tool.
[0067] Xenops is the virtual machine manager of Xen Server, responsible for starting, stopping, pausing, resuming, migrating virtual machines, hot-plugging virtual disks, hot-plugging virtual network cards, etc.
[0068] Qemu provides a series of hardware simulation devices (CPU, network card, disk, etc.), and client instructions need to be translated by Qemu, so the performance is poor. KVM is a virtualization module provided by the Linux kernel, which is responsible for the virtualization of CPU and memory, but lacks the virtualization of I / O devices. Qemu-kvm is the combination of KVM and Qemu, KVM is responsible for CPU virtualization + memory virtualization, and Qemu simulates other I / O devices.
[0069] libxc is a C language library that provides some easy-to-use APIs (application programming interfaces) so that user programs can easily communicate with the Hypervisor. Hypervisor is an intermediate software layer running between the physical server and the operating system, allowing multiple operating systems and applications to share hardware, also known as a virtual machine monitor.
[0070] In some embodiments, some currently selectable virtual machine system image resources, virtual machine software resources, virtual machine configuration files, and software configuration files can be displayed to the user through the interface of the management node 101. The management node 101 responds to the connection request initiated by the controller to be deployed (including the IP address information of the controller to be deployed, etc.), and determines the virtual machine system image resources, virtual machine software resources, virtual machine configuration files, and software configuration files selected by the user (such as production personnel, etc.) for the controller to be deployed as the target virtual machine system image resources, target virtual machine software resources, target virtual machine configuration files, and target software configuration files, and sends them to the controller to be deployed.
[0071] In this way, reusable static resources (for example, image resources and software resources of the target virtual machine, etc.) can be reused as flexibly as possible, thereby achieving deployment of a virtual machine software environment to one or more industrial controllers in different application scenarios.
[0072] Step S202, based on a preset automatic deployment script, controls the controller to be deployed to execute a process of automatically deploying a virtualized software environment based on target virtual machine system image resources, target virtual machine software resources, target virtual machine configuration files and target software configuration files.
[0073] In some implementations, a technician may pre-write a script for implementing automated deployment of a virtual machine software environment of a controller to be deployed, and store the script in the management node 101 .
[0074] As an example, after the management node 101 sends the target virtual machine system image resources, target virtual machine software resources, target virtual machine configuration file and target software configuration file to the controller to be deployed 102, the stored automated deployment script is read, the automated deployment script is executed, and the controller to be deployed 102 is controlled to execute the process of automated deployment of the virtualized software environment.
[0075] The technical solution provided by the embodiment of the present application can realize the automatic deployment of the virtual machine software environment to the industrial controller, shorten the deployment time, improve the deployment efficiency, and at the same time, can minimize the problem of deviation of the deployment state of the controller or even failure to operate normally due to human factors, resulting in the need for rework, which is conducive to improving subsequent production efficiency. At the same time, the automated deployment solution of the embodiment of the present application can be applied to deploy the virtual machine software environment to one or more industrial controllers in various application scenarios, with good flexibility and universality.
[0076] In some embodiments, the controller to be deployed is provided with a plug-in part, which is plugged into a mobile boot medium. The mobile boot medium stores a root operating system installation image and a virtual machine operating system installation image suitable for the controller to be deployed. The controller to be deployed uses the root operating system installation image to locally deploy the root operating system; the controller to be deployed uses the virtual machine operating system installation image to locally deploy the virtual machine operating system.
[0077] The plug-in portion may be a plug interface (eg, a USB plug interface, etc.) provided on the body of the controller to be deployed.
[0078] The mobile boot medium can be a USB flash drive, a mobile disk, etc.
[0079] The root operating system installation image is the installation image of the root operating system of the controller to be deployed.
[0080] The virtual machine operating system installation image is the installation image of the virtual machine operating system of the controller to be deployed.
[0081] In some embodiments, when the controller to be deployed is an industrial controller that does not support PXE (Preboote Xecute Environment), the mobile boot medium can be plugged into the plug-in part of the controller to be deployed, and then powered on to start. After that, the controller to be deployed can read the root operating system installation image and the virtual machine operating system installation image in the mobile boot medium, and use the root operating system installation image to install and deploy the root operating system locally, and use the virtual machine operating system installation image to install and deploy the virtual machine operating system locally.
[0082] After the root operating system is installed and deployed, the controller to be deployed restarts and then initiates a connection request to the management node 101 for connecting to the management software.
[0083] When the management software of the management node 101 receives a connection request initiated by the controller to be deployed, it determines and sends the target virtual machine system image resources, target virtual machine software resources, target virtual machine configuration file and target software configuration file to the controller to be deployed based on the virtual machine system image resources, virtual machine software resources, virtual machine configuration file and software configuration file in the resource repository.
[0084] Specifically, the management node 101 obtains the resource allocation information of the virtual machine system image resources in the resource repository, and the resource requirement information of the controller to be deployed; based on the resource allocation information and the resource requirement information, determines and sends the target virtual machine system image resources and the target virtual machine configuration file to the controller to be deployed; determines the software deployment requirement information for the controller to be deployed; based on the software deployment requirement information and the virtual machine software resources, determines and sends the target virtual machine software resources and the target software configuration file to the controller to be deployed.
[0085] Resource allocation information indicates the remaining virtual machine system image resources currently available for allocation in the management node, including the remaining available CPU, memory disk, graphics card and other operating resources.
[0086] Resource requirement information indicates the CPU, memory, disk, graphics card and other operating resources required to deploy the virtual machine software environment to the controller to be deployed.
[0087] Software deployment requirement information indicates the relevant information of the application software that needs to be installed on the virtual machine of the controller to be deployed, including the software name, software version, etc.
[0088] As an example, assuming that the remaining allocatable virtual machine system image resources of the management node 101 currently include resource 01, resource 02 and resource 03, and the resource requirement of the controller 102 to be deployed is resource y, where resource 01 matches resource y, then resource 01 can be determined as the target virtual machine system image resource, and resource 01 and its corresponding target virtual machine configuration file can be sent to the controller 102 to be deployed.
[0089] As an example, first, the user (such as production personnel) can select the application software that needs to be installed and deployed to the virtual machine of the controller to be deployed through the software interface provided by the management software of the management node 101. The management software of the management node 101 extracts the corresponding target virtual machine software resources and target software configuration files from the virtual machine software resources in the resource repository according to the user's selected operation, and sends them to the controller to be deployed.
[0090] In the prior art, most open source virtualization solutions are released in the form of source code. Therefore, it is generally necessary to build a compilation environment first, and then use the source code for compilation and deployment. This method is not only time-consuming, but also leaves behind tool software that is only required during compilation after deployment, thereby occupying additional disk space.
[0091] Although the disk image copy method can save the process of using the system image to install the operating system, and instead use the disk image to directly copy the installed and configured operating system to the target device (such as an industrial controller), the disk space occupied by this method is often higher than the disk space occupied by the system image to install the operating system, and it will weaken the flexibility of operating system deployment. For example, using the 2GB Ubuntu (a Linux operating system mainly for desktop applications) operating system image to install the operating system, its disk space occupies 3 to 5GB; if the uncompressed original disk image is used to directly copy the installed and configured Ubuntu operating system to the target device, its disk space occupies the size of the original disk (the common disk space is more than 64GB), which will cause a greater disk load during the deployment process. Furthermore, the disk image often loses the compatibility configuration information for different hardware products (such as industrial controllers) in the system image. Therefore, after replacing the deployed hardware product, there may be problems such as driver loss and configuration abnormality that cause the hardware product to be unable to use normally.
[0092] In view of this, an embodiment of the present application provides a method for automatically deploying a virtual machine software environment, by decoupling the compilation environment from the process of deploying the virtual machine software environment, so as to minimize deployment resources and thus improve deployment efficiency.
[0093] In some embodiments, the root operating system installation image that needs to rely on the compilation environment to deploy the virtual machine environment to the industrial controller can be burned to a removable medium (such as a USB, a removable disk, etc.) through free tools such as Rufus to obtain a mobile boot medium.
[0094] Specifically, the user (such as a technician) can use other compilable environments to create the mobile boot medium. In some embodiments, the steps for creating the mobile boot medium are as follows:
[0095] Build a compilation environment;
[0096] Determine the base image for the root operating system and virtual machine operating system of the controller to be deployed, and mount the base image to the compilation environment;
[0097] In the compilation environment, modify the base image to obtain the root operating system installation image and the virtual machine operating system installation image suitable for the controller to be deployed;
[0098] Burn the root operating system installation image and the virtual machine operating system installation image to a removable medium to obtain a removable boot medium.
[0099] The following describes in detail an operating system that supports a freely customizable Linux system (eg, CentOS, Ubuntu system) as an example.
[0100] First, according to the different open source solutions of the selected virtualization software, determine the way to build the compilation environment. Specifically, the compilation environment can be built by referring to the process provided by the open source community of the selected virtualization software. Then, one or more stable community version system installation images can be downloaded from the official website as the basic images of the root operating system and virtual machine operating system of the controller to be deployed, and the basic image can be mounted to the above-mentioned compiled environment. Then, in the compilation environment, modify the basic image to obtain the root operating system installation image and virtual machine operating system installation image suitable for the controller to be deployed. Finally, burn the root operating system installation image and the virtual machine operating system installation image to a removable medium through free tools such as Rufus to obtain a mobile boot medium.
[0101] In some embodiments, in a compilation environment, the base image is modified to obtain a root operating system installation image and a virtual machine operating system installation image suitable for the controller to be deployed, including:
[0102] In the compilation environment, find the first root file system file of the base image;
[0103] Copy the contents of the first root file system file to the working directory of the compilation environment, and add the common software dependency package to the working directory to obtain the second root file system file;
[0104] In the compilation environment, compile the virtualization software to obtain a virtualization software package;
[0105] Add the virtualization software package and its software dependency packages to the second root file system file to obtain the third root file system file;
[0106] The third root file system file is packaged to obtain a root operating system installation image and a virtual machine operating system installation image suitable for the controller to be deployed.
[0107] Specifically, the base image is mounted to the above-mentioned compilation environment, and the file used to store the "root file system" in the base image is found, that is, the first root file system file, and then the first root file system file is mounted to a temporary folder, and the content of the first root file system file is copied to the working directory of the compilation environment. Then, use the chroot command to switch the root directory of the current interactive terminal (or interactive command line environment) to the above-mentioned working directory, and add a general software dependency package (for example, common software such as ssh) to the working directory to obtain the second root file system file. In the above-mentioned compilation environment, compile the selected virtualization software to obtain a virtualization software package. The default compilation output of some open source solutions is in the software package format (such as rpm, deb, etc.); if not, you can refer to the community documentation of the official website of the virtualization software and package it into a software package format by yourself. Next, add the virtualization software package and its software dependency package to the above-mentioned second root file system file to obtain the third root file system file. Finally, modify the automatic installation configuration file of the base image so that it can complete the automatic local installation according to the default configuration, or complete the differentiated deployment based on the network configuration, and then package the modified automatic installation configuration file and the third root file system file to obtain the root operating system installation image suitable for the controller to be deployed. For the specific packaging operation process, please refer to the relevant operation process in the community document.
[0108] It should be noted that, for a path that does not require a virtualization software package, it is not necessary to add the virtualization software package and its software dependency packages to the second root file system file.
[0109] For different types of general-purpose operating systems, the storage path and description format of the automatic installation configuration file may vary. You can find the storage path and description format corresponding to the automatic installation configuration file through the community documentation. If the storage path and description format corresponding to the automatic installation configuration file are not found in the community documentation, you can use open source tools such as ISOLINUX to build a configurable image deployment script environment based on the third root file system file as the automatic installation configuration file.
[0110] In some embodiments, the third root file system file is packaged to obtain a root operating system installation image and a virtual machine operating system installation image suitable for the controller to be deployed, including:
[0111] The third root file system file is trimmed to obtain the fourth root file system file;
[0112] The fourth root file system file is packaged and compressed to obtain a root operating system installation image and a virtual machine operating system installation image suitable for the controller to be deployed.
[0113] Specifically, the third root file system file can be trimmed according to user needs (for example, the need to reduce the storage space occupied by the image, etc.), which can reduce its occupied space and help improve the subsequent installation and deployment efficiency.
[0114] By packaging and compressing the fourth root file system files, the space occupied by the fourth root file system can be further reduced.
[0115] In some embodiments, the base image may be trimmed first, and then modified to obtain a root operating system installation image and a virtual machine operating system installation image suitable for the controller to be deployed. In this way, the storage space occupied by the root operating system installation image and the virtual machine operating system installation image can be kept low.
[0116] In some embodiments, based on a preset automated deployment script, the controller to be deployed is controlled to execute a process of automatically deploying a virtualized software environment based on a target virtual machine system image resource, a target virtual machine software resource, a target virtual machine configuration file, and a target software configuration file, including:
[0117] Based on the preset automated deployment script, the controller to be deployed is controlled to deploy the virtual machine locally based on the target virtual machine system image resources and target virtual machine configuration parameters;
[0118] Based on the preset automation script, the controller to be deployed is controlled, the virtual machine is started, the application software is installed in the virtual machine based on the target virtual machine software resources, and the initial software configuration of the application software is updated based on the target software configuration parameters to complete the automated deployment of the virtual machine software environment.
[0119] Figure 4 It is a flowchart of another method for automatically deploying a virtual machine software environment provided in an embodiment of the present application. Figure 5 It is a flow chart of the interaction between the management node and the controller to be deployed provided in an embodiment of the present application.
[0120] The target configuration resources include target virtual machine system image resources, target virtual machine software resources, target virtual machine configuration files, and target software configuration files.
[0121] Deployment resources include virtual machine system image resources, virtual machine software resources, virtual machine configuration files, and software configuration files.
[0122] As an example, see Figure 4 and Figure 5After the controller to be deployed is plugged in the mobile boot medium and started, it determines whether it is installed locally; if it is installed locally, the root operating system installation image is loaded from the mobile boot medium, and the root operating system installation image is used to install and deploy the root operating system locally. If it is not installed locally, a request for obtaining remote resources and configuration parameters is sent to the management node 101. After receiving the request, the management node 101 extracts the root operating system installation image and configuration parameters corresponding to the request from its resource repository and returns them to the controller to be deployed. After the controller to be deployed loads and obtains the root operating system installation image and configuration parameters, it installs and deploys the root operating system locally. After the root operating system is installed and restarted, the controller to be deployed initiates a connection request to the management node 101 to connect to the management software. The management node 101 receives and processes the connection request and sends the target virtual machine configuration file to the controller to be deployed. After the controller to be deployed obtains the target virtual machine configuration file, it loads the virtual machine operating system image from the mobile boot medium, and uses the virtual machine operating system image to install and deploy the virtual machine operating system locally, and creates a virtual machine according to the target virtual machine configuration file. The management node 101 sends the target virtual machine system image resource to the controller to be deployed. After the controller to be deployed obtains the target virtual machine system image resource, it uses the target virtual machine system image resource to deploy the virtual machine. The management node 101 sends the target virtual machine software resource to the controller to be deployed. The controller to be deployed starts the virtual machine, obtains the target virtual machine software resource, and uses the target virtual machine software resource to install the user software (application software) in the virtual machine. The management node 101 sends the target software configuration file to the controller to be deployed. The controller to be deployed obtains the target software configuration file, and uses the target software configuration file to update the initial software configuration of the user software in the virtual machine, completing the deployment process of the virtual machine software environment.
[0123] When there are at least two controllers to be deployed that need to deploy virtual machine software environments, serial deployment or parallel deployment can be performed through the management node according to the above implementation method. Serial deployment refers to processing a connection request initiated by a controller to be deployed through the management node, and automatically deploying the virtual machine software environment of a controller to be deployed, and then deploying the virtual machine software environment of the next controller to be deployed. Parallel deployment refers to processing connection requests initiated by at least two controllers to be deployed in parallel through the management node, and deploying the virtual machine software environments of each controller to be deployed in parallel. The overall deployment time required for serial deployment and parallel deployment is similar, and serial deployment is not prone to errors, so serial deployment is preferably used.
[0124] Figure 6 It is a flowchart of another method for automatically deploying a virtual machine software environment provided in an embodiment of the present application. Figure 6 The method for automatically deploying the virtual machine software environment can be Figure 1 The controller to be deployed 102 is executed.
[0125] See also Figure 6 The method for automatically deploying a virtual machine software environment comprises the following steps:
[0126] Step S601, when a mobile boot medium is plugged into a plug-in portion of the controller to be deployed, a root operating system installation image and a virtual machine operating system installation image are read from the mobile boot medium based on a preset automatic installation script, and the root operating system is locally deployed based on the root operating system installation image, and the virtual machine operating system is locally deployed based on the virtual machine operating system installation image;
[0127] Step S602, when the root operating system and the virtual machine operating system are installed, based on a preset automatic installation script, read the target virtual machine system image resources and the target virtual machine configuration parameters from the mobile boot medium, and deploy the virtual machine locally based on the target virtual machine system image resources and the target virtual machine configuration parameters;
[0128] Step S603, when the virtual machine deployment is completed, start the virtual machine, read the target virtual machine software resources and the target software configuration file from the mobile boot medium based on the preset automatic installation script, install the application software in the virtual machine based on the target virtual machine software resources, and update the initial software configuration of the application software based on the target software configuration file to complete the automated deployment of the virtual machine software environment.
[0129] Among them, the controller to be deployed is provided with a plug-in part, which is plugged into and cooperates with the mobile boot medium, and the mobile boot medium stores the root operating system installation image, virtual machine operating system installation image, target virtual machine system image resources, target virtual machine software resources, target virtual machine configuration file and target software configuration file suitable for the controller to be deployed.
[0130] In the absence of conditions to deploy a management node, the root operating system installation image, virtual machine operating system installation image, target virtual machine system image resources, target virtual machine software resources, target virtual machine configuration files, and target software configuration files required to deploy the virtual machine software environment to the controller to be deployed can be stored in the mobile boot medium. In this way, the automatic installation script that is pre-written and stored in the controller to be deployed can be used to automatically deploy the virtual machine software environment to the controller to be deployed, shorten the deployment time, improve the deployment efficiency, and at the same time, minimize the problem of deviations in the deployment status of the controller due to human factors, or even failure to operate normally, resulting in the need for rework, which is conducive to improving subsequent production efficiency.
[0131] In some embodiments, when packaging and producing the root operating system installation image and the virtual machine operating system image, they can be built from scratch based on the minimum version of the general operating system (for example, Ubuntu Base or CentOS Minimal version), which will greatly simplify the tailoring and debugging process of the root operating system installation image and the virtual machine operating system image.
[0132] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present application, which will not be described one by one here.
[0133] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.
[0134] Figure 7 Schematic diagram of a structure of a device for automatically deploying a virtual machine software environment provided in an embodiment of the present application. Figure 7 As shown, the device for automatically deploying a virtual machine software environment includes:
[0135] The response module 701 is configured to respond to the connection request initiated by the controller to be deployed, determine and send the target virtual machine system image resources, target virtual machine software resources, target virtual machine configuration file and target software configuration file to the controller to be deployed based on the virtual machine system image resources, virtual machine software resources, virtual machine configuration file and software configuration file in the resource repository;
[0136] The control module 702 is configured to control the controller to be deployed to execute the process of automatically deploying the virtualized software environment based on the target virtual machine system image resources, target virtual machine software resources, target virtual machine configuration file and target software configuration file based on a preset automated deployment script.
[0137] In some embodiments, the controller to be deployed is provided with a plug-in part, which is plugged into a mobile boot medium. The mobile boot medium stores a root operating system installation image and a virtual machine operating system installation image suitable for the controller to be deployed. The controller to be deployed uses the root operating system installation image to locally deploy the root operating system; the controller to be deployed uses the virtual machine operating system installation image to locally deploy the virtual machine operating system.
[0138] The above-mentioned response module 701 includes:
[0139] An acquisition unit is configured to acquire resource allocation information of virtual machine system image resources in a resource storage repository and resource demand information of a controller to be deployed;
[0140] A first determination unit is configured to determine and send a target virtual machine system image resource and a target virtual machine configuration file to the controller to be deployed based on the resource allocation information and the resource demand information;
[0141] A second determining unit is configured to determine software deployment requirement information for the controller to be deployed;
[0142] The third determining unit is configured to determine and send target virtual machine software resources and target software configuration files to the controller to be deployed based on the software deployment requirement information and the virtual machine software resources.
[0143] In some embodiments, the mobile boot medium can be produced by a management node or terminal. The management node or terminal includes:
[0144] The build module is configured to build the compilation environment;
[0145] A determination module is configured to determine a base image suitable for a root operating system and a virtual machine operating system of a controller to be deployed, and mount the base image into a compilation environment;
[0146] A modification module is configured to modify the base image in the compilation environment to obtain a root operating system installation image and a virtual machine operating system installation image suitable for the controller to be deployed;
[0147] The burning module is configured to burn the root operating system installation image and the virtual machine operating system installation image onto a mobile medium to obtain a mobile boot medium.
[0148] In some embodiments, the modification module includes:
[0149] A search unit is configured to search for a first root file system file of a base image in a compilation environment;
[0150] a copy unit configured to copy the content of the first root file system file to a working directory of the compilation environment, and to add a common software dependency package to the working directory to obtain a second root file system file;
[0151] The compiling unit is configured to compile the virtualization software in the compiling environment to obtain a virtualization software package;
[0152] an adding unit, configured to add the virtualization software package and its software dependency package to the second root file system file to obtain a third root file system file;
[0153] The packaging unit is configured to package the third root file system file to obtain a root operating system installation image and a virtual machine operating system installation image suitable for the controller to be deployed.
[0154] In some embodiments, the above-mentioned packaging unit may be specifically configured as follows:
[0155] The third root file system file is trimmed to obtain the fourth root file system file;
[0156] The fourth root file system file is packaged and compressed to obtain a root operating system installation image and a virtual machine operating system installation image suitable for the controller to be deployed.
[0157] In some embodiments, the control module 702 includes:
[0158] A first control unit is configured to control the controller to be deployed to locally deploy the virtual machine based on the target virtual machine system image resources and the target virtual machine configuration parameters based on a preset automated deployment script;
[0159] The second control unit is configured to control the controller to be deployed based on a preset automation script, start the virtual machine, install the application software in the virtual machine based on the target virtual machine software resources, and update the initial software configuration of the application software based on the target software configuration parameters to complete the automated deployment of the virtual machine software environment.
[0160] Figure 8 1 is a schematic diagram of the structure of another device for automatically deploying a virtual machine software environment provided by an embodiment of the present application. Figure 8 As shown, the device for automatically deploying a virtual machine software environment includes:
[0161] The first deployment module 801 is configured to read the root operating system installation image and the virtual machine operating system installation image from the mobile boot medium based on a preset automatic installation script when the plug-in portion of the controller to be deployed is plugged with a mobile boot medium, and to locally deploy the root operating system based on the root operating system installation image and to locally deploy the virtual machine operating system based on the virtual machine operating system installation image;
[0162] The second deployment module 802 is configured to read the target virtual machine system image resources and target virtual machine configuration parameters from the mobile boot medium based on a preset automatic installation script when the root operating system and the virtual machine operating system are installed, and to deploy the virtual machine locally based on the target virtual machine system image resources and the target virtual machine configuration parameters;
[0163] The third deployment module 803 is configured to start the virtual machine when the virtual machine deployment is completed, read the target virtual machine software resources and the target software configuration file from the mobile boot medium based on the preset automatic installation script, install the application software in the virtual machine based on the target virtual machine software resources, and update the initial software configuration of the application software based on the target software configuration file to complete the automated deployment of the virtual machine software environment.
[0164] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0165] Fig. 9 Schematic diagram of an electronic device 9 provided in an embodiment of the present application. Fig. 9 As shown, the electronic device 9 of this embodiment includes: a processor 901, a memory 902, and a computer program 903 stored in the memory 902 and executable on the processor 901. When the processor 901 executes the computer program 903, the steps in the above-mentioned method embodiments are implemented. Alternatively, when the processor 901 executes the computer program 903, the functions of the modules / units in the above-mentioned device embodiments are implemented.
[0166] The electronic device 9 may be a desktop computer, a notebook, a PDA, a cloud server, or other electronic device. The electronic device 9 may include, but is not limited to, a processor 901 and a memory 902. Those skilled in the art will appreciate that Fig. 9 The electronic device 9 is merely an example and does not limit the electronic device 9 , and may include more or less components than those shown in the figure, or different components.
[0167] The processor 901 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
[0168] The memory 902 may be an internal storage unit of the electronic device 9, for example, a hard disk or memory of the electronic device 9. The memory 902 may also be an external storage device of the electronic device 9, for example, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 9. The memory 902 may also include both an internal storage unit of the electronic device 9 and an external storage device. The memory 902 is used to store computer programs and other programs and data required by the electronic device.
[0169] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units.
[0170] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium (e.g., a computer-readable storage medium). Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. The computer program may include computer program code, which may be in source code form, object code form, executable file or some intermediate form. Computer-readable storage media may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc.
[0171] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A method for automatically deploying a virtual machine software environment, characterized in that: Applied to a management node, wherein a resource repository is deployed in the management node, and the resource repository stores virtual machine system image resources, virtual machine software resources, virtual machine configuration files, and software configuration files; The method comprises the following steps: In response to a connection request initiated by the controller to be deployed, based on the virtual machine system image resources, virtual machine software resources, virtual machine configuration files and software configuration files in the resource repository, determine and send target virtual machine system image resources, target virtual machine software resources, target virtual machine configuration files and target software configuration files to the controller to be deployed; Based on a preset automated deployment script, the controller to be deployed is controlled to execute a process of automated deployment of a virtualized software environment based on the target virtual machine system image resources, target virtual machine software resources, target virtual machine configuration file and target software configuration file.
2. The method according to claim 1, characterized in that The controller to be deployed is provided with a plug-in portion, the plug-in portion is plugged with a mobile boot medium, the mobile boot medium stores a root operating system installation image and a virtual machine operating system installation image suitable for the controller to be deployed, the controller to be deployed uses the root operating system installation image to locally deploy the root operating system; the controller to be deployed uses the virtual machine operating system installation image to locally deploy the virtual machine operating system; Based on the virtual machine system image resources, virtual machine software resources, virtual machine configuration files and software configuration files in the resource repository, determining and sending target virtual machine system image resources, target virtual machine software resources, target virtual machine configuration files and target software configuration files to the controller to be deployed, including: Obtain resource allocation information of the virtual machine system image resources in the resource repository and resource requirement information of the controller to be deployed; Based on the resource allocation information and resource demand information, determine and send a target virtual machine system image resource and a target virtual machine configuration file to the controller to be deployed; Determining software deployment requirement information for the controller to be deployed; Based on the software deployment requirement information and the virtual machine software resources, target virtual machine software resources and a target software configuration file are determined and sent to the controller to be deployed.
3. The method according to claim 2, characterized in that The steps for making the mobile guide medium are as follows: Build a compilation environment; Determine a base image suitable for the root operating system and the virtual machine operating system of the controller to be deployed, and mount the base image into the compilation environment; In the compilation environment, modify the basic image to obtain a root operating system installation image and a virtual machine operating system installation image suitable for the controller to be deployed; The root operating system installation image and the virtual machine operating system installation image are burned onto a mobile medium to obtain the mobile boot medium.
4. The method according to claim 3, characterized in that: In the compilation environment, the basic image is modified to obtain a root operating system installation image and a virtual machine operating system installation image suitable for the controller to be deployed, including: In the compilation environment, finding the first root file system file of the basic image; Copying the content of the first root file system file to the working directory of the compilation environment, and adding a general software dependency package to the working directory to obtain a second root file system file; In the compilation environment, compiling the virtualization software to obtain a virtualization software package; Add the virtualization software package and its software dependency package to the second root file system file to obtain a third root file system file; The third root file system file is packaged to obtain a root operating system installation image and a virtual machine operating system installation image suitable for the controller to be deployed.
5. The method according to claim 4, characterized in that The third root file system file is packaged to obtain a root operating system installation image and a virtual machine operating system installation image suitable for the controller to be deployed, including: Cutting the third root file system file to obtain a fourth root file system file; The fourth root file system file is packaged and compressed to obtain a root operating system installation image and a virtual machine operating system installation image suitable for the controller to be deployed.
6. The method according to claim 1, characterized in that Based on a preset automated deployment script, the controller to be deployed is controlled to execute an automated deployment process of a virtualized software environment based on the target virtual machine system image resources, the target virtual machine software resources, the target virtual machine configuration file, and the target software configuration file, including: Based on a preset automated deployment script, control the controller to be deployed to locally deploy the virtual machine based on the target virtual machine system image resources and target virtual machine configuration parameters; Based on a preset automation script, the controller to be deployed is controlled, the virtual machine is started, the application software is installed in the virtual machine based on the target virtual machine software resources, and the initial software configuration of the application software is updated based on the target software configuration parameters to complete the automated deployment of the virtual machine software environment.
7. A method for automatically deploying a virtual machine software environment, characterized in that: Applied to a controller to be deployed, the controller to be deployed is provided with a plug-in portion, the plug-in portion is plugged and matched with a mobile boot medium, and the mobile boot medium stores a root operating system installation image, a virtual machine operating system installation image, a target virtual machine system image resource, a target virtual machine software resource, a target virtual machine configuration file, and a target software configuration file applicable to the controller to be deployed; The method comprises the following steps: In the case where the plug-in portion of the controller to be deployed is plugged with the mobile boot medium, based on a preset automatic installation script, a root operating system installation image and a virtual machine operating system installation image are read from the mobile boot medium, and the root operating system is locally deployed based on the root operating system installation image, and the virtual machine operating system is locally deployed based on the virtual machine operating system installation image; When the root operating system and the virtual machine operating system are installed, based on a preset automatic installation script, the target virtual machine system image resources and the target virtual machine configuration parameters are read from the mobile boot medium, and the virtual machine is deployed locally based on the target virtual machine system image resources and the target virtual machine configuration parameters; When the deployment of the virtual machine is completed, the virtual machine is started, and based on a preset automatic installation script, the target virtual machine software resources and the target software configuration file are read from the mobile boot medium, the application software is installed in the virtual machine based on the target virtual machine software resources, and the initial software configuration of the application software is updated based on the target software configuration file, thereby completing the automated deployment of the virtual machine software environment.
8. A device for automatically deploying a virtual machine software environment, characterized in that: include: A response module is configured to respond to a connection request initiated by a controller to be deployed, determine and send a target virtual machine system image resource, a target virtual machine software resource, a target virtual machine configuration file, and a target software configuration file to the controller to be deployed based on the virtual machine system image resource, the virtual machine software resource, the virtual machine configuration file, and the software configuration file in the resource repository; The control module is configured to control the controller to be deployed to execute the process of automatically deploying the virtualized software environment based on the target virtual machine system image resources, target virtual machine software resources, target virtual machine configuration file and target software configuration file based on a preset automated deployment script.
9. A device for automatically deploying a virtual machine software environment, characterized in that: include: A first deployment module is configured to read a root operating system installation image from a mobile boot medium based on a preset automatic installation script when a plug-in portion of the controller to be deployed is plugged with the mobile boot medium, and to locally deploy the root operating system based on the root operating system installation image; A second deployment module is configured to read the target virtual machine system image resources and target virtual machine configuration parameters from the mobile boot medium based on a preset automatic installation script when the root operating system is installed, and to deploy the virtual machine locally based on the target virtual machine system image resources and target virtual machine configuration parameters; The third deployment module is configured to start the virtual machine when the deployment of the virtual machine is completed, read the target virtual machine software resources and the target software configuration file from the mobile boot medium based on a preset automatic installation script, install the application software in the virtual machine based on the target virtual machine software resources, and update the initial software configuration of the application software based on the target software configuration file to complete the automated deployment of the virtual machine software environment.
10. A readable storage medium storing a computer program, 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 7 are implemented.
Citation Information
Cited By
Programmable cluster installation method and device based on hyper-converged architecture
CN120428983A