Method and device for creating virtual machine of embedded real-time operating system on cloud platform
By uploading the mirror of the embedded real-time operating system on the OpenStack platform and configuring metadata to generate virtual machine configuration files, the problem that the OpenStack platform does not support the creation of embedded real-time operating system virtual machines is solved, and efficient deployment and operation is achieved, meeting the needs of the defense and industrial fields.
Patent Information
- Application Number
- CN202411663258.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-20
- Publication Date
- 2025-04-04
AI Technical Summary
The OpenStack platform does not support the creation of embedded real-time operating system (Delta OS) virtual machines and cannot meet the needs of real-time operating systems in defense equipment and industrial fields.
By uploading the kernel and disk images of the embedded real-time operating system in the cloud platform's mirroring service, and configuring relevant metadata, generating configuration files for the virtual machine, realizing the creation and operation of the embedded real-time operating system virtual machine.
It simplifies the resource configuration steps in the virtual machine creation process, significantly improves deployment efficiency, and meets the needs of real-time operating systems in defense equipment and industrial fields.
Smart Images

Figure CN119759485A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of cloud computing technology, and in particular to a method and device for creating an embedded real-time operating system virtual machine on a cloud platform. Background Art
[0002] With the popularization of cloud computing technology, enterprises and users have an increasing demand for running specific operating systems, especially real-time operating systems, on cloud platforms. As a high-performance real-time operating system, the embedded real-time operating system (Delta OS) has a microsecond response time and a real-time task scheduling strategy based on priority preemption. It is widely used in defense equipment and industrial fields. This operating system is an important part of the science and technology defense business and can meet the strict requirements of the defense field for high reliability and real-time performance.
[0003] As a mainstream cloud computing management platform in the market, OpenStack has a huge community support and a rich ecosystem. However, the current OpenStack platform does not directly support the creation of Delta OS virtual machines and cannot meet the needs of defense equipment and industrial fields for real-time operating systems. Summary of the invention
[0004] In view of this, the present application proposes a method and apparatus, equipment, and storage medium for creating an embedded real-time operating system virtual machine on a cloud platform, so as to realize the creation and operation of an embedded real-time operating system virtual machine on a cloud platform, improve deployment efficiency, and meet the needs of defense equipment and industrial fields for real-time operating systems.
[0005] In a first aspect, the present application provides a method for creating an embedded real-time operating system virtual machine on a cloud platform, comprising:
[0006] Upload the kernel image and disk image of the embedded real-time operating system to the image service of the cloud platform;
[0007] Configuring metadata for the disk image, the metadata including the boot mode of the disk image, the associated kernel ID and the name of the operating system; the kernel ID is an ID assigned by the cloud platform to the kernel image;
[0008] A configuration file of an embedded real-time operating system virtual machine is created according to the metadata of the disk image, and the embedded real-time operating system virtual machine is started according to the configuration file.
[0009] From the above, this application simplifies the resource configuration steps in the virtual machine creation process by uploading the kernel image and disk image of the embedded real-time operating system to the image service of the cloud platform in advance, and configuring detailed metadata in the disk image, such as the boot mode, the associated kernel ID and the operating system name, etc. When the user issues a virtual machine creation request, the configuration file of the virtual machine can be generated according to the metadata of the disk image configuration, and the corresponding resources can be called in sequence according to the configuration file to start and run the embedded real-time operating system virtual machine, without having to repeat the cumbersome operating system installation and configuration process every time deployment, thereby significantly improving deployment efficiency.
[0010] Optionally, after uploading the kernel image and disk image of the embedded real-time operating system to the image service of the cloud platform, it also includes:
[0011] The image format of the kernel image is set to aki, and the image format of the disk image is set to qcow2.
[0012] As mentioned above, after uploading the kernel image and disk image of the embedded real-time operating system to the image service of the cloud platform, it is also necessary to set the image format to ensure that the image file can be correctly identified and called by the cloud platform. For example, the image format of the kernel image can be set to aki (Amazon Kernel Image) and the image format of the disk image can be set to qcow2 (QEMUCopy On Write version 2) according to the format compatible with the cloud platform.
[0013] Optionally, before creating a configuration file of the embedded real-time operating system virtual machine according to the metadata of the disk image, the method further includes:
[0014] Receiving a virtual machine creation request through a virtual machine management interface of a cloud platform, wherein the virtual machine creation request includes metadata of the disk image;
[0015] The virtual machine management interface requests the scheduler of the cloud platform to call the corresponding computing node through the RPC mechanism, so as to deploy the embedded real-time operating system virtual machine in the computing node.
[0016] From the above, when a virtual machine needs to be created, the user or automated tool submits a virtual machine creation request through the virtual machine management interface of the cloud platform (such as API, Web interface, etc.). The request contains key information required for the configuration of the virtual machine, especially the metadata of the disk image. After receiving the creation request, the virtual machine management interface will use the RPC (Remote Procedure Call) mechanism to communicate with the scheduler of the cloud platform. The scheduler will select a suitable computing node to deploy the embedded real-time operating system virtual machine according to the resource situation and scheduling strategy of the cloud platform. By receiving the virtual machine creation request through the virtual machine management interface of the cloud platform and interacting with the scheduler using the RPC mechanism, the deployment and management of the embedded real-time operating system virtual machine on the cloud platform can be efficiently realized.
[0017] Optionally, after starting the embedded real-time operating system virtual machine according to the configuration file, the method further includes:
[0018] The computing node returns the creation result of the embedded real-time operating system virtual machine through the RPC mechanism, and updates the state of the embedded real-time operating system virtual machine to the database.
[0019] As mentioned above, after the computing node completes the startup of the embedded real-time operating system virtual machine, it will communicate with the cloud platform through the RPC mechanism to return the creation result of the embedded real-time operating system virtual machine. The cloud platform can update the latest status information of the embedded real-time operating system virtual machine to the cloud platform database, so that users and administrators can view the current status and performance of the embedded real-time operating system virtual machine through the database.
[0020] Optionally, the step of creating a configuration file of an embedded real-time operating system virtual machine according to the metadata of the disk image includes:
[0021] According to the boot mode in the metadata, setting the startup mode of the embedded real-time operating system virtual machine to BIOS mode in the configuration file;
[0022] According to the kernel ID in the metadata, setting the kernel image called when the embedded real-time operating system virtual machine is started in the configuration file;
[0023] According to the operating system name of the disk image, the recognition logic for the operating system name is set in the configuration file to identify the name of the embedded real-time operating system, and the virtual environment optimization of the embedded real-time operating system virtual machine is performed according to the recognition result.
[0024] From the above, according to the metadata configured in the disk image, a configuration file for the embedded real-time operating system virtual machine can be created, and the startup mode of the virtual machine is set to BIOS mode in the configuration file, the kernel image called at startup is set, and the recognition logic of the operating system name is set, so as to optimize the virtual environment of the virtual machine according to the recognition result, thereby ensuring that the embedded real-time operating system virtual machine is stably and efficiently started and run on the cloud platform.
[0025] Optionally, starting the embedded real-time operating system virtual machine according to the configuration file includes:
[0026] According to the BIOS mode in the configuration file, start the embedded real-time operating system virtual machine;
[0027] According to the kernel ID, calling a corresponding kernel image for the embedded real-time operating system virtual machine;
[0028] The name of the embedded real-time operating system is identified according to the identification logic in the configuration file, and the virtual environment optimization of the embedded real-time operating system virtual machine is performed according to the identification result.
[0029] From the above, according to the generated configuration file, the cloud platform can start the embedded real-time operating system virtual machine according to the parameters and logic set in the configuration file, and call the corresponding kernel image after startup, and after identifying the name of the embedded real-time operating system, perform the corresponding virtual environment optimization, thereby ensuring that the embedded real-time operating system virtual machine is stably and efficiently started and run on the cloud platform.
[0030] Optionally, the virtual environment optimization includes:
[0031] According to the identification result of the identification logic, the ACPI module of the embedded real-time operating system virtual machine is disabled or removed, and the network card type and disk type of the embedded real-time operating system virtual machine are set to virtio-mmio.
[0032] From the above, by disabling or removing the ACPI (Advanced Configuration and Power Interface) module of the embedded real-time operating system virtual machine, it is ensured that the embedded real-time operating system virtual machine can be started according to the set BIOS mode and no longer relies on the ACPI module for power management and configuration, thereby reducing unnecessary system overhead. In addition, by setting the network card type and disk type to virtio-mmio, virtio-mmio is a lightweight virtual bus mechanism with lower latency and higher performance, thereby significantly improving network performance and disk I / O performance.
[0033] In a second aspect, the present application provides an embedded real-time operating system virtual machine creation device on a cloud platform, comprising:
[0034] The upload module is used to upload the kernel image and disk image of the embedded real-time operating system to the image service of the cloud platform;
[0035] A configuration module, configured to configure metadata for the disk image, the metadata including a boot mode of the disk image, an associated kernel ID, and an operating system name; the kernel ID is an ID assigned by the cloud platform to the kernel image;
[0036] The creation module is used to create a configuration file of an embedded real-time operating system virtual machine according to the metadata of the disk image, and start the embedded real-time operating system virtual machine according to the configuration file.
[0037] In a third aspect, the present application provides a computing device, the computing device comprising:
[0038] processor;
[0039] A memory for storing one or more programs;
[0040] When the one or more programs are executed by the processor, the processor implements the above-mentioned method for creating an embedded real-time operating system virtual machine on a cloud platform.
[0041] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a computer, implements the above-mentioned method for creating an embedded real-time operating system virtual machine on a cloud platform.
[0042] These and other aspects of the present application will become more apparent from the following description of the embodiment(s). BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 A flowchart of a method for creating an embedded real-time operating system virtual machine on a cloud platform provided in an embodiment of the present application;
[0044] Figure 2 A signaling interaction diagram of an embedded real-time operating system virtual machine creation process provided in an embodiment of the present application;
[0045] Figure 3 A structural diagram of an embedded real-time operating system virtual machine creation device on a cloud platform provided in an embodiment of the present application;
[0046] Figure 4 A structural diagram of a computing device provided in an embodiment of the present application.
[0047] It should be understood that the size and shape of each block diagram in the above structural diagram are for reference only and should not constitute an exclusive interpretation of the embodiments of the present application. The relative positions and inclusion relationships between the blocks presented in the structural diagram are only schematic representations of the structural associations between the blocks, and do not limit the physical connection methods of the embodiments of the present application. DETAILED DESCRIPTION
[0048] The technical solution provided by the present application is further described below with reference to the accompanying drawings and examples. It should be understood that the system structure and business scenarios provided in the examples of the present application are mainly to illustrate the possible implementation methods of the technical solution of the present application and should not be interpreted as the only limitation on the technical solution of the present application. It is known to those of ordinary skill in the art that with the evolution of the system structure and the emergence of new business scenarios, the technical solution provided by the present application is also applicable to similar technical problems.
[0049] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present application. In case of any inconsistency, the meaning described in this specification or the meaning derived from the contents recorded in this specification shall prevail. In addition, the terms used herein are only for the purpose of describing the embodiments of the present application and are not intended to limit the present application.
[0050] The embodiment of the present application proposes a method and device for creating an embedded real-time operating system virtual machine on a cloud platform, which can solve the problem that the cloud platform (such as the OpenStack platform) does not support the embedded real-time operating system virtual machine. By uploading the kernel image and disk image of the embedded real-time operating system (Delta OS) in the image service of the cloud platform and configuring the relevant metadata, it is convenient to create a configuration file of the embedded real-time operating system virtual machine according to the metadata, so as to create and run the embedded real-time operating system virtual machine on the OpenStack platform according to the configuration file. The embodiment of the present application improves the deployment efficiency and meets the demand for real-time operating systems in defense equipment and industrial fields.
[0051] like Figure 1 As shown, the embodiment of the present application provides a method for creating an embedded real-time operating system virtual machine on a cloud platform, including:
[0052] S110: Upload the kernel image and disk image of the embedded real-time operating system to the image service of the cloud platform.
[0053] In this step, the kernel image and disk image of the embedded real-time operating system (Delta OS) are pre-uploaded to the image service of the cloud platform, and the image format of the kernel image is set to aki (Amazon Kernel Image) and the image format of the disk image is set to qcow2 (QEMUCopy On Writeversion 2) according to the format compatible with the cloud platform to ensure that the image file can be correctly identified and called by the cloud platform. After receiving and identifying the kernel image, the cloud platform will assign a unique kernel ID (kernel_id) to the kernel image so that the kernel image can be called according to the kernel ID in subsequent steps.
[0054] S120: configuring metadata for the disk image, where the metadata includes a boot mode of the disk image, an associated kernel ID, and an operating system name.
[0055] The disk image contains all the data and file system structure of the embedded real-time operating system. The virtual machine can be successfully started according to the disk image and perform subsequent configuration. Therefore, this step also requires the configuration of the metadata of the disk image, which includes the boot mode of the disk image, the associated kernel ID and the name of the operating system. Since the embedded real-time operating system does not currently support UEFI mode, it is necessary to set the boot mode of the disk image to BIOS mode in the metadata to ensure that the embedded real-time operating system virtual machine can be started in BIOS mode. It is also necessary to set the kernel ID associated with the disk image in the metadata to ensure that the embedded real-time operating system virtual machine can call the correct kernel image according to the kernel ID after starting. In addition, the cloud platform also sets the recognition logic for the operating system name. Therefore, the operating system name can be set in the metadata so that the cloud platform can recognize the name of the embedded real-time operating system according to its recognition logic, and then perform corresponding virtual environment optimization and other operations according to the recognition result.
[0056] S130: Creating a configuration file of an embedded real-time operating system virtual machine according to the metadata of the disk image, and starting the embedded real-time operating system virtual machine according to the configuration file.
[0057] In this step, when a virtual machine needs to be created, the user or automated tool submits a virtual machine creation request through the cloud platform's virtual machine management interface (such as API, Web interface, etc.). The request contains key information required for the virtual machine configuration, especially the metadata of the disk image. After receiving the creation request, the virtual machine management interface will use the RPC (Remote Procedure Call) mechanism to communicate with the cloud platform's scheduler. The scheduler will select the appropriate computing node to deploy the embedded real-time operating system virtual machine based on the cloud platform's resource conditions and scheduling strategy.
[0058] Through the selected computing node, a configuration file of an embedded real-time operating system virtual machine can be created according to the metadata of the disk image. Specifically, according to the boot method in the metadata, the startup mode of the embedded real-time operating system virtual machine can be set to BIOS mode in the configuration file, and according to the kernel ID in the metadata, the kernel image called when the embedded real-time operating system virtual machine is started can be set in the configuration file. According to the operating system name of the disk image, the identification logic for the operating system name can be set in the configuration file to identify the name of the embedded real-time operating system, and the virtual environment optimization of the embedded real-time operating system virtual machine can be performed according to the identification result.
[0059] After completing the creation of the configuration file, you can start and run the embedded real-time operating system virtual machine in the computing node according to the parameters and logic set in the configuration file. First, start the embedded real-time operating system virtual machine in BIOS mode. When the embedded real-time operating system virtual machine starts, it calls the corresponding kernel image according to the kernel ID and starts running. The computing node can also identify the name of the embedded real-time operating system according to the set identification logic, and perform virtual environment optimization of the embedded real-time operating system virtual machine according to the identification result, thereby ensuring that the embedded real-time operating system virtual machine starts and runs stably and efficiently on the cloud platform.
[0060] In some embodiments, the virtual environment optimization may include adjusting CPU and memory allocation strategies, optimizing storage and network performance, configuring specific hardware acceleration functions, etc. Among them, the hardware acceleration function can be implemented by disabling or removing the ACPI (Advanced Configuration and Power Interface) module of the embedded real-time operating system virtual machine to ensure that the embedded real-time operating system virtual machine can be started according to the set BIOS mode and no longer rely on the ACPI module for power management and configuration, reducing unnecessary system overhead, and optimizing storage and network performance can be implemented by setting the network card type and disk type to virtio-mmio, which is a lightweight virtual bus mechanism with lower latency and higher performance, thereby significantly improving network performance and disk I / O performance.
[0061] In some embodiments, after completing the startup of the embedded real-time operating system virtual machine, the computing node will communicate with the scheduler of the cloud platform through the RPC mechanism to return the creation result of the embedded real-time operating system virtual machine. The scheduler can update the latest status information of the embedded real-time operating system virtual machine to the database of the cloud platform, so that users and administrators can view the current status and performance of the embedded real-time operating system virtual machine through the database.
[0062] based on Figure 1 As shown, the embodiment of the present application simplifies the resource configuration steps in the virtual machine creation process by uploading the kernel image and disk image of the embedded real-time operating system to the image service of the cloud platform in advance, and configuring detailed metadata in the disk image, such as the boot mode, kernel ID, and operating system name, etc. When the user issues a virtual machine creation request, the configuration file of the virtual machine can be generated according to the metadata configured in the disk image, and the corresponding resources can be called in sequence according to the configuration file to start and run the embedded real-time operating system virtual machine, without having to repeat the cumbersome operating system installation and configuration process every time deployment, thereby significantly improving the deployment efficiency.
[0063] Refer to the following Figure 2 The signaling interaction diagram of the embedded real-time operating system virtual machine creation process shown in the figure describes in detail the embedded real-time operating system virtual machine creation process of the embodiment of the present application.
[0064] like Figure 2 As shown, the signaling interaction parties in the process of creating a virtual machine of the embedded real-time operating system include Client (client), Nova-API (virtual machine management interface of the OpenStack platform), Nova-scheduler (scheduler of the OpenStack platform), Nova-compute (computing node of the OpenStack platform), and Nova-conductor (database management interface of the OpenStack platform). Figure 2 As shown, the embedded real-time operating system virtual machine creation process includes:
[0065] S210: A user or an automated tool sends a virtual machine creation request to Nova-API through the Client.
[0066] In this step, when a virtual machine needs to be created, the user or automated tool sends a virtual machine creation request to Nova-API through the Client. The virtual machine creation request may include key configuration information required to create the virtual machine, such as virtual machine specifications, disk image metadata, network configuration, and other information.
[0067] It should be noted that before sending a request to create a virtual machine, you can upload the kernel image and disk image of the embedded real-time operating system (Delta OS) to the image service of the OpenStack platform in advance, and set the image format of the kernel image to aki (Amazon Kernel Image) and the image format of the disk image to qcow2 (QEMUCopy On Write version 2) according to the format compatible with the OpenStack platform to ensure that the image file can be correctly recognized and called by the OpenStack platform. After uploading, the metadata of the disk image also needs to be configured. The metadata includes the boot mode of the disk image, the associated kernel ID and the operating system name, etc. Since the embedded real-time operating system currently does not support UEFI mode, it is necessary to set the boot mode of the disk image to BIOS mode in the metadata to ensure that the embedded real-time operating system virtual machine can be started in BIOS mode. It is also necessary to set the kernel ID associated with the disk image in the metadata to ensure that the correct kernel image can be called according to the kernel ID after the embedded real-time operating system virtual machine is started. Therefore, after the user issues a virtual machine creation request, the configuration file of the virtual machine can be generated according to the metadata of the disk image configuration, and the corresponding resources can be called in sequence according to the configuration file to start and run the embedded real-time operating system virtual machine. There is no need to repeat the tedious operating system installation and configuration process every time deployment, thereby significantly improving deployment efficiency.
[0068] S220: Nova-API sends a computing node scheduling request to Nova-conductor.
[0069] After Nova-API receives the request to create a virtual machine, it communicates with Nova-conductor through the RPC mechanism, which is a protocol that allows a program to call a process in another address space. Nova-API can request Nova-conductor to select a suitable computing node to deploy the virtual machine through the RPC mechanism. The Nova-conductor will select a suitable computing node to deploy the embedded real-time operating system virtual machine based on the resources and scheduling strategy of the OpenStack platform. For example, the scheduling strategy may include factors such as load balancing, resource utilization optimization, and cost-effectiveness.
[0070] S230: Nova-conductor returns the scheduled computing node to Nova-API.
[0071] After Nova-conductor selects a suitable computing node, it returns the scheduled computing node to Nova-API.
[0072] S240: Nova-API sends a virtual machine creation request to Nova-compute.
[0073] Nova-API can send the virtual machine creation request to the scheduled computing node Nova-compute, so that Nova-compute executes the deployment process of the embedded real-time operating system virtual machine according to the virtual machine creation request.
[0074] S250: Nova-compute obtains and verifies the metadata, and generates a configuration file of the embedded real-time operating system virtual machine.
[0075] After Nova-compute receives the virtual machine creation request, it can parse and verify the metadata in the virtual machine creation request, and generate the configuration file of the embedded real-time operating system virtual machine according to the verification structure. Specifically, the generation process of the configuration file includes:
[0076] Set the boot mode to BIOS mode: Since the embedded real-time operating system currently does not support UEFI mode, you need to set the boot mode (hw_firmware_type) of the disk image to BIOS mode in the metadata to ensure that the embedded real-time operating system virtual machine can be started in BIOS mode;
[0077] Set the kernel ID: The kernel ID (kernel_id) in the metadata is a unique identifier assigned by the OpenStack platform to the kernel image. By setting the kernel ID in the configuration file as the path of the kernel image called when the virtual machine is started, when the embedded real-time operating system virtual machine is started, Nova-compute can find and load the correct kernel image according to the kernel ID in the configuration file, thereby starting and running the embedded real-time operating system virtual machine;
[0078] Set the operating system name identification logic: The operating system name contained in the metadata of the disk image is the key information for identifying the embedded real-time operating system (Delta OS). The operating system name enables Nova-compute to distinguish different types of operating systems and apply corresponding optimization measures. Once the embedded real-time operating system is successfully identified, Nova-compute can optimize the virtual environment according to the characteristics of the embedded real-time operating system, such as adjusting the CPU and memory allocation strategy, optimizing storage and network performance, and configuring specific hardware acceleration functions. Among them, the hardware acceleration function can be implemented by disabling or removing the ACPI module of the embedded real-time operating system virtual machine to ensure that the embedded real-time operating system virtual machine can be started according to the set BIOS mode and no longer rely on the ACPI module for power management and configuration, reducing unnecessary system overhead. Optimizing storage and network performance can be achieved by setting the network card type and disk type to virtio-mmio. The virtio-mmio is a lightweight virtual bus mechanism with lower latency and higher performance, thereby significantly improving network performance and disk I / O performance.
[0079] In some embodiments, when Nova-compute uses libvirt as the virtualization technology, Nova-compute generates an XML-formatted configuration file to describe various aspects of the virtual machine, such as CPU, memory, disk, and network settings, so as to facilitate the creation and startup of the virtual machine according to the XML-formatted configuration file.
[0080] S260: Nova-compute creates and runs an embedded real-time operating system virtual machine based on the configuration file.
[0081] After completing the creation of the configuration file, Nova-compute can start and run the embedded real-time operating system virtual machine in the computing node according to the parameters and logic set in the configuration file. First, the embedded real-time operating system virtual machine is started in BIOS mode. When the embedded real-time operating system virtual machine is started, the corresponding kernel image is called according to the kernel ID and starts running. The computing node can also identify the name of the embedded real-time operating system according to the set identification logic, and perform virtual environment optimization of the embedded real-time operating system virtual machine according to the identification result, thereby ensuring that the embedded real-time operating system virtual machine is stably and efficiently started and run on the OpenStack platform.
[0082] S270: Nova-compute returns the virtual machine creation result to Nova-conductor.
[0083] After completing the creation of the embedded real-time operating system virtual machine, Nova-compute can report the virtual machine creation results to Nova-conductor through the RPC mechanism, and update the status information of the embedded real-time operating system virtual machine to the database of the OpenStack platform through Nova-conductor, so that users and administrators can view the current status and performance of the embedded real-time operating system virtual machine through the database.
[0084] In summary, the embodiment of the present application provides a method for creating and running an embedded real-time operating system virtual machine on an OpenStack platform. By pre-uploading a kernel image and a disk image and setting specific image metadata, automatic identification and configuration of the embedded real-time operating system virtual machine are achieved, the creation process of the embedded real-time operating system virtual machine is simplified, the deployment efficiency is improved, and the demand for real-time operating systems in defense equipment and industrial fields is met.
[0085] like Figure 3 As shown, the embodiment of the present application provides an embedded real-time operating system virtual machine creation device on a cloud platform, which can be used to implement the above Figure 1-Figure 2 Any step of a method for creating an embedded real-time operating system virtual machine on a cloud platform and its optional embodiments are shown. Figure 3 As shown, the device includes an upload module 310, a configuration module 320 and a creation module 330;
[0086] Among them, the upload module 310 is used to upload the kernel image and disk image of the embedded real-time operating system to the image service of the cloud platform; the configuration module 320 is used to configure metadata for the disk image, and the metadata includes the boot mode, kernel ID and operating system name of the disk image; the kernel ID is the ID assigned by the cloud platform to the kernel image; the creation module 330 is used to create a configuration file of the embedded real-time operating system virtual machine according to the metadata of the disk image, and start the embedded real-time operating system virtual machine according to the configuration file.
[0087] In some embodiments, the upload module 310 may be Figure 2 The client shown in FIG. 1 may be configured as a configuration module 320. Figure 2 As shown in Nova-API (cloud platform virtual machine management interface), the creation module 330 can be Figure 2 Nova-compute (the computing node of the cloud platform) is shown.
[0088] It should be understood that the device or module in the embodiment of the present application can be implemented by software, for example, it can be implemented by a computer program or instruction having the above functions, and the corresponding computer program or instruction can be stored in a memory inside the terminal, and the processor reads the corresponding computer program or instruction inside the memory to implement the above functions. Alternatively, the device or module in the embodiment of the present application can also be implemented by hardware. Alternatively, the device or module in the embodiment of the present application can also be implemented by a combination of a processor and a software module.
[0089] It should be understood that the processing details of the device or module in the embodiment of the present application can refer to Figure 1-Figure 2 The related descriptions of the illustrated embodiment and related extended embodiments will not be repeated in the embodiments of the present application.
[0090] Figure 4 5 is a structural diagram of a computing device 500 provided in an embodiment of the present application. The computing device 500 includes: a processor 510 , a memory 520 , a communication interface 530 , and a bus 540 .
[0091] It should be understood that Figure 4 The communication interface 530 in the computing device 500 shown may be used to communicate with other devices.
[0092] The processor 510 may be connected to a memory 520. The memory 520 may be used to store the program code and data. Therefore, the memory 520 may be a storage unit inside the processor 510, or an external storage unit independent of the processor 510, or a component including a storage unit inside the processor 510 and an external storage unit independent of the processor 510.
[0093] Optionally, the computing device 500 may further include a bus 540. The memory 520 and the communication interface 530 may be connected to the processor 510 via the bus 540. The bus 540 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus 540 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 The fact that only one line is used in the diagram does not mean that there is only one bus or only one type of bus.
[0094] It should be understood that in the embodiment of the present application, the processor 510 may adopt a central processing unit (CPU). The processor may also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. Alternatively, the processor 510 may adopt one or more integrated circuits to execute relevant programs to implement the technical solutions provided in the embodiment of the present application.
[0095] The memory 520 may include a read-only memory and a random access memory, and provides instructions and data to the processor 510. A portion of the processor 510 may also include a nonvolatile random access memory. For example, the processor 510 may also store information on the device type.
[0096] When the computing device 500 is running, the processor 510 executes the computer-executable instructions in the memory 520 to perform the operating steps of the above method.
[0097] It should be understood that the computing device 500 according to the embodiment of the present application can correspond to the corresponding subjects in the methods according to the embodiments of the present application, and the above-mentioned other operations and / or functions of each module in the computing device 500 are respectively for realizing the corresponding processes of each method of the present embodiment. For the sake of brevity, they will not be repeated here.
[0098] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0099] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0100] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0101] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0102] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0103] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0104] An embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, it is used to execute the above method, which includes at least one of the solutions described in the above embodiments.
[0105] The computer storage medium of the embodiment of the present application can adopt any combination of one or more computer-readable media. Computer-readable media can be computer-readable signal media or computer-readable storage media. Computer-readable storage media can be, for example, but not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or devices, or any combination of the above. More specific examples (non-exhaustive lists) of computer-readable storage media include: electrical connections with one or more wires, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the above. In this document, computer-readable storage media can be any tangible medium containing or storing programs, which can be used by instruction execution systems, devices or devices or used in combination with them.
[0106] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0107] The program code embodied on the computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0108] Computer program code for performing the operation of the present application can be written in one or more programming languages or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., using an Internet service provider to connect through the Internet).
[0109] It should be noted that the embodiments described in the present application are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application usually described and shown in the drawings can be arranged and designed in various different configurations. Therefore, the above detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0110] The words "first, second, third, etc." or module A, module B, module C and other similar terms in the specification and claims are only used to distinguish similar objects and do not represent a specific ordering of the objects. It is understandable that the specific order or sequence can be interchanged where permitted so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.
[0111] In the above description, the numbers representing the steps involved do not necessarily mean that the steps will be executed. Intermediate steps may be included or replaced by other steps. The order of the previous and next steps may be interchanged or executed simultaneously if permitted.
[0112] The term "comprising" as used in the description and claims should not be interpreted as being limited to what is listed thereafter; it does not exclude other elements or steps. Therefore, it should be interpreted as specifying the presence of the features, integers, steps or components mentioned, but does not exclude the presence or addition of one or more other features, integers, steps or components and groups thereof. Therefore, the expression "a device comprising means A and B" should not be limited to a device consisting of components A and B only.
[0113] The "one embodiment" or "embodiment" mentioned in this specification means that the specific features, structures or characteristics described in conjunction with the embodiment are included in at least one embodiment of the present application. Therefore, the terms "in one embodiment" or "in an embodiment" appearing in various places in this specification do not necessarily refer to the same embodiment, but may refer to the same embodiment. In addition, in the various embodiments of the present application, if there is no special explanation and logical conflict, the terms and / or descriptions between different embodiments are consistent and can be referenced to each other, and the technical features in different embodiments can be combined to form a new embodiment according to their inherent logical relationship.
[0114] Note that the above are only preferred embodiments of the present application and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present application is described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may also include more other equivalent embodiments without departing from the concept of the present invention, all of which belong to the protection scope of the present invention.
Claims
1. A method for creating an embedded real-time operating system virtual machine on a cloud platform, characterized in that: include: Upload the kernel image and disk image of the embedded real-time operating system to the image service of the cloud platform; Configuring metadata for the disk image, the metadata including the boot mode of the disk image, the associated kernel ID and the name of the operating system; the kernel ID is an ID assigned by the cloud platform to the kernel image; A configuration file of an embedded real-time operating system virtual machine is created according to the metadata of the disk image, and the embedded real-time operating system virtual machine is started according to the configuration file.
2. The method according to claim 1, characterized in that After uploading the kernel image and disk image of the embedded real-time operating system to the image service of the cloud platform, it also includes: The image format of the kernel image is set to aki, and the image format of the disk image is set to qcow2.
3. The method according to claim 1, characterized in that: Before creating a configuration file of an embedded real-time operating system virtual machine according to the metadata of the disk image, the method further includes: Receiving a virtual machine creation request through a virtual machine management interface of a cloud platform, wherein the virtual machine creation request includes metadata of the disk image; The virtual machine management interface requests the scheduler of the cloud platform to call the corresponding computing node through the RPC mechanism, so as to deploy the embedded real-time operating system virtual machine in the computing node.
4. The method according to claim 3, characterized in that: After starting the embedded real-time operating system virtual machine according to the configuration file, the method further includes: The computing node returns the creation result of the embedded real-time operating system virtual machine through the RPC mechanism, and updates the state of the embedded real-time operating system virtual machine to the database.
5. The method according to claim 1, characterized in that The step of creating a configuration file for an embedded real-time operating system virtual machine according to the metadata of the disk image comprises: According to the boot mode in the metadata, setting the startup mode of the embedded real-time operating system virtual machine to BIOS mode in the configuration file; According to the kernel ID in the metadata, setting the kernel image called when the embedded real-time operating system virtual machine is started in the configuration file; According to the operating system name of the disk image, the recognition logic for the operating system name is set in the configuration file to identify the name of the embedded real-time operating system, and the virtual environment optimization of the embedded real-time operating system virtual machine is performed according to the recognition result.
6. The method according to claim 5, characterized in that Starting the embedded real-time operating system virtual machine according to the configuration file includes: According to the BIOS mode in the configuration file, start the embedded real-time operating system virtual machine; According to the kernel ID, calling a corresponding kernel image for the embedded real-time operating system virtual machine; The name of the embedded real-time operating system is identified according to the identification logic in the configuration file, and the virtual environment optimization of the embedded real-time operating system virtual machine is performed according to the identification result.
7. The method according to claim 5 or 6, characterized in that: The virtual environment optimization includes: According to the identification result of the identification logic, the ACPI module of the embedded real-time operating system virtual machine is disabled or removed, and the network card type and disk type of the embedded real-time operating system virtual machine are set to virtio-mmio.
8. An embedded real-time operating system virtual machine creation device on a cloud platform, characterized in that: include: The upload module is used to upload the kernel image and disk image of the embedded real-time operating system to the image service of the cloud platform; A configuration module, configured to configure metadata for the disk image, the metadata including a boot mode of the disk image, an associated kernel ID, and an operating system name; the kernel ID is an ID assigned by the cloud platform to the kernel image; The creation module is used to create a configuration file of an embedded real-time operating system virtual machine according to the metadata of the disk image, and start the embedded real-time operating system virtual machine according to the configuration file.
9. A computing device, characterized in that include: processor; A memory for storing one or more programs; When the one or more programs are executed by the processor, the processor implements the method for creating an embedded real-time operating system virtual machine on a cloud platform as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed by a computer, the method for creating an embedded real-time operating system virtual machine on a cloud platform as described in any one of claims 1 to 7 is implemented.
Citation Information
Cited By
Method and device for deploying multiple real-time operating system instances
CN121143827A