Bare metal instance management and control method, device and equipment and storage medium
Through the smart card, the management of bare metal instances based on the virtualization library interface is solved, and the high R&D and maintenance costs caused by the differences in bare metal and virtual machine architectures are improved, and the operation success rate and cloud service stability are improved.
Patent Information
- Application Number
- CN202411896139.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2044-12-20
AI Technical Summary
The use of different architectures between bare metal and virtual machine instances leads to high R&D and maintenance costs, and the success rate of CSOC installation service is low, affecting the overall operation success rate of bare metal products.
The smart card receives operation requests for bare metal instances, and based on the interface provided by the virtualization library, performs target operations corresponding to the operation requests on the bare metal instance, and uniformly manages bare metal instances and virtual machine instances.
It reduces the R&D and maintenance costs caused by different architectures, improves the operation success rate of bare metal instances, optimizes the cloud computing resource management process and efficiency, and enhances the stability and scalability of cloud services.
Smart Images

Figure CN119806742A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to technical fields such as cloud computing, cloud services, and bare metal products. Background Art
[0002] With the continuous evolution of cloud computing technology, bare metal products are also constantly integrating the advantages of cloud computing, allowing users to enjoy the high performance of physical machines while also experiencing the efficient operation and maintenance and flexible expansion capabilities brought by cloud computing, further expanding its application scope in key business areas of various industries, and laying a solid foundation for the widespread application of cloud computing in more complex and high-performance demand scenarios. Summary of the invention
[0003] The present disclosure provides a management and control method, apparatus, device, and storage medium for bare metal instances.
[0004] According to one aspect of the present disclosure, a bare metal instance management and control method is provided, including:
[0005] The smart card receives an operation request for the bare metal instance;
[0006] The smart card performs the target operation corresponding to the operation request on the bare metal instance based on the interface provided by the virtualization library.
[0007] According to another aspect of the present disclosure, a bare metal instance management and control device is provided, including:
[0008] A receiving module, used for receiving an operation request for a bare metal instance through a smart card;
[0009] The execution module is used to execute the target operation corresponding to the operation request on the bare metal instance through the interface provided by the smart card based on the virtualization library.
[0010] According to another aspect of the present disclosure, there is provided an electronic device, comprising:
[0011] at least one processor; and
[0012] a memory communicatively connected to the at least one processor; wherein,
[0013] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute any method in the embodiments of the present disclosure.
[0014] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute any method according to the embodiments of the present disclosure.
[0015] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, which implements any method according to the embodiments of the present disclosure when executed by a processor.
[0016] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.
[0018] Figure 1 It is a flowchart of a bare metal instance management and control method provided according to an embodiment of the present disclosure;
[0019] Figure 2 is a timing diagram for creating a bare metal instance according to an embodiment of the present disclosure;
[0020] Figure 3 is a timing diagram for starting a bare metal instance according to an embodiment of the present disclosure;
[0021] Figure 4 is a timing diagram of shutting down a bare metal instance through soft shutdown according to an embodiment of the present disclosure;
[0022] Figure 5 is a timing diagram of shutting down a bare metal instance through hard shutdown according to an embodiment of the present disclosure;
[0023] Figure 6a is a timing diagram of releasing a bare metal instance according to an embodiment of the present disclosure;
[0024] Figure 6b is a framework diagram of releasing a bare metal instance according to an embodiment of the present disclosure;
[0025] Figure 7 is a timing diagram of device mounting in a bare metal instance provided according to an embodiment of the present disclosure;
[0026] Figure 8 is a timing diagram of uninstalling a device in a bare metal instance provided according to an embodiment of the present disclosure;
[0027] Fig. 9 is a timing diagram of capacity expansion of a system disk in a bare metal instance provided according to an embodiment of the present disclosure;
[0028] Fig.10 is a framework diagram of a bare metal instance management and control method provided according to an embodiment of the present disclosure;
[0029] Fig.11 is a framework diagram of libvirt provided according to an embodiment of the present disclosure;
[0030] Fig.12 is a schematic diagram of the structure of a control device for a bare metal instance provided according to an embodiment of the present disclosure;
[0031] Fig.13 It is a block diagram of an electronic device used to implement the management and control method of the bare metal instance of the embodiment of the present disclosure. DETAILED DESCRIPTION
[0032] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope of the present disclosure. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0033] The terms "first", "second", etc. in this disclosure are used to distinguish similar objects, and are not necessarily used to describe a specific order or precedence. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, including a series of steps or units. The method, system, product or device is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0034] For ease of understanding, the terms involved in the embodiments of the present disclosure are explained below:
[0035] Bare metal instance: Bare metal instance is a computing resource provision method in the cloud computing service model. It aims to provide users with complete physical servers without an intermediate virtualization layer. Users can directly access the server's hardware resources, including the CPU (Central Processing Unit), memory, storage devices, and network interfaces, just like using a traditional physical server.
[0036] Libvirt (virtual machine manager): also known as a virtualization management toolkit, Libvirt is an open source project that provides a set of tools for managing virtual machine instances. Libvirt itself is a CS architecture, including RPC-Client and RPC-Server. The RPC channel supports UnixSocket, TCP and other communication methods. The Client can interact with other Servers.
[0037] Libvirtd (virtual machine hypervisor): is a daemon in Libvirt, which is responsible for scheduling and managing virtual machines.
[0038] Qemu (Quick Emulato): QEMU is a widely used open source computer emulator and virtual machine software. As an independent hypervisor (virtual machine monitor), QEMU can run virtual machines at the application level and also supports compatible virtualization modes.
[0039] IOemu (Input-Output QEMU): IOemu is the abbreviation of IO Qemu; Qemu (Quick EMUlator) is an open source virtualization software and hardware emulator. In the disclosed embodiment, in order to adapt to the unified management of bare metal instances and virtual machine instances, IOemu is used to replace Qemu in the virtual machine instance management tool.
[0040] QMP (QEMU Machine Protocol) is a JSON-based (a lightweight data exchange format) protocol provided by QEMU. It allows users to query and configure QEMU instances through a socket interface.
[0041] Nova (OpenStack Nova, computing control plane): is a core component in OpenStack (a cloud computing platform), which is mainly responsible for the management and scheduling of computing resources. In the disclosed embodiment, Nova is used to respond to operation requests, call the interface provided by the virtualization library, and send the target instruction corresponding to the operation request to the virtual machine hypervisor.
[0042] Smart card: a card-type device that integrates a microprocessor and a storage unit. It can also be understood as a device similar to a server. In the disclosed embodiment, the smart card integrates key components such as Nova, Libvirtd and IOemu for managing bare metal instances.
[0043] With the continuous development of cloud computing technology, in order to meet the diverse needs of different users, two key computing products, bare metal products and virtual machine products, have emerged at the IaaS (Infrastructure as a Service) layer.
[0044] However, these two computing products have some urgent problems to be solved in practical applications, which seriously affect the overall efficiency and user experience of cloud computing services, and also bring many challenges and increased costs to the R&D and operation and maintenance teams.
[0045] On the one hand, since bare metal and virtual machine instances use different architectures, the R&D and maintenance costs are high.
[0046] On the other hand, the success rate of using the installation service CSOC (Cloud Service Onboarding and Commissioning) is relatively low, about 95% after testing. This has become a shortcoming that restricts the improvement of the overall operation success rate of bare metal products.
[0047] In view of this, the embodiments of the present disclosure provide a bare metal instance management method. The management of the smart card bare metal instance can be achieved by managing the virtual machine instance, thereby unifying the management architecture of the bare metal instance and the virtual machine instance. Figure 1 FIG. 1 is a flow chart of a bare metal instance management and control method provided in an embodiment of the present disclosure, which mainly includes the following contents:
[0048] S101, a smart card receives an operation request for a bare metal instance.
[0049] It is understandable that bare metal instances essentially run directly on physical machine hardware. One bare metal instance corresponds to one physical machine.
[0050] A smart card is a card-type device that integrates a microprocessor and a storage unit. It can be used as a medium to receive operation requests for bare metal instances. These operation requests can be management requests for bare metal instances. For example, a cloud service user initiates an operation request through a specific management platform, hoping to modify the configuration of the managed bare metal product, expand the disk capacity, deploy applications, and so on.
[0051] S102: The smart card executes a target operation corresponding to the operation request on the bare metal instance based on an interface provided by the virtualization library.
[0052] The virtualization library (Libvirt) is an interface library formed by encapsulating and integrating many interfaces. These interfaces shield the complexity and diversity of the underlying hardware, so that the operation requests of the bare metal instance can be received by the smart card in a unified and standardized way. For example, the operation request of the bare metal instance is converted from C++ (C plus plus, a programming language) format to Python (Python programming language, a programming language) format, so that the bare metal instance can be managed using the same architecture as virtual machine management.
[0053] In the disclosed embodiment, by using the standardized interface of the virtualization library, the operation request of the bare metal instance can be received and executed by the smart card in a unified and standardized manner, which helps to build a more reliable and easy-to-operate cloud computing environment, and reduce the R&D cost and maintenance cost caused by the different architectures used by bare metal and virtual machine instances. Through the interface provided by the smart card based on the virtualization library, the target operation corresponding to the operation request is executed on the bare metal instance, which can replace the installation service CSOC, and does not require the network communication process of CSOC. The management of the bare metal instance is limited to the smart card and the physical machine, which can shorten the management time, further improve the operation success rate of the bare metal instance, optimize the cloud computing resource management process and efficiency, and enhance the stability and scalability of cloud services.
[0054] In the disclosed embodiment, multiple key components are integrated into the smart card, including Nova, virtual machine hypervisor (Libvirtd), IPMITool (Intelligent Platform Management Interface Tool), and IOemu. These components work together to effectively handle various operation requests for bare metal instances. The specific functions of these components are as follows:
[0055] (1) Nova is a core component in OpenStack (a cloud computing platform), which is mainly responsible for the management and scheduling of computing resources. In the disclosed embodiment, Nova is used to respond to operation requests, call the interface provided by the virtualization library, and send the target instruction corresponding to the operation request to the virtual machine management program. In the disclosed embodiment, the interface fields and field meanings provided by the virtualization library are the same as those for managing virtual machine instances, but the field values are different. Specifically, when managing bare metal instances, the field values use the metadata of bare metal instances; when managing virtual machine instances, the field values use the metadata of virtual machine instances.
[0056] Taking the operation request of a bare metal instance to expand the system disk in the bare metal instance as an example, Nova calls the corresponding interface through the virtualization library, and then converts the operation request into a target instruction that the virtual machine hypervisor can recognize and process and gives it to the virtual machine hypervisor. The virtual machine hypervisor then performs further processing to ensure that the entire operation process can proceed in order.
[0057] (2) The virtual machine management program refines the target instructions sent by Nova and generates execution instructions that can be actually executed. It is used to generate execution instructions based on the target instructions and send them to IPMITool and / or IOemu to perform corresponding operations.
[0058] In the disclosed embodiment, the virtual machine hypervisor may be Libvirtd, which can manage various virtualization technologies through the common interface provided inside it, so that bare metal instances can be created, configured, started, stopped, and managed in a unified manner without having to worry about the specific details of the underlying technology. In addition, the virtual machine hypervisor also integrates various components, including (a)-(c):
[0059] (a) Application program interface (Libvirt_api), used to receive target instructions sent by Nova;
[0060] (b) a domain connection management object (virConnectPtr), which is used to call the client driver (RemoteDriver) to send execution instructions to the fast simulator driver based on the target instruction;
[0061] (c) Quick Emulator Driver (QemuDriver), used to communicate with IOemu and / or IPMITool.
[0062] The application program interface, as an interactive channel, can ensure communication standardization; the domain connection management object, as the hub of the entire process, processes the target instruction and calls the client driver to send the execution instruction to the fast simulator driver, thereby realizing communication with IOemu and / or IPMITool. The fast simulator driver can play a connecting role, and the entire architecture is also unified with the virtual machine instance management architecture, which can realize the management of bare metal instances and reduce maintenance and development costs.
[0063] During implementation, after receiving the target instruction sent from Nova through the application program interface, the virtual machine hypervisor will analyze the specific components involved in the target instruction through the domain connection management object, and then call the client driver to send execution instructions to IOemu and / or IPMITool to perform the corresponding operations. For example, when the target instruction involves the operation related to the system disk in the bare metal instance, the virtual machine hypervisor will send the corresponding execution instruction to the IOemu component responsible for the system disk operation, and let it actually perform the specific tasks related to the system disk; when the target instruction involves the power management-related operation in the bare metal instance, the virtual machine hypervisor will send the corresponding execution instruction to IPMITool for subsequent related operations.
[0064] (3) IPMITool, used to perform power management operations on bare metal instances.
[0065] IPMITool is a tool for remote management and monitoring of server hardware. It can access and control server hardware based on the Intelligent Platform Management Interface (IPMI) standard protocol.
[0066] Use IPMTool to perform power management operations on bare metal instances, allowing you to perform various operations on bare metal instances of servers without relying on the server operating system, such as power on, power off, restart, power status monitoring, and BIOS (Basic Input / Output System) modification.
[0067] (4) IOemu, used to perform at least one of the following operations on bare metal instances: mounting devices, unmounting devices, and expanding disk capacity.
[0068] IOemu in the disclosed embodiment mainly implements the smart card and physical machine related operations on the uninstall device and disk expansion, and realizes communication with SDPCIe (Software-Define-PCIe), and simulates PCIe Switch (Peripheral Component Interconnect Express Switch, PCIe switch) through SDPCIe.
[0069] In summary, in order to adapt to operations consistent with the virtual machine instance management architecture, the embodiment of the present disclosure adds an IOemu component so that it can be used to simulate disk devices and implement operations such as mounting, unmounting, and expanding the capacity of disk devices through corresponding instructions; it can also be used to simulate network cards to provide network connection functions.
[0070] Taking the mounting of devices as an example, when the virtual machine hypervisor sends relevant execution instructions, IOemu will simulate the corresponding hardware reading and writing and device interaction processes, and collaborate with the storage and device management modules of the bare metal instance to correctly connect the devices to be mounted to the bare metal instance so that they can be recognized and used by the system.
[0071] When expanding disk capacity, IOemu will simulate the process of disk space allocation and expansion according to execution instructions, and reasonably expand the disk resources of the bare metal instance to meet the business demand for storage capacity.
[0072] During implementation, QMP message communication is used between the hypervisor and IOemu. By adopting the fast simulator monitoring protocol QMP, it can ensure that the message communication method between the hypervisor and IOemu is compatible with the management architecture of the virtual machine instance, avoiding cloud service failures caused by communication problems, thereby improving the success rate of installation services.
[0073] In the disclosed embodiment, Nova, the virtual machine hypervisor, IPMITool and IOemu components in the smart card cooperate with each other to form a complete mechanism for performing various operations on bare metal instances, which helps to improve the management and use efficiency of bare metal instances, meet the diverse needs in different application scenarios, and can be consistent with the management architecture of virtual machine instances to reduce development and maintenance costs.
[0074] In order to make the bare metal instance management and control method provided by the embodiments of the present disclosure easier to understand, the operation requests of the bare metal instance can be elaborated in detail from multiple key aspects, which may specifically include: creating a bare metal instance, starting a bare metal instance, shutting down a bare metal instance, releasing a bare metal instance, mounting a bare metal device, unmounting a bare metal device, expanding the capacity of a disk, etc.
[0075] When the operation request includes creating a bare metal instance, the smart card uses the interface provided by the virtualization library to execute the target operation corresponding to the operation request on the bare metal instance. Figure 2 The displayed timing diagram is presented and the detailed steps are as follows:
[0076] S201, when the operation request includes creating an instance, calling the instance definition interface in the virtualization library through Nova.
[0077] That is, when Nova receives an operation request to create an instance, it calls the instance form definition interface in the virtualization library, and in S202, sends an instance creation instruction to the virtual machine management program through Nova.
[0078] The operation request for creating an instance and the instruction for creating an instance have different formats and contents. The operation request for creating an instance is an instance specification description in JSON format. The instruction for creating an instance is a virtual machine form description in XML format.
[0079] Among them, Nova needs to schedule a suitable physical machine to create a bare metal instance according to the operation request for creating an instance. After scheduling a suitable physical machine, it schedules the virtual machine hypervisor to create a bare metal instance based on the instance creation instruction. Therefore, the instance creation instruction can understand a subset of the operation request for creating an instance.
[0080] The instance creation instruction may include key parameters of the bare metal instance form, such as the number, type, and configuration information of the specified network cards; and the number, capacity, and disk type of system disks.
[0081] S203, creating a bare metal instance by responding to the instance creation instruction through the virtual machine management program.
[0082] That is, after receiving the instruction, the hypervisor builds a bare metal instance form that meets the requirements according to Nova's definition, thereby preparing the basic hardware environment for the startup and operation of the bare metal instance.
[0083] In the disclosed embodiment, by calling the definition instance form interface in the virtualization library by Nova, a standardized docking method is formed between Nova and the underlying virtual machine management program and hardware driver and management tools, which can unify the management process and interface of the virtual machine and the bare metal instance. Based on the standardized docking method, the virtual machine management program can respond to the instance creation instruction more accurately and create a bare metal instance, which can lay a solid foundation for the stable operation of the bare metal instance.
[0084] When the operation request includes starting a bare metal instance, the smart card uses the interface provided by the virtualization library to execute the target operation corresponding to the operation request on the bare metal instance. Figure 3 The displayed timing diagram is presented and the detailed steps are as follows:
[0085] S301, when the operation request includes starting a bare metal instance, calling a start instance interface in a virtualization library through Nova.
[0086] S302: Based on the instance startup interface, Nova sends an instance startup instruction to the virtual machine management program.
[0087] S303: After the virtual machine management program receives the startup instruction sent by Nova, it sends the startup instruction to IOemu.
[0088] S304: Initialize the system disk and network card of the bare metal instance based on the startup instruction through IOemu.
[0089] S305: When IOemu is successfully started, a power-on instruction is sent to IPMITool through the virtual machine management program.
[0090] That is, when IOemu is successfully started, it means that the initialization of the system disk and the network card has been successfully completed. The virtual machine management program will monitor this state change, determine that the physical machine can be powered on, and send a power-on command to the IPMITool component.
[0091] S306: Instruct the physical machine corresponding to the bare metal instance to perform a power-on operation based on the power-on instruction through IPMITool.
[0092] The power-on operation is that the IPMITool sends a corresponding signal to the power management module of the physical machine based on the power-on instruction to turn on the power, so as to change the power state of the physical machine from the off state to the on state (active).
[0093] In the disclosed embodiment, Nova calls the startup instance interface in the virtualization library and sends the instance startup instruction to the virtual machine hypervisor, which then sends the startup instruction to IOemu. If the startup is successful, a power-on instruction is sent to IPMITool. In the whole process, each component can ensure the orderly progress of the startup process by orderly transmitting instructions, which can enhance the stability of cloud service operation.
[0094] Continue with Figure 3 For example, after the physical machine corresponding to the bare metal instance is powered on, the power status of the physical machine is checked through IPMITool in S307.
[0095] During implementation, IPMITool will send specific IPMI commands to the management controller of the physical machine, and the management controller will return the power status information of the physical machine, such as whether the power is turned on.
[0096] S308: When it is determined that the physical machine is powered on successfully, the power status is sent to the virtual machine management program through IPMITool.
[0097] S309, update the power state of the bare metal instance to a powered-on state through the virtual machine hypervisor. For example, set the power state of the bare metal instance to an active state to synchronize the power state to Nova.
[0098] In the disclosed embodiment, by checking the power status of the physical machine, it is possible to ensure that the physical machine has been properly powered on according to the previous power-on instruction, avoiding errors in subsequent operations due to power failure or incomplete power-on. After the power status of the bare metal instance is updated, the status is synchronized to Nova, so that Nova can schedule subsequent operations according to a pre-set process.
[0099] In the disclosed embodiment, the operation of shutting down the bare metal instance can be divided into a soft shutdown operation and a hard shutdown operation. Among them, the soft shutdown operation refers to actively shutting down the physical machine, and then monitoring the power status of the physical machine through the virtual machine hypervisor, and after monitoring that the power status of the physical machine is shut down, stopping the IOemu process to release resources; the hard shutdown refers to the operation of forcibly stopping the bare metal instance in an abnormal situation where the physical machine cannot be shut down normally.
[0100] In actual usage scenarios, considering factors such as the stability of cloud services and the rational use of resources, in order to more effectively ensure the operation of cloud services, soft shutdown operations are usually preferred to reduce the potential risks and adverse effects of hard shutdown operations on cloud services and resources, and ensure the smooth operation and efficient management of the entire cloud service.
[0101] When the operation request includes shutting down the bare metal instance, the smart card uses the interface provided by the virtualization library to execute the target operation corresponding to the operation request on the bare metal instance. Figure 4 The displayed timing diagram is presented and the detailed steps are as follows:
[0102] S401, when the operation request includes shutting down the bare metal instance, a soft shutdown interface in the virtualization library is called through Nova.
[0103] S402, Nova sends a soft shutdown instruction to the virtual machine management program.
[0104] S403, responding to the soft shutdown instruction through the virtual machine management program, and sending a shutdown instruction to IPMITool.
[0105] S404: Request the physical machine of the bare metal instance to perform a shutdown operation based on the shutdown instruction through IPMITool.
[0106] S405, polling the power state of the physical machine through IPMITool to determine that the power state of the physical machine is a shutdown state.
[0107] S406: When it is determined that the power state of the physical machine is the shutdown state, notify the virtual machine hypervisor through IPMITool to update the power state of the bare metal instance to the shutdown state.
[0108] S407: shut down IOemu based on the shutdown state through the virtual machine management program.
[0109] During implementation, IPMITool sends a shutdown command data packet that complies with the IPMI protocol to the intelligent platform management interface of the physical machine based on the shutdown instruction. After receiving the command, the management controller will execute the shutdown operation on the physical machine of the bare metal instance according to the pre-set hardware control logic.
[0110] Each time IPMITool sends a shutdown command to the physical machine, it will check the power status. If the power status is not shut down, the call returns. That is, the current shutdown and power status check operation process ends, returns to the location where the operation was originally initiated, and resends the shutdown command until the power status of the physical machine is shut down or an error alarm is issued after reaching a certain number of times.
[0111] When it is determined that the power state is the shutdown state, the virtual machine hypervisor updates the power state of the bare metal instance to the shutdown state. At the same time, a command such as "system powerdown" is sent to IOemu to shut down the IOemu process.
[0112] In the disclosed embodiment, by soft shutdown, the IOemu process is stopped, which can ensure that all disk write operations are completed, prevent file system damage, and implement the shutdown operation of the bare metal instance.
[0113] Correspondingly, in the case of soft shutdown failure, the hard shutdown operation can be used to shut down the computer. The specific execution process can be seen in Figure 5 The displayed timing diagram is presented and the detailed steps are as follows:
[0114] S501, when the soft shutdown fails, call the hard shutdown interface in the virtualization library through Nova.
[0115] S502, Nova sends a hard shutdown instruction to the virtual machine hypervisor.
[0116] S503: In response to the hard shutdown instruction, the virtual machine management program sends a shutdown instruction to the IPMI Tool.
[0117] S504: Request the physical machine of the bare metal instance to perform a shutdown operation based on the shutdown instruction through IPMITool.
[0118] S505, polling the power status of the physical machine through IPMITool.
[0119] S506: When the power state of the physical machine is found to remain powered on within the preset time period, IOemu is turned off through the virtual machine management program.
[0120] Different from soft shutdown, after IPMITool polls the power status of the physical machine for more than a preset m time, the hypervisor can forcibly terminate the IOemu process through a command such as "kill -15".
[0121] In the embodiment of the present disclosure, the IOemu process is terminated by hard shutdown operation, so that the IOemu process can be prevented from falling into an infinite loop, etc. The bare metal instance can be smoothly shut down through the process architecture.
[0122] In a cloud computing environment, you can recycle the resources of a bare metal instance that has been allocated and used, that is, clear all data and configurations related to the previous user's use on the bare metal instance physical machine, and release various system resources related to the bare metal instance, so that it can be restored to a state where it can be reallocated and used. This process is called releasing a bare metal instance. Before performing the operation of releasing a bare metal instance, you must ensure that the bare metal instance is in a closed state to avoid data loss, system errors, and many other problems caused by the direct release operation when it is in an open state.
[0123] In the embodiment of the present disclosure, when the operation request includes releasing the bare metal instance, the smart card can execute the target operation corresponding to the operation request on the bare metal instance based on the interface provided by the virtualization library. Figure 6a The displayed timing diagram is presented and the detailed steps are as follows:
[0124] S601, when the operation request includes releasing the bare metal instance, Nova calls the instance release interface in the virtualization library when determining to shut down the bare metal instance.
[0125] S602: Nova sends a release instruction to the virtual machine management program.
[0126] S603, responding to the release instruction through the virtual machine hypervisor, creating a write-zero operating system based on the image file to the physical machine corresponding to the bare metal instance; and erasing the target data on the physical machine based on the write-zero operating system.
[0127] During implementation, similar to the operation process of creating a bare metal instance, when creating a write-zero operating system, the relevant management components will also receive instruction requests specifically for creating a write-zero operating system.
[0128] For example, Nova sends an instruction request for creating a write-zero operating system to the virtual machine hypervisor, which then processes the request instruction and completes the operation of creating a write-zero operating system based on the image file to the physical machine corresponding to the bare metal instance through the corresponding execution component.
[0129] After creating the write-zero operating system, Nova can call the erase interface in the virtualization library and send an erase instruction to the virtual machine hypervisor. The virtual machine hypervisor sends the erase instruction to the physical machine through the management and control channel between the write-zero operating system and the physical machine to erase the data on the corresponding disk.
[0130] In the disclosed embodiment, a write-zero operating system is created based on the image file to the physical machine corresponding to the bare metal instance, and the target data on the physical machine is erased based on the write-zero operating system to ensure that the bare metal instance is released, which helps to improve the success rate of new instance deployment.
[0131] Correspondingly, after erasing the target data on the physical machine based on the write-zero operating system, by checking whether the erasure is completed, if the erasure is completed, the write-zero operating system also needs to be closed, and the operation continues with Figure 6a For example:
[0132] S604, calling the image system in the virtualization library through Nova to close the interface.
[0133] S605, Nova sends the image system shutdown instruction to the virtual machine management program.
[0134] S606: In response to the mirror system shutdown instruction, the virtual machine management program sends the shutdown instruction to the IPMI Tool.
[0135] S607: Request the physical machine of the bare metal instance to perform a shutdown operation based on the shutdown instruction through IPMITool.
[0136] In the disclosed embodiment, Nova calls the mirror system shutdown interface in the virtualization library to send a mirror system shutdown instruction to the virtual machine hypervisor, and then the virtual machine hypervisor sends an instruction to IPMITool to execute a shutdown operation on the physical machine, which can release the physical resources occupied by the write-zero operating system and facilitate subsequent system deployment and management operations.
[0137] In summary, to further understand the operation request for releasing the bare metal instance, such as Figure 6b As shown:
[0138] First, Nova sends a shutdown command to shut down the bare metal instance to the hypervisor (first using the soft shutdown interface), and the hypervisor sends the shutdown command to IPMITool, which requests the physical machine of the bare metal instance to perform a shutdown operation through a command such as "poweroff". This completes the preparation operation before releasing the bare metal instance.
[0139] Nova then sends an operation request instruction to create and start the write-zero operating system to the virtual machine hypervisor. The virtual machine hypervisor sends the operation request instruction to IPMITool, and IPMITool completes the operation of creating the write-zero operating system on the physical machine corresponding to the bare metal instance and starting it through instructions such as "power on".
[0140] After completing the operations of creating and starting the write-zero operating system, Nova sends an erase instruction to the virtual machine hypervisor. The virtual machine hypervisor sends the erase instruction to the write-zero operating system in the physical machine through the management and control channel between the write-zero operating system and the physical machine to erase the data on the corresponding disk.
[0141] Finally, Nova sends an operation request instruction to shut down and delete the write-zero operating system to the virtual machine hypervisor. The virtual machine hypervisor sends the operation request instruction to IPMITool, and IPMITool completes the shutdown and deletion operation of the write-zero operating system to the physical machine corresponding to the bare metal instance through instructions such as "power off".
[0142] When the operation request includes mounting a device, the smart card uses the interface provided by the virtualization library to execute the target operation corresponding to the operation request on the bare metal instance. Figure 7 The displayed timing diagram is presented and the detailed steps are as follows:
[0143] S701: When the operation request includes mounting a device, a mounting interface in a virtualization library is called through Nova.
[0144] S702: Nova sends a first mount instruction to the virtual machine management program; the first mount instruction includes a first device type and a mount mode.
[0145] The first device type may include mounting a network card or mounting a disk.
[0146] The mounting method may include hot-plugging or cold-plugging. The hot-plugging method is to plug in or unplug the first device while the bare metal instance is running; the cold-plugging method is to plug in or unplug the first device after shutting down the bare metal instance.
[0147] S703: Modify metadata corresponding to the first device type in the bare metal instance based on the first mount instruction through the virtual machine hypervisor.
[0148] In the case of cold plugging, after modifying the metadata, when you start the bare metal instance again, you can simulate the mounted device by starting IOemu. For details, please execute the subsequent S704-S705.
[0149] S704: When the mounting mode is hot-plugging, send a second mounting instruction to IOemu through the virtual machine management program.
[0150] S705: Using IOemu based on the second mount instruction, requesting through a serial bus interface to simulate a device of the first device type in the bare metal instance.
[0151] The second mount instruction is converted based on the first mount instruction. During implementation, the "chardev-add" instruction in the second mount instruction can be used to create a socket file to implement data exchange between the virtual machine hypervisor and IOemu, and then IOemu uses the "device add" instruction to send it to SDPCIe to mount the block device, thereby simulating the first device type device in the bare metal instance.
[0152] In the disclosed embodiment, Nova, a virtual machine hypervisor, and IOemu are used to complete the device mounting of a bare metal instance. The virtual machine hypervisor can handle the mounting operation in a relatively consistent manner, and the virtual machine hypervisor and IOemu can flexibly support a variety of mounting types and devices.
[0153] When the operation request includes uninstalling the device, the smart card uses the interface provided by the virtualization library to execute the target operation corresponding to the operation request on the bare metal instance. Figure 8 The displayed timing diagram is presented and the detailed steps are as follows:
[0154] S801: When the operation request includes uninstalling a device, an uninstall interface in a virtualization library is called through Nova.
[0155] S802, Nova sends a first uninstallation instruction to the virtual machine management program; the first uninstallation instruction includes the second device type and the uninstallation method.
[0156] The second device type may include uninstalling a network card or uninstalling a disk. The uninstallation method may include a hot-plug method or a cold-plug method.
[0157] S803: Modify metadata corresponding to the second device type in the bare metal instance based on the first uninstall instruction through the virtual machine hypervisor.
[0158] S804: When the uninstallation mode is hot-plugging, send a second uninstallation instruction to IOemu through the virtual machine management program.
[0159] S805: IOemu requests to uninstall the device of the second device type in the bare metal instance through the serial bus interface based on the second uninstall instruction.
[0160] The second uninstall instruction is converted based on the first uninstall instruction. During implementation, the second uninstall instruction can be used to use the "device_del" instruction to uninstall the device of the second device type, and then the "chardev-remove" instruction can be used to delete the socket file, so as to uninstall the device of the second device type in the bare metal instance.
[0161] In the disclosed embodiment, Nova, a virtual machine manager, and IOemu are used to complete the device uninstallation of the bare metal instance. The virtual machine manager can better coordinate resource recovery, including computing, storage, and network resources, to improve system resource utilization. The combination of the virtual machine manager and IOemu can support the uninstallation of multiple devices, and new devices can be adapted by updating the simulation module.
[0162] When the operation request includes disk expansion, the smart card uses the interface provided by the virtualization library to execute the target operation corresponding to the operation request on the bare metal instance. Fig. 9 The displayed timing diagram is presented and the detailed steps are as follows:
[0163] S901: When the operation request includes disk expansion, call the expansion interface in the virtualization library through Nova.
[0164] S902, Nova sends a first capacity expansion instruction to the virtual machine management program; the first capacity expansion instruction includes the capacity expansion and the capacity expansion method.
[0165] The expansion capacity refers to the increased disk space capacity. The expansion methods include hot-swap and cold-swap.
[0166] S903: Using the virtual machine hypervisor, modify the metadata corresponding to the disk in the bare metal instance based on the first capacity expansion instruction.
[0167] S904: When the capacity expansion mode is hot plugging, send a second capacity expansion instruction to IOemu through the virtual machine management program.
[0168] S905: Using IOemu based on the second capacity expansion instruction, requesting to expand the capacity of the disk that needs to be expanded in the bare metal instance through the serial bus interface.
[0169] In the disclosed embodiment, Nova, a virtual machine hypervisor, and IOemu are used to complete the disk expansion of a bare metal instance. The combination of the virtual machine hypervisor and IOemu can flexibly adapt to diverse expansion needs, cope with different scales, types, and storage forms, and improve the success rate of expansion.
[0170] In summary, the overall framework of the bare metal instance management and control method provided by the embodiment of the present disclosure is as follows: Fig.10 As shown, it mainly includes two parts:
[0171] Part 1: Northbound interface, the application program interface exposed by the hypervisor to Nova, so that Nova can call the same interface in the virtualization library as the virtual machine to operate the bare metal instance. Among them, the interface in the virtualization library and the application program interface in the hypervisor are consistent in format and semantics.
[0172] Part 2: Southbound interface, the virtual machine hypervisor uses the Intelligent Platform Management Interface Tool (IPMITool) based on the target instructions to implement the power operation of the bare metal instance, and encapsulates the QMP message to request the input and output simulator (IOemu) to implement the mounting, unmounting and disk expansion operations of the bare metal instance device.
[0173] like Fig.10 As shown, in S1001, Nova responds to the operation request and calls the interface provided by the virtualization library. In S1002, the target instruction corresponding to the operation request is encapsulated as an RPC message by Nova and sent to the virtual machine management program. Among them, the operation request may include: creating a bare metal instance, starting a bare metal instance, shutting down a bare metal instance, releasing a bare metal instance, mounting a bare metal device, uninstalling a bare metal device, expanding the capacity of a disk, etc.
[0174] In S1003, the virtual machine management program can receive the target instruction sent by Nova based on the application program interface. In S1004, through the domain connection management object, the client driver is called to send the target instruction to the fast simulator driver, and the fast simulator driver calls different components to complete the target operation corresponding to the operation request for the bare metal instance.
[0175] Since the virtual machine hypervisor does not support direct connection with the serial bus interface (SDPCie), in order to avoid the problem of requiring additional development management due to direct connection. During implementation, in S1005, the target instruction can be encapsulated as a QMP message by the fast simulator driver and sent to IOemu. Then in S1006, the QMP message is converted into an RPC message by IOemu and sent to the serial bus interface. After that, in S1007, the serial bus interface inputs the message to the field programmable gate array (FPGA, Field-Programmable Gate Array) to complete the communication with the physical machine. In this way, the mounting, unmounting and disk expansion operations of the bare metal instance device can be realized through IOemu.
[0176] Alternatively, in S1008, the target command is interpreted as a target command that can be understood by the physical machine through Bash (Bourne-Again Shell, a command interpreter) and sent to IPMITool. Then in S1009, the power supply of the bare metal instance is managed through the smart card and the baseboard management controller (BMC) in the physical machine.
[0177] like Fig.11As shown, a bare metal instance management and control architecture based on a smart card is provided in an embodiment of the present disclosure. In S1101, the smart card can call the interface in the virtualization library to send the target instruction corresponding to the operation request to the virtual machine management program. Then in S1102, the virtual machine management program receives the target instruction based on the application program interface. Then in S1103, the domain connection management object calls its internal client driver to encapsulate the target instruction as an RPC message and send it to the fast simulator driver. In S1104, the fast simulation driver completes the communication with IOemu based on the QMP message. Among them, the virtual machine management program includes the following Fig.11 The application program interface, the domain connection management object and the client driver therein, as well as the fast simulation driver that communicates with the client driver through the RPC protocol, and the IOemu that communicates with the fast simulation driver based on QMP messages.
[0178] In summary, the bare metal instance management and control method provided by the embodiment of the present disclosure can unify the management and control planes of virtual machines and bare metal instances, reduce the workload of related interface development and testing, and shorten the product back-end system release cycle, thereby reducing the R&D and operation and maintenance costs of bare metal products; in addition, the operation path of the bare metal instance no longer depends on components such as CSOC, which can reduce component dependence and improve product delivery efficiency. At the same time, according to experimental data, it can also improve the operation success rate of the product from the original 95% to 99.9%. The operating efficiency can be shortened from the original 20 minutes to about 5 minutes. Unifying the management structure of the bare metal instance with the operation interface of the virtual machine instance can reduce the workload of Openstack related interface development and testing, and shorten the product back-end system release cycle.
[0179] Based on the same technical concept, the present disclosure also proposes a bare metal instance management and control device 1200, such as Fig.12 As shown, including:
[0180] The receiving module 1201 is used to receive an operation request for a bare metal instance through a smart card;
[0181] The execution module 1202 is used to execute the target operation corresponding to the operation request on the bare metal instance through the interface provided by the smart card based on the virtualization library.
[0182] In some embodiments, the smart card includes Nova, a virtual machine hypervisor, an intelligent platform management interface tool IPMITool, and IOemu;
[0183] Nova is used to respond to operation requests, call the interface provided by the virtualization library, and send the target instructions corresponding to the operation request to the virtual machine hypervisor;
[0184] A virtual machine management program, used for generating execution instructions according to target instructions and sending them to IPMITool and / or IOemu;
[0185] IPMITool, used to perform power management operations on bare metal instances;
[0186] IOemu is used to perform at least one of the following operations on bare metal instances: mounting devices, unmounting devices, and expanding disk capacity.
[0187] In some embodiments, the execution module includes a creation unit for:
[0188] When the operation request includes creating an instance, Nova calls the instance form definition interface in the virtualization library to send an instance creation instruction to the virtual machine hypervisor;
[0189] The virtual machine hypervisor responds to the instance creation instruction and creates a bare metal instance.
[0190] In some embodiments, the execution module includes a startup unit for:
[0191] In the case where the operation request includes starting an instance, Nova sends an instance start instruction to the virtual machine hypervisor based on the start instance interface in the virtualization library;
[0192] Send a startup command to IOemu through the hypervisor;
[0193] Use IOemu to initialize the system disk and network card of the bare metal instance based on the startup instructions;
[0194] In case of successful startup of IOemu, the power-on command is sent to IPMITool through the hypervisor;
[0195] Use IPMITool to instruct the physical machine corresponding to the bare metal instance to perform the power-on operation based on the power-on instruction.
[0196] In some embodiments, a synchronization unit is further included, configured to:
[0197] Check the power status of the physical machine through IPMITool;
[0198] When the physical machine is confirmed to be powered on successfully, the power status is sent to the hypervisor through IPMITool;
[0199] Update the power state of the bare metal instance to the powered-on state through the hypervisor to synchronize the power state to Nova.
[0200] In some embodiments, the execution module includes a first closing unit configured to:
[0201] When the operation request includes shutting down the bare metal instance, the soft shutdown interface in the virtualization library is called by Nova to send the soft shutdown instruction to the virtual machine hypervisor.
[0202] In response to the soft shutdown command, the virtual machine hypervisor sends a shutdown command to the IPMITool;
[0203] Use IPMITool to request the physical machine of the bare metal instance to perform a shutdown operation based on the shutdown command;
[0204] Use IPMITool to poll the power status of the physical machine. If the power status of the physical machine is determined to be off, notify the hypervisor to update the power status of the bare metal instance to off.
[0205] Shut down IOemu based on shutdown state via the hypervisor.
[0206] In some embodiments, the execution module includes a second closing unit for:
[0207] In the case of soft shutdown failure, Nova calls the hard shutdown interface in the virtualization library to send the hard shutdown command to the virtual machine hypervisor;
[0208] In response to the hard shutdown command, the virtual machine hypervisor sends a shutdown command to IPMITool;
[0209] Use IPMITool to request the physical machine of the bare metal instance to perform a shutdown operation based on the shutdown command;
[0210] Poll the power status of the physical machine through IPMITool;
[0211] When the power state of the physical machine is found to remain powered on within a preset time period, IOemu is shut down through the virtual machine management program.
[0212] In some embodiments, the execution module includes a release unit, which is used to:
[0213] When the operation request includes releasing the bare metal instance, Nova calls the instance release interface in the virtualization library to send the release instruction to the virtual machine hypervisor when determining to shut down the bare metal instance.
[0214] The hypervisor responds to the release instruction and creates a write-zero operating system based on the image file to the physical machine corresponding to the bare metal instance.
[0215] Erases target data on a physical machine based on a write-zero operating system through a hypervisor.
[0216] In some embodiments, a clearing module is further included for:
[0217] Nova calls the image system shutdown interface in the virtualization library to send the image system shutdown instruction to the virtual machine hypervisor;
[0218] In response to the image system shutdown command through the virtual machine hypervisor, the shutdown command is sent to the IPMITool;
[0219] Use IPMITool to request the physical machine of the bare metal instance to perform a shutdown operation based on the shutdown command.
[0220] In some embodiments, the execution module includes a mounting unit for:
[0221] In the case where the operation request includes mounting a device, calling a mount interface in a virtualization library through Nova, and sending a first mount instruction to a virtual machine management program; the first mount instruction includes a first device type and a mount mode;
[0222] Modify, by the virtual machine hypervisor, metadata corresponding to the first device type in the bare metal instance based on the first mount instruction;
[0223] When the mounting mode is hot-plug, a second mounting instruction is sent to IOemu through the virtual machine management program;
[0224] Based on the second mount instruction, IOemu requests to simulate a device of the first device type in the bare metal instance through a serial bus interface.
[0225] In some embodiments, the execution module includes an unloading unit for:
[0226] In the case where the operation request includes uninstalling the device, calling the uninstall interface in the virtualization library through Nova, sending a first uninstall instruction to the virtual machine management program; the first uninstall instruction includes the second device type and the uninstall mode;
[0227] Modifying, by the virtual machine hypervisor, metadata corresponding to the second device type in the bare metal instance based on the first uninstall instruction;
[0228] When the uninstallation mode is hot-plug, a second uninstallation instruction is sent to IOemu through the virtual machine management program;
[0229] Based on the second uninstall instruction, IOemu requests, through the serial bus interface, to uninstall the device of the second device type in the bare metal instance.
[0230] In some embodiments, the execution module includes an expansion unit, which is used to:
[0231] In the case where the operation request includes disk expansion, Nova calls the expansion interface in the virtualization library to send a first expansion instruction to the virtual machine management program; the first expansion instruction includes the expansion capacity and the expansion method;
[0232] Modify, by the virtual machine hypervisor, metadata corresponding to the disk in the bare metal instance based on the first capacity expansion instruction;
[0233] When the capacity expansion mode is hot plugging, a second capacity expansion instruction is sent to IOemu through the virtual machine management program;
[0234] Based on the second expansion instruction, IOemu requests to expand the disk that needs to be expanded in the bare metal instance through the serial bus interface.
[0235] In some embodiments, the virtual machine hypervisor and IOemu communicate using the Quick Emulator Monitoring Protocol (QMP) message.
[0236] In some embodiments, wherein the virtual machine hypervisor comprises:
[0237] Application Programming Interface (API), used to receive target instructions sent by Nova;
[0238] The domain connection management object is used to call the client driver to send execution instructions to the fast simulator driver based on the target instruction;
[0239] The fast emulator driver is used to communicate with IOemu and / or IPMITool.
[0240] For the description of specific functions and examples of each module and submodule of the device in the embodiment of the present disclosure, reference can be made to the relevant description of the corresponding steps in the above method embodiment, which will not be repeated here.
[0241] In the technical solution disclosed herein, the acquisition, storage and application of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0242] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
[0243] Fig.13A schematic block diagram of an example electronic device 1300 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0244] like Fig.13 As shown, the device 1300 includes a computing unit 1301, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 1302 or a computer program loaded from a storage unit 1308 into a random access memory (RAM) 1303. In the RAM 1303, various programs and data required for the operation of the device 1300 can also be stored. The computing unit 1301, the ROM 1302, and the RAM 1303 are connected to each other via a bus 1304. An input / output (I / O) interface 1305 is also connected to the bus 1304.
[0245] A number of components in the device 1300 are connected to the I / O interface 1305, including: an input unit 1306, such as a keyboard, a mouse, etc.; an output unit 1307, such as various types of displays, speakers, etc.; a storage unit 1308, such as a disk, an optical disk, etc.; and a communication unit 1309, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 1309 allows the device 1300 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0246] The computing unit 1301 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 1301 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 1301 performs the various methods and processes described above, such as the management and control method of the bare metal instance. For example, in some embodiments, the management and control method of the bare metal instance may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 1308. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 1300 via the ROM 1302 and / or the communication unit 1309. When the computer program is loaded into the RAM 1303 and executed by the computing unit 1301, one or more steps of the management and control method of the bare metal instance described above may be performed. Alternatively, in other embodiments, the computing unit 1301 may be configured to execute the management and control method of the bare metal instance in any other appropriate manner (for example, by means of firmware).
[0247] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0248] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0249] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0250] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0251] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0252] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.
[0253] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
[0254] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the principles of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A bare metal instance management and control method, comprising: The smart card receives an operation request for the bare metal instance; The smart card executes the target operation corresponding to the operation request on the bare metal instance based on the interface provided by the virtualization library.
2. The method according to claim 1, wherein: The smart card includes a computing control plane Nova, a virtual machine management program, an intelligent platform management interface tool IPMITool, and an input and output simulator IOemu; The Nova is used to respond to the operation request, call the interface provided by the virtualization library, and send the target instruction corresponding to the operation request to the virtual machine management program; The virtual machine management program is used to generate an execution instruction according to the target instruction and send it to the IPMITool and / or the IOemu; The IPMITool is used to perform power management operations on the bare metal instance; The IOemu is used to perform at least one of the following operations on the bare metal instance: mounting a device, unmounting a device, and expanding disk capacity.
3. The method according to claim 2, wherein: The smart card performs a target operation corresponding to the operation request on the bare metal instance based on an interface provided by the virtualization library, including: In the case where the operation request includes creating an instance, calling the instance form definition interface in the virtualization library through Nova to send an instance creation instruction to the virtual machine management program; The bare metal instance is created by the virtual machine hypervisor in response to the instance creation instruction.
4. The method according to claim 2 or 3, wherein: The smart card performs a target operation corresponding to the operation request on the bare metal instance based on an interface provided by the virtualization library, including: In a case where the operation request includes starting an instance, sending an instance start instruction to the virtual machine hypervisor based on a start instance interface in the virtualization library by Nova; Sending a startup instruction to the IOemu through the virtual machine management program; Initialize the system disk and network card of the bare metal instance based on the startup instruction by using the IOemu; When the IOemu is successfully started, a power-on instruction is sent to the IPMITool through the virtual machine management program; The IPMITool instructs the physical machine corresponding to the bare metal instance to perform a power-on operation based on the power-on instruction.
5. The method according to claim 4, further comprising: Check the power status of the physical machine through the IPMITool; When it is determined that the physical machine is successfully powered on, sending the power status to the virtual machine hypervisor through the IPMITool; The power state of the bare metal instance is updated to a powered-on state through the virtual machine hypervisor to synchronize the power state to the Nova.
6. The method according to claim 2, wherein: The smart card performs a target operation corresponding to the operation request on the bare metal instance based on an interface provided by the virtualization library, including: In a case where the operation request includes shutting down the bare metal instance, calling a soft shutdown interface in the virtualization library through Nova to send a soft shutdown instruction to the virtual machine hypervisor; In response to the soft shutdown instruction, the virtual machine management program sends a shutdown instruction to IPMITool; Requesting the physical machine of the bare metal instance to perform a shutdown operation based on the shutdown instruction through the IPMITool; Polling the power state of the physical machine through the IPMITool, and when determining that the power state of the physical machine is in the shutdown state, updating the power state of the bare metal instance to the shutdown state by notifying the virtual machine hypervisor; The IOemu is shut down based on the shutdown state by the virtual machine hypervisor.
7. The method according to claim 2 or 6, wherein: The smart card performs a target operation corresponding to the operation request on the bare metal instance based on an interface provided by the virtualization library, including: In the case of a soft shutdown failure, calling a hard shutdown interface in the virtualization library through the Nova to send a hard shutdown instruction to the virtual machine management program; In response to the hard shutdown instruction, the virtual machine hypervisor sends a shutdown instruction to the IPMITool; Requesting the physical machine of the bare metal instance to perform a shutdown operation based on the shutdown instruction through the IPMITool; Polling the power status of the physical machine through the IPMITool; When the power state of the physical machine is found to remain powered on within a preset time period, the IOemu is shut down through the virtual machine management program.
8. The method according to claim 2, wherein: The smart card performs a target operation corresponding to the operation request on the bare metal instance based on an interface provided by the virtualization library, including: In a case where the operation request includes releasing the bare metal instance, when Nova determines to shut down the bare metal instance, calling a release instance interface in the virtualization library to send a release instruction to the virtual machine hypervisor; Responding to the release instruction through the virtual machine hypervisor, creating a write-zero operating system based on the image file to the physical machine corresponding to the bare metal instance; The target data on the physical machine is erased based on the write-zero operating system through the virtual machine hypervisor.
9. The method according to claim 8, further comprising: Calling the image system shutdown interface in the virtualization library through Nova to send the image system shutdown instruction to the virtual machine management program; In response to the mirror system shutdown instruction, the virtual machine management program sends the shutdown instruction to IPMITool; The IPMITool requests the physical machine of the bare metal instance to perform a shutdown operation based on the shutdown instruction.
10. The method according to claim 2, wherein: The smart card performs a target operation corresponding to the operation request on the bare metal instance based on an interface provided by the virtualization library, including: In the case where the operation request includes mounting a device, calling a mount interface in the virtualization library through Nova to send a first mount instruction to the virtual machine management program; the first mount instruction includes a first device type and a mount mode; Modifying, by the virtual machine hypervisor, metadata corresponding to the first device type in the bare metal instance based on the first mount instruction; When the mounting mode is hot-plug, sending a second mounting instruction to the IOemu through the virtual machine management program; Based on the second mount instruction, the IOemu requests, through a serial bus interface, to simulate a device of the first device type in the bare metal instance.
11. The method according to claim 2, wherein: The smart card performs a target operation corresponding to the operation request on the bare metal instance based on an interface provided by the virtualization library, including: In the case where the operation request includes uninstalling a device, calling an uninstall interface in the virtualization library through Nova to send a first uninstall instruction to the virtual machine management program; the first uninstall instruction includes a second device type and an uninstall mode; Modifying, by the virtual machine hypervisor, metadata corresponding to the second device type in the bare metal instance based on the first uninstall instruction; When the uninstallation mode is hot-plugging, sending a second uninstallation instruction to the IOemu through the virtual machine management program; Based on the second uninstall instruction, the IOemu requests to uninstall the device of the second device type in the bare metal instance through a serial bus interface.
12. The method according to claim 2, wherein: The smart card performs a target operation corresponding to the operation request on the bare metal instance based on an interface provided by the virtualization library, including: In the case where the operation request includes disk expansion, the expansion interface in the virtualization library is called by the Nova to send a first expansion instruction to the virtual machine management program; the first expansion instruction includes the expansion capacity and the expansion method; Modifying, by the virtual machine hypervisor, metadata corresponding to the disk in the bare metal instance based on the first capacity expansion instruction; When the capacity expansion mode is hot plugging, sending a second capacity expansion instruction to the IOemu through the virtual machine management program; Based on the second expansion instruction, the IOemu requests, through a serial bus interface, to expand the disk of the expanded capacity in the bare metal instance.
13. The method according to any one of claims 2 to 12, wherein: The virtual machine management program and the IOemu communicate with each other using the Quick Simulator Monitoring Protocol (QMP) message.
14. The method according to any one of claims 2 to 13, wherein: The virtual machine management program includes: An application program interface, used to receive target instructions sent by the Nova; A domain connection management object, for invoking a client driver to send an execution instruction to a fast simulator driver based on the target instruction; The fast simulator driver is used to communicate with the IOemu and / or IPMITool.
15. A bare metal instance management and control device, comprising: A receiving module, used for receiving an operation request for a bare metal instance through a smart card; The execution module is used to execute the target operation corresponding to the operation request on the bare metal instance through the interface provided by the smart card based on the virtualization library.
16. The device according to claim 15, wherein: The smart card includes a computing control plane Nova, a virtual machine management program, an intelligent platform management interface tool IPMITool, and an input and output simulator IOemu; The Nova is used to respond to the operation request, call the interface provided by the virtualization library, and send the target instruction corresponding to the operation request to the virtual machine management program; The virtual machine management program is used to generate an execution instruction according to the target instruction and send it to the IPMITool and / or the IOemu; The IPMITool is used to perform power management operations on the bare metal instance; The IOemu is used to perform at least one of the following operations on the bare metal instance: mounting a device, unmounting a device, and expanding disk capacity.
17. The device according to claim 16, wherein: The execution module includes a creation unit, which is used to: In the case where the operation request includes creating an instance, calling the instance form definition interface in the virtualization library through Nova to send an instance creation instruction to the virtual machine management program; The bare metal instance is created by the virtual machine hypervisor in response to the instance creation instruction.
18. The device according to claim 16 or 17, wherein: The execution module includes a starting unit, which is used to: In a case where the operation request includes starting an instance, sending an instance start instruction to the virtual machine hypervisor based on a start instance interface in the virtualization library by Nova; Sending a startup instruction to the IOemu through the virtual machine management program; Initialize the system disk and network card of the bare metal instance based on the startup instruction by using the IOemu; When the IOemu is successfully started, a power-on instruction is sent to the IPMITool through the virtual machine management program; The IPMITool instructs the physical machine corresponding to the bare metal instance to perform a power-on operation based on the power-on instruction.
19. The apparatus according to claim 18, further comprising a synchronization unit, configured to: Check the power status of the physical machine through the IPMITool; When it is determined that the physical machine is successfully powered on, sending the power status to the virtual machine hypervisor through the IPMITool; The power state of the bare metal instance is updated to a powered-on state through the virtual machine hypervisor to synchronize the power state to the Nova.
20. The device according to claim 16, wherein: The execution module includes a first closing unit, which is used to: In a case where the operation request includes shutting down the bare metal instance, calling a soft shutdown interface in the virtualization library through Nova to send a soft shutdown instruction to the virtual machine hypervisor; In response to the soft shutdown instruction, the virtual machine management program sends a shutdown instruction to IPMITool; Requesting the physical machine of the bare metal instance to perform a shutdown operation based on the shutdown instruction through the IPMITool; Polling the power state of the physical machine through the IPMITool, and when determining that the power state of the physical machine is in the shutdown state, updating the power state of the bare metal instance to the shutdown state by notifying the virtual machine hypervisor; The IOemu is shut down based on the shutdown state by the virtual machine hypervisor.
21. The device according to claim 16 or 20, wherein: The execution module includes a second closing unit, which is used to: In the case of a soft shutdown failure, calling a hard shutdown interface in the virtualization library through the Nova to send a hard shutdown instruction to the virtual machine management program; In response to the hard shutdown instruction, the virtual machine hypervisor sends a shutdown instruction to the IPMITool; Requesting the physical machine of the bare metal instance to perform a shutdown operation based on the shutdown instruction through the IPMITool; Polling the power status of the physical machine through the IPMITool; When the power state of the physical machine is found to remain powered on within a preset time period, the IOemu is shut down through the virtual machine management program.
22. The device according to claim 16, wherein: The execution module includes a release unit, which is used to: In a case where the operation request includes releasing the bare metal instance, when Nova determines to shut down the bare metal instance, calling a release instance interface in the virtualization library to send a release instruction to the virtual machine hypervisor; Responding to the release instruction through the virtual machine hypervisor, creating a write-zero operating system based on the image file to the physical machine corresponding to the bare metal instance; The target data on the physical machine is erased based on the write-zero operating system through the virtual machine hypervisor.
23. The apparatus according to claim 22, further comprising a clearing module, configured to: Calling the image system shutdown interface in the virtualization library through Nova to send the image system shutdown instruction to the virtual machine management program; In response to the mirror system shutdown instruction, the virtual machine management program sends the shutdown instruction to IPMITool; The IPMITool requests the physical machine of the bare metal instance to perform a shutdown operation based on the shutdown instruction.
24. The device according to claim 16, wherein: The execution module includes a mounting unit, which is used to: In the case where the operation request includes mounting a device, calling a mount interface in the virtualization library through Nova to send a first mount instruction to the virtual machine management program; the first mount instruction includes a first device type and a mount mode; Modifying, by the virtual machine hypervisor, metadata corresponding to the first device type in the bare metal instance based on the first mount instruction; When the mounting mode is hot-plug, sending a second mounting instruction to the IOemu through the virtual machine management program; Based on the second mount instruction, the IOemu requests, through a serial bus interface, to simulate a device of the first device type in the bare metal instance.
25. The device according to claim 16, wherein: The execution module includes an unloading unit, which is used to: In the case where the operation request includes uninstalling a device, calling an uninstall interface in the virtualization library through Nova to send a first uninstall instruction to the virtual machine management program; the first uninstall instruction includes a second device type and an uninstall mode; Modifying, by the virtual machine hypervisor, metadata corresponding to the second device type in the bare metal instance based on the first uninstall instruction; When the uninstallation mode is hot-plugging, sending a second uninstallation instruction to the IOemu through the virtual machine management program; Based on the second uninstall instruction, the IOemu requests to uninstall the device of the second device type in the bare metal instance through a serial bus interface.
26. The device according to claim 16, wherein: The execution module includes a capacity expansion unit, which is used to: In the case where the operation request includes disk expansion, the expansion interface in the virtualization library is called by the Nova to send a first expansion instruction to the virtual machine management program; the first expansion instruction includes the expansion capacity and the expansion method; Modifying, by the virtual machine hypervisor, metadata corresponding to the disk in the bare metal instance based on the first capacity expansion instruction; When the capacity expansion mode is hot plugging, sending a second capacity expansion instruction to the IOemu through the virtual machine management program; Based on the second expansion instruction, the IOemu requests, through a serial bus interface, to expand the disk of the expanded capacity in the bare metal instance.
27. The device according to any one of claims 16 to 26, wherein: The virtual machine management program and the IOemu communicate with each other using the Quick Simulator Monitoring Protocol (QMP) message.
28. The device according to any one of claims 16 to 27, wherein: The virtual machine management program includes: An application program interface, used to receive target instructions sent by the Nova; A domain connection management object, for invoking a client driver to send an execution instruction to a fast simulator driver based on the target instruction; The fast simulator driver is used to communicate with the IOemu and / or IPMITool.
29. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 14.
30. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-14.
31. A computer program product comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 14.
Citation Information
Patent Citations
Method and system for mounting cinder volume on pod based on cloud physical machine
CN113485786A
Bare metal server control method and device, and medium
CN114995954A
Method, system and equipment for unified management of virtual machine and container and medium
CN115033348A
Interaction method, computer equipment and computer storage medium
CN116010017A
Virtual machine creation method, apparatus and device, and computer storage medium
CN116521320A
Cited By
Bare metal instance management and control method and apparatus, device, and storage medium
WO2026130114A1