Image production method, system and storage medium based on virtualized chemical control equipment

By using OpenStack to build a cloud platform and installing the cloud-init plug-in in the virtual laboratory, the problems of long image production time and poor scalability of virtualized industrial control equipment are solved, dynamic loading of files and user data is achieved, and the image production process is simplified and Reduced costs.

CN113268252BActive Publication Date: 2024-08-30STATE GRID HEBEI ELECTRIC POWER CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110366754.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-04-06
Publication Date
2024-08-30
Estimated Expiration
2041-04-06

Smart Images

  • Figure CN113268252B
    Figure CN113268252B
Patent Text Reader

Abstract

The present invention discloses a method, system and storage medium for making an image based on a virtualized chemical control device in the field of virtualization security protection technology, including: installing a cloud-init plug-in based on a basic image of a virtualized chemical control device based on a constructed virtual laboratory; performing secondary packaging development on a computing service to improve the API interface provided by the calling computing service, and realizing the service docking of cloud-init with the computing service based on Openstack during the creation process; exporting the virtualized chemical control device instance after dynamically loading files and user data through the image service of Openstack to complete the image making. The virtualized chemical control device can dynamically introduce and execute custom files, custom user data and custom scripts during the image making process; simplifying the image making process, reducing costs and improving production efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of virtualization security protection, and in particular relates to a mirroring method, system and storage medium based on virtualization of chemical control equipment. Background Art

[0002] In recent years, the number of network security incidents has increased exponentially, and the information security situation of power systems has become increasingly severe. The power system pays more and more attention to the training of information security professional skills. However, due to the particularity of the industry, there are many internal devices in the existing business system and protection system, and the manufacturers and models of host equipment, network equipment, general security equipment, special security equipment, etc. are more complex. When organizing relevant training, the learning cost of the security protection system in the existing power system is high. The virtual laboratory based on cloud computing and virtualization technology supports the creation of various network devices, including virtual switches, virtual routers, virtual firewalls, virtual power vertical devices and virtual power isolation devices, as well as hosts of various virtual industrial control equipment (Windows, Linux, Ningsi system, Kylin system), which can provide networking and configuration of various network devices in the power environment and simulate real network scenarios. Disadvantages of the existing technology: the large number and variety of images produced by virtual industrial control equipment leads to a long production time; the images produced by existing virtual industrial control equipment have poor scalability, and it is difficult to meet the requirements of virtual laboratories for script files or user data, and the initial deployment and later maintenance costs are high. Summary of the invention

[0003] In order to solve the deficiencies in the prior art, the present invention provides an image production method, system and storage medium based on virtualized chemical control equipment, which solves the problems of large number of images produced, large number of images, and difficult deployment and maintenance due to the dynamic introduction and execution of custom files, custom user data, and custom scripts in the image production process of virtualized chemical control equipment.

[0004] In order to achieve the above object, the technical solution adopted by the present invention is:

[0005] In a first aspect, a method for making an image based on a virtualized chemical control device is provided, comprising: based on a constructed virtual laboratory, installing a cloud-init plug-in on the basis of a basic image of a virtualized chemical control device; performing secondary packaging development on a computing service to improve the API interface provided by the calling computing service, and realizing the service docking of cloud-init with the computing service based on Openstack during the creation process; exporting the virtualized chemical control device instance after dynamically loading files and user data through the image service of Openstack to complete the image making.

[0006] Furthermore, the method for building a virtual laboratory includes: using hardware servers to build a cloud platform service based on OpenStack to provide basic cloud environment support for the virtual laboratory; based on OpenStack, making a virtualized version of a given system host to provide virtual component support for industrial control equipment for the virtual laboratory; building a manager for the virtual laboratory and releasing a call interface to the outside.

[0007] Furthermore, in the virtual laboratory, a virtual machine of the industrial control equipment is created through a virtual vertical file managed by the mirror service.

[0008] Furthermore, at least two hardware servers with the same configuration are connected to form a network through switches, one of which serves as a control node of OpenStack, used to control, manage, and schedule the resources and component services of the cloud platform. The services specifically deployed by this control node include network services, authentication services, graphical services, and image services; the remaining hardware servers serve as computing nodes of OpenStack, used to schedule and process computing resources. The services specifically deployed by each computing node include computing services and network agents.

[0009] Furthermore, the first network card of the control node is used as a management network for communication between nodes, and the second network card of the control node is used as an OverLay network for accessing the control node management network through Float IP; the first network card of the computing node is used as a management network for direct communication between the control node and each computing node, and the second network card of the computing node is used as a tunnel network for communication between virtual machines on different computing nodes.

[0010] Furthermore, based on OpenStack, a virtualized version of a given system host is produced to provide virtual component support for industrial control equipment for the virtual laboratory, including: producing a basic image of the virtualized industrial control equipment and obtaining the basic image file; dividing a management network for the virtualized industrial control equipment to connect to the management network port of the virtualized security equipment and manage it; dividing a business network for the virtualized industrial control equipment to connect to corresponding businesses according to user needs; and installing built-in services of the virtual laboratory for the virtualized industrial control equipment.

[0011] Furthermore, the virtual laboratory manager runs in the form of a Web service on the control node. The backend uses Django to implement the Web service, uses uWsgi+Nginx as a Web container and access scheduling, and uses MySQL database+Redis as a data storage / cache service; HTML5+CSS3+React is used to implement the front end.

[0012] In a second aspect, an image production system based on virtualized chemical control equipment is provided, comprising a processor and a storage device, wherein the storage device stores a plurality of instructions for the processor to load and execute the steps of the method described in the first aspect.

[0013] According to a third aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium includes a stored computer program, wherein when the computer program is executed by a processor, the device where the storage medium is located is controlled to execute the method described in the first aspect.

[0014] Compared with the prior art, the present invention has the following beneficial effects: the present invention produces image files by using a virtual laboratory built on OpenStack, so that virtualized chemical control equipment can dynamically introduce and execute custom files, custom user data, and custom scripts during the image production process; the image production process is simplified, costs are reduced, and production efficiency is improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 A schematic diagram of a system architecture of a virtual laboratory in an embodiment of the present invention;

[0016] Figure 2 The figure is a schematic diagram of the image making process of virtualizing the chemical control equipment according to the present invention. DETAILED DESCRIPTION

[0017] The present invention will be further described below in conjunction with the accompanying drawings. The following embodiments are only used to more clearly illustrate the technical solution of the present invention, and cannot be used to limit the protection scope of the present invention.

[0018] Embodiment 1:

[0019] like Figure 1 , Figure 2 As shown, a method for making an image based on a virtualized chemical control device includes: based on a constructed virtual laboratory, installing a cloud-init plug-in on the basis of a basic image of a virtualized chemical control device; performing secondary packaging development on a computing service to improve the API interface provided by the calling computing service, and realizing the service docking of cloud-init with the computing service based on Openstack during the creation process; exporting the virtualized chemical control device instance after dynamically loading files and user data through the image service of Openstack to complete the image making.

[0020] The purpose of the virtual laboratory for dynamically building a security protection model for the power monitoring system is to design and configure a cloud computing system that provides experimental, teaching, and attack and defense drill services for the power system in an economical and cost-effective manner. Figure 1The system architecture in the virtual laboratory includes: using hardware servers to build a cloud platform service based on OpenStack to provide basic cloud environment support for virtual laboratories; based on OpenStack, making a virtualized version of a given system host to provide virtual component support for industrial control equipment for virtual laboratories; building a virtual laboratory manager and releasing call interfaces to the outside world:

[0021] 1. Use hardware servers to build OpenStack-based cloud platform services to provide basic cloud environment support for virtual laboratories:

[0022] Based on the native OpenStack (Queens version) network service (Neutron), the network topology is transformed to realize the virtual-real interconnection network scenario (i.e., the interconnection between the virtual devices inside the cloud and the physical devices outside the cloud). This platform will provide basic cloud environment support for virtual laboratories.

[0023] OpenStack is an open source cloud computing management platform that is composed of multiple components to complete specific tasks. Its goal is to provide a cloud computing platform that is simple to implement, scalable, rich, and standardized. It provides an Infrastructure as a Service (IaaS) solution through various complementary services.

[0024] This virtual laboratory builds a cloud platform based on OpenStack (Queens version), and the main specific services used are: computing service (Nova), network service (Neutron), authentication service (Keystone), graphics service (Horizon) and image service (Glance).

[0025] The main deployment methods are:

[0026] 1) Required hardware: multiple (greater than or equal to 2) hardware servers with the same configuration (the server includes at least a processor, memory, disk, and network card, and the number of network cards is greater than or equal to 3, and the server is installed with the CentOS 7 operating system); multiple switches to cooperate with the hardware servers to build a network;

[0027] 2) One of the multiple hardware servers is used as an OpenStack control node to control, manage, and schedule the resources of the cloud platform and other component services. The specific services deployed by this control node include: network service, authentication service, graphical service, and image service (image service is used to manage the image files required for the virtual laboratory, mainly the image files of the virtual power vertical. Image file: is a special file that converts some specific files into a single file in a certain format to facilitate user download and use, and can be recognized and loaded by specific programs; in the virtual laboratory, we can create virtual machines for industrial control equipment through virtual vertical files managed by image service). The first network card (eth0) of the control node is used as the management network (for communication between nodes), and the second network card (eth1) is used as the OverLay network (i.e., the cross network: the virtual power vertical communication network in the cloud, the virtual power vertical accesses the control node management network through Float IP);

[0028] 3) The remaining hardware servers in the multiple hardware servers are all used as OpenStack computing nodes to schedule and process computing resources (CPU, memory, disk, network, etc.). The specific services deployed on each computing node are: computing service, network agent (DHCP agent, virtual switch agent, virtual router agent, each agent is managed by the network service of the control node, and finally realizes its own specific functions. The DHCP agent realizes the dhcp server and client functions, the virtual switch agent realizes the layer 2 switch function, and the virtual routing agent realizes the layer 3 routing function). The first network card (eth0) of the computing node is used as the management network (the same as the control node management network, used for direct communication between the control node and each computing node), and the second network card (eth1) is used as the tunnel network (used for vertical communication between computing nodes, that is, communication between virtual machines on different computing nodes).

[0029] 2. Based on OpenStack, create a virtualized version of a given system host to provide virtual component support for industrial control equipment for the virtual laboratory:

[0030] Virtualization of industrial control equipment:

[0031] The industrial control equipment here usually refers to the host servers deployed with the Nexus and Kylin operating systems used in the power system. To use industrial control equipment in a virtual laboratory, the original physical equipment needs to be transformed into virtual equipment (virtualized industrial control equipment);

[0032] The transformation process is as follows:

[0033] First, make a basic image of the virtualized industrial control equipment. The production process is as follows: upload the ISO format (a file in an image format) image file of the required industrial control equipment version in Openstack, use the appropriate instance type to create an instance of the image, and after the instance is successfully created, install the corresponding operating system in the console of the instance and complete the corresponding configuration, such as time zone, network card, disk, etc. After the system is installed, we use the image service of OpenStack to obtain the basic image file of the instance through the ID (identifier) ​​of the instance. The type of the image file is qcow2 (a disk image format);

[0034] Secondly, divide the management network for the virtualized chemical control equipment. Here, the first network card (eth0) of the virtualized chemical control equipment is set as the management network. If the network card name of the operating system is not eth0, modify its network card boot configuration file and set it to eth mode. In the application of virtual laboratories, the management network of the virtualized chemical control equipment is usually used to connect to the management network port of the virtualized security equipment to manage it.

[0035] Next, divide the service network for the virtualized chemical control equipment. Here, the second network card (eth1) of the virtualized chemical control equipment is set as the service network. In the application of the virtual laboratory, the service network is connected to the corresponding service according to the specific needs of the user.

[0036] Finally, when using virtualized industrial control equipment in a virtual laboratory, it is necessary to install the virtual laboratory's own built-in services, including the division of the network in the virtual laboratory (whether to obtain IP through DHCP or static method), and the implementation of unique network functions between components of each network type. These built-in service programs should be copied to the corresponding directory of the virtualized industrial control equipment background and set to start automatically at startup. That is, after the virtual machine is started, the built-in service program of this industrial control equipment will automatically run as a daemon process.

[0037] 3. Build a virtual laboratory manager and release the call interface to the outside world: Use a variety of Web technologies to build a virtual laboratory manager and release the call interface to the outside world; provide users with a convenient and flexible operation experience; and provide a configurable interface for external third-party applications;

[0038] An important role of virtual laboratory management is to provide users with virtual components in power security scenarios, including but not limited to virtual power vertical, virtual power isolation, virtual UKey, virtual host (Windows7, CentOS 7), virtual router, virtual switch, virtual network cable, etc.; another important role of virtual laboratory manager is to provide users with a set of laboratory graphical management tools, which users can use browser to access and through flexible and convenient operations, complete the construction and configuration of classic power security topology experimental scenarios, virtual and real intercommunication scenarios, retrieve experimental cases, attack and defense drills, etc., to provide users with an experimental platform to understand and skillfully build and configure power-specific business security scenarios; the third role of the manager is to allow the laboratory to be flexibly embedded in other third-party platforms and provide a complete API (Application Programming Interface);

[0039] The virtual laboratory manager (running as a Web service on the control node) uses Django (Python Web framework) to implement Web services on the back end, uses uWsgi+Nginx as Web containers and access scheduling, and uses MySQL (database) + Redis (NoSQL) as data storage / cache services; the front end uses the currently popular HTML5+CSS3+React to implement the front end.

[0040] The method for making a virtualized chemical control device image by using a custom file and custom user data includes:

[0041] First, based on the basic image of the virtualized chemical control device, install the cloud-init plug-in (cloud-init is an application that applies some custom configurations to the client during initialization). This plug-in is currently based on the Linux operating system and can be installed using YUM. After the installation is complete, the virtualized chemical control device currently has the function of defining some configurations independent of the operating system during the initialization process. A cloud host provider needs to initialize thousands of virtual hosts for customers every day. These machines may use different operating systems and may have different IP addresses, different SSH keys, and different host names set according to customer needs. What should be done at this time? Cloud-init was born to solve this problem;

[0042] Secondly, in order to realize the connection between Openstack's computing service and cloud-init service during the creation process, it is necessary to perform secondary packaging and development on the computing service to improve the API interface provided by the computing service, and add parameter processing of --files and --userdata to meet the loading of dynamic files and dynamic user data. The --files parameter realizes that the parameters after --files are written to the corresponding instance in the form of byte stream during the creation process of the virtualized chemical control device to realize file loading. --userdata realizes the execution of user data (including user-defined scripts or programs) during the creation process of the virtualized chemical control device. Similarly, like --files, the transmitted user data is also loaded into the instance in the form of byte stream and executed;

[0043] Finally, the virtualized chemical control device instance after the files and user data are dynamically loaded in the previous step is exported to a qcow2 format image through the image service of Openstack; after the image is made, when the virtualized chemical control device is created by the virtual laboratory, the instance created with the completed image file qcow2 contains the files dynamically loaded by the user and the user data information loaded and executed. The virtualized chemical control device can dynamically introduce and execute custom files, custom user data, and custom scripts during the image making process. Simplify the image making process, reduce costs, and improve production efficiency.

[0044] Embodiment 2:

[0045] Based on the image production method based on virtualized chemical control equipment described in Example 1, this embodiment provides an image production system based on virtualized chemical control equipment, including a processor and a storage device, wherein the storage device stores multiple instructions for the processor to load and execute the steps of the method described in Example 1.

[0046] Embodiment three:

[0047] Based on Embodiment 1 and Embodiment 2, this embodiment provides a computer-readable storage medium, wherein the computer-readable storage medium includes a stored computer program, wherein when the computer program is executed by a processor, the device where the storage medium is located is controlled to execute the method described in Embodiment 1.

[0048] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0049] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0050] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0051] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

Claims

1. A method for making an image based on virtualized chemical control equipment. Its characteristics are: include: Based on the built virtual laboratory, install the cloud-init plug-in on the basis of the basic image of the virtualized chemical control equipment; Perform secondary packaging development on the computing service to improve the API interface provided by the computing service, and realize the connection of the computing service based on Openstack to the cloud-init service during the creation process; Export the virtualized chemical control device instance after dynamically loading files and user data through Openstack's image service to complete the image production; The method for building the virtual laboratory includes: Use hardware servers to build OpenStack-based cloud platform services to provide basic cloud environment support for virtual laboratories; Based on OpenStack, a virtualized version of a given system host is created to provide virtual component support for industrial control equipment for the virtual laboratory, including: Make a basic image of the virtualized industrial control equipment. Obtaining the basic image file includes: uploading the ISO format image file of the required industrial control equipment version in Openstack, creating an instance of the image, then installing the corresponding operating system in the console of the instance, completing the corresponding configuration, and then using the image service of OpenStack to obtain the basic image file of the instance through the ID of the instance. The type of the image file is qcow2; Divide the management network for the virtualized chemical control equipment to connect to the management network port of the virtualized security equipment and manage it, including: setting the first network card of the virtualized chemical control equipment as the management network. If the network card name of the operating system is not eth0, modify its network card boot configuration file and set it to eth mode; Divide the service network for the virtualized chemical control device to connect the corresponding services according to the needs of the users, including: setting the second network card of the virtualized chemical control device as the service network; Install the built-in services of the virtual laboratory for the virtualized industrial control equipment, including: the division of the network in the virtual laboratory, the realization of unique network functions between components of various network types, copy these built-in service programs to the corresponding directory of the virtualized industrial control equipment background, and set them to start automatically at startup, that is, after the virtual machine is turned on, the built-in service program of this industrial control equipment will automatically run as a daemon process; Build a virtual laboratory manager and release a call interface to the outside world. The virtual laboratory manager runs on the control node as a Web service. The backend uses Django to implement Web services, uses uWsgi+Nginx as Web containers and access scheduling, and uses MySQL database + Redis as data storage / cache services; HTML5 + CSS3 + React is used to implement the front end; The method of making a virtualized chemical control device image by using a custom file and custom user data includes: First, based on the basic image of the virtualized chemical control device, install the cloud-init plug-in to set different IP addresses, different SSH keys, and different host names for virtual hosts using different operating systems; Secondly, the computing service is repackaged and developed to improve the API interface provided by the computing service. This is used to realize the connection between the computing service of Openstack and the cloud-init service during the creation process. The --files and --userdata parameter processing are added to meet the loading of dynamic files and dynamic user data. The --files parameter realizes that the parameters after --files are written to the corresponding instance in the form of byte stream during the creation process of the virtualized chemical control device to realize the loading of files. --userdata realizes the execution of user data during the creation process of the virtualized chemical control device. Like --files, the transmitted user data is also loaded into the instance in the form of byte stream and executed. Finally, the virtualized chemical control device instance after the files and user data are dynamically loaded in the previous step is exported to a qcow2 format image through the image service of Openstack. In this way, the image is made. When the virtualized chemical control device is created by the virtual laboratory, the instance created with the completed image file qcow2 contains the files dynamically loaded by the user and the user data information loaded and executed. The virtualized chemical control device dynamically introduces and executes custom files, custom user data, and custom scripts during the image making process. At least two hardware servers with the same configuration are connected to form a network through switches, one of which is used as a control node of OpenStack to control, manage and schedule the resources and component services of the cloud platform. The services specifically deployed by this control node include network services, authentication services, graphics services and image services; the remaining hardware servers are used as computing nodes of OpenStack to schedule and process computing resources. The services specifically deployed by each computing node include computing services and network agents; The first network card of the control node is used as a management network for communication between nodes, and the second network card of the control node is used as an OverLay network for accessing the control node management network through Float IP; the first network card of the computing node is used as a management network for direct communication between the control node and each computing node, and the second network card of the computing node is used as a tunnel network for communication between virtual machines on different computing nodes.

2. The method for making a virtualized image of a chemical control device according to claim 1, Its characteristics are: In the virtual laboratory, a virtual machine of an industrial control device is created through a virtual vertical file managed by a mirror service.

3. A mirror production system based on virtualized chemical control equipment, Its characteristics are: It comprises a processor and a storage device, wherein the storage device stores a plurality of instructions for the processor to load and execute the steps of the method according to any one of claims 1 to 2.

4. A computer-readable storage medium, Its characteristics are: The computer-readable storage medium includes a stored computer program, wherein when the computer program is executed by a processor, the device where the storage medium is located is controlled to execute the method according to any one of claims 1 to 2.

Citation Information

Patent Citations

  • Method and device for acquiring mirror image file in cloud computing system

    CN109391688A

  • Electric power monitoring system safety protection virtual laboratory and construction method thereof

    CN111049686A