Linux KVM-based all-in-one machine deployment methods, devices, and equipment

By generating an all-in-one machine image file and automating the installation, the underlying Linux operating system is shielded, allowing direct access to the virtual machine operating system. This solves the copyright and user customization issues in Linux KVM all-in-one machine deployment and improves deployment efficiency.

CN115686742BActive Publication Date: 2026-03-10INSPUR BUSINESS MACHINE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-27
Publication Date
2026-03-10

Smart Images

  • Figure CN115686742B_ABST
    Figure CN115686742B_ABST
Patent Text Reader

Abstract

This application relates to the field of server technology and discloses a method, apparatus, device, and computer-readable storage medium for deploying an all-in-one machine based on Linux KVM. By pre-writing an automated installation configuration file for an all-in-one machine image based on Linux KVM, an all-in-one machine system customization configuration file, and an all-in-one machine system customization installation script for executing the all-in-one machine system based on the all-in-one machine system customization configuration file to build the all-in-one machine system based on Linux KVM, the files, along with the Linux operating system image and the target virtual machine operating system image, are copied to the production directory to generate an all-in-one machine image file, which is then installed on the target device. This realizes the generation of an all-in-one machine image based on Linux KVM and the delivery of the all-in-one machine. It can both meet the manufacturer's need for underlying shielding of Linux KVM and realize user customization functions, which facilitates the use and promotion of Linux KVM.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of servers, and in particular to a Linux KVM-based all-in-one machine deployment method and device, equipment and a computer readable storage medium. BACKGROUND

[0002] A Kernel-based Virtual Machine (KVM, hereinafter referred to as KVM) is based on a Linux kernel, and each virtual machine instance managed thereby can be regarded as a process by a Linux operating system, so that the scheduling algorithm and strategy of the Linux operating system can be fully utilized, and all standard Linux process management tools can be applied to the virtual machine, thereby reducing the control and scheduling overhead of virtual resources on the Linux operating system. With the development of KVM technology, virtualization applications under the Linux system are becoming more and more widespread. However, due to copyright and user demand restrictions, it is necessary to provide a Linux KVM-based all-in-one machine. SUMMARY

[0003] The purpose of the present application is to provide a Linux KVM-based all-in-one machine deployment method, device, equipment and computer readable storage medium, for realizing the generation of a Linux KVM-based all-in-one machine image and the delivery of the all-in-one machine, meeting the underlying shielding requirements and user customization requirements of the Linux KVM, and improving the delivery efficiency.

[0004] To solve the above technical problems, the present application provides a Linux KVM-based all-in-one machine deployment method, comprising:

[0005] copying a Linux operating system image, a target virtual machine operating system image, an automatic installation configuration file for a Linux KVM-based all-in-one machine image, an all-in-one machine system customization configuration file for the all-in-one machine image, and an all-in-one machine system customization installation script to a production directory;

[0006] executing an image file creation command to generate an all-in-one machine image file from the files in the production directory;

[0007] running an installation operation of the all-in-one machine image file on a target device;

[0008] The all-in-one machine system customization installation script is used to perform the task of building a Linux operating system based on device hardware, a KVM running environment running on the Linux operating system, and a target virtual machine operating system running on the KVM running environment according to the all-in-one machine system customization configuration file.

[0009] Optionally, the all-in-one system customized configuration file specifically comprises: an all-in-one system startup flow configuration file, an all-in-one system shutdown flow configuration file, an all-in-one interface configuration file and an all-in-one packaging configuration file.

[0010] Optionally, the all-in-one system startup flow configuration file specifically comprises:

[0011] After receiving the startup signal, performing hardware self-checking;

[0012] Starting the Linux operating system, while shielding the display information of the Linux operating system and replacing it with the customized display information of the all-in-one mirror image;

[0013] After entering the Linux operating system, automatically running the KVM running environment and starting the target virtual machine operating system in the target virtual machine environment, while displaying the root user login interface customized based on the virtual machine graphical console tool;

[0014] After receiving and inputting the user login information in the root user login interface, entering the operation interface of the target virtual machine operating system;

[0015] The all-in-one system shutdown flow configuration file specifically comprises:

[0016] After receiving the shutdown signal, performing shutdown operation on the target virtual machine operating system;

[0017] After monitoring that the target virtual machine operating system completes the shutdown flow based on the virtual machine graphical console tool, automatically performing the shutdown operation of the Linux operating system to physically shut down the target device.

[0018] Optionally, the configuration content of the all-in-one interface configuration file specifically comprises:

[0019] The prohibited exit full-screen function, the function of automatically performing the shutdown operation of the Linux operating system after the target virtual machine operating system is shut down, and the resolution adaptive function of the virtual machine graphical console tool, which are customized and developed based on the open source virtual machine graphical console tool.

[0020] Optionally, the configuration content of the all-in-one packaging configuration file specifically comprises:

[0021] Configuring the startup item of the multi-operating system startup program of the Linux operating system as 0 to realize the Linux operating system boot item shielding function;

[0022] Configuring the display manager of the Linux operating system to automatically log in according to the registered root user information;

[0023] Configure the boot screen of the Linux operating system to display customized display information of the all-in-one machine image;

[0024] Configure the KVM runtime environment to start automatically in the Linux operating system, and configure the target virtual machine operating system to start automatically in the KVM runtime environment;

[0025] Install the customized virtual machine graphical console tool to realize the preset virtual machine graphical console tool customization function;

[0026] Create a root user login session to enable the virtual machine graphical console tool to connect to the target virtual machine operating system's interface.

[0027] Optionally, the configuration content of the automated installation configuration file specifically includes: basic configuration items for the installation of the all-in-one system based on Linux KVM, installation operation configuration items for the all-in-one system, and the installation package of the all-in-one system;

[0028] The basic installation configuration items include: system root password, system language, installation media type, installation mode, firewall settings, system time zone, and hard disk partitioning.

[0029] The operations corresponding to the installation operation configuration items include: after installing the Linux operating system, copying the image file of the target virtual machine operating system and the custom installation script of the all-in-one system to a specific directory of the Linux operating system, and executing the custom installation script of the all-in-one system;

[0030] The installation package of the all-in-one system includes the Linux operating system image, the KVM runtime environment installation package, and the target virtual machine operating system image.

[0031] Optional, also includes:

[0032] Change the display name of the configuration file of the Linux operating system to the display name of the target virtual machine operating system.

[0033] To address the aforementioned technical problems, this application also provides an all-in-one deployment device based on Linux KVM, comprising:

[0034] The acquisition unit is used to copy the Linux operating system image, the target virtual machine operating system image, the automated installation configuration file for the LinuxKVM-based all-in-one machine image, the all-in-one machine system customized configuration file for the all-in-one machine image, and the all-in-one machine system customized installation script to the production directory;

[0035] The generation unit is used to execute the command to create an image file, and to generate an all-in-one machine image file from the files in the production directory;

[0036] The deployment unit is used to run the installation operation of the all-in-one machine image file on the target device;

[0037] The custom installation script for the all-in-one machine system is used to execute tasks such as building a Linux operating system based on the device hardware, a KVM runtime environment running on the Linux operating system, and a target virtual machine operating system running on the KVM runtime environment, according to the custom configuration file of the all-in-one machine system.

[0038] To address the aforementioned technical issues, this application also provides an all-in-one deployment device based on Linux KVM, comprising:

[0039] Memory, used to store computer programs;

[0040] A processor for executing the computer program, which, when executed by the processor, implements the steps of the Linux KVM-based all-in-one machine deployment method as described in any of the preceding descriptions.

[0041] To address the aforementioned technical problems, this application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the Linux KVM-based all-in-one machine deployment method as described in any of the preceding claims.

[0042] The Linux KVM-based all-in-one machine deployment method provided in this application pre-writes an automated installation configuration file for the Linux KVM-based all-in-one machine image, an all-in-one machine system customization configuration file for the all-in-one machine image, and an all-in-one machine system customization installation script for executing tasks such as building a Linux operating system based on the device hardware, a KVM runtime environment running on the Linux operating system, and a target virtual machine operating system running on the KVM runtime environment. The method copies the Linux operating system image, the target virtual machine operating system image, the automated installation configuration file, the all-in-one machine system customization configuration file, and the all-in-one machine system customization installation script to the production directory, generates an all-in-one machine image file using the image file creation command, and runs the installation operation of the all-in-one machine image file on the target device. This achieves the generation of a Linux KVM-based all-in-one machine image and the delivery of the all-in-one machine, fulfilling both the manufacturer's need for underlying Linux KVM abstraction and the user's customization capabilities, thus facilitating the use and promotion of Linux KVM.

[0043] This application also provides an all-in-one deployment device, equipment, and computer-readable storage medium based on Linux KVM, which has the above-mentioned beneficial effects, and will not be elaborated here. Attached Figure Description

[0044] To more clearly illustrate the technical solutions of the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0045] Figure 1 A flowchart illustrating an all-in-one machine deployment method based on Linux KVM, provided as an embodiment of this application;

[0046] Figure 2 A schematic diagram of the structure of an all-in-one machine deployment device based on Linux KVM provided in an embodiment of this application;

[0047] Figure 3 This is a schematic diagram of the structure of an all-in-one deployment device based on Linux KVM, provided in an embodiment of this application. Detailed Implementation

[0048] The core of this application is to provide a method, apparatus, device, and computer-readable storage medium for deploying an all-in-one machine based on Linux KVM, which enables the generation of an all-in-one machine image based on Linux KVM and the delivery of the all-in-one machine, meeting the underlying shielding requirements of Linux KVM and user customization requirements, and improving delivery efficiency.

[0049] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0050] Example 1

[0051] Figure 1 A flowchart illustrating an all-in-one machine deployment method based on Linux KVM, provided as an embodiment of this application.

[0052] like Figure 1 As shown in the embodiments of this application, the all-in-one machine deployment method based on Linux KVM includes:

[0053] S101: Copy the Linux operating system image, the target virtual machine operating system image, the automated installation configuration file for the Linux KVM-based all-in-one machine image, the all-in-one machine system customization configuration file for the all-in-one machine image, and the all-in-one machine system customization installation script to the creation directory.

[0054] S102: Execute the command to create an image file, generating an all-in-one machine image file from the files in the production directory.

[0055] S103: Run the installation operation of the all-in-one machine image file on the target device.

[0056] The all-in-one system custom installation script is used to execute tasks such as building a Linux operating system based on the device hardware, a KVM runtime environment running on the Linux operating system, and a target virtual machine operating system running on the KVM runtime environment, based on the all-in-one system custom configuration file.

[0057] The application needs of all-in-one machines based on Linux KVM stem from the manufacturer's desire to shield the underlying system of the all-in-one machine, and the user's desire for easier use. All-in-one machines eliminate the need for users to manually select and run the KVM environment after booting into the Linux operating system; instead, users can directly enter the virtual machine operating system upon startup. This simplifies user experience while protecting the manufacturer's technical confidentiality.

[0058] In response, this application provides an architecture for an all-in-one machine based on Linux KVM, which adopts a two-layer structure. The first layer is a Linux operating system (i.e., the host operating system) based on server hardware, and the second layer is a KVM runtime environment running under the Linux operating system, and a specific virtual machine operating system (Guest OS) running.

[0059] The Linux KVM-based all-in-one machine deployment method provided in this application includes the process of creating an all-in-one machine image based on Linux KVM and the deployment process. Specifically, the process of creating the Linux KVM-based all-in-one machine image involves constructing a system image that can be used for server installation from the Linux operating system running on the server and the target virtual machine operating system image.

[0060] For the S101, the goal of creating an all-in-one machine image based on Linux KVM is to create a Linux operating system image that includes the target virtual machine operating system image. This can be achieved using an open-source Linux operating system. Both the Linux operating system image and the target virtual machine operating system image can be downloaded from the official website and copied to the creation directory.

[0061] A pre-written custom configuration file for the all-in-one machine system is used to record the manufacturer's and / or user's custom configuration information. A pre-written custom installation script for the all-in-one machine system is used to deploy the Linux KVM-based all-in-one machine provided in this application embodiment on the target device. The functions implemented include what customization goals the system should achieve after the all-in-one machine image is installed, such as disabling keyboard shortcuts or starting a monitoring service to monitor the virtual machine status. The custom configuration file and the custom installation script for the all-in-one machine system are copied to the production directory.

[0062] An automated installation configuration file, which serves as the overall workflow document, is pre-written and is a script that outlines the operations to be performed after the all-in-one system is installed. Copy the automated installation configuration file to the creation directory.

[0063] Automated installation configuration files can utilize kickstart configuration files. Kickstart is an unattended installation method that records various parameters manually entered during the installation process and generates a configuration file. If parameters are required during automatic installation, the installer first searches the configuration file. If suitable parameters are found, they are used; otherwise, a dialog box prompts for manual installation. If the configuration file covers all parameters required during installation, the installation process using this configuration file achieves full automation. Using kickstart configuration files, it's convenient to access the system installation bootloader on the target device via virtual / physical optical drives, USB drives, etc., without the need for professional technical personnel. This allows users to easily install the all-in-one system themselves, significantly saving deployment time and improving work efficiency.

[0064] The Linux KVM-based all-in-one machine deployment method provided in this application embodiment offers an automated installation configuration file, specifically including: basic installation configuration items for the Linux KVM-based all-in-one machine system, installation operation configuration items for the all-in-one machine system, and the installation package for the all-in-one machine system.

[0065] The basic configuration items for installation include: system root password, system language, installation media type, installation mode, firewall settings, system time zone, hard disk partitioning, etc.

[0066] The operations corresponding to the installation operation configuration items include: after installing the Linux operating system, copying the target virtual machine operating system image file and the all-in-one system customized installation script to a specific directory of the Linux operating system, and executing the all-in-one system customized installation script, etc.

[0067] The installation package for the all-in-one system includes a Linux operating system image, a KVM runtime environment installation package, and a target virtual machine operating system image.

[0068] Understandably, depending on the customization needs of the manufacturer and the user, the configuration content of an automated installation configuration file may include more or less or other configuration content.

[0069] Furthermore, the Linux KVM-based all-in-one machine deployment method provided in this application embodiment may further include: changing the display name of the Linux operating system's configuration file to the display name of the target virtual machine operating system. If a Linux operating system image is used directly for installation, the name of the Linux operating system will be displayed according to the configuration file isolinux.cfg of the Linux operating system image during the installation process. As an identifier, the display name of the configuration file in the Linux operating system image copied into the creation directory is changed to the display name of the target virtual machine operating system.

[0070] For S102, the command to create an image file (make iso file system, mkisofs) is executed, which transforms the creation directory into an installable system image and converts the original files in the creation directory into .iso format files for burning onto the storage medium storing the Linux KVM-based all-in-one machine image provided in this embodiment of the application. For ease of use, a USB flash drive can be used as the storage medium.

[0071] For S103, connect the storage medium obtained in S102 to the target device, power on the target device, and after the hardware self-test (POST) is completed and passed, the target device will load a bootable program and select the aforementioned storage medium as the boot device. If a USB flash drive is used, enter the USB boot option, select the system to be installed, and according to the configuration in the kickstart configuration file, the automatic installation of the all-in-one machine image based on Linux KVM can be completed on the target device. After installation, according to the configuration in the kickstart configuration file, the system configuration work is performed to add the customized functions in the all-in-one machine system customization configuration file to the current system. Then, the system is restarted, and after restarting, it directly enters the operation interface of the target virtual machine operating system image.

[0072] The Linux KVM-based all-in-one machine deployment method provided in this application pre-writes an automated installation configuration file for the Linux KVM-based all-in-one machine image, an all-in-one machine system customization configuration file for the all-in-one machine image, and an all-in-one machine system customization installation script for executing tasks such as building a Linux operating system based on the device hardware, a KVM runtime environment running on the Linux operating system, and a target virtual machine operating system running on the KVM runtime environment according to the all-in-one machine system customization configuration file. The Linux operating system image, the target virtual machine operating system image, the automated installation configuration file, the all-in-one machine system customization configuration file, and the all-in-one machine system customization installation script are copied to the production directory. An all-in-one machine image file is generated using the image file creation command. The installation operation of the all-in-one machine image file is run on the target device. This realizes the generation of the Linux KVM-based all-in-one machine image and the delivery of the all-in-one machine. It can both meet the manufacturer's need for low-level shielding of Linux KVM and realize user customization functions, which facilitates the use and promotion of Linux KVM.

[0073] Example 2

[0074] Based on the above embodiments, this application further provides a Linux KVM-based all-in-one machine deployment method that fulfills the underlying shielding requirements of Linux KVM and the user-customized functional requirements. In the Linux KVM-based all-in-one machine deployment method provided in this application, the all-in-one machine system customization configuration files specifically include: an all-in-one machine system startup process configuration file, an all-in-one machine system shutdown process configuration file, an all-in-one machine interface configuration file, and an all-in-one machine packaging configuration file.

[0075] In practical implementation, the boot process of the all-in-one machine based on Linux KVM is recorded through the all-in-one system boot process configuration file. The shutdown process of the all-in-one machine based on Linux KVM is recorded through the all-in-one system shutdown process configuration file. In order to meet the requirements of Linux KVM's underlying shielding and user-customized functions, the underlying packaging function configuration and other customized configurations of the all-in-one machine are recorded through the all-in-one machine packaging configuration file, and the display functions of the packaged all-in-one machine are recorded through the all-in-one machine interface configuration file.

[0076] The main functions of the all-in-one machine are provided by the target virtual machine operating system. Therefore, the goal of the all-in-one machine deployment method based on Linux KVM provided in this application embodiment is to boot the target virtual machine operating system. To shield the underlying system of the all-in-one machine, the boot process of the all-in-one machine can be configured in the system boot process configuration file, specifically including:

[0077] Upon receiving the power-on signal, a hardware self-test is performed.

[0078] Boot the Linux operating system, and at the same time hide the display information of the Linux operating system and replace it with the customized display information of the all-in-one machine image;

[0079] After entering the Linux operating system, the KVM runtime environment is automatically run, and the target virtual machine operating system is started in the target virtual machine environment. At the same time, a root user login interface customized based on the virtual machine graphical console tool is displayed.

[0080] After receiving and verifying the user login information entered in the root user login interface, the system enters the target virtual machine operating system's interface.

[0081] The power-on signal can be the hardware power-on signal from the power button on the target device. Upon receiving the power-on signal, a hardware check of the target device is performed.

[0082] After passing the target device's power-on self-test, the first-layer host operating system (HOS), namely the Linux operating system, is first started. At this time, in order to meet the low-level shielding requirements of the all-in-one machine, the display of the Linux operating system on the target device needs to be completely blocked, while the customized display information of the all-in-one machine is displayed on the target device's screen.

[0083] Then, based on the configuration of the all-in-one system's customized configuration file, the KVM runtime environment is automatically started, and the target virtual machine operating system, i.e., the target KVM virtual machine, is set to start automatically.

[0084] Create a root user session (Xsession), whose main task is to connect to the target virtual machine operating system started in the above steps through a customized virtual machine graphical console tool (virt-viewer).

[0085] After the target virtual machine operating system starts normally, the operating interface of the target virtual machine operating system is displayed on the screen of the target device to complete the all-in-one machine startup process.

[0086] The all-in-one machine displays the operating interface of the target virtual machine's operating system during operation. Therefore, a hardware shutdown operation needs to be associated when the target virtual machine's operating system shuts down. The all-in-one machine's shutdown process can be configured in the system shutdown process configuration file, specifically including:

[0087] Upon receiving a shutdown signal, the target virtual machine operating system is shut down.

[0088] After the virtual machine graphical console tool monitors the target virtual machine operating system to complete the shutdown process, it automatically executes the shutdown operation of the Linux operating system to physically shut down the target device.

[0089] Specifically, the power-off signal can be a hardware power-off signal from the power-off button of the target device, or a power-off operation signal received from the operating interface.

[0090] Upon receiving a shutdown signal, the target virtual machine operating system performs a shutdown. Simultaneously, the customized virtual machine graphical console tool detects that the target virtual machine operating system has completed the shutdown process and directly executes the shutdown operation of the host operating system (i.e., the Linux operating system), thus achieving a physical shutdown.

[0091] Example 3

[0092] The above embodiments propose that the underlying Linux operating system can be shielded during the boot and shutdown processes of the all-in-one machine through a customized virtual machine graphical console tool. Existing open-source virtual machine graphical console tools cannot achieve these functions, therefore, customized development of open-source virtual machine graphical console tools is required. In the all-in-one machine deployment method based on Linux KVM provided in this application embodiment, the configuration content of the all-in-one machine interface configuration file may specifically include:

[0093] The software features include a function to prevent exiting full-screen mode, an automatic shutdown function for the Linux operating system after the target virtual machine operating system is shut down, and a resolution adaptive function for the virtual machine graphical console tool.

[0094] In practical implementation, the above functions are customized and developed based on the open-source virtual machine graphical console tool to achieve the functions of shielding and displaying the underlying Linux operating system during the boot and shutdown processes of the all-in-one machine. Other customized functions can also be set according to the underlying shielding requirements and user needs.

[0095] Example 4

[0096] Based on the above embodiments, in order to achieve the function of shielding the underlying Linux operating system during the boot and shutdown processes of the all-in-one machine, it is also necessary to configure the first-layer host operating system (i.e., the Linux operating system), including shielding and display functions. In the all-in-one machine deployment method based on Linux KVM provided in this application embodiment, the configuration content of the all-in-one machine encapsulation configuration file may specifically include:

[0097] Configure the boot entry of the Linux operating system's multi-boot program (grub) to 0 to achieve the function of disabling the Linux operating system's boot entry;

[0098] Configure the Linux operating system's display manager (gdm) to automatically log in based on the registered root user information;

[0099] Configure the boot screen (plymouth) of the Linux operating system to display customized information of the all-in-one machine image;

[0100] Configure the KVM runtime environment to start automatically in the Linux operating system, and configure the target virtual machine operating system to start automatically in the KVM runtime environment;

[0101] Install a customized virtual machine graphical console tool to achieve the preset virtual machine graphical console tool customization functions;

[0102] Create a root user login session to enable the virtual machine graphical console tool to connect to the target virtual machine operating system's interface.

[0103] Specifically, by configuring the boot entry of the Linux operating system's multi-boot loader (grub) to 0, the boot entry of grub is hidden, thus disabling the Linux user login interface. Simultaneously, by configuring the Linux operating system's display manager to automatically log in based on the registered root user information, the automatic login function for the root user is achieved.

[0104] The boot screen (plymouth) of the Linux operating system is configured to display customized information about the all-in-one machine image, specifically the all-in-one machine's logo. Simultaneously, the KVM runtime environment is configured to automatically boot within the Linux operating system, and the target virtual machine operating system is configured to automatically boot within the KVM runtime environment. This means that while the customized information about the all-in-one machine image is being displayed, the target device completes the process of entering the first-level Linux operating system and then the second-level KVM runtime environment, before starting the target virtual machine operating system.

[0105] By installing a customized virtual machine graphical console tool, namely the virtual machine graphical console tool described in the above embodiments, a customized display of the target virtual machine operating system can be achieved.

[0106] Then, a root user login session (Xsession) is created, enabling the all-in-one machine to display the virtual machine's graphical console tool and connect to the target virtual machine operating system's interface.

[0107] With the above configuration, users will not see the Linux operating system's boot screen after turning on the target device. Instead, they will only see the customized display information of the all-in-one machine image. After the underlying system completes the boot of the target virtual machine operating system, the user can log in as the root user and directly enter the target virtual machine operating system's interface. This greatly facilitates the user experience while also meeting the need to shield confidential information at the underlying level.

[0108] Optionally, you can also configure the root user login interface of the target virtual machine operating system to automatically log in based on the user information of the registered root user, so that users can directly enter the operation interface of the target virtual machine operating system after booting up.

[0109] The above details various embodiments of the Linux KVM-based all-in-one machine deployment method. Based on this, this application also discloses an all-in-one machine deployment apparatus, device, and computer-readable storage medium based on Linux KVM corresponding to the above method.

[0110] Example 5

[0111] Figure 2 This is a schematic diagram of the structure of an all-in-one deployment device based on Linux KVM provided in an embodiment of this application.

[0112] like Figure 2 As shown in the embodiment of this application, the all-in-one machine deployment device based on Linux KVM includes:

[0113] The acquisition unit 201 is used to copy the Linux operating system image, the target virtual machine operating system image, the automated installation configuration file for the Linux KVM-based all-in-one machine image, the all-in-one machine system customization configuration file for the all-in-one machine image, and the all-in-one machine system customization installation script to the production directory.

[0114] The generation unit 202 is used to execute the command to create an image file, and to generate an all-in-one machine image file from the files in the production directory;

[0115] Deployment unit 203 is used to run the installation operation of the all-in-one machine image file on the target device;

[0116] The all-in-one system custom installation script is used to execute tasks such as building a Linux operating system based on the device hardware, a KVM runtime environment running on the Linux operating system, and a target virtual machine operating system running on the KVM runtime environment, based on the all-in-one system custom configuration file.

[0117] Furthermore, the all-in-one system customized configuration files specifically include: all-in-one system startup process configuration file, all-in-one system shutdown process configuration file, all-in-one interface configuration file, and all-in-one packaging configuration file.

[0118] Furthermore, the all-in-one machine startup process configuration file specifically includes:

[0119] Upon receiving the power-on signal, a hardware self-test is performed.

[0120] Boot the Linux operating system, and at the same time hide the display information of the Linux operating system and replace it with the customized display information of the all-in-one machine image;

[0121] After entering the Linux operating system, the KVM runtime environment is automatically run, and the target virtual machine operating system is started in the target virtual machine environment. At the same time, a root user login interface customized based on the virtual machine graphical console tool is displayed.

[0122] After receiving and verifying the user login information entered on the root user login interface, the user enters the target virtual machine operating system's interface.

[0123] The power-off process of the all-in-one system in the power-off process configuration file specifically includes:

[0124] Upon receiving a shutdown signal, the target virtual machine operating system is shut down.

[0125] After the virtual machine graphical console tool monitors the target virtual machine operating system to complete the shutdown process, it automatically executes the shutdown operation of the Linux operating system to physically shut down the target device.

[0126] Furthermore, the configuration content of the all-in-one machine interface configuration file specifically includes:

[0127] The software features include a function to prevent exiting full-screen mode, an automatic shutdown function for the Linux operating system after the target virtual machine operating system is shut down, and a resolution adaptive function for the virtual machine graphical console tool.

[0128] Furthermore, the configuration details of the all-in-one machine packaging configuration file specifically include:

[0129] Configure the boot entry of the multi-boot program in the Linux operating system to 0 to achieve the boot entry blocking function of the Linux operating system;

[0130] Configure the display manager of the Linux operating system to automatically log in based on the registered root user information;

[0131] Configure the boot screen of the Linux operating system to display customized information of the all-in-one machine image;

[0132] Configure the KVM runtime environment to start automatically in the Linux operating system, and configure the target virtual machine operating system to start automatically in the KVM runtime environment;

[0133] Install a customized virtual machine graphical console tool to achieve the preset virtual machine graphical console tool customization functions;

[0134] Create a root user login session to enable the virtual machine graphical console tool to connect to the target virtual machine operating system's interface.

[0135] Furthermore, the configuration content of the automated installation configuration file specifically includes: basic configuration items for the installation of the all-in-one system based on Linux KVM, configuration items for the installation operation of the all-in-one system, and the installation package of the all-in-one system;

[0136] The basic configuration items for installation include: system root password, system language, installation media type, installation mode, firewall settings, system time zone, and hard disk partitioning.

[0137] The operations corresponding to the installation operation configuration items include: after installing the Linux operating system, copy the target virtual machine operating system image file and the all-in-one system customized installation script to a specific directory of the Linux operating system, and execute the all-in-one system customized installation script;

[0138] The installation package for the all-in-one system includes a Linux operating system image, a KVM runtime environment installation package, and a target virtual machine operating system image.

[0139] Furthermore, the all-in-one machine deployment device based on Linux KVM provided in this application embodiment may further include:

[0140] The replacement unit is used to change the display name of the configuration file of the Linux operating system to the display name of the target virtual machine operating system.

[0141] Since the embodiments of the apparatus and the embodiments of the method correspond to each other, please refer to the description of the embodiments of the method for the embodiments of the apparatus, which will not be repeated here.

[0142] Example 6

[0143] Figure 3 This is a schematic diagram of the structure of an all-in-one deployment device based on Linux KVM, provided in an embodiment of this application.

[0144] like Figure 3 As shown in the embodiments of this application, the all-in-one deployment device based on Linux KVM includes:

[0145] Memory 310 is used to store computer program 311;

[0146] The processor 320 is configured to execute a computer program 311, which, when executed by the processor 320, implements the steps of the Linux KVM-based all-in-one machine deployment method as described in any of the above embodiments.

[0147] The processor 320 may include one or more processing cores, such as a 3-core processor or an 8-core processor. The processor 320 may be implemented using at least one hardware form selected from Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 320 may also include a main processor and a coprocessor. The main processor, also known as a Central Processing Unit (CPU), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, the processor 320 may integrate a Graphics Processing Unit (GPU), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, the processor 320 may also include an Artificial Intelligence (AI) processor, which handles computational operations related to machine learning.

[0148] The memory 310 may include one or more computer-readable storage media, which may be non-transitory. The memory 310 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In this embodiment, the memory 310 is used to store at least the following computer program 311, which, after being loaded and executed by the processor 320, can implement the relevant steps in the Linux KVM-based all-in-one machine deployment method disclosed in any of the foregoing embodiments. In addition, the resources stored in the memory 310 may also include an operating system 312 and data 313, and the storage method may be temporary storage or permanent storage. The operating system 312 may be Windows. The data 313 may include, but is not limited to, the data involved in the above methods.

[0149] In some embodiments, the Linux KVM-based all-in-one deployment device may further include a display screen 330, a power supply 340, a communication interface 350, an input / output interface 360, a sensor 370, and a communication bus 380.

[0150] Those skilled in the art will understand that Figure 3 The structure shown does not constitute a limitation on Linux KVM-based all-in-one deployment devices and may include more or fewer components than shown.

[0151] The all-in-one machine deployment device based on Linux KVM provided in this application includes a memory and a processor. When the processor executes the program stored in the memory, it can implement the all-in-one machine deployment method based on Linux KVM as described above, with the same effect.

[0152] Example 7

[0153] It should be noted that the device and equipment embodiments described above are merely illustrative. For example, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or modules may be electrical, mechanical, or other forms. Modules described as separate components may or may not be physically separate, and components shown as modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0154] Furthermore, the functional modules in the various embodiments of this application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The integrated modules described above can be implemented in hardware or as software functional modules.

[0155] If the integrated module is implemented as a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and executes all or part of the steps of the methods described in the various embodiments of this application.

[0156] Therefore, embodiments of this application also provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements steps such as the all-in-one machine deployment method based on Linux KVM.

[0157] The computer-readable storage medium may include: USB flash drive, portable hard drive, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk, and other media that can store program code.

[0158] The computer program contained in the computer-readable storage medium provided in this embodiment can implement the steps of the Linux KVM-based all-in-one machine deployment method described above when executed by a processor, with the same effect.

[0159] The foregoing provides a detailed description of a Linux KVM-based all-in-one machine deployment method, apparatus, device, and computer-readable storage medium. The various embodiments in the specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. The apparatus, device, and computer-readable storage medium disclosed in the embodiments are described simply because they correspond to the methods disclosed in the embodiments; relevant parts can be referred to in the method section. It should be noted that those skilled in the art can make various improvements and modifications to this application without departing from the principles of this application, and these improvements and modifications also fall within the protection scope of the claims of this application.

[0160] It should also be noted that, in this specification, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

Claims

1. A Linux KVM-based integrated machine deployment method, characterized in that, The application relates to a Linux KVM-based all-in-one machine system customization method and device. copying a Linux operating system image, a target virtual machine operating system image, an automatic installation configuration file for an all-in-one machine image based on the Linux KVM, an all-in-one machine system customization configuration file for the all-in-one machine image and an all-in-one machine system customization installation script to a production directory; executing an image file establishing command to generate an all-in-one machine image file from the files in the production directory; running an installation operation of the all-in-one machine image file on a target device; the all-in-one machine system customization installation script is used to perform the task of establishing a Linux operating system based on device hardware, a KVM running environment running on the Linux operating system and a target virtual machine operating system running on the KVM running environment according to the all-in-one machine system customization configuration file; the all-in-one machine system customization configuration file specifically comprises an all-in-one machine system startup flow configuration file, an all-in-one machine system shutdown flow configuration file, an all-in-one machine interface configuration file and an all-in-one machine packaging configuration file; the all-in-one machine startup flow of the all-in-one machine system startup flow configuration file specifically comprises the following steps: after receiving a startup signal, performing hardware self-checking; starting the Linux operating system while shielding display information of the Linux operating system and replacing the display information with customized display information of the all-in-one machine image; after entering the Linux operating system, automatically running the KVM running environment and starting the target virtual machine operating system in the target virtual machine environment while displaying a root user login interface customized based on a virtual machine graphical console tool; after receiving and inputting user login information on the root user login interface, entering an operation interface of the target virtual machine operating system; the all-in-one machine shutdown flow of the all-in-one machine system shutdown flow configuration file specifically comprises the following steps: after receiving a shutdown signal, performing a shutdown operation on the target virtual machine operating system; after monitoring that the target virtual machine operating system completes the shutdown flow based on the virtual machine graphical console tool, automatically performing a shutdown operation on the Linux operating system to physically shut down the target device.

2. The method of claim 1, wherein, the configuration content of the all-in-one machine interface configuration file specifically comprises the following: inhibiting an exit full-screen function, automatically performing a shutdown operation on the Linux operating system after the target virtual machine operating system is shut down and resolution self-adapting function of the virtual machine graphical console tool which are developed based on an open source virtual machine graphical console tool.

3. The method of claim 1, wherein, the configuration content of the all-in-one machine packaging configuration file specifically comprises the following: configuring a start item of a multi-operating system startup program of the Linux operating system as 0 to realize a Linux operating system boot item shielding function; configuring a display manager of the Linux operating system to automatically log in according to registered root user information; configuring a startup interface of the Linux operating system to display customized display information of the all-in-one machine image; configuring the KVM running environment to automatically start in the Linux operating system and the target virtual machine operating system to automatically start in the KVM running environment; installing the customized virtual machine graphical console tool to realize preset virtual machine graphical console tool customization functions; creating a root user login session to realize connection of the virtual machine graphical console tool to an operation interface of the target virtual machine operating system.

4. The method of claim 1, wherein, The configuration content of the automatic installation configuration file specifically includes: an installation basic configuration item of the Linux KVM all-in-one system, an installation operation configuration item of the all-in-one system, and an installation package of the all-in-one system. The installation basic configuration item includes: a system root password, a system language, an installation medium type, an installation mode, a firewall setting, a system time zone, and a hard disk partition. The operation corresponding to the installation operation configuration item includes: after installing the Linux operating system, copying an image file of the target virtual machine operating system and an all-in-one system customized installation script to a specific directory of the Linux operating system, and executing the all-in-one system customized installation script. The installation package of the all-in-one system includes the Linux operating system image, a KVM running environment installation package, and the target virtual machine operating system image.

5. The method of claim 1, wherein, Further comprising: changing a display name of a configuration file of the Linux operating system to a display name of the target virtual machine operating system.

6. A Linux KVM-based integrated machine deployment device, characterized by comprising: Comprising: an acquisition unit configured to copy a Linux operating system image, a target virtual machine operating system image, an automatic installation configuration file for an all-in-one machine image based on a Linux KVM, an all-in-one machine system customized configuration file for the all-in-one machine image, and an all-in-one machine system customized installation script to a production directory; a generation unit configured to execute a build image file command to generate an all-in-one machine image file from files in the production directory; a deployment unit configured to run an installation operation of the all-in-one machine image file on a target device; The all-in-one machine system customized installation script is configured to perform a task of building a Linux operating system based on device hardware, a KVM running environment running on the Linux operating system, and a target virtual machine operating system running on the KVM running environment according to the all-in-one machine system customized configuration file. The all-in-one machine system customized configuration file specifically includes: an all-in-one machine system startup process configuration file, an all-in-one machine system shutdown process configuration file, an all-in-one machine interface configuration file, and an all-in-one machine packaging configuration file. The all-in-one machine startup process of the all-in-one machine system startup process configuration file specifically includes: after receiving a power-on signal, performing a hardware self-check; starting the Linux operating system, while shielding display information of the Linux operating system and replacing it with customized display information of the all-in-one machine image; after entering the Linux operating system, automatically running the KVM running environment, starting the target virtual machine operating system in a target virtual machine environment, and displaying a root user login interface customized based on a virtual machine graphical console tool; after receiving and verifying user login information input in the root user login interface, entering an operation interface of the target virtual machine operating system; The all-in-one machine shutdown process of the all-in-one machine system shutdown process configuration file specifically includes: After receiving the shutdown signal, performing a shutdown operation on the target virtual machine operating system; After the virtual machine graphic console tool monitors that the target virtual machine operating system completes the shutdown process, automatically performing a shutdown operation on the Linux operating system to perform physical shutdown of the target device.

7. A Linux KVM-based integrated machine deployment device, characterized in that, Comprise: a memory for storing a computer program; a processor for executing the computer program, the computer program being executed by the processor to implement the steps of the all-in-one machine deployment method based on Linux KVM as claimed in any one of claims 1 to 5.

8. A computer-readable storage medium having stored thereon a computer program, characterized in that, the computer program being executed by the processor to implement the steps of the all-in-one machine deployment method based on Linux KVM as claimed in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Method and system for off-line and automatically installing software of virtual machine

    CN103514023A

  • Installation method and device of Linux operating system

    CN107391197A