Virtual machine management unloading method and device, computer equipment, readable storage medium and program product

By mounting the shared file directory on HOST and storing the executable files on the server of the command execution component in this directory, the problem of poor performance caused by HOST resource occupation in traditional technology is solved, and the effect of improving the overall performance of the system is achieved.

CN119621244APending Publication Date: 2025-03-14SHENZHEN JAGUAR MICROSYSTEMS CO LTD
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202411745314.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-28
Publication Date
2025-03-14

AI Technical Summary

Technical Problem

In traditional technology, the server side of the file system mapping component runs on HOST, occupying HOST resources, resulting in poor HOST performance.

Method used

By obtaining the shared file directory, it is mounted on the host when the host loads the driver of the data processing unit. The host and the data processing unit share a file source through the shared file directory. The executable file of the command execution component server in the host is stored in the shared file directory, and communicates with the command execution component client in the data processing unit through virtio-vsock.

Benefits of technology

It reduces the burden on the HOST host CPU, makes HOST's computing resources more used for virtual machines, and improves the overall performance of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119621244A_ABST
    Figure CN119621244A_ABST
Patent Text Reader

Abstract

The invention relates to a virtual machine management unloading method and device, computer equipment, a computer readable storage medium and a computer program product. The method comprises the steps that a shared file directory is obtained, the shared file directory is mounted on a host when the host loads a drive of a data processing unit, and the host and the data processing unit share a file source through the shared file directory; storing an executable file of a command execution component server side in the host in the shared file directory, wherein the executable file of the command execution component server side is used for storage, starting and management of the command execution component server side; and the command execution component server side is communicated with the command execution component client side in the data processing unit through virtio-vsock. By adopting the method, the influence on the HOST performance can be avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of virtual machine technology, and in particular to a virtual machine management and uninstallation method, apparatus, computer equipment, computer-readable storage medium, and computer program product. Background Art

[0002] Hypervisor is an intermediate software layer running between the physical server and the operating system, which allows multiple operating systems and applications to share hardware. It is also called a virtual machine monitor (VM Monitor). Hypervisor is the core of all virtualization technologies, and its basic function is to support the migration of multiple workloads without interruption.

[0003] In the conventional technology, the client of the file system mapping component is deployed on the DPU (Data Processing Unit); the server of the file system mapping component is deployed on the HOST; the libvirt component is deployed on the DPU; the client of the remote command execution component is deployed on the DPU; the server of the remote command execution component is deployed on the HOST; the file unloading process includes: sending a path configuration instruction of a target file directory to the server of the file system mapping component through the client of the file system mapping component, so that the HOST writes the access path into the configuration file of the server of the file system mapping component; reading the access path from the server of the file system mapping component through the client of the file system mapping component, so as to mount the target file directory in the server to the DPU file system; the client of the file system mapping component and the server of the file system mapping component communicate through socket.

[0004] However, in the traditional technology, the server of the file system mapping component works on the HOST, is managed and stored by the HOST, occupies HOST resources, and thus causes poor HOST performance. Summary of the invention

[0005] Based on this, it is necessary to provide a virtual machine management unloading method, apparatus, computer equipment, computer-readable storage medium and computer program product that can avoid affecting the performance of the HOST in response to the above technical problems.

[0006] In a first aspect, the present application provides a virtual machine management offloading method, which is applied to a data processing unit, and the method includes:

[0007] Acquire a shared file directory, and the shared file directory is mounted on the host when the host loads the driver of the data processing unit, and the host and the data processing unit share a file source through the shared file directory;

[0008] The executable file of the command execution component server in the host is stored in the shared file directory, wherein the executable file of the command execution component server is used for storage, startup and management of the command execution component server; the command execution component server communicates with the command execution component client in the data processing unit through virtio-vsock to operate the shared file directory.

[0009] In one of the optional embodiments, obtaining the shared file directory includes:

[0010] In the case where the file source is located in the data processing unit, obtaining a shared file directory provided by a local system;

[0011] In the case where the file source is located at a third-party storage location, a shared file directory provided by a remote system corresponding to the third-party storage location is obtained.

[0012] In one embodiment, the method further comprises:

[0013] The executable file of the virtual machine monitor is stored in the shared file directory. The executable file of the virtual machine monitor is used for storage, startup and management of the virtual machine monitor. After the data processing unit is driven to start, the host actively starts the virtual machine monitor based on the executable file of the virtual machine monitor.

[0014] In one embodiment, the method further comprises:

[0015] Create a storage pool directory in the shared file directory, and configure the storage pool directory in a storage pool configuration file;

[0016] Sending a storage pool creation command to virtual machine management software running on the data processing unit through a command line interface tool for managing virtual machines;

[0017] The storage pool configuration file is parsed by the virtual machine management software, and a storage pool is created in the storage pool directory. The storage pool is dynamically managed by the command line interface tool.

[0018] In one embodiment, the method further comprises:

[0019] Creating a storage volume directory in the storage pool directory, and acquiring a storage volume configuration file based on the storage volume directory;

[0020] Sending a storage volume creation command to the virtual machine management software running on the data processing unit through the command line interface tool;

[0021] The storage volume configuration file is parsed by the virtual machine management software, and a storage volume is created in the storage volume directory. The storage volume is used by the host and is dynamically managed by the command line interface tool.

[0022] In one embodiment, the method further comprises:

[0023] Creating a virtual machine directory in the storage volume directory, and obtaining a virtual machine configuration file based on the virtual machine directory;

[0024] Sending a virtual machine creation command to the virtual machine management software running on the data processing unit through the command line interface tool;

[0025] The virtual machine configuration file is parsed by the virtual machine management software, and the resources required for the virtual machine are created. The command execution component client sends a virtual machine creation message to the command execution component server, and the virtual machine creation message is used to instruct the command execution component server to obtain the virtual machine configuration file and call the virtual machine monitor command to create a virtual machine; the created virtual machine uses the corresponding storage volume to run.

[0026] In one embodiment, the method further comprises:

[0027] Sending a virtual machine management command to the virtual machine management software running on the data processing unit through the command line interface tool;

[0028] The virtual machine management command is parsed by the virtual machine management software, and a virtual machine management message is sent to the command execution component server through the command execution component client. The virtual machine management message is used to instruct the command execution component server to parse the virtual machine management message and call the virtual machine monitor to manage the virtual machine.

[0029] In one of the embodiments, the command execution component server is a kernel module in the host.

[0030] In a second aspect, the present application further provides a virtual machine management unloading device, which is applied to a data processing unit, and the device includes:

[0031] A file unloading module, used for obtaining a shared file directory, and the shared file directory is mounted on the host when the host loads the driver of the data processing unit, and the host and the data processing unit share a file source through the shared file directory;

[0032] An executable file unloading module is used to store the executable file of the command execution component server in the host in the shared file directory, wherein the executable file of the command execution component server is used for the storage, startup and management of the command execution component server; the command execution component server communicates with the command execution component client in the data processing unit through virtio-vsock to operate on the shared file directory.

[0033] In a third aspect, the present application further provides a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.

[0034] In a fourth aspect, the present application also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the steps of the above method when executed by a processor.

[0035] In a fifth aspect, the present application also provides a computer program product, including a computer program, which implements the steps of the above method when executed by a processor.

[0036] The above-mentioned virtual machine management unloading method, device, computer equipment, computer-readable storage medium and computer program product run virtual machine management software in the data processing unit, run a shared file directory, and obtain the shared file directory, and the shared file directory is mounted on the host when the host loads the driver of the data processing unit, and the host and the data processing unit share a file source through the shared file directory to realize the storage of the virtual machine being unloaded to the data processing unit, and in addition, the executable file of the command execution component server in the host is stored in the shared file directory, wherein the executable file of the command execution component server is used for the storage, startup and management of the command execution component server; the command execution component server communicates with the command execution component client in the data processing unit through virtio-vsock, so that both the host and the data processing unit can operate on the shared file directory, and the executable file of the command execution component server in the host is stored in the shared file directory, that is, also in the data processing unit, without modifying the host, reducing the burden on the HOST host CPU, making the HOST computing resources more used for virtual machines, and improving the overall performance of the system. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0038] Figure 1 A diagram of an application environment of a virtual machine management offloading method in one embodiment;

[0039] Figure 2 A schematic diagram of a flow chart of a virtual machine management uninstallation method in one embodiment;

[0040] Figure 3 is a flowchart of steps for unloading a storage pool in one embodiment;

[0041] Figure 4 A flowchart of steps for unloading a storage volume in one embodiment;

[0042] Figure 5 is a flowchart of steps for creating a virtual machine in one embodiment;

[0043] Figure 6 is a flowchart of the steps for managing a virtual machine in one embodiment;

[0044] Figure 7 It is a structural block diagram of a virtual machine management offloading device in one embodiment;

[0045] Figure 8 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0046] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0047] The virtual machine management uninstallation method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown, the host HOST communicates with the data processing unit DPU. In this application, the storage and management of the virtual machine are offloaded from the host HOST to the data processing unit DPU, wherein the data processing unit DPU is a hardware device specially designed to process data-intensive tasks, and its purpose is to reduce the burden on the CPU of the host HOST, so that the computing resources of the host HOST are more used for the virtual machine, and the overall performance of the system is improved.

[0048] Among them, in this application, the storage and management of the virtual machine are offloaded from the host HOST to the data processing unit DPU, without modifying the original software of the host HOST and occupying the original storage resources of the host HOST; the embodiment of this application takes the virtual machine management software libvirt as an example to illustrate, and other open source or private virtual machine management software can also be unloaded to the data processing unit DPU according to this method; the embodiment of the virtual machine monitor hypervisor in this application takes QEMU as an example to illustrate, and other open source or private hypervisor software such as xen, qemu-kvm, kvm-tool, etc. can also be processed in this way.

[0049] Among them combined Figure 1 As shown, virtio-fs is used between the host HOST and the data processing unit DPU to realize file sharing; the host HOST and the data processing unit DPU share the same file source through virtio-fs; the file source is located in a third-party storage location or in the local storage of the data processing unit DPU to avoid intrusion into the storage resources of the host HOST. Virtio-fs is a file sharing technology. The operating system of the host HOST supports and comes with a virtio-fs driver. This technology can be used without modifying the operating system; according to the characteristics of virtio-fs, the host HOST can operate the shared files of the data processing unit DPU like operating the local file system; the host HOST uses virtio-fs supported by the data processing unit DPU to realize virtio-fs shared files.

[0050] The host HOST further includes a command execution component server and a virtual machine monitor, and the data processing unit DPU further includes a command execution component client and virtual machine management software. The virtual management software in this embodiment is described by taking libvirtd as an example, wherein the virtual management software runs on the data processing unit DPU and is pulled up after the system on chip of the data processing unit DPU is powered on.

[0051] The command execution component server and the command execution component client communicate through virtio-vsock. The executable files of the command execution component server are stored in the shared file directory. In this way, the storage, startup and management of the command execution component server are all in the data processing unit DPU, without changing the host HOST, reducing the impact on the HOST.

[0052] Optionally, for some private clouds, the command execution component server may be a kernel module in the host.

[0053] In addition, offloading in this application refers to transferring a target from one location to another.

[0054] In an exemplary embodiment, Figure 2 As shown, a virtual machine management uninstallation method is provided, and the method is applied to Figure 1 Taking the data processing unit DPU in the example as an example, the method includes the following steps S202 to S204. Among them:

[0055] S202: Acquire a shared file directory, and mount the shared file directory on the host when the host loads a driver of the data processing unit, and the host and the data processing unit share a file source through the shared file directory.

[0056] The shared file directory is unloaded to the data processing unit DPU. The file source corresponding to the shared file directory can be located in a third-party storage location or in the local storage location of the data processing unit DPU. No specific limitation is made here. It is only necessary to ensure that the shared file directory is unloaded to the data processing unit DPU.

[0057] One way to create a shared file may include: on the host HOST side: in the DPU driver loading process, the DPU driver reads the configuration information of the shared file from the data processing unit DPU, and uses the mount (command for mounting the file system, which is explained in English as attach the file system found on some device to the Unix system) method to set the virtio-fs shared file directory on the host HOST according to the configuration information. On the data processing unit DPU side: after the data processing unit DPU is powered on, if the system-on-chip of the data processing unit DPU uses the shared file directory provided by the local system, the shared file is directly operated. When the file source is located in a third-party storage location, the shared file directory provided by the remote system is used, and the corresponding file is obtained using technologies including but not limited to iscsi, rdma, etc.

[0058] Through the above method, the host HOST does not need to care about the storage location of the shared file directory, and can use it by just mounting it. Compared with the traditional nfs mounting and iscsi mounting, these implementation details are hidden in the data processing unit DPU, which improves security. Because for the host HOST, the virtio-fs device provided by the data processing unit DPU is used at this time to automatically load the driver.

[0059] S204: Storing the executable file of the command execution component server in the host in a shared file directory, wherein the executable file of the command execution component server is used for storage, startup and management of the command execution component server; the command execution component server communicates with the command execution component client in the data processing unit through virtio-vsock.

[0060] The command execution component may be a CMD component. In the present application, the command execution component includes two parts, a command execution component server CMD-Server and a command execution component client CMD-Client.

[0061] The executable file CMD-Server-bin of the command execution component server CMD-Server is located in the virtio-fs shared file directory and does not occupy the storage resources of the host HOST. The executable file of the command execution component server is used for the storage, startup and management of the command execution component server, so the host HOST does not need to manage the storage of the command execution component server CMD-Server, does not need to be responsible for the startup and management of the command execution component server CMD-Server, and is also conducive to upgrade and maintenance work.

[0062] In addition, the command execution component client CMD-Client runs in the data processing unit DPU, and the command execution component server CMD-Server runs in the host HOST; the command execution component client CMD-Client and the command execution component server CMD-Server communicate with each other through the virtio-vsock provided by the data processing unit DPU.

[0063] Virtio-vsock is a network communication device based on virtio. For the data processing unit DPU, it is implemented as a PCI device with independent vendor-id and device-id.

[0064] In this way, by utilizing the virtio-fs and virtio-vsock driver technologies natively supported by the host HOST system, as well as the virtio-fs, virtio-vsock, virtio-net, virtio-blk and other devices that come with the data processing unit DPU, the virtual machine management is offloaded from the host HOST to the data processing unit DPU. For diskless hosts HOST, the image provided by the data processing unit DPU can also be used to achieve diskless boot, which ultimately indirectly realizes the plug-and-play of the data processing unit DPU.

[0065] The virtio-fs and virtio-vsock drivers provided and supported by the host system are utilized to offload virtual machine management from the host to the data processing unit DPU. There is no need to modify the original software of the host, and there is no need for the host to actively manage related software.

[0066] The above-mentioned virtual machine management unloading method runs virtual machine management software in the data processing unit, runs a shared file directory, and obtains the shared file directory. When the host loads the driver of the data processing unit, the shared file directory is mounted on the host, and the host and the data processing unit share a file source through the shared file directory, so as to realize the storage of the virtual machine being unloaded to the data processing unit. In addition, the executable file of the command execution component server in the host is stored in the shared file directory, wherein the executable file of the command execution component server is used for the storage, startup and management of the command execution component server; the command execution component server communicates with the command execution component client in the data processing unit DPU through virtio-vsock, and both the host and the data processing unit DPU can operate on the shared file directory, and the executable file of the command execution component server in the host is stored in the shared file directory, that is, also in the data processing unit, without modifying the host, reducing the burden on the HOST host CPU, making the HOST computing resources more used for virtual machines, and improving the overall performance of the system.

[0067] In one of the optional embodiments, the method also includes: storing an executable file of the virtual machine monitor in a shared file directory, the executable file of the virtual machine monitor is used for storage, startup and management of the virtual machine monitor, and the virtual machine monitor is actively started by the host based on the executable file of the virtual machine monitor after the data processing unit driver is started.

[0068] The virtual machine monitor in this embodiment is described by taking QEMU (an open source virtual machine management software) as an example. The executable file QEMU-bin of the virtual machine monitor is located in the virtio-fs shared file directory and does not occupy the storage resources of the host HOST; the virtual machine monitor QEMU runs on the host HOST.

[0069] The virtual machine monitor QEMU startup includes: after the host HOST and the data processing unit DPU driver are started, the virtual machine monitor QEMU is actively pulled up. In this way, the host HOST does not need to manage the storage of the virtual machine monitor QEMU, and does not need to be responsible for the startup and management of the virtual machine monitor QEMU.

[0070] The virtual machine storage unloading includes the unloading of the storage pool and the unloading of the storage volume. The following will specifically introduce the process of unloading the storage pool and the unloading of the storage volume.

[0071] In one of the optional embodiments, in combination Figure 3 As shown, Figure 3 The flowchart of the unloading step of a storage pool in one embodiment includes:

[0072] S302: Create a storage pool directory in the shared file directory, and configure the storage pool directory in the storage pool configuration file.

[0073] Among them, the data processing unit DPU has created the virtio-fs shared file directory in the aforementioned manner. The system on chip of the data processing unit DPU and the software in the system can operate the shared file directory like operating local files. Therefore, the data processing unit DPU can create a storage pool directory in the shared file directory and configure the storage pool directory in the storage pool configuration file, such as the storage pool XML configuration file.

[0074] S304: Sending a storage pool creation command to the virtual machine management software running on the data processing unit through a command line interface tool for managing virtual machines.

[0075] The command line interface tool for managing virtual machines may be a tool such as virsh, which is not specifically limited here.

[0076] The data processing unit DPU sends a storage pool creation command to the virtual machine management software libvirtd through tools such as virsh. It should be noted that the virtual machine management software also runs in the data processing unit DPU.

[0077] S306: parsing the storage pool configuration file through the virtual machine management software, and creating a storage pool in the storage pool directory. The storage pool is dynamically managed by the command line interface tool.

[0078] The virtual machine management software libvirtd can parse the storage pool configuration file to obtain the storage pool directory and create the storage pool in the corresponding directory in the virtio-fs shared file system.

[0079] In addition, after the storage pool is created, the storage pool located in the virtio-fs shared file can be managed through tools such as the command line interface tool virsh.

[0080] This will offload the storage pool to the data processing unit DPU, reducing the storage resource usage of the host HOST.

[0081] In one of the optional embodiments, in combination Figure 4 As shown, Figure 4 The flowchart of the unloading step of a storage volume in one embodiment includes:

[0082] S402: Create a storage volume directory in the storage pool directory, and obtain a storage volume configuration file based on the storage volume directory.

[0083] Among them, the data processing unit DPU has created the virtio-fs shared file directory in the aforementioned manner. The system on chip of the data processing unit DPU and the software in the system can operate the shared file directory like operating local files. Therefore, the data processing unit DPU can create a storage volume directory in the storage pool directory in the shared file directory, and configure the storage volume directory in the storage volume configuration file, such as the storage volume XML configuration file.

[0084] S404: Send a storage volume creation command to the virtual machine management software running on the data processing unit through the command line interface tool.

[0085] The data processing unit DPU sends a storage volume creation command to the virtual machine management software libvirtd through tools such as virsh. It should be noted that the virtual machine management software also runs in the data processing unit DPU.

[0086] S406: parsing the storage volume configuration file through the virtual machine management software, and creating a storage volume in the storage volume directory. The storage volume is used by the host and is dynamically managed by the command line interface tool.

[0087] The virtual machine management software libvirtd can parse the storage volume configuration file to obtain the storage volume directory and create the storage pool in the corresponding directory in the virtio-fs shared file system.

[0088] In addition, after the storage volume is created, the storage volume located in the virtio-fs shared file can be managed through tools such as the command line interface tool virsh.

[0089] This will offload the storage volume to the data processing unit DPU, reducing the storage resource usage of the host HOST.

[0090] In this application, shared files are offloaded to the data processing unit DPU, and virtio-vsock is used to realize the communication between the command execution component server and the command execution component client, so that virtual machine management can be offloaded to the data processing unit DPU, wherein virtual machine management includes virtual machine creation and virtual machine life cycle management, and virtual machine life cycle management includes operations such as starting, stopping, pausing, snapshotting, migrating, and destroying virtual machines.

[0091] In one of the optional embodiments, in combination Figure 5 As shown, Figure 5 The flowchart of the steps of creating a virtual machine in one embodiment includes:

[0092] S502: Create a virtual machine directory in the storage volume directory, and obtain a virtual machine configuration file based on the virtual machine directory.

[0093] Among them, the data processing unit DPU has created the virtio-fs shared file directory in the aforementioned manner. The system on chip of the data processing unit DPU and the software in the system can operate the shared file directory like operating local files. Therefore, the data processing unit DPU can create a virtual machine directory in the storage volume directory in the shared file directory and configure the virtual machine directory in the virtual machine configuration file, such as the virtual machine XML configuration file.

[0094] S504: Sending a virtual machine creation command to the virtual machine management software running on the data processing unit through a command line interface tool.

[0095] The data processing unit DPU sends a virtual machine creation command to the virtual machine management software libvirtd through tools such as virsh. It should be noted that the virtual machine management software also runs in the data processing unit DPU.

[0096] S506: Parse the virtual machine configuration file through the virtual machine management software, and create the resources required for the virtual machine. Send a virtual machine creation message to the command execution component server through the command execution component client. The virtual machine creation message is used to instruct the command execution component server to obtain the virtual machine configuration file and call the virtual machine monitor command to create a virtual machine; the created virtual machine uses the corresponding storage volume to run.

[0097] The virtual machine management software libvirtd can parse the virtual machine configuration file and create the resources required by the virtual machine based on the virtual machine configuration file.

[0098] The command execution component client sends a virtual machine creation message to the command execution component server, so that the command execution component server obtains the virtual machine configuration file and calls the virtual machine monitor command to create a virtual machine; the created virtual machine uses the corresponding storage volume, so that the virtual machine is unloaded in the data processing unit DPU.

[0099] In the above embodiment, the virtual machine is offloaded to the data processing unit DPU, thereby reducing the occupation of storage resources of the host HOST.

[0100] In one of the optional embodiments, in combination Figure 6 As shown, Figure 6 The flowchart of the virtual machine management steps in one embodiment includes:

[0101] S602: Sending a virtual machine management command to the virtual machine management software running on the data processing unit through a command line interface tool.

[0102] The user can use tools such as virsh to send virtual machine management commands to the virtual machine management software libvirtd running on the data processing unit DPU.

[0103] The life cycle management of a virtual machine includes at least one of the following operations: start, stop, pause, snapshot, migrate, and destroy.

[0104] S604: Parse the virtual machine management command through the virtual machine management software, and send a virtual machine management message to the command execution component server through the command execution component client. The virtual machine management message is used to instruct the command execution component server to parse the virtual machine management message and call the virtual machine monitor to manage the virtual machine.

[0105] Among them, the virtual machine management software libvirtd parses the virtual machine management command, and sends the virtual machine management message to the command execution component server CMD-Server through the command execution component client CMD-Client; the command execution component server CMD-Server parses the virtual machine management message and calls the virtual machine monitor QEMU to manage the virtual machine.

[0106] In the above embodiment, the intrusion of the host HOST operating system by the traditional solution is eliminated; there is no need to modify the original software of the host HOST, and the host HOST does not need to actively manage related software, so that computing and IO virtualization are completely separated, so that all CPUs of the host HOST can be fully sold, and the management function is completely unloaded to the data processing unit DPU, which also improves the security level. For the situation where a data processing unit DPU is connected to multiple hosts HOST, storage space is also saved.

[0107] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0108] Based on the same inventive concept, the embodiment of the present application also provides a virtual machine management uninstallation device for implementing the virtual machine management uninstallation method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more virtual machine management uninstallation device embodiments provided below can refer to the limitations of the virtual machine management uninstallation method above, and will not be repeated here.

[0109] In an exemplary embodiment, Figure 7 As shown, a virtual machine management uninstallation device is provided, including: a file uninstallation module 701 and an executable file uninstallation module 702, wherein:

[0110] The file unloading module 701 is used to obtain a shared file directory, and the shared file directory is mounted on the host when the host loads the driver of the data processing unit, and the host and the data processing unit share a file source through the shared file directory;

[0111] The executable file unloading module 702 is used to store the executable files of the command execution component server in the host in the shared file directory, wherein the executable files of the command execution component server are used for the storage, startup and management of the command execution component server; the command execution component server communicates with the command execution component client in the data processing unit through virtio-vsock to operate the shared file directory.

[0112] In one of the optional embodiments, the above device further includes:

[0113] The virtual machine monitor unloading module is used to store the executable file of the virtual machine monitor in the shared file directory. The executable file of the virtual machine monitor is used for the storage, startup and management of the virtual machine monitor. The virtual machine monitor is started by the host actively based on the executable file of the virtual machine monitor after the data processing unit driver is started.

[0114] In one of the optional embodiments, the above device further includes:

[0115] A storage pool creation module is used to create a storage pool directory in a shared file directory and configure the storage pool directory in a storage pool configuration file; send a storage pool creation command to a virtual machine management software running on a data processing unit through a command line interface tool for managing virtual machines; parse the storage pool configuration file through the virtual machine management software and create a storage pool in the storage pool directory. The storage pool is dynamically managed by the command line interface tool.

[0116] In one of the optional embodiments, the above device further includes:

[0117] The storage volume creation module is used to create a storage volume directory in the storage pool directory and obtain a storage volume configuration file based on the storage volume directory; send a storage volume creation command to the virtual machine management software running on the data processing unit through the command line interface tool; parse the storage volume configuration file through the virtual machine management software, and create a storage volume in the storage volume directory. The storage volume is used by the host and is dynamically managed by the command line interface tool.

[0118] In one of the optional embodiments, the above device further includes:

[0119] A virtual machine creation module is used to create a virtual machine directory in a storage volume directory and obtain a virtual machine configuration file based on the virtual machine directory; send a virtual machine creation command to the virtual machine management software running on the data processing unit through a command line interface tool; parse the virtual machine configuration file through the virtual machine management software, and create the resources required for the virtual machine, and send a virtual machine creation message to the command execution component server through the command execution component client. The virtual machine creation message is used to instruct the command execution component server to obtain the virtual machine configuration file and call the virtual machine monitor command to create a virtual machine; the created virtual machine uses the corresponding storage volume to run.

[0120] In one of the optional embodiments, the above device further includes:

[0121] The virtual machine management module is used to send virtual machine management commands to the virtual machine management software running in the data processing unit through the command line interface tool; parse the virtual machine management commands through the virtual machine management software, and send virtual machine management messages to the command execution component server through the command execution component client. The virtual machine management message is used to instruct the command execution component server to parse the virtual machine management message and call the virtual machine monitor to manage the virtual machine.

[0122] In one of the optional embodiments, the command execution component server is a kernel module in the host.

[0123] Each module in the above-mentioned virtual machine management and uninstallation device can be implemented in whole or in part by software, hardware or a combination thereof. Each of the above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.

[0124] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 8As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a virtual machine management unloading method is implemented.

[0125] Those skilled in the art will understand that Figure 8 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 those shown in the figure, or combine certain components, or have a different arrangement of components.

[0126] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the following steps when executing the computer program: obtaining a shared file directory, and the shared file directory is mounted on the host when the host loads the driver of the data processing unit, and the host and the data processing unit share a file source through the shared file directory; storing the executable file of the command execution component server in the host in the shared file directory, wherein the executable file of the command execution component server is used for storage, startup and management of the command execution component server; the command execution component server communicates with the command execution component client in the data processing unit through virtio-vsock.

[0127] In one embodiment, obtaining a shared file directory implemented when a processor executes a computer program includes: when the file source is located in a data processing unit, obtaining a shared file directory provided by a local system; when the file source is located in a third-party storage location, obtaining a shared file directory provided by a remote system corresponding to the third-party storage location.

[0128] In one embodiment, when the processor executes the computer program, the following steps are also implemented: an executable file of the virtual machine monitor is stored in a shared file directory, the executable file of the virtual machine monitor is used for storage, startup and management of the virtual machine monitor, and the virtual machine monitor is actively started by the host based on the executable file of the virtual machine monitor after the data processing unit driver is started.

[0129] In one embodiment, the processor also implements the following steps when executing the computer program: creating a storage pool directory in the shared file directory, and configuring the storage pool directory in the storage pool configuration file; sending a storage pool creation command to the virtual machine management software running on the data processing unit through a command line interface tool for managing virtual machines; parsing the storage pool configuration file through the virtual machine management software, and creating a storage pool in the storage pool directory, and the storage pool is dynamically managed by the command line interface tool.

[0130] In one embodiment, the processor further implements the following steps when executing the computer program: creating a storage volume directory in the storage pool directory, and obtaining a storage volume configuration file based on the storage volume directory; sending a storage volume creation command to the virtual machine management software running on the data processing unit through the command line interface tool; parsing the storage volume configuration file through the virtual machine management software, and creating a storage volume in the storage volume directory, the storage volume is used by the host, and is dynamically managed by the command line interface tool.

[0131] In one embodiment, when the processor executes the computer program, the following steps are also implemented: creating a virtual machine directory in the storage volume directory, and obtaining a virtual machine configuration file based on the virtual machine directory; sending a virtual machine creation command to the virtual machine management software running on the data processing unit through a command line interface tool; parsing the virtual machine configuration file through the virtual machine management software, and creating the resources required for the virtual machine, sending a virtual machine creation message to the command execution component server through the command execution component client, the virtual machine creation message is used to instruct the command execution component server to obtain the virtual machine configuration file and call the virtual machine monitor command to create a virtual machine; the created virtual machine uses the corresponding storage volume to run.

[0132] In one embodiment, when the processor executes the computer program, the following steps are also implemented: sending a virtual machine management command to the virtual machine management software running on the data processing unit through the command line interface tool; parsing the virtual machine management command through the virtual machine management software, and sending a virtual machine management message to the command execution component server through the command execution component client, and the virtual machine management message is used to instruct the command execution component server to parse the virtual machine management message and call the virtual machine monitor to manage the virtual machine.

[0133] In one embodiment, the command execution component server involved in the execution of the computer program by the processor is a kernel module in the host.

[0134] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented: a shared file directory is obtained, and the shared file directory is mounted on the host when the host loads the driver of the data processing unit, and the host and the data processing unit share a file source through the shared file directory; the executable file of the command execution component server in the host is stored in the shared file directory, wherein the executable file of the command execution component server is used for storage, startup and management of the command execution component server; the command execution component server communicates with the command execution component client in the data processing unit through virtio-vsock.

[0135] In one embodiment, obtaining a shared file directory implemented when a computer program is executed by a processor includes: when the file source is located in a data processing unit, obtaining a shared file directory provided by a local system; when the file source is located in a third-party storage location, obtaining a shared file directory provided by a remote system corresponding to the third-party storage location.

[0136] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: an executable file of the virtual machine monitor is stored in a shared file directory, the executable file of the virtual machine monitor is used for storage, startup and management of the virtual machine monitor, and the virtual machine monitor is actively started by the host based on the executable file of the virtual machine monitor after the data processing unit driver is started.

[0137] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: creating a storage pool directory in the shared file directory, and configuring the storage pool directory in the storage pool configuration file; sending a storage pool creation command to the virtual machine management software running on the data processing unit through the command line interface tool for managing virtual machines; parsing the storage pool configuration file through the virtual machine management software, and creating a storage pool in the storage pool directory, and the storage pool is dynamically managed by the command line interface tool.

[0138] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: creating a storage volume directory in the storage pool directory, and obtaining a storage volume configuration file based on the storage volume directory; sending a storage volume creation command to the virtual machine management software running on the data processing unit through the command line interface tool; parsing the storage volume configuration file through the virtual machine management software, and creating a storage volume in the storage volume directory, the storage volume is used by the host, and is dynamically managed by the command line interface tool.

[0139] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: creating a virtual machine directory in the storage volume directory, and obtaining a virtual machine configuration file based on the virtual machine directory; sending a virtual machine creation command to the virtual machine management software running on the data processing unit through a command line interface tool; parsing the virtual machine configuration file through the virtual machine management software, and creating the resources required for the virtual machine, sending a virtual machine creation message to the command execution component server through the command execution component client, the virtual machine creation message is used to instruct the command execution component server to obtain the virtual machine configuration file and call the virtual machine monitor command to create a virtual machine; the created virtual machine uses the corresponding storage volume to run.

[0140] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: sending a virtual machine management command to the virtual machine management software running on the data processing unit through the command line interface tool; parsing the virtual machine management command through the virtual machine management software, and sending a virtual machine management message to the command execution component server through the command execution component client, the virtual machine management message is used to instruct the command execution component server to parse the virtual machine management message and call the virtual machine monitor to manage the virtual machine.

[0141] In one embodiment, the command execution component server involved when the computer program is executed by the processor is a kernel module in the host.

[0142] In one embodiment, a computer program product is provided, including a computer program, which implements the following steps when executed by a processor: obtaining a shared file directory, and the shared file directory is mounted on the host when the host loads the driver of the data processing unit, and the host and the data processing unit share a file source through the shared file directory; storing the executable file of the command execution component server in the host in the shared file directory, wherein the executable file of the command execution component server is used for storage, startup and management of the command execution component server; the command execution component server communicates with the command execution component client in the data processing unit through virtio-vsock.

[0143] In one embodiment, obtaining a shared file directory implemented when a computer program is executed by a processor includes: when the file source is located in a data processing unit, obtaining a shared file directory provided by a local system; when the file source is located in a third-party storage location, obtaining a shared file directory provided by a remote system corresponding to the third-party storage location.

[0144] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: an executable file of the virtual machine monitor is stored in a shared file directory, the executable file of the virtual machine monitor is used for storage, startup and management of the virtual machine monitor, and the virtual machine monitor is actively started by the host based on the executable file of the virtual machine monitor after the data processing unit driver is started.

[0145] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: creating a storage pool directory in the shared file directory, and configuring the storage pool directory in the storage pool configuration file; sending a storage pool creation command to the virtual machine management software running on the data processing unit through the command line interface tool for managing virtual machines; parsing the storage pool configuration file through the virtual machine management software, and creating a storage pool in the storage pool directory, and the storage pool is dynamically managed by the command line interface tool.

[0146] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: creating a storage volume directory in the storage pool directory, and obtaining a storage volume configuration file based on the storage volume directory; sending a storage volume creation command to the virtual machine management software running on the data processing unit through the command line interface tool; parsing the storage volume configuration file through the virtual machine management software, and creating a storage volume in the storage volume directory, the storage volume is used by the host, and is dynamically managed by the command line interface tool.

[0147] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: creating a virtual machine directory in the storage volume directory, and obtaining a virtual machine configuration file based on the virtual machine directory; sending a virtual machine creation command to the virtual machine management software running on the data processing unit through a command line interface tool; parsing the virtual machine configuration file through the virtual machine management software, and creating the resources required for the virtual machine, sending a virtual machine creation message to the command execution component server through the command execution component client, the virtual machine creation message is used to instruct the command execution component server to obtain the virtual machine configuration file and call the virtual machine monitor command to create a virtual machine; the created virtual machine uses the corresponding storage volume to run.

[0148] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: sending a virtual machine management command to the virtual machine management software running on the data processing unit through the command line interface tool; parsing the virtual machine management command through the virtual machine management software, and sending a virtual machine management message to the command execution component server through the command execution component client, the virtual machine management message is used to instruct the command execution component server to parse the virtual machine management message and call the virtual machine monitor to manage the virtual machine.

[0149] In one embodiment, the command execution component server involved when the computer program is executed by the processor is a kernel module in the host.

[0150] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0151] The technical features of the above embodiments may 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 application.

[0152] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A virtual machine management uninstallation method, characterized in that: Applied to a data processing unit, the method comprises: Acquire a shared file directory, and the shared file directory is mounted on the host when the host loads the driver of the data processing unit, and the host and the data processing unit share a file source through the shared file directory; The executable file of the command execution component server in the host is stored in the shared file directory, wherein the executable file of the command execution component server is used for storage, startup and management of the command execution component server; the command execution component server communicates with the command execution component client in the data processing unit through virtio-vsock.

2. The method according to claim 1, characterized in that: The step of obtaining a shared file directory includes: In the case where the file source is located in the data processing unit, obtaining a shared file directory provided by a local system; In the case where the file source is located at a third-party storage location, a shared file directory provided by a remote system corresponding to the third-party storage location is obtained.

3. The method according to claim 1, characterized in that The method further comprises: The executable file of the virtual machine monitor is stored in the shared file directory. The executable file of the virtual machine monitor is used for storage, startup and management of the virtual machine monitor. After the data processing unit is driven to start, the host actively starts the virtual machine monitor based on the executable file of the virtual machine monitor.

4. The method according to any one of claims 1 to 3, characterized in that: The method further comprises: Create a storage pool directory in the shared file directory, and configure the storage pool directory in a storage pool configuration file; Sending a storage pool creation command to virtual machine management software running on the data processing unit through a command line interface tool for managing virtual machines; The storage pool configuration file is parsed by the virtual machine management software, and a storage pool is created in the storage pool directory. The storage pool is dynamically managed by the command line interface tool.

5. The method according to claim 4, characterized in that The method further comprises: Creating a storage volume directory in the storage pool directory, and acquiring a storage volume configuration file based on the storage volume directory; Sending a storage volume creation command to the virtual machine management software running on the data processing unit through the command line interface tool; The storage volume configuration file is parsed by the virtual machine management software, and a storage volume is created in the storage volume directory. The storage volume is used by the host and is dynamically managed by the command line interface tool.

6. The method according to claim 5, characterized in that The method further comprises: Creating a virtual machine directory in the storage volume directory, and obtaining a virtual machine configuration file based on the virtual machine directory; Sending a virtual machine creation command to the virtual machine management software running on the data processing unit through the command line interface tool; The virtual machine configuration file is parsed by the virtual machine management software, and the resources required for the virtual machine are created. The command execution component client sends a virtual machine creation message to the command execution component server, and the virtual machine creation message is used to instruct the command execution component server to obtain the virtual machine configuration file and call the virtual machine monitor command to create a virtual machine; the created virtual machine uses the corresponding storage volume to run.

7. The method according to claim 6, characterized in that The method further comprises: Sending a virtual machine management command to the virtual machine management software running on the data processing unit through the command line interface tool; The virtual machine management command is parsed by the virtual machine management software, and a virtual machine management message is sent to the command execution component server through the command execution component client. The virtual machine management message is used to instruct the command execution component server to parse the virtual machine management message and call the virtual machine monitor to manage the virtual machine.

8. The method according to any one of claims 1 to 3, characterized in that: The command execution component server is a kernel module in the host.

9. A virtual machine management uninstallation device, characterized in that: Applied to a data processing unit, the device comprises: A file unloading module, used for obtaining a shared file directory, and the shared file directory is mounted on the host when the host loads the driver of the data processing unit, and the host and the data processing unit share a file source through the shared file directory; An executable file unloading module is used to store the executable file of the command execution component server in the host in the shared file directory, wherein the executable file of the command execution component server is used for the storage, startup and management of the command execution component server; the command execution component server communicates with the command execution component client in the data processing unit through virtio-vsock.

10. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 8 are implemented.

11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.

12. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.

Citation Information

Cited By

  • Virtio-vsock unloading method and device based on DPU, equipment and medium

    CN120523523A

  • Container mirror image acquisition method and device, chip, network interface card, equipment, medium and program product

    CN121277611A

  • Container image acquisition method and device, chip, network interface card, equipment, medium and program product

    CN121277611B