A virtual machine management method and related device

By using the communication channels of the serial interface and USB interface through the BMC management system, the virtual machine operating system can be reinstalled in a network-free environment, solving the problem that the BMC management system cannot meet the requirements of virtual machine operating system crash reinstallation.

CN117539588BActive Publication Date: 2025-09-30启朔(深圳)科技有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311326233.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-10-12
Publication Date
2025-09-30
Estimated Expiration
2043-10-12

AI Technical Summary

Technical Problem

In the PC-FARM array server, the BMC management system cannot meet the requirements of reinstalling the virtual machine operating system after a crash if there is no network.

Method used

The BMC management system establishes a connection with the host machine through the communication channels of the serial interface and the USB interface, issues instructions to create a virtual machine, and mounts the ISO image file to the USB device bound to the host machine through the USB interface. It controls the host machine to bind the USB interface to the virtual machine, and the virtual machine obtains the ISO image file based on the USB interface to install the operating system.

Benefits of technology

It realizes interaction with the host machine through the serial port in the absence of network, controls the binding of USB devices to the virtual machine, and completes the installation of the virtual machine operating system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117539588B_ABST
    Figure CN117539588B_ABST
Patent Text Reader

Abstract

An embodiment of the present invention discloses a virtual machine management method and related apparatus. The method includes: a base management system (BMC) establishing a serial port connection with a host machine via a communication channel, controlling the host machine to create a virtual machine and bind a USB device using the communication channel; the BMC management system mounting an ISO image file to the USB device via the USB data transmission channel, controlling the host machine to map the USB device to the virtual machine; the virtual machine obtaining the ISO image file from the USB device, and installing the virtual machine's operating system based on the ISO image file. In the present invention, when the BMC management system is not connected to a network, the BMC management system communicates and interacts with the host machine via the USB channel and the serial port channel, and controls the USB device to bind and interact with the virtual machine, thereby enabling the BMC management system to install the operating system for the virtual machine.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a virtual machine management method and related devices. Background Art

[0002] In PC-FARM array servers, the BMC management system and virtual machines primarily communicate via UART, I2C, Ethernet, and other methods. In the event of an Ethernet failure and network disconnection, the virtual machine's operating system crash and reinstallation requirements cannot be met. Reinstalling the virtual machine's operating system through the BMC management system without a network connection is a major challenge. Summary of the Invention

[0003] The main purpose of the present invention is to provide a virtual machine management method, device, computer equipment and storage medium, which can solve the problem in the prior art that the system crash reinstallation requirement cannot be met when there is no network.

[0004] To achieve the above-mentioned object, the present invention provides a virtual machine management method in a first aspect, the method being applied to a BMC management system, the method comprising:

[0005] The BMC management system establishes connections with the host machine through communication channels of the serial interface and the USB interface respectively, and issues a first instruction to the host machine through the communication channel of the serial interface to control the host machine to create a virtual machine and control the host machine to bind a USB device;

[0006] The BMC management system mounts the ISO image file to the USB device bound to the host machine based on the communication channel of the USB interface, and sends a second instruction to the host machine through the serial interface to control the host machine to bind the USB interface to the corresponding virtual machine. The virtual machine is used to obtain the ISO image file in the USB device based on the USB interface and install the operating system of the virtual machine according to the ISO image file; the ISO image file includes the operating system installation file of the virtual machine.

[0007] In combination with the first aspect, in a possible implementation method, the above-mentioned sending of a first instruction to the host machine through the communication channel of the serial interface to control the host machine to create a virtual machine, and controlling the host machine to bind a USB device, includes: using the communication channel of the serial interface to send the first instruction to the host machine and specify the USB device to be bound to the host machine, and the host machine is used to respond to the first instruction to create a virtual machine and bind the specified USB device after receiving the first instruction.

[0008] In combination with the first aspect, in one possible implementation, the BMC management system establishes a connection with the host machine through a serial interface, including: the BMC management system connects to the blade motherboard of the host machine and initializes the serial interface to enable the serial port service; based on the serial port service, the BMC management system establishes a serial port connection with the blade motherboard of the host machine through the communication channel of the serial interface.

[0009] To achieve the above-mentioned object, the second aspect of the present invention provides a virtual machine management method, which is applied to a BMC management system and includes:

[0010] The host machine establishes connections with the BMC management system through communication channels of the serial interface and the USB interface respectively. The BMC management system is used to use the communication channel of the serial interface to issue a first instruction to the host machine. The host machine creates a virtual machine based on the first instruction and binds the USB device specified by the BMC management system.

[0011] The host machine controls the bound USB device to receive the ISO image file mounted by the BMC management system based on the communication channel of the USB interface, receives a second instruction issued by the BMC management system through the serial interface, and binds the USB interface to the corresponding virtual machine based on the second instruction; the virtual machine is used to obtain the ISO image file in the USB device based on the USB interface, and install the operating system of the virtual machine according to the ISO image file; the ISO image file includes the operating system installation file of the virtual machine.

[0012] In combination with the second aspect, in a possible implementation, the above-mentioned BMC management system is used to use the communication channel of the serial interface to issue a first instruction to the host machine; the host machine creates a virtual machine based on the first instruction and binds the USB device specified by the BMC management system, including: the BMC management system is used to use the communication channel of the serial interface to issue a first instruction to the host machine, and specify the USB device to be bound to the host machine; the host machine receives the first instruction and responds to the first instruction to create a virtual machine, and bind the USB device specified by the BMC management system.

[0013] In combination with the second aspect, in one possible implementation, the host machine establishes a connection with the BMC management system through a serial interface, including: the blade motherboard of the host machine is connected to the BMC management system; and after the BMC management system initializes the serial interface to start the serial port service, based on the serial port service, the host machine blade motherboard establishes a serial port connection with the BMC management system through the communication channel of the serial interface.

[0014] To achieve the above-mentioned object, the third aspect of the present invention provides a virtual machine management device, which is used to execute the method described in the first aspect, and the device includes:

[0015] A connection control module is configured to establish a connection with a host machine through the communication channels of the serial interface and the USB interface, and to send a first instruction to the host machine through the communication channel of the serial interface to control the host machine to create a virtual machine, and to control the host machine to bind a USB device;

[0016] The mounting and installation module is used to mount the ISO image file to the USB device bound to the host machine based on the communication channel of the USB interface, and send a second instruction to the host machine through the serial interface to control the host machine to bind the USB interface to the corresponding virtual machine. The virtual machine is used to obtain the ISO image file in the USB device based on the USB interface and install the operating system of the virtual machine according to the ISO image file; the ISO image file includes the operating system installation file of the virtual machine.

[0017] To achieve the above-mentioned object, a fourth aspect of the present invention provides a virtual machine management device, the device being configured to execute the method described in the second aspect, the device comprising:

[0018] Creating a binding module: used to establish a connection with the BMC management system through the communication channels of the serial interface and the USB interface respectively, and the BMC management system is used to use the communication channel of the serial interface to issue a first instruction to the host machine; the host machine creates a virtual machine based on the first instruction and binds the USB device specified by the BMC management system;

[0019] The system installation module is used to control the bound USB device to receive the ISO image file mounted by the BMC management system based on the communication channel of the USB interface, and receive a second instruction issued by the BMC management system through the serial interface, and bind the USB interface to the corresponding virtual machine based on the second instruction; the virtual machine is used to obtain the ISO image file in the USB device based on the USB interface and install the operating system of the virtual machine according to the ISO image file; the ISO image file includes the operating system installation file of the virtual machine.

[0020] To achieve the above objectives, the fifth aspect of the present invention provides a computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to perform the steps of the following method.

[0021] To achieve the above objectives, the sixth aspect of the present invention provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes the above method steps.

[0022] The embodiments of the present invention have the following beneficial effects:

[0023] The present invention provides a virtual machine management method, in which a BMC management system establishes connections with a host machine via communication channels of a serial interface and a USB interface, respectively, and issues a first instruction to the host machine via the communication channel of the serial interface, and specifies a USB device bound to the host machine. The host machine creates a virtual machine based on the first instruction and binds the USB device. The BMC management system mounts an ISO image file to the USB device bound to the host machine based on the communication channel of the USB interface, and issues a second instruction to the host machine via the serial interface. The host machine binds the USB interface to the corresponding virtual machine based on the second instruction. The virtual machine obtains the ISO image file in the USB device based on the USB interface and installs the operating system of the virtual machine based on the ISO image file. In the present invention, when the BMC management system has no network, the BMC management system communicates and interacts with the host machine via the serial port, and controls the USB device to bind and interact with the virtual machine, thereby realizing the function of installing the operating system of the virtual machine. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0025] in:

[0026] Figure 1 This is a flow chart of a first embodiment of a virtual machine management method according to an embodiment of the present invention;

[0027] Figure 2 A virtual machine management system provided in an embodiment of the present invention;

[0028] Figure 3 This is a flow chart of a second embodiment of a virtual machine management method according to an embodiment of the present invention;

[0029] Figure 4 This is a structural block diagram of a virtual machine management device executed by a BMC management system in an embodiment of the present invention;

[0030] Figure 5This is a structural block diagram of a virtual machine management device executed by a host machine in an embodiment of the present invention;

[0031] Figure 6 4 is a structural block diagram of a computer device in an embodiment of the present invention. DETAILED DESCRIPTION

[0032] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0033] The embodiment of the present invention provides a first embodiment of a virtual machine management method, which is used in a BMC management system. Figure 1 as well as Figure 2 , Figure 1 A flowchart of a first embodiment of a virtual machine management method provided by an embodiment of the present invention is provided. Figure 2 A virtual machine management system provided by an embodiment of the present invention includes a BMC management system and a host machine, such as Figure 1 and Figure 2 As shown, the specific steps of this method are as follows:

[0034] In step S101, the BMC management system establishes connections with the host machine through the communication channels of the serial interface and the USB interface respectively, and sends a first instruction to the host machine through the communication channel of the serial interface to control the host machine to create a virtual machine and control the host machine to bind a USB device.

[0035] The BMC management system establishes a connection with the host computer through a data transmission channel, wherein the data transmission channel is divided into a serial interface communication channel and a USB interface communication channel.

[0036] The BMC management system establishes a serial port connection with the host machine. In a possible implementation, the BMC management system establishes a serial port connection with the host machine through a communication channel of a serial interface. The serial interface can be an RS232 device, and the communication channel of the serial interface can be an RS232 channel. Specifically, the BMC management system can be connected to the blade motherboard of the host machine. After the blade motherboard enters the system, it initializes the serial interface to enable the serial port service. The serial port service is used for the BMC management system to establish a serial port connection with the blade motherboard of the host machine through the communication channel of the serial interface. That is, based on the serial port service, the BMC management system establishes a serial port connection with the blade motherboard of the host machine through the communication channel of the serial interface.

[0037] In one possible implementation, a baseboard management controller (BMC control board) of a BMC management system can establish a serial port connection with a host machine based on a communication channel of a serial interface, and use the communication channel of the serial interface to send a first instruction to the host machine, where the first instruction is an instruction for the host machine to create a virtual machine, so as to control the host machine to create a virtual machine, and use the communication channel of the serial interface to control the host machine to bind a USB device.

[0038] The BMC management system uses the communication channel of the serial interface to control the host machine to create a virtual machine and control the host machine to bind a USB device, as shown in step S201:

[0039] Step S201: Using the communication channel of the serial interface, send the first instruction to the host machine and specify the USB device to be bound to the host machine. After receiving the first instruction, the host machine responds to the first instruction to create a virtual machine and bind the specified USB device.

[0040] The BMC management system uses the communication channel of the serial interface to send a first instruction to the host machine and specifies the USB device to be bound to the host machine. In one possible implementation, the USB device to be bound can be determined by the communication channel of the USB interface used to connect the BMC management system to the host machine. For example, if the communication channel of the USB interface used is a USB flash drive channel and a USB keyboard and mouse channel, the USB devices can be a USB flash drive and a USB keyboard and mouse.

[0041] After receiving the first instruction, the host machine responds to the first instruction to create a virtual machine and bind the specified USB device. In this embodiment, the host machine can create multiple virtual machines.

[0042] In a possible implementation, the BMC management system sets the USB device to device mode, so that the USB device is a USB device.

[0043] Step S102: The BMC management system mounts the ISO image file to the USB device bound to the host machine based on the communication channel of the USB interface, and sends a second instruction to the host machine through the serial interface to control the host machine to bind the USB interface to the corresponding virtual machine. The virtual machine is used to obtain the ISO image file in the USB device based on the USB interface and install the operating system of the virtual machine according to the ISO image file.

[0044] The BMC management system can store the ISO image file to the USB device corresponding to the USB interface, that is, the BMC management system mounts the ISO image file to the USB device bound to the host machine through the communication channel of the USB interface, and sends a second instruction to the host machine through the serial interface. The second instruction is an instruction to control the host machine to bind the USB interface to the corresponding virtual machine, so as to control the host machine to bind the USB interface to the corresponding virtual machine, so that the host machine maps the USB device corresponding to the USB interface to the virtual machine, so that the virtual machine can recognize the USB device, wherein the ISO image file contains the operating system installation file of the virtual machine. Since the host machine can create multiple virtual machines, the BMC management system needs to control the host machine to bind the USB interface to the corresponding virtual machine.

[0045] The specific steps for controlling the host machine to bind a USB interface to a corresponding virtual machine are as follows: the BMC management system mounts an ISO image file to the USB device bound to the host machine based on the USB interface's communication channel. The USB device starts the virtual machine. After the USB device starts the virtual machine, the BMC management system sends a second instruction to the host machine via the serial interface to control the host machine to bind the USB interface to the corresponding virtual machine. In one possible implementation, the BMC management system sets the virtual machine's BIOS startup item to be started by the USB device. The virtual machine's BIOS startup item is used to start the virtual machine. When the virtual machine's BIOS startup item is enabled by the USB device, the USB device starts the virtual machine.

[0046] In one possible implementation, the BMC management system mounts the ISO image file to the USB device bound to the host machine based on the communication channel of the USB interface, and controls the host machine to bind the USB interface to the corresponding virtual machine through the hypervisor layer.

[0047] The virtual machine obtains the ISO image file in the USB device. Since the ISO image file contains the virtual machine's operating system installation file, the virtual machine's operating system can be installed according to the ISO image file.

[0048] Based on the above method, in the absence of a network, the BMC control board is connected to the blade motherboard of the host machine through the serial port, and then the BMC management system communicates with the host machine through the serial port, issues a virtual machine creation instruction to the host system, and binds the specified USB device to the virtual machine. In addition, the BMC management system sets the corresponding USB device to the device type so that the virtual machine can recognize a USB devic device, and then mounts an ISO image file to the USB device device, thereby mapping the ISO image file to the USB device of the host machine. Finally, the host machine maps this USB device to the virtual machine through the virtualization hypervisor layer. Finally, when the virtual machine is turned on, the BIOS startup item is set to boot from the USB device. The virtual machine will recognize a USB storage device, thereby installing the operating system of the virtual machine.

[0049] The embodiment of the present invention provides a second embodiment of a virtual machine management method, which is used in a host machine, referring to Figure 3 , Figure 3 A flow chart of a second embodiment of a virtual machine management method provided by an embodiment of the present invention is shown as follows: Figure 3 As shown, the specific steps of this method are as follows:

[0050] In step S301, the host machine establishes connections with the BMC management system through communication channels of the serial interface and the USB interface respectively. The BMC management system is used to use the communication channel of the serial interface to issue a first instruction to the host machine. The host machine creates a virtual machine based on the first instruction and binds the USB device specified by the BMC management system.

[0051] The host machine establishes a serial port connection with the BMC management system. In a possible implementation, the host machine establishes a serial port connection with the BMC management system through a communication channel of a serial interface. The serial interface may be an RS232 device, and the communication channel of the serial interface may be an RS232 channel.

[0052] In one possible implementation, the host blade motherboard is connected to the BMC management system, and after the BMC management system initializes the serial interface to enable the serial port service, the host controls the blade motherboard to establish a serial port connection with the BMC management system through the communication channel of the serial interface based on the serial port service.

[0053] Specifically, the blade mainboard of the host machine can be connected to the BMC management system. After the blade mainboard enters the operating system, it initializes the serial interface to start the serial port service. The serial port service is used for the blade mainboard of the host machine to establish a serial port connection with the BMC management system through the communication channel of the serial interface. That is, based on the serial port service, the blade mainboard of the host machine establishes a serial port connection with the BMC management system through the communication channel of the serial interface.

[0054] In one possible implementation, a serial port connection can be established between the host machine and the BMC control board of the BMC management system through a communication channel based on a serial interface. The host machine uses the communication channel of the serial interface to create a virtual machine and bind a USB device.

[0055] The specific steps of creating a virtual machine and binding a USB device using the communication channel of the serial interface include steps S401 and S402:

[0056] Step S401: The BMC management system sends a first instruction to the host machine using the communication channel of the serial interface, and specifies the USB device to be bound to the host machine.

[0057] Step S402: The host machine receives the first instruction, and responds to the first instruction to create a virtual machine and bind the USB device specified by the BMC management system.

[0058] The BMC management system sends a first instruction to the host machine using a communication channel of a serial interface, specifying a USB device to be bound to the host machine. In one possible implementation, the USB device to be bound can be determined using the communication channel of the USB interface used by the BMC management system to connect to the host machine. After receiving the first instruction, the host machine responds to the first instruction, creates a virtual machine, and binds the specified USB device.

[0059] In a possible implementation, the BMC management system sets the USB device to device mode, so that the USB device is a USB device.

[0060] Step S302: The host machine controls the bound USB device to receive the ISO image file mounted by the BMC management system based on the communication channel of the USB interface, receives a second instruction issued by the BMC management system through the serial interface, and binds the USB interface to the corresponding virtual machine based on the second instruction; the virtual machine is used to obtain the ISO image file in the USB device based on the USB interface, and install the operating system of the virtual machine according to the ISO image file.

[0061] The BMC management system mounts the ISO image file to the USB device bound to the host machine through the communication channel of the USB interface, and sends a second instruction to the host machine through the serial interface. The second instruction is an instruction to control the host machine to bind the USB interface to the corresponding virtual machine, so as to control the host machine to bind the USB interface to the corresponding virtual machine, so that the host machine maps the USB device corresponding to the USB interface to the virtual machine, so that the virtual machine can recognize the USB device. The ISO image file contains the operating system installation file of the virtual machine.

[0062] Specifically, the BMC management system mounts the ISO image file to a USB device bound to the host machine using the USB interface's communication channel. The USB device then boots the virtual machine. After the USB device boots the virtual machine, the BMC management system sends a second instruction to the host machine via the serial interface, controlling the host machine to bind the USB interface to the corresponding virtual machine. In one possible implementation, the BMC management system sets the virtual machine's BIOS boot item to be booted by the USB device. The virtual machine's BIOS boot item is used to boot the virtual machine. When the virtual machine's BIOS boot item is enabled by the USB device, the USB device boots the virtual machine.

[0063] In one possible implementation, the BMC management system mounts the ISO image file to the USB device bound to the host machine based on the communication channel of the USB interface, and controls the host machine to bind the USB interface to the corresponding virtual machine through the hypervisor layer.

[0064] The virtual machine obtains the ISO image file in the USB device. Since the ISO image file contains the virtual machine's operating system installation file, the virtual machine's operating system can be installed according to the ISO image file.

[0065] The above describes how the BMC management system reinstalls the virtual machine operating system through serial and USB channels without a network connection. First, the BMC control board connects to the host machine's blade motherboard via the serial port. The BMC management system then communicates with the host machine through the serial port, issues a virtual machine creation command to the host system, and binds the specified USB device to the virtual machine. Furthermore, the BMC management system sets the corresponding USB device to the device type, allowing the virtual machine to recognize it as a USB device. It then mounts an ISO image file onto the USB device, mapping the ISO image file to the host machine's USB device. Finally, the host machine maps this USB device to the virtual machine through the hypervisor layer. Finally, when the virtual machine boots up, the BIOS boot item is set to boot from the USB device. The virtual machine recognizes the USB storage device, allowing the virtual machine's operating system to be installed.

[0066] In the present invention, when the BMC management system has no network, the BMC management system communicates and interacts with the serial port device and controls the USB device to bind and interact with the virtual machine, thereby realizing the function of installing the operating system of the virtual machine.

[0067] In order to better implement the above-mentioned virtual machine management method, the embodiment of the present invention also provides a virtual machine management device executed by the BMC management system, referring to Figure 4 , Figure 4 A structural block diagram of a virtual machine management device implemented by a BMC management system is provided in an embodiment of the present invention, such as Figure 4 As shown, the device 40 specifically includes:

[0068] Connection control module 401: used to establish a connection with the host machine through the communication channels of the serial interface and the USB interface respectively, and send a first instruction to the host machine through the communication channel of the serial interface to control the host machine to create a virtual machine, and control the host machine to bind a USB device.

[0069] Mounting and installation module 402: used to mount the ISO image file to the USB device bound to the host machine based on the communication channel of the USB interface, and send a second instruction to the host machine through the serial interface to control the host machine to bind the USB interface to the corresponding virtual machine. The virtual machine is used to obtain the ISO image file in the USB device based on the USB interface and install the operating system of the virtual machine according to the ISO image file; the ISO image file includes the operating system installation file of the virtual machine.

[0070] In one possible design, the connection control module 401 is specifically used to: connect the BMC management system to the blade motherboard of the host machine and initialize the serial interface to enable the serial port service; based on the serial port service, the BMC management system establishes a serial port connection with the blade motherboard of the host machine through the communication channel of the serial interface.

[0071] In one possible design, the above-mentioned mounting and installation module 402 is specifically used to: utilize the communication channel of the serial interface to send the first instruction to the host machine and specify the USB device to be bound to the host machine, and the host machine is used to respond to the first instruction after receiving the first instruction to create a virtual machine and bind the specified USB device.

[0072] Based on the above device, when the BMC management system has no network, it can communicate and interact with the host machine through the serial port through the BMC management system, and control the USB device to bind and interact with the virtual machine, thereby realizing the function of installing the operating system of the virtual machine.

[0073] In order to better implement the above-mentioned virtual machine management method, the embodiment of the present invention also provides a virtual machine management device executed by the host machine, referring to Figure 5 , Figure 5 A structural block diagram of a virtual machine management device executed by a host machine according to an embodiment of the present invention is provided. Figure 4 As shown, the device 50 specifically includes:

[0074] Create a binding module 501: used to establish a connection with the BMC management system through the communication channels of the serial interface and the USB interface respectively, and the BMC management system is used to use the communication channel of the serial interface to issue a first instruction to the host machine; the host machine creates a virtual machine based on the first instruction and binds the USB device specified by the BMC management system.

[0075] System installation module 502: used to control the bound USB device to receive the ISO image file mounted by the BMC management system based on the communication channel of the USB interface, and receive a second instruction issued by the BMC management system through the serial interface, and bind the USB interface to the corresponding virtual machine based on the second instruction; the virtual machine is used to obtain the ISO image file in the USB device based on the USB interface, and install the operating system of the virtual machine according to the ISO image file; the ISO image file includes the operating system installation file of the virtual machine.

[0076] In one possible design, the above-mentioned creation binding module 501 is specifically used to: connect the blade motherboard of the host machine with the BMC management system; and after the BMC management system initializes the serial interface to start the serial port service, based on the serial port service, the host machine blade motherboard establishes a serial port connection with the BMC management system through the communication channel of the serial interface.

[0077] In one possible design, the above-mentioned system installation module 502 is specifically used for: the BMC management system is used to use the communication channel of the serial interface to issue a first instruction to the host machine, and specify the USB device to be bound to the host machine; receive the first instruction, and respond to the first instruction to create a virtual machine, and bind the USB device specified by the BMC management system.

[0078] Based on the above device, when the BMC management system has no network, it can communicate and interact with the host machine through the serial port through the BMC management system, and control the USB device to bind and interact with the virtual machine, thereby realizing the function of installing the operating system of the virtual machine.

[0079] Figure 6 FIG1 shows an internal structure diagram of a computer device in an embodiment. The computer device can be a terminal or a server. Figure 6 As shown, the computer device includes a processor, a memory, and a network interface connected via a system bus. The memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system and may also store a computer program. When the computer program is executed by the processor, the processor can implement all the steps of the above method. The internal memory may also store a computer program. When the computer program is executed by the processor, the processor can implement all the steps of the above method. It will be understood by those skilled in the art that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0080] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor executes each step of the aforementioned method.

[0081] In one embodiment, a computer-readable storage medium is provided, which stores a computer program. When the computer program is executed by a processor, the processor is caused to perform the steps of the aforementioned method.

[0082] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0083] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0084] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present invention, all of which fall within the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be determined by the appended claims.

Claims

1. A virtual machine management method, characterized in that: The method is applied to a BMC management system and includes: The BMC management system establishes connections with the host machine through communication channels of the serial interface and the USB interface respectively, and issues a first instruction to the host machine through the communication channel of the serial interface to control the host machine to create multiple virtual machines and control the host machine to bind a USB device; The BMC management system mounts the ISO image file to the USB device bound to the host machine based on the communication channel of the USB interface, and issues a second instruction to the host machine through the serial interface to control the host machine to bind the USB interface to the corresponding virtual machine, and the virtual machine is used to obtain the ISO image file in the USB device based on the USB interface and install the operating system of the virtual machine according to the ISO image file; the ISO image file includes the operating system installation file of the virtual machine; The method further comprises: The BMC management system communicates with the host through the serial port, issues a command to the host to create a virtual machine, and binds the specified USB device to the virtual machine. The BMC management system sets the corresponding USB device to device type; The virtual machine recognizes the USB device and mounts the ISO image file to the USB device; The host machine then maps the USB device to the virtual machine through the hypervisor layer; When the virtual machine is turned on, set the BIOS startup item to boot from the USB device; The virtual machine recognizes the USB storage device and installs the operating system of the virtual machine; The BMC management system establishes a connection with the host machine through a serial interface, including: The BMC management system connects to the blade motherboard of the host machine and initializes the serial interface to enable the serial port service; Based on the serial port service, the BMC management system establishes a serial port connection with the blade mainboard of the host machine through the communication channel of the serial interface.

2. The method according to claim 1, characterized in that The sending of a first instruction to the host machine through the communication channel of the serial interface to control the host machine to create a virtual machine and control the host machine to bind a USB device includes: The first instruction is sent to the host machine and the USB device to be bound to the host machine is specified by using the communication channel of the serial interface. After receiving the first instruction, the host machine responds to the first instruction to create a virtual machine and bind the specified USB device.

3. A virtual machine management method, characterized in that: The method is applied to a host machine, and the method includes: The host machine establishes connections with the BMC management system through communication channels of the serial interface and the USB interface respectively, and the BMC management system is used to use the communication channel of the serial interface to issue a first instruction to the host machine; the host machine creates multiple virtual machines based on the first instruction and binds the USB devices specified by the BMC management system; The host machine controls the bound USB device to receive the ISO image file mounted by the BMC management system based on the communication channel of the USB interface, receives a second instruction issued by the BMC management system through the serial interface, and binds the USB interface to the corresponding virtual machine based on the second instruction; the virtual machine is used to obtain the ISO image file in the USB device based on the USB interface, and install the operating system of the virtual machine according to the ISO image file; the ISO image file includes the operating system installation file of the virtual machine; The BMC management system is configured to use a communication channel of a serial interface to issue a first instruction to the host machine; the host machine creates a virtual machine based on the first instruction and binds the USB device specified by the BMC management system, including: The BMC management system is used to send a first instruction to the host machine using a communication channel of the serial interface, and to specify a USB device to be bound to the host machine; The host machine receives the first instruction, and responds to the first instruction to create a virtual machine and bind the USB device specified by the BMC management system; The host machine establishes a connection with the BMC management system through a serial interface, including: The blade motherboard of the host machine is connected to the BMC management system; After the BMC management system initializes the serial interface to start the serial port service, based on the serial port service, the host machine blade mainboard establishes a serial port connection with the BMC management system through the communication channel of the serial interface.

4. A virtual machine management device, characterized in that: The device is used to perform the method according to claim 1, and the device includes: A connection control module is configured to establish a connection with a host machine through the communication channels of the serial interface and the USB interface, and to send a first instruction to the host machine through the communication channel of the serial interface to control the host machine to create a virtual machine, and to control the host machine to bind a USB device; The mounting and installation module is used to mount the ISO image file to the USB device bound to the host machine based on the communication channel of the USB interface, and send a second instruction to the host machine through the serial interface to control the host machine to bind the USB interface to the corresponding virtual machine. The virtual machine is used to obtain the ISO image file in the USB device based on the USB interface and install the operating system of the virtual machine according to the ISO image file; the ISO image file includes the operating system installation file of the virtual machine.

5. A virtual machine management device, characterized in that: The device is used to perform the method according to claim 3, and the device includes: Creating a binding module: used to establish a connection with the BMC management system through the communication channels of the serial interface and the USB interface respectively, and the BMC management system is used to use the communication channel of the serial interface to issue a first instruction to the host machine; the host machine creates a virtual machine based on the first instruction and binds the USB device specified by the BMC management system; The system installation module is used to control the bound USB device to receive the ISO image file mounted by the BMC management system based on the communication channel of the USB interface, and receive a second instruction issued by the BMC management system through the serial interface, and bind the USB interface to the corresponding virtual machine based on the second instruction; the virtual machine is used to obtain the ISO image file in the USB device based on the USB interface and install the operating system of the virtual machine according to the ISO image file; the ISO image file includes the operating system installation file of the virtual machine.

6. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the processor is caused to perform the steps of the method according to any one of claims 1 to 3.

7. A computer device comprising a memory and a processor, characterized in that: The memory stores a computer program, and when the computer program is executed by the processor, the processor is caused to perform the steps of the method according to any one of claims 1 to 3.

Citation Information

Patent Citations

  • Server management control system and method

    CN108170518A

  • Mirror image manufacturing method and device of operating system, electronic equipment and storage medium

    CN116009899A