Deployment Method, Device, Computer Equipment and Storage Medium of Virtualization Engine
The method enables deployment of multiple virtualization engines on a single hardware device by replicating and editing configuration files, optimizing resource usage and enabling direct inter-networking.
Patent Information
- Application Number
- CN202210766407.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-01
- Publication Date
- 2025-07-15
- Estimated Expiration
- 2042-07-01
AI Technical Summary
In the prior art, virtualization engines can only be deployed on different hardware devices, resulting in waste of hardware resources.
By deploying different virtualization engines on one hardware device, the configuration files and system service data of the first computing node are determined by copying and editing the configuration files and system service data of the second computing node, conflicts between different virtualization engines on the same hardware device are avoided, and internal interoperability is achieved using the same host Internet protocol address.
It realizes the deployment of multiple virtualization engines on a hardware device, saves hardware resources, and the virtual network can be directly interoperable without additional processing.
Smart Images

Figure CN115113882B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of cloud computing, and particularly to a method, apparatus, computer device, and storage medium for deploying a virtualization engine. Background Art
[0002] Virtualization refers to virtualizing one computer into multiple logical computers through virtualization technology. Multiple logical computers can run simultaneously on one computer. Each logical computer can run a different operating system, and application programs can run in independent spaces without affecting each other, thereby significantly improving the working efficiency of the computer.
[0003] The virtualization engine is an important part of virtualization. It can translate the instructions sent by the virtual machine to the operating system, and then pass them to the physical hardware and then make a response. Generally, different virtualization engines can only be deployed on different hardware devices, which will waste hardware resources. Summary of the Invention
[0004] The present invention provides a method, apparatus, and storage medium for deploying a virtualization engine, which can deploy different virtualization engines on one hardware device, thereby reducing the waste of hardware resources.
[0005] To achieve the above object, the present invention adopts the following technical solutions:
[0006] In a first aspect, the present invention provides a method for deploying a virtualization engine, the method comprising:
[0007] Determine a second computing node according to the category of a first computing node, where a first virtualization engine is deployed on the first computing node, and the category of the second computing node is the same as that of the first computing node;
[0008] Determine a first name of the second computing node according to the category of the second computing node and a preset engine type;
[0009] Create a basic environment for the second computing node according to the first name and the Internet protocol address of the host;
[0010] Obtain a copy file of a first configuration file of the first computing node, and copy service data of first system service data, where the first system service data includes the first configuration file;
[0011] Store the copy file and the copy service data in the basic environment;
[0012] In response to a user's editing operation on the copy file, obtain a second configuration file of the second computing node, where the second configuration file is used to run a second virtualization engine;
[0013] Replace the first configuration file in the replicated service data with the second configuration file to obtain the second system service data of the second computing node, and obtain the configured second computing node;
[0014] Deploy a second virtualization engine on the configured second computing node.
[0015] Adopting the deployment method of the virtualization engine provided by the present invention, the deployment node of the second virtualization engine, that is, the second computing node, is determined according to the deployment node of the first virtualization engine already deployed on the hardware device, that is, the first computing node. Specifically, a replication file is obtained according to the first configuration file of the first computing node, replication service data is obtained according to the first system service data of the first computing node, and corresponding editing operations are performed on the replication file and the replication service data, so as to obtain the second configuration file and the second system service for determining the second computing node, and then deploy the second virtualization engine on the configured second computing node. Since corresponding editing operations are performed on the basis of the replication file and the replication service data, the first computing node is different from the second computing node, so the problem of conflicts between different virtualization engines deployed on the same hardware device is avoided, so that two virtualization engines can be deployed on one hardware device, saving hardware resources. At the same time, since the first virtualization engine and the second virtualization engine are deployed on the same hardware device and both use the Internet protocol address of the host, the virtual networks inside the two virtualization engines coexisting on the hardware device can be directly interconnected without additional processing.
[0016] In a possible implementation manner, the above replication file includes a first file, the first file is a file with computing functions, the first file includes the second name of the first computing node and a first driver parameter, and the first driver parameter is used to indicate the first virtualization engine.
[0017] The above obtaining the second configuration file of the second computing node in response to the user's editing operation on the replication file includes:
[0018] In response to the user's modification operation on the second name and the first driver parameter, obtain the modified first file;
[0019] In response to the user's addition operation in the modified first file, obtain the added available domain filter, and the available domain filter is used to enable the control function of the second computing node based on the domain;
[0020] Obtain the second configuration file, and the second configuration file includes the modified first file and the available domain filter.
[0021] In a possible implementation, the above-mentioned copied file further includes a second file, which is a file with network connection function. The second file includes a second name, a first offline timeout time, and a first available domain parameter. The first offline timeout time is used to determine whether the first computing node is running normally, and the first available domain parameter is used to allocate an instance specified with a domain to the first computing node corresponding to the domain.
[0022] The above method for deploying the virtualization engine further includes:
[0023] In response to the user's modification operation on the second name, the first offline timeout time, and the first available domain parameter, obtain the modified second file;
[0024] The second configuration file further includes the modified second file.
[0025] In a possible implementation, the above-mentioned creation of the basic environment of the second computing node according to the first name and the Internet protocol address of the host includes:
[0026] Modify the preset system file according to the first name and the Internet protocol address to obtain a target system file;
[0027] Create a basic environment according to the target system file.
[0028] In a possible implementation, the above-mentioned modification of the preset system file according to the first name and the Internet protocol address to obtain a target system file includes:
[0029] Modify the second name in the system file to the first name, establish a mapping relationship between the first name and the Internet protocol address, and obtain the target system file according to the mapping relationship.
[0030] In a possible implementation, the above method for deploying the virtualization engine further includes:
[0031] Obtain a first timestamp of the first computing node and a second timestamp of the second computing node;
[0032] Determine the timestamp with the earlier time among the first timestamp and the second timestamp as the target timestamp;
[0033] Use the target timestamp as the timestamp of the first computing node and the second computing node.
[0034] In a second aspect, the present invention provides a device for deploying a virtualization engine. The device for deploying the virtualization engine includes:
[0035] A first determination unit, configured to determine a second computing node according to the category of the first computing node. A first virtualization engine is deployed on the first computing node, and the category of the second computing node is the same as that of the first computing node;
[0036] A second determination unit, configured to determine a first name of the second computing node according to the category of the second computing node and a preset engine type;
[0037] A creation unit, configured to create a basic environment of the second computing node according to the first name and the Internet protocol address of the host;
[0038] An obtaining unit, configured to obtain a copied file of a first configuration file of the first computing node and copied service data of first system service data, where the first system service data includes the first configuration file;
[0039] A storage unit, configured to store the copied file and the copied service data in the basic environment;
[0040] The obtaining unit is further configured to obtain a second configuration file of the second computing node in response to a user's editing operation on the copied file, where the second configuration file is used to run a second virtualization engine;
[0041] A third determination unit, configured to replace the first configuration file in the copied service data with the second configuration file to obtain second system service data of the second computing node, and obtain a configured second computing node; and deploy a second virtualization engine on the configured second computing node.
[0042] In a possible implementation manner, the above-mentioned copied file includes a first file, the first file is a file with computing functions, the first file includes a second name of the first computing node and a first driver parameter, and the first driver parameter is used to indicate a first virtualization engine;
[0043] The above-mentioned obtaining unit is specifically configured to:
[0044] Obtain a modified first file in response to a user's modification operation on the second name and the first driver parameter;
[0045] Obtain an added available domain label filter in response to a user's addition operation in the modified first file, where the available domain filter is used to enable a control function of the second computing node based on a domain;
[0046] Obtain a second configuration file, where the second configuration file includes the modified first file and the available domain filter.
[0047] In a possible implementation manner, the above-mentioned copied file may further include a second file, the second file is a file with network connection functions, the second file includes a second name, a first offline timeout time, and a first available domain parameter, the first offline timeout time is used to determine whether the first computing node is running normally, and the first available domain parameter is used to allocate an instance specifying a domain to the first computing node corresponding to the domain.
[0048] The above-mentioned acquisition unit is further configured to obtain a modified second file in response to a user's modification operation on the second name, the first offline timeout time, and the first available domain parameter.
[0049] The modified second file may also be included in the second configuration file.
[0050] In a possible implementation manner, the above-mentioned creation unit is specifically configured to:
[0051] Modify a preset system file according to the first name and the Internet protocol address to obtain a target system file; create a basic environment according to the target system file.
[0052] In a possible implementation manner, the above-mentioned creation unit is specifically configured to:
[0053] Modify the second name in the system file to the first name, establish a mapping relationship between the first name and the Internet protocol address, and obtain the target system file according to the mapping relationship.
[0054] In a possible implementation manner, the above-mentioned acquisition unit is further configured to obtain a first timestamp of a first computing node and a second timestamp of a second computing node.
[0055] The deployment device of the above-mentioned virtualization engine further includes a fourth determination unit;
[0056] The fourth determination unit is configured to determine the earlier timestamp among the first timestamp and the second timestamp as the target timestamp; use the target timestamp as the timestamp of the first computing node and the second computing node.
[0057] In a third aspect, the present invention provides a computer device, which includes: a processor and a memory. The memory is used to store computer program code, and the computer program code includes computer instructions. When the processor executes the computer instructions, the computer device executes the deployment method of the virtualization engine as described in the first aspect and any of its possible implementation manners.
[0058] In a fourth aspect, the present invention provides a computer-readable storage medium, on which computer instructions are stored. When the computer instructions run on a computer device, the computer device is caused to execute the deployment method of the virtualization engine as described in any item of the first aspect or the possible implementation manners of the first aspect. Description of the Drawings
[0059] Figure 1 It is a schematic structural diagram of a computer device provided by an embodiment of the present invention;
[0060] Figure 2 It is one of the schematic flowcharts of the deployment method of the virtualization engine provided by an embodiment of the present invention;
[0061] Figure 3 This is the second flowchart of the deployment method of the virtualization engine provided by the embodiments of the present invention;
[0062] Figure 4 This is the third flowchart of the deployment method of the virtualization engine provided by the embodiments of the present invention;
[0063] Figure 5 This is the fourth flowchart of the deployment method of the virtualization engine provided by the embodiments of the present invention;
[0064] Figure 6 This is the fifth flowchart of the deployment method of the virtualization engine provided by the embodiments of the present invention;
[0065] Figure 7 This is the first structural diagram of the deployment device of the virtualization engine provided by the embodiments of the present invention;
[0066] Figure 8 This is the second structural diagram of the deployment device of the virtualization engine provided by the embodiments of the present invention. Detailed implementation manners
[0067] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0068] Hereinafter, the terms "first" and "second" are only used for descriptive purposes and cannot be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include one or more of such features. In the description of the embodiments of the present disclosure, unless otherwise stated, the meaning of "a plurality" is two or more. Additionally, the use of "based on" or "according to" means open and inclusive, because a process, step, calculation, or other action "based on" or "according to" one or more of the stated conditions or values may in practice be based on additional conditions or values beyond the stated ones.
[0069] To solve the problem in the prior art that due to various conflicts, different virtualization engines can only be deployed on different hardware devices, the embodiments of the present invention provide a deployment method, device, computer device, and storage medium for a virtualization engine, enabling different virtualization engines to be deployed on one hardware device, thereby reducing waste of hardware resources.
[0070] Figure 1Schematic structural diagram of a computer device, as Figure 1 shown, the computer device may include: a processor 11, a memory 12, a communication interface 13, and a bus 14. The processor 11, the memory 12, and the communication interface 13 may be connected through the communication bus 14.
[0071] The processor 11 is the control center of the computer device, which may be a single processor 11 or a collective term for multiple processing elements. For example, the processor 11 may be a general-purpose central processing unit (CPU), or other general-purpose processors 11, etc. Among them, the general-purpose processor 11 may be a microprocessor or any conventional processor, etc.
[0072] As an embodiment, the processor 11 may include one or more CPUs. For example, Figure 1 the shown CPU0 and CPU1.
[0073] The memory 12 may be a read-only memory 12 (ROM) or other types of static storage devices that can store static information and instructions, a random access memory 12 (RAM) or other types of dynamic storage devices that can store information and instructions, or an electrically erasable programmable read-only memory 12 (EEPROM), a magnetic disk storage medium, or other magnetic storage devices, or any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto.
[0074] In a possible implementation, the memory 12 may exist independently of the processor 11. The memory 12 may be connected to the processor 11 through the bus 14 for storing instructions or program codes. When the processor 11 calls and executes the instructions or program codes stored in the memory 12, the deployment method of the virtualization engine provided in the following embodiments of the present invention can be implemented.
[0075] In another possible implementation, the memory 12 may also be integrated with the processor 11.
[0076] A communication interface 13 for connecting a computer device to other devices via a communication network, which can be an Ethernet, a radio access network (RAN), a wireless local area network (WLAN), etc. The communication interface 13 may include a receiving unit for receiving data and a transmitting unit for transmitting data.
[0077] A bus 14, which can be an Industry Standard Architecture (ISA) bus 14, a Peripheral Component Interconnect (PCI) bus 14, an Extended Industry Standard Architecture (EISA) bus 14, etc. The bus 14 can be divided into an address bus, a data bus, a control bus, etc. For the sake of simplicity of representation, Figure 1 it is only represented by a thick line in the figure, but it does not mean that there is only one bus 14 or one type of bus 14.
[0078] It should be noted that Figure 1 the structure shown in the figure does not constitute a limitation on the computer device. Except Figure 1 for the components shown, the computer device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.
[0079] The execution subject of the deployment method of the virtualization engine provided by the embodiment of the present invention is a deployment device of the virtualization engine. The deployment device of the virtualization engine can be the above computer device, or the CPU in the above computer device, or a control module for deploying the virtualization engine in the above computer device. The embodiment of the present invention takes the computer device as an example to execute the deployment method of the virtualization engine to illustrate the deployment method of the virtualization engine provided by the present invention.
[0080] The following describes the deployment method of the virtualization engine provided by the embodiment of the present invention with reference to the accompanying drawings.
[0081] As Figure 2 shown, the deployment method of the virtualization engine provided by the embodiment of the present invention includes the following steps 201 to 208.
[0082] 201. Determine a second computing node according to the category of the first computing node.
[0083] Among them, a first virtualization engine is deployed on the first computing node, and the category of the second computing node is the same as that of the first computing node. In the actual application process, the second computing node can be determined by running the hostname command.
[0084] It should be noted that the computing node can be a computing node in the narrow sense or a control node with the functions of a computing node. Therefore, the second computing node can also be a second control node.
[0085] In one embodiment, when the category of the second computing node is a control node, that is, when other virtualization engines are deployed on the control node, after running the hostname command, the category of the second computing node can be obtained as: controller{X1}. X1 is a number used to represent the identifier of the control node.
[0086] In another embodiment, when the category of the second computing node is a computing node, that is, when other virtualization engines are deployed on the computing node, after running the hostname command, the category of the second computing node can be obtained as: compute{X2}, where X2 is a number used to represent the identifier of the computing node.
[0087] 202. Determine the first name of the second computing node according to the category of the second computing node and the preset engine type.
[0088] Optionally, the engine type of the second computing node can be represented as {etype}. Then, according to the naming rule of the second computing node, the category of the second computing node, and the preset engine type, when it is determined that the category of the second computing node is a computing node, the first name of the second computing node can be represented as: compute-{etype}{X1}. When it is determined that the category of the second computing node is a control node, the first name of the second computing node can be represented as: controller-{etype}{X2}.
[0089] 203. Create the basic environment of the second computing node according to the first name and the Internet protocol address of the host.
[0090] 204. Obtain a copy file of the first configuration file of the first computing node and replicated service data of the first system service data, where the first system service data includes the first configuration file.
[0091] In the actual application process, the user can input corresponding replication instructions to obtain a copy file of the first configuration file of the first computing node and replicated service data of the first system service data.
[0092] 205. Store the copy file and the replicated service data in the basic environment.
[0093] 206. In response to a user's editing operation on a copied file, obtain a second configuration file of a second computing node. The second configuration file is used to run a second virtualization engine.
[0094] 207. Replace the first configuration file in the replication service data with the second configuration file to obtain second system service data of the second computing node, thereby obtaining a configured second computing node.
[0095] 208. Deploy the second virtualization engine on the configured second computing node.
[0096] In actual application, a conventional deployment method can be adopted to deploy the second virtualization engine on the configured second computing node.
[0097] Using the deployment method of the virtualization engine provided by the embodiment of the present invention, the deployment node of the second virtualization engine, i.e., the second computing node, is determined according to the deployment node of the first virtualization engine already deployed on the hardware device, i.e., the first computing node. Specifically, a copied file is obtained according to the first configuration file of the first computing node, and replication service data is obtained according to the first system service data of the first computing node, and corresponding editing operations are performed on the copied file and the replication service data, so as to obtain the second configuration file and the second system service for determining the second computing node, and further obtain the deployed second virtualization engine. Since corresponding editing operations are performed on the basis of the copied file and the replication service data, the first computing node is different from the second computing node, so the problem of conflict between different virtualization engines deployed on the same hardware device is avoided, and thus two virtualization engines can be deployed on one hardware device, saving hardware resources. At the same time, since the first virtualization engine and the second virtualization engine are deployed on the same hardware device and both use the Internet protocol address of the host, the virtual networks inside the two virtualization engines coexisting on the hardware device can be directly interconnected without additional processing.
[0098] Combined Figure 2 , as Figure 3 shown, the above step 206 may include the following steps 301 to 303.
[0099] 301. In response to a user's modification operation on the second name and the first driver parameter, obtain the modified first file. The first driver parameter is used to indicate the first virtualization engine.
[0100] Optionally, the copied file may include a first file, which belongs to the configuration file of the Nova node in the first computing node in the Openstack system, and its name may be Nova-{etype}.conf, and the first file is a file with computing functions. The first file may include the second name of the first computing node and the first driver parameter.
[0101] In response to the user's modification operation, modify the second name of the first computing node in the first file to the first name of the second computing node, and modify the first driver parameter of the first computing node in the first file to the second driver parameter of the second computing node. The second driver parameter is used to indicate the second virtualization engine.
[0102] Exemplarily, taking the first virtualization engine as Kvm and the second virtualization engine as Docker as an example, the modified first file can be obtained through the following code.
[0103] [DEFAULT]
[0104] compute_driver=novadocker.virt.docker.DockerDriver;
[0105] host={E2_NAME}.
[0106] It should be noted that {E2_NAME} can be compute-{etype}{X1} or controller-{etype}{X2}.
[0107] 302. In response to the user's addition operation in the modified first file, obtain the added availability zone filter. Among them, the availability zone filter is used to enable the control function of the second computing node based on the domain.
[0108] Exemplarily, in response to the user's addition operation in the modified first file, obtaining the added availability zone filter can be implemented through the following code.
[0109] [filter_scheduler]
[0110] enabled_filters=...,AvailabilityZoneFilter.
[0111] 303. Obtain a second configuration file, where the second configuration file includes the modified first file and the availability zone filter.
[0112] Optionally, during the process of obtaining the second configuration file, it is also necessary to patch some driver codes. Specifically, there is a situation where some driver codes do not obtain the node name from the configuration file Nova-{etype}.conf. Therefore, it is necessary to replace such driver codes so that all the second computing node names are obtained from the host setting in the configuration file Nova-{etype}.conf.
[0113] Optionally, it is necessary to add node resolution on all computing nodes and control nodes. Specifically, add the first name of the second computing node to the node resolution, and the Internet Protocol Address (IP) is also the IP address of the host. That is to say, the IP addresses of the first computing node and the second computing node are both the IP address of the host, that is, the IP address of the computer device.
[0114] Combined with Figure 3 , such as Figure 4 shown, after step 303 above, the deployment method of the virtualization engine may further include the following step 401.
[0115] 401. In response to the user's modification operations on the second name, the first offline timeout period, and the first availability zone parameter, obtain the modified second file. The second configuration file also includes the modified second file. The first offline timeout period is used to determine whether the first computing node is running normally, and the first availability zone parameter is used to allocate the instances specified with a zone to the first computing node corresponding to the zone.
[0116] Optionally, the above copied file may further include a second file. The second file belongs to the configuration file of the Neutron node. The second file is a file with network connection functions. The second file includes the second name, the first offline timeout period, and the availability zone parameter. The second file may include the configuration file named Neutron-dist-{etype}.conf, the configuration file named Neutron-{etype}.conf, and the configuration file named Openvswitch_agent-{etype}.conf.
[0117] Exemplarily, for the configuration file named Neutron-dist-{etype}.conf, in response to the user's modification operation on the second name, that is, modify the second name in the second file to the first name, so that the modified Neutron-dist-{etype}.conf configuration file can be obtained.
[0118] For example, the configuration file named Neutron-dist-{etype}.conf can be modified by the following code.
[0119] [DEFAULT]
[0120] host={E2_NAME}.
[0121] Exemplarily, for the configuration file named Neutron-{etype}.conf, in response to the user's modification operations on the second name, the first offline timeout time, and the first availability zone parameter, the modified Neutron-dist-{etype}.conf configuration file can be obtained.
[0122] For example, the second name in the configuration file named Neutron-dist-{etype}.conf can be modified by the following code.
[0123] [DEFAULT]
[0124] host={E2_NAME}.
[0125] For example, the first offline timeout time in the configuration file named Neutron-dist-{etype}.conf can be modified to the second offline timeout time, i.e., 120, by the following code.
[0126] agent_down_time=120.
[0127] It should be noted that the unit of the offline timeout time is seconds.
[0128] For example, the first availability zone parameter in the configuration file named Neutron-dist-{etype}.conf can be modified to the second availability zone parameter by the following code.
[0129] availability_zone={etype}.
[0130] Exemplarily, for the configuration file named Openvswitch_agent-{etype}.conf, in response to the user's modification operation on the second name, the modified Openvswitch_agent-{etype}.conf configuration file can be obtained.
[0131] For example, the second name in the configuration file named Openvswitch_agent-{etype}.conf can be modified by the following code.
[0132] [DEFAULT]
[0133] host = {E2_NAME}.
[0134] Optionally, in the actual application process, it is also necessary to grant the operation permissions of the above configuration files Neutron-dist-{etype}.conf, Neutron-{etype}.conf, and Openvswitch_agent-{etype}.conf to the users of the Neutron node.
[0135] Exemplarily, the operation permissions of the configuration files Neutron-dist-{etype}.conf, Neutron-{etype}.conf, and Openvswitch_agent-{etype}.conf can be granted to the users of the Neutron node through the following code.
[0136] chown root:neutron
[0137] / etc / neutron / plugins / ml2 / openvswitch_agent_{etype}.ini;
[0138] chown root:neutron / usr / share / neutron / neutron-dist-{etype}.conf;
[0139] chown root:neutron / etc / neutron / neutron-{etype}.conf.
[0140] Optionally, for the system service corresponding to the configuration file Openvswitch_agent-{etype}.conf, a service restart operation is required. Specifically, first, it is necessary to shut down the system service corresponding to Openvswitch_agent.conf of the first computing node; second, start the system service corresponding to Openvswitch_agent-{etype}.conf of the second computing node to complete the Neutron node registration; finally, restart the system service corresponding to Openvswitch_agent.conf of the first computing node. Based on this, the system service corresponding to Openvswitch_agent.conf in the first computing node and the system service corresponding to Openvswitch_agent-{etype}.conf in the second computing node can run simultaneously.
[0141] Combined withFigure 4 , as Figure 5 shown, step 203 above may include the following steps 501 and 502.
[0142] 501. Modify a preset system file according to the first name and the Internet protocol address to obtain a target system file.
[0143] Modify the second name in the system file to the first name, establish a mapping relationship between the first name and the Internet protocol address of the host, and obtain the target system file according to the mapping relationship.
[0144] 502. Create a basic environment according to the target system file.
[0145] Combined with Figure 5 , as Figure 6 shown, the deployment method of the virtualization engine provided by the embodiment of the present invention may further include the following steps 601 to 603.
[0146] 601. Obtain a first timestamp of a first computing node and a second timestamp of a second computing node.
[0147] 602. Determine the timestamp with the earlier time among the first timestamp and the second timestamp as the target timestamp.
[0148] 603. Use the target timestamp as the timestamps of the first computing node and the second computing node.
[0149] Optionally, add the time synchronization script timesync to the second computing node to ensure that the database record times of the first computing node and the second computing node are consistent. Specifically, the time synchronization script timesync reads the second timestamp of the second computing node from the database table neutron.agents and obtains the first timestamp of the first virtualization engine. Compare the second timestamp with the first timestamp to determine the earlier timestamp among the first timestamp and the second timestamp, and determine the earlier timestamp as the target timestamp. Finally, assign the target timestamp to the time node corresponding to the later timestamp and write the target timestamp into the database table neutron.agents. Based on this, the database record times of the first computing node and the second computing node can be kept consistent.
[0150] In summary, in the embodiment of the present invention, the second configuration file and the second system service data of the second computing node of the second virtualization engine are obtained by modifying the copied file of the first configuration file of the first computing node of the first virtualization engine and the copied service data of the first system service data, so that the configured second computing node can be obtained. Based on this, the problem of naming conflicts when different virtualization engines are respectively deployed on multiple nodes of the same hardware device is solved, so that multiple virtualization engines can be deployed on one hardware device. Secondly, the IP addresses of multiple virtualization engines are all the IP address of the hardware device, so the virtual networks inside multiple virtualization engines can be directly interconnected without additional processing. Finally, in the embodiment of the present invention, the method of starting multiple sets of system services is adopted, that is, the system services corresponding to multiple virtualization engines can run on the hardware device at the same time, so that different virtualization engines on the same hardware device can run on the hardware device at the same time.
[0151] The above mainly introduces the solution provided by the embodiment of the present invention from the perspective of the device. It can be understood that in order for the device to implement the above functions, it includes the corresponding hardware structure and / or software module for executing each function. Those skilled in the art should easily realize that, in combination with the algorithm steps of each example described in the embodiments disclosed herein, the present invention can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed in the way of hardware or computer software driving the hardware depends on the specific application and design constraint conditions of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present invention.
[0152] Figure 7 shows a possible composition schematic diagram of the deployment device 700 of the virtualization engine involved in the above embodiment, as Figure 7 shown, the deployment device 700 of the virtualization engine may include: a first determination unit 701, a second determination unit 702, a creation unit 703, an acquisition unit 704, a storage unit 705, and a third determination unit 706.
[0153] Among them, the first determination unit 701 is configured to determine a second computing node according to the category of the first computing node. A first virtualization engine is deployed on the first computing node, and the category of the second computing node is the same as that of the first computing node. The second determination unit 702 is configured to determine the first name of the second computing node according to the category of the second computing node and a preset engine type. The creation unit 703 is configured to create a basic environment for the second computing node according to the first name and the Internet protocol address of the host. The acquisition unit 704 is configured to acquire a copy file of the first configuration file of the first computing node and copy service data of the first system service data, where the first system service data includes the first configuration file. The storage unit 705 is configured to store the copy file and the copy service data in the basic environment. The acquisition unit 704 is further configured to, in response to a user's editing operation on the copy file, acquire a second configuration file of the second computing node, and the second configuration file is used to run the second virtualization engine. The third determination unit 706 is configured to replace the first configuration file in the copy service data with the second configuration file to obtain second system service data of the second computing node, and obtain the configured second computing node; and deploy the second virtualization engine on the configured second computing node.
[0154] Optionally, the above copy file may include a first file, and the first file is a file with computing functions, and the first file includes the second name of the first computing node and the first driver parameter.
[0155] Optionally, the above acquisition unit 704 is specifically configured to:
[0156] In response to a user's modification operation on the second name and the first driver parameter, acquire the modified first file; in response to a user's addition operation in the modified first file, acquire the added available domain filter, and the available domain filter is used to enable the control function of the second computing node based on the domain; acquire the second configuration file, and the second configuration file includes the modified first file and the available domain filter.
[0157] Optionally, the above copy file may further include a second file, and the second file is a file with network connection functions, and the second file includes the second name, the first offline timeout time, and the first available domain parameter. The first offline timeout time is used to determine whether the first computing node is running normally, and the first available domain parameter is used to allocate an instance specified with a domain to the first computing node corresponding to the domain.
[0158] Optionally, the above acquisition unit 704 is further configured to, in response to a user's modification operation on the second name, the first offline timeout time, and the first available domain parameter, acquire the modified second file.
[0159] Optionally, the modified second file may further be included in the second configuration file.
[0160] Optionally, the above-mentioned creation unit 703 is specifically configured to:
[0161] Modify a preset system file according to the first name and the Internet protocol address to obtain a target system file; create a basic environment according to the target system file.
[0162] Optionally, the above-mentioned creation unit 703 is specifically configured to:
[0163] Modify the second name in the system file to the first name, establish a mapping relationship between the first name and the Internet protocol address, and obtain the target system file according to the mapping relationship.
[0164] Optionally, the above-mentioned acquisition unit 704 is further configured to acquire a first timestamp of the first computing node and a second timestamp of the second computing node.
[0165] Figure 8 Another possible composition diagram of the deployment device 700 of the virtualization engine involved in the above embodiment is shown. Combining Figure 7 , as Figure 8 shown, the deployment device 700 of the virtualization engine provided by the embodiment of the present invention may further include a fourth determination unit 801.
[0166] Optionally, the fourth determination unit 801 is configured to determine the timestamp with an earlier time among the first timestamp and the second timestamp as the target timestamp, and use the target timestamp as the timestamp of the first computing node and the second computing node.
[0167] Of course, the deployment device 700 of the virtualization engine provided by the embodiment of the present invention includes but is not limited to the above modules.
[0168] Another embodiment of the present invention further provides a computer-readable storage medium, in which computer instructions are stored. When the computer instructions run on a computer device, the computer device is caused to execute each step executed by the computer device in the method flow shown in the above method embodiment.
[0169] Another embodiment of the present invention further provides a chip system, which is applied to the deployment device 700 of the virtualization engine. The chip system includes one or more interface circuits and one or more processors 11. The interface circuits and the processor 11 are interconnected by lines. The interface circuit is configured to receive a signal from the memory 12 of the deployment device 700 of the virtualization engine and send the signal to the processor 11, and the signal includes computer instructions stored in the memory 12. When the processor 11 executes the computer instructions, the deployment device 700 of the virtualization engine executes each step executed by the deployment device 700 of the virtualization engine in the method flow shown in the above method embodiment.
[0170] In another embodiment of the present invention, there is also provided a computer program product, which includes instructions. When the instructions run on the deployment device 700 of the virtualization engine, the deployment device 700 of the virtualization engine is caused to execute each step performed by the deployment device 700 in the method flow shown in the above method embodiment.
[0171] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using a software program, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer execution instructions are loaded and executed on a computer, the processes or functions according to the embodiments of the present invention are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains one or more integrated media. The available medium can be a magnetic medium (such as a floppy disk, hard disk, magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid state disk (SSD)), etc.
[0172] As described above, the above are only specific embodiments of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions within the technical scope disclosed by the present invention should be covered by the protection scope of the present invention. Therefore, the protection scope of the present invention should be subject to the protection scope of the claims.
Claims
1. A deployment method of a virtualization engine, characterized in that, Including: Determine a second computing node according to the category of the first computing node, where a first virtualization engine is deployed on the first computing node, and the category of the second computing node is the same as that of the first computing node; Determine the first name of the second computing node according to the category of the second computing node and a preset engine type; Create a basic environment for the second computing node according to the first name and the Internet protocol address of the host; Obtain a copy file of the first configuration file of the first computing node and replicated service data of the first system service data, where the first system service data includes the first configuration file; Store the copy file and the replicated service data in the basic environment; In response to a user's editing operation on the copy file, obtain a second configuration file of the second computing node, where the second configuration file is used to run a second virtualization engine; Replace the first configuration file in the replicated service data with the second configuration file to obtain second system service data of the second computing node, and obtain a configured second computing node; Deploy a second virtualization engine on the configured second computing node; The copy file includes a first file, the first file is a file with computing functions, and the first file includes a second name of the first computing node and first driver parameters, where the first driver parameters are used to indicate the first virtualization engine; The obtaining the second configuration file of the second computing node in response to a user's editing operation on the copy file includes: In response to a user's modification operation on the second name and the first driver parameters, obtain a modified first file; In response to a user's addition operation in the modified first file, obtain an added available domain filter, where the available domain filter is used to enable a control function of the second computing node based on a domain; Obtain the second configuration file, where the second configuration file includes the modified first file and the available domain filter.
2. The deployment method of the virtualization engine according to claim 1, wherein The copy file further includes a second file, the second file is a file with network connection functions, and the second file includes the second name, a first offline timeout time, and first available domain parameters, where the first offline timeout time is used to determine whether the first computing node is operating normally, and the first available domain parameters are used to allocate an instance with a specified domain to the first computing node in the corresponding domain; The method for deploying the virtualization engine further includes: In response to a user's modification operation on the second name, the first offline timeout time, and the first available domain parameters, obtain a modified second file; The modified second file is further included in the second configuration file.
3. The deployment method of the virtualization engine according to claim 1 or 2, characterized in that, The creating the basic environment for the second computing node according to the first name and the Internet protocol address of the host includes: Modify a preset system file according to the first name and the Internet protocol address to obtain a target system file; Create the basic environment according to the target system file.
4. The deployment method of the virtualization engine according to claim 3, characterized in that, The modifying a preset system file according to the first name and the Internet protocol address to obtain a target system file includes: Modify the second name in the system file to the first name, establish a mapping relationship between the first name and the Internet protocol address, and obtain the target system file according to the mapping relationship.
5. The deployment method of the virtualization engine according to claim 1 or 2, characterized in that The method for deploying the virtualization engine further includes: Obtain the first timestamp of the first computing node and the second timestamp of the second computing node; Determine the timestamp with the earlier time among the first timestamp and the second timestamp as the target timestamp; Use the target timestamp as the timestamp of the first computing node and the second computing node.
6. A deployment device for a virtualization engine, characterized in that It includes: A first determination unit for determining a second computing node according to the category of the first computing node. The first virtualization engine is deployed on the first computing node, and the category of the second computing node is the same as that of the first computing node; A second determination unit for determining the first name of the second computing node according to the category of the second computing node and a preset engine type; A creation unit for creating a basic environment for the second computing node according to the first name and the Internet protocol address of the host; An acquisition unit for acquiring a copy of the first configuration file of the first computing node and copy service data of the first system service data, where the first system service data includes the first configuration file; A storage unit for storing the copy file and the copy service data in the basic environment; The acquisition unit is further configured to obtain a second configuration file of the second computing node in response to a user's editing operation on the copy file, where the second configuration file is used to run the second virtualization engine; A third determination unit for replacing the first configuration file in the copy service data with the second configuration file to obtain the second system service data of the second computing node, and obtaining the configured second computing node; And deploy a second virtualization engine on the configured second computing node; The copy file includes a first file, the first file is a file with computing functions, the first file includes the second name of the first computing node and a first driver parameter, and the first driver parameter is used to indicate the first virtualization engine; The acquisition unit is specifically configured to: Obtain the modified first file in response to a user's modification operation on the second name and the first driver parameter; Obtain an added available domain filter in response to a user's addition operation in the modified first file, where the available domain filter is used to enable the control function of the second computing node based on the domain; Obtain the second configuration file, where the second configuration file includes the modified first file and the available domain filter.
7. A computer device, characterized in that, The computer device includes: a processor and a memory; the memory is used to store computer program code, and the computer program code includes computer instructions; when the processor executes the computer instructions, the computer device executes the method for deploying the virtualization engine according to any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that, including computer instructions that, when run on a computer device, cause the computer device to execute the method for deploying the virtualization engine according to any one of claims 1 to 5.
Citation Information
Patent Citations
Automated configuration method of electrical power system cloud computing platform
CN103200036A
Virtual cloud honeynet deployment method, device and system and computer readable storage medium
CN110784361A