CN117170795A - Method and device for adjusting acceleration hardware of virtual machine, storage medium and electronic device - Google Patents

Method and device for adjusting acceleration hardware of virtual machine, storage medium and electronic device Download PDF

Info

Publication number
CN117170795A
CN117170795A CN202210577431.9A CN202210577431A CN117170795A CN 117170795 A CN117170795 A CN 117170795A CN 202210577431 A CN202210577431 A CN 202210577431A CN 117170795 A CN117170795 A CN 117170795A
Authority
CN
China
Prior art keywords
acceleration hardware
hardware
information
virtual machine
modification
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210577431.9A
Other languages
Chinese (zh)
Inventor
孟晓辉
朱荣
陈克
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ZTE Corp
Original Assignee
ZTE Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by ZTE Corp filed Critical ZTE Corp
Priority to CN202210577431.9A priority Critical patent/CN117170795A/en
Priority to PCT/CN2023/086295 priority patent/WO2023226602A1/en
Publication of CN117170795A publication Critical patent/CN117170795A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]

Abstract

The embodiment of the application provides a method and a device for adjusting acceleration hardware of a virtual machine, a storage medium and an electronic device, wherein the method comprises the following steps: receiving a modification request for adjusting acceleration hardware of the virtual machine; acquiring the modified equipment information of the acceleration hardware by analyzing the modification request; determining target acceleration hardware increment information of the acceleration hardware according to the modification equipment information, and determining a modification scheme of the target acceleration hardware according to the target acceleration hardware increment information; and adjusting the acceleration hardware of the virtual machine according to the modification scheme. By the method, the problem that the specification and the number of the acceleration hardware of the virtual machine cannot be dynamically adjusted after the virtual machine is created in the related art can be solved, and the acceleration hardware of the created virtual machine is added and deleted according to actual requirements, so that the requirement of a user on continuous change of the acceleration capability of the virtual machine is met.

Description

Method and device for adjusting acceleration hardware of virtual machine, storage medium and electronic device
Technical Field
The embodiment of the application relates to the field of cloud computing, in particular to a method and a device for adjusting acceleration hardware of a virtual machine, a storage medium and an electronic device.
Background
In the field of cloud computing, a user applies from a cloud computing platform to use a virtual machine, and over time, the acceleration capability requirement of the user on the virtual machine also changes, for example: the user's virtual machine does not have acceleration hardware at first, but the demand increases, requiring new acceleration hardware in the virtual machine; or the user's virtual machine has acceleration hardware at first, but the demand changes, and the user wants the acceleration hardware of the virtual machine to change dynamically.
In the prior art, when creating a virtual machine with acceleration hardware, a user needs to provide acceleration hardware specification information to a cloud computing platform, the cloud computing platform filters according to the acceleration hardware specification, finds a host meeting the conditions, and then selects one host to create the virtual machine. When the virtual machine is created, the cloud computing platform distributes corresponding acceleration hardware to the virtual machine according to the acceleration hardware specification information.
The problem in the prior art is that once the virtual machine is created, the cloud computing platform is difficult to dynamically adjust the acceleration hardware of the virtual machine. When the requirements of users on the specifications, the number and the like of the acceleration hardware of the existing virtual machines are changed, the original virtual machines can be deleted, and new virtual machines meeting the requirements are created. The method has poor flexibility and long adjustment period, and can have great influence on the user service.
Acceleration hardware of a cloud computing platform typically includes a graphics processor (Graphics Processing Unit, abbreviated GPU), an AI acceleration card (Neural-Network Processing Unit, abbreviated NPU), a programmable acceleration card (Field Programmable Gate Array, abbreviated FPGA), and a Smart NIC. In the related art, a solution for adjusting PCI type acceleration devices is provided, but the solution can only adjust virtualized PCI acceleration devices such as an intelligent network card and an FPGA, can not realize addition or deletion of acceleration hardware such as a GPU (graphics processing Unit), an NPU (non-processing Unit) and the like, can not adjust the number of virtual machine acceleration devices, and has poor universality.
Disclosure of Invention
The embodiment of the application provides a method and a device for adjusting acceleration hardware of a virtual machine, a storage medium and an electronic device, which at least solve the problem that the specification and the number of the acceleration hardware of the virtual machine cannot be dynamically adjusted after the virtual machine is created in the related technology.
According to an embodiment of the present application, there is provided an acceleration hardware adjustment method of a virtual machine, including:
receiving a modification request for adjusting acceleration hardware of the virtual machine;
acquiring the modified equipment information of the acceleration hardware by analyzing the modification request;
determining target acceleration hardware increment information of the acceleration hardware according to the modification equipment information, and determining a modification scheme of the target acceleration hardware according to the target acceleration hardware increment information;
and adjusting the acceleration hardware of the virtual machine according to the modification scheme.
According to another embodiment of the present application, there is also provided a virtual machine acceleration hardware adjustment apparatus, including:
the receiving module is used for receiving a modification request for adjusting the acceleration hardware of the virtual machine;
the analysis module is used for acquiring the modified equipment information of the acceleration hardware by analyzing the modification request;
the determining module is used for determining target acceleration hardware increment information of the acceleration hardware according to the modification equipment information and determining a modification scheme of the target acceleration hardware according to the target acceleration hardware increment information;
and the adjusting module is used for adjusting the acceleration hardware of the virtual machine according to the modification scheme.
According to a further embodiment of the application, there is also provided a computer-readable storage medium having stored therein a computer program, wherein the computer program is arranged to perform the steps of any of the method embodiments described above when run.
According to a further embodiment of the application, there is also provided an electronic device comprising a memory having stored therein a computer program and a processor arranged to run the computer program to perform the steps of any of the method embodiments described above.
According to the embodiment of the application, a modification request for adjusting acceleration hardware of a virtual machine is received; acquiring the modified equipment information of the acceleration hardware by analyzing the modification request; determining target acceleration hardware increment information of the acceleration hardware according to the modification equipment information, and determining a modification scheme of the target acceleration hardware according to the target acceleration hardware increment information; according to the modification scheme, the accelerating hardware of the virtual machine is adjusted, so that the problem that the specification and the number of the accelerating hardware of the virtual machine cannot be dynamically adjusted after the virtual machine is created in the related technology can be solved, and the accelerating hardware of the created virtual machine is added and deleted according to actual requirements, so that the requirement of a user on continuous change of the accelerating capacity of the virtual machine is met.
Drawings
FIG. 1 is a block diagram of a hardware architecture of a mobile terminal of a method for adjusting acceleration hardware of a virtual machine according to an embodiment of the present application;
FIG. 2 is a flow chart of a method of virtual machine acceleration hardware adjustment according to an embodiment of the application;
FIG. 3 is a flow chart of a method of virtual machine acceleration hardware adjustment in accordance with an alternative embodiment of the present application;
FIG. 4 is a block diagram of a virtual machine acceleration hardware adjustment device according to an embodiment of the application;
FIG. 5 is a block diagram of a virtual machine acceleration hardware adjustment device according to an alternative embodiment of the application.
Detailed Description
Embodiments of the present application will be described in detail below with reference to the accompanying drawings in conjunction with the embodiments.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present application and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order.
The method embodiments provided in the embodiments of the present application may be performed in a mobile terminal, a computer terminal or similar computing device. Taking a mobile terminal as an example, fig. 1 is a block diagram of a hardware structure of a mobile terminal of a virtual machine acceleration hardware adjustment method according to an embodiment of the present application, as shown in fig. 1, the mobile terminal may include one or more (only one is shown in fig. 1) processors 102 (the processors 102 may include, but are not limited to, a microprocessor MCU or a programmable logic device FPGA, etc. processing means) and a memory 104 for storing data, where the mobile terminal may further include a transmission device 106 for communication functions and an input/output device 108. It will be appreciated by those skilled in the art that the structure shown in fig. 1 is merely illustrative and not limiting of the structure of the mobile terminal described above. For example, the mobile terminal may also include more or fewer components than shown in fig. 1, or have a different configuration than shown in fig. 1.
The memory 104 may be used to store a computer program, for example, a software program of application software and a module, such as a computer program corresponding to a method for adjusting acceleration hardware of a virtual machine in an embodiment of the present application, and the processor 102 executes the method for adjusting acceleration hardware of the virtual machine by running the computer program stored in the memory 104, that is, implements the method described above. Memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include memory remotely located relative to the processor 102, which may be connected to the mobile terminal via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The transmission means 106 is arranged to receive or transmit data via a network. Specific examples of the network described above may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, simply referred to as NIC) that can connect to other network devices through a base station to communicate with the internet. In one example, the transmission device 106 may be a Radio Frequency (RF) module, which is used to communicate with the internet wirelessly.
In this embodiment, a method for adjusting acceleration hardware of a virtual machine is provided, and fig. 2 is a flowchart of a method for adjusting acceleration hardware of a virtual machine according to an embodiment of the present application, as shown in fig. 2, where the flowchart includes the following steps:
step S202, receiving a modification request for adjusting acceleration hardware of a virtual machine;
step S204, obtaining the modified equipment information of the acceleration hardware by analyzing the modification request;
step S206, determining target acceleration hardware increment information of the acceleration hardware according to the modification equipment information, and determining a modification scheme of the target acceleration hardware according to the target acceleration hardware increment information;
step S208, the acceleration hardware of the virtual machine is adjusted according to the modification scheme;
in this embodiment, the step S202 may specifically include: the user inputs a modification request through a command line or an HTML page, and the modification request may be an incremental modification request or a full modification request, where the modification request includes a virtual machine identifier for indicating a virtual machine to be modified. The acceleration hardware specification information modifiable by the virtual machine can be displayed on the visual page, and the user inputs the modification request by selecting the acceleration hardware specification in the visual page.
In this embodiment, the step S204 may specifically include: acquiring acceleration hardware increment information by analyzing an increment modification request, wherein the acceleration hardware increment information is acceleration hardware information which needs to be modified by the virtual machine; and acquiring acceleration hardware full quantity information through analyzing the full quantity modification request, wherein the acceleration hardware full quantity information is expected acceleration hardware information after the acceleration hardware of the virtual machine is adjusted.
Specifically, the acceleration hardware information includes a part or all of hardware specifications of the acceleration hardware; the hardware specifications of the acceleration hardware include: the identifier, the type, the number, the manufacturer name, the manufacturer number, the model number, the memory and the like of the acceleration hardware, and the acceleration hardware information can be one or more items.
In this embodiment, the step S206 may specifically include: if the modified equipment information is the acceleration hardware total information, the existing acceleration hardware specification of the virtual machine is obtained, and the acceleration hardware increment information is determined by comparing the acceleration hardware total information with the existing acceleration hardware specification. Specifically, by comparing the full acceleration hardware information with the existing acceleration hardware specification to determine the difference value between the full acceleration hardware information and the existing acceleration hardware specification, the difference value is determined to be acceleration hardware increment information, for example, the memory of the acceleration hardware in the full acceleration hardware information is 16G, the memory of the acceleration hardware in the existing acceleration hardware specification is 8G, and the acceleration hardware increment information is 8G of the memory to which the acceleration hardware needs to be added. Determining target acceleration hardware increment information according to the acceleration hardware increment information, and further screening target acceleration hardware matched with the acceleration hardware increment information from an acceleration hardware resource pool of the virtual machine through a filtering algorithm; and determining the hardware specification of the target acceleration hardware as the increment information of the target acceleration hardware.
The acceleration hardware increment information in the embodiment can only provide a fuzzy acceleration hardware type or memory size, and can also be specific to a model or identifier of a certain acceleration hardware; the target acceleration hardware increment information contains all specification information of the target acceleration hardware, such as an identifier, a type, a number, a manufacturer name, a manufacturer number, a model number, a memory and the like of the acceleration hardware. The identifier of the acceleration hardware includes a uuid or PCI address of the acceleration hardware. Types of acceleration hardware include a Smart network card (Smart NIC), a graphics processor (Graphics Processing Unit, abbreviated GPU), an AI acceleration card (Neural-Network Processing Unit, abbreviated NPU), a programmable acceleration card (Field Programmable Gate Array, abbreviated FPGA).
In another embodiment, the step S206 further includes: obtaining a hardware modification execution scheme corresponding to the target acceleration hardware increment information, wherein the hardware modification execution scheme comprises: the virtual machine identifier, the number of target acceleration hardware, the hardware identifier of the target acceleration hardware and the configuration information of the target acceleration hardware.
In this embodiment, the step S206 further includes: the target acceleration hardware comprises one or more hardware combinations, wherein each hardware combination corresponds to a hardware modification execution scheme, and each hardware combination comprises one acceleration hardware or a plurality of acceleration hardware; in the case that the target acceleration hardware includes a plurality of combinations, the hardware modification execution schemes of the plurality of combinations are ordered, for example, the hardware modification execution schemes corresponding to the plurality of combinations are ordered according to the cost price or performance of the target acceleration hardware, and the ordering rules of optimal performance, lowest price and the like can be set according to the requirements of clients.
In an embodiment, the step S208 may specifically include: closing the virtual machine; adding or deleting configuration information of the target acceleration hardware in a configuration file of the virtual machine according to the hardware modification execution scheme; restarting the virtual machine.
Specifically, the identifier of the virtual machine indicates the virtual machine to be modified, the number of target acceleration hardware and the hardware identifier indicate the acceleration hardware to be modified, and the change of the acceleration hardware of the virtual machine is realized by modifying the configuration file of the virtual machine.
For example, when the PCI address is used for the FPGA, the PCI address corresponding to the FPGA can be written into an xml configuration file of the virtual machine in a fixed format; for the virtual GPU provided by the NVIDIA manufacturer, the uuid corresponding to the virtual GPU can be written into the xml configuration file of the virtual machine in a fixed format.
In this embodiment, the step S208 further includes: the following operations are performed on the plurality of combined hardware modification execution schemes until the adjustment is successful: closing the virtual machine; adding or deleting the configuration information of the target acceleration hardware in the configuration file of the virtual machine according to the current hardware modification execution scheme; restarting the virtual machine; detecting whether the adjustment is successful; if the adjustment is successful, sending an adjustment completion notification, and displaying the adjusted acceleration hardware configuration information; if the adjustment fails, adding or deleting the configuration information of the target acceleration hardware in the configuration file of the virtual machine according to the next hardware modification execution scheme.
Through the steps S202 to S208, the problem that the specification and the number of the acceleration hardware of the virtual machine cannot be dynamically adjusted after the virtual machine is created in the related art can be solved, and the acceleration hardware of the created virtual machine is added and deleted according to the actual requirements, so that the requirement of a user on the continuous change of the acceleration capability of the virtual machine is met.
FIG. 3 is a flowchart of determining a migration scheme of a virtual machine according to incremental information of target acceleration hardware according to an embodiment of the present application, where the flowchart includes the following steps:
step S302, detecting whether an original host of the virtual machine meets the target acceleration hardware increment information;
step S304, if the original host does not meet the target acceleration hardware increment information, determining a target host meeting the target acceleration hardware increment information from the acceleration hardware resource pool according to the target acceleration hardware increment information;
and step S306, determining a modification scheme of the target acceleration hardware according to the original host and the target host, wherein the modification scheme is a migration scheme of the virtual machine.
Specifically, the migration scheme of the virtual machine includes an identifier of an original host, an identifier of a target host, a migration mode of the virtual machine, and the like, wherein the migration mode of the virtual machine is divided into hot migration and cold migration.
In this embodiment, after step S306, the virtual machine is migrated from the original host to the target host according to a migration scheme of the virtual machine, where the virtual machine migration scheme includes hot migration or cold migration.
In another embodiment, the modification request may further include a modification request to install or uninstall a driver of the acceleration hardware in the virtual machine, or an algorithm of the FPGA acceleration hardware.
The modifying device information in this embodiment further includes: drive information and/or algorithm information of the acceleration hardware.
Specifically, the driving information includes at least one of: drive number, drive name, drive version; algorithm information for acceleration hardware, including at least one of: algorithm number, algorithm name. Acquiring target acceleration hardware increment information of a driver or an algorithm according to the modified equipment information, wherein the target acceleration hardware increment information comprises a driver number, a driver name and a driver version, or the target acceleration hardware increment information comprises an algorithm number and an algorithm name;
in one embodiment, determining a modification of the target acceleration hardware based on the target acceleration hardware delta information includes: acquiring an installation image file and an installation script of the acceleration hardware according to the driving information and/or algorithm information of the acceleration hardware, wherein the installation image file comprises: drive image and rely image, and/or algorithm image.
The installation script is written by a professional technician according to the installation characteristics and the installation steps of drivers/algorithms of various manufacturers, and comprises a restarting step of the virtual machine or part of services after the installation is completed; an automatic installation operation of the driver/algorithm can be performed through the installation script; the installation script may also be replaced with an uninstall script for performing an automatic uninstall operation on the driver/algorithm.
Specifically, whether a driving/algorithm image file and a dependent image file corresponding to the target acceleration hardware exist in the virtual machine or not is detected, if not, the corresponding image file is downloaded according to driving/algorithm information, and the image file can be stored in a component specially used for managing images in the cloud computing platform.
In another embodiment, the modification scheme may only include an algorithm number or a driving number, an information list of the algorithm or the driving is stored in the cloud computing platform, and the corresponding image file and the installation script are searched according to the number and the information list.
According to the embodiment, the acceleration capacity of the virtual machine can be adjusted from the software level of the acceleration hardware, the adjustment requirements of more types of acceleration hardware are met, the universality is higher, and the learning cost of a user is reduced.
According to another aspect of the embodiment of the present application, there is further provided a device for adjusting acceleration hardware of a virtual machine, fig. 4 is a block diagram of the device for adjusting acceleration hardware of a virtual machine according to an embodiment of the present application, as shown in fig. 4, the device includes:
a receiving module 402, configured to receive a modification request for adjusting acceleration hardware of a virtual machine;
the parsing module 404 is configured to obtain modified device information of the acceleration hardware by parsing the modification request;
a determining module 406, configured to determine target acceleration hardware increment information of the acceleration hardware according to the modification device information, and determine a modification scheme of the target acceleration hardware according to the target acceleration hardware increment information;
and the adjusting module 408 is configured to adjust acceleration hardware of the virtual machine according to the modification scheme.
In an embodiment, the determining module includes:
the first determining submodule is used for acquiring the existing acceleration hardware specification of the virtual machine if the modified equipment information is the acceleration hardware total information, determining the acceleration hardware increment information by comparing the acceleration hardware total information with the existing acceleration hardware specification, and determining the target acceleration hardware increment information according to the acceleration hardware increment information;
and the second determining submodule is used for screening target acceleration hardware matched with the acceleration hardware increment information from the acceleration hardware resource pool of the virtual machine through a filtering algorithm, and determining that all hardware specifications of the target acceleration hardware are the target acceleration hardware increment information.
In this embodiment, the first determining submodule is further configured to determine, if the modified device information is the acceleration hardware incremental information, the target acceleration hardware incremental information according to the acceleration hardware incremental information.
In this embodiment, the second determining sub-module includes:
the first acquisition unit is configured to acquire a hardware modification execution scheme corresponding to the target acceleration hardware increment information, where the hardware modification execution scheme includes: the virtual machine identifier, the number of target acceleration hardware, the hardware identifier of the target acceleration hardware, and the configuration information of the target acceleration hardware.
The determining unit is used for detecting whether the original host of the virtual machine meets the target acceleration hardware increment information; if the original host does not meet the target acceleration hardware increment information, determining a target host meeting the target acceleration hardware increment information from an acceleration hardware resource pool according to the target acceleration hardware increment information; and determining a modification scheme of target acceleration hardware according to the original host and the target host, wherein the modification scheme is a migration scheme of the virtual machine.
The second obtaining unit is used for obtaining an installation image file and an installation script of the acceleration hardware according to the driving information and/or algorithm information of the acceleration hardware, wherein the installation image file comprises: drive image and rely image, and/or algorithm image.
In one embodiment, the adjustment module 408 includes: the hardware adjusting unit is also used for closing the virtual machine, adding or deleting the configuration information of the target acceleration hardware in the configuration file of the virtual machine according to the hardware modification execution scheme, and restarting the virtual machine.
In an embodiment, the device further comprises: and the ordering module is used for ordering the hardware modification execution schemes of a plurality of combinations when the target acceleration hardware comprises the combinations.
In an embodiment, the hardware adjustment unit is further configured to perform the following operations on the plurality of combined hardware modification execution schemes until the adjustment is successful: closing the virtual machine; adding or deleting configuration information of the target acceleration hardware in a configuration file of the virtual machine according to a current hardware modification execution scheme; restarting the virtual machine; detecting whether the adjustment is successful; if the adjustment is successful, sending an adjustment completion notification, and displaying the adjusted acceleration hardware configuration information; if the adjustment fails, adding or deleting the configuration information of the target acceleration hardware in the configuration file of the virtual machine according to the next hardware modification execution scheme.
In another embodiment, the adjustment module 408 further comprises:
the virtual machine adjusting unit is used for migrating the virtual machine from the original host machine to the target host machine according to a migration scheme of the virtual machine, wherein the virtual machine migration scheme comprises hot migration or cold migration;
the software adjusting unit is used for executing the installation script to install the installation image file of the acceleration hardware; restarting the virtual machine or the acceleration hardware according to the installation script.
FIG. 5 is a block diagram of a method for adjusting acceleration hardware of a virtual machine according to an alternative embodiment of the present application, as shown in FIG. 5, the method for adjusting acceleration hardware of a virtual machine includes the steps of:
step S501, the user terminal 502 sends a modification request to the cloud computing platform 504;
step S502, the cloud computing platform 504 sends modification information to the acceleration hardware management platform 506;
step S503, the acceleration hardware management platform 506 returns the modification scheme to the cloud computing platform 504;
in step S504, the cloud computing platform 504 operates on the virtual machine 508.
Specifically, the cloud computing platform 504 includes a receiving module 402, an parsing module 404, and an adjusting module 408, and the acceleration hardware management platform 506 includes a determining module 406, where the modification information corresponds to modification device information.
Embodiments of the present application also provide a computer readable storage medium having a computer program stored therein, wherein the computer program is arranged to perform the steps of any of the method embodiments described above when run.
In one exemplary embodiment, the computer readable storage medium may include, but is not limited to: a usb disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing a computer program.
An embodiment of the application also provides an electronic device comprising a memory having stored therein a computer program and a processor arranged to run the computer program to perform the steps of any of the method embodiments described above.
In an exemplary embodiment, the electronic apparatus may further include a transmission device connected to the processor, and an input/output device connected to the processor.
Specific examples in this embodiment may refer to the examples described in the foregoing embodiments and the exemplary implementation, and this embodiment is not described herein.
It will be appreciated by those skilled in the art that the modules or steps of the application described above may be implemented in a general purpose computing device, they may be concentrated on a single computing device, or distributed across a network of computing devices, they may be implemented in program code executable by computing devices, so that they may be stored in a storage device for execution by computing devices, and in some cases, the steps shown or described may be performed in a different order than that shown or described herein, or they may be separately fabricated into individual integrated circuit modules, or multiple modules or steps of them may be fabricated into a single integrated circuit module. Thus, the present application is not limited to any specific combination of hardware and software.
The above description is only of the preferred embodiments of the present application and is not intended to limit the present application, but various modifications and variations can be made to the present application by those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the principle of the present application should be included in the protection scope of the present application.

Claims (15)

1. An acceleration hardware adjustment method for a virtual machine, the method comprising:
receiving a modification request for adjusting acceleration hardware of the virtual machine;
acquiring the modified equipment information of the acceleration hardware by analyzing the modification request;
determining target acceleration hardware increment information of the acceleration hardware according to the modification equipment information, and determining a modification scheme of the target acceleration hardware according to the target acceleration hardware increment information;
and adjusting the acceleration hardware of the virtual machine according to the modification scheme.
2. The method of claim 1, wherein determining target acceleration hardware delta information for the acceleration hardware based on the modified device information comprises:
the modification device information further comprises acceleration hardware increment information and acceleration hardware total information, wherein the acceleration hardware increment information is acceleration hardware information which needs to be modified by the virtual machine, the acceleration hardware total information is acceleration hardware information expected after the acceleration hardware of the virtual machine is adjusted, and the acceleration hardware information comprises part or all of hardware specifications of the acceleration hardware;
if the modified equipment information is the acceleration hardware total information, acquiring the existing acceleration hardware specification of the virtual machine, determining the acceleration hardware increment information by comparing the acceleration hardware total information with the existing acceleration hardware specification, and determining the target acceleration hardware increment information according to the acceleration hardware increment information;
and if the modified equipment information is the acceleration hardware increment information, determining the target acceleration hardware increment information according to the acceleration hardware increment information.
3. The method of claim 2, wherein determining the target acceleration hardware delta information from the acceleration hardware delta information comprises:
screening target acceleration hardware matched with the acceleration hardware increment information from an acceleration hardware resource pool of the virtual machine through a filtering algorithm;
and determining the hardware specification of the target acceleration hardware as the increment information of the target acceleration hardware.
4. The method of claim 1, wherein determining a modification of the target acceleration hardware based on the target acceleration hardware delta information comprises:
obtaining a hardware modification execution scheme corresponding to the target acceleration hardware increment information, wherein the hardware modification execution scheme comprises: the virtual machine identifier, the number of target acceleration hardware, the hardware identifier of the target acceleration hardware, and the configuration information of the target acceleration hardware.
5. The method of claim 4, wherein adjusting acceleration hardware of the virtual machine according to the modification scheme comprises:
closing the virtual machine;
adding or deleting configuration information of the target acceleration hardware in a configuration file of the virtual machine according to the hardware modification execution scheme;
restarting the virtual machine.
6. The method according to claim 4, wherein the method further comprises:
the target acceleration hardware comprises one or more hardware combinations, wherein each hardware combination corresponds to a hardware modification execution scheme, and each hardware combination comprises one acceleration hardware or a plurality of acceleration hardware;
in the case where the target acceleration hardware includes a plurality of combinations, the hardware modification execution schemes of the plurality of combinations are ordered.
7. The method of claim 5, wherein adjusting acceleration hardware of the virtual machine according to the modification scheme comprises:
the following operations are performed on the plurality of combined hardware modification execution schemes until the adjustment is successful:
closing the virtual machine;
adding or deleting configuration information of the target acceleration hardware in a configuration file of the virtual machine according to a current hardware modification execution scheme;
restarting the virtual machine;
detecting whether the adjustment is successful;
if the adjustment is successful, sending an adjustment completion notification, and displaying the adjusted acceleration hardware configuration information;
if the adjustment fails, adding or deleting the configuration information of the target acceleration hardware in the configuration file of the virtual machine according to the next hardware modification execution scheme.
8. The method of claim 1, wherein determining a modification of the target acceleration hardware based on the target acceleration hardware delta information comprises:
detecting whether an original host of the virtual machine meets the target acceleration hardware increment information;
if the original host does not meet the target acceleration hardware increment information, determining a target host meeting the target acceleration hardware increment information from an acceleration hardware resource pool according to the target acceleration hardware increment information;
and determining a modification scheme of target acceleration hardware according to the original host and the target host, wherein the modification scheme is a migration scheme of the virtual machine.
9. The method of claim 8, wherein adjusting acceleration hardware of the virtual machine according to the modification scheme comprises:
and migrating the virtual machine from the original host to the target host according to a migration scheme of the virtual machine, wherein the virtual machine migration scheme comprises hot migration or cold migration.
10. The method of claim 1, wherein modifying the device information further comprises: drive information and/or algorithm information of the acceleration hardware.
11. The method of claim 10, wherein determining a modification of the target acceleration hardware based on the target acceleration hardware delta information comprises:
acquiring an installation image file and an installation script of the acceleration hardware according to the driving information and/or algorithm information of the acceleration hardware, wherein the installation image file comprises: drive image and rely image, and/or algorithm image.
12. The method of claim 11, wherein adjusting acceleration hardware of the virtual machine according to the modification scheme comprises:
executing the installation script to install an installation image file of the acceleration hardware;
restarting the virtual machine or the acceleration hardware according to the installation script.
13. A virtual machine acceleration hardware adjustment apparatus, the apparatus comprising:
the receiving module is used for receiving a modification request for adjusting the acceleration hardware of the virtual machine;
the analysis module is used for acquiring the modified equipment information of the acceleration hardware by analyzing the modification request;
the determining module is used for determining target acceleration hardware increment information of the acceleration hardware according to the modification equipment information and determining a modification scheme of the target acceleration hardware according to the target acceleration hardware increment information;
and the adjusting module is used for adjusting the acceleration hardware of the virtual machine according to the modification scheme.
14. A computer readable storage medium having a computer program stored therein, wherein the computer program is arranged to perform the method of any of claims 1 to 12 when run.
15. An electronic device comprising a memory in which a computer program is stored and a processor arranged to run the computer program to perform the method of any of claims 1 to 12.
CN202210577431.9A 2022-05-25 2022-05-25 Method and device for adjusting acceleration hardware of virtual machine, storage medium and electronic device Pending CN117170795A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202210577431.9A CN117170795A (en) 2022-05-25 2022-05-25 Method and device for adjusting acceleration hardware of virtual machine, storage medium and electronic device
PCT/CN2023/086295 WO2023226602A1 (en) 2022-05-25 2023-04-04 Virtual machine acceleration hardware adjusting method and apparatus, storage medium and electronic apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210577431.9A CN117170795A (en) 2022-05-25 2022-05-25 Method and device for adjusting acceleration hardware of virtual machine, storage medium and electronic device

Publications (1)

Publication Number Publication Date
CN117170795A true CN117170795A (en) 2023-12-05

Family

ID=88918406

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210577431.9A Pending CN117170795A (en) 2022-05-25 2022-05-25 Method and device for adjusting acceleration hardware of virtual machine, storage medium and electronic device

Country Status (2)

Country Link
CN (1) CN117170795A (en)
WO (1) WO2023226602A1 (en)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3089035A1 (en) * 2015-04-30 2016-11-02 Virtual Open Systems Virtualization manager for reconfigurable hardware accelerators
US10754702B2 (en) * 2015-08-18 2020-08-25 Telefonaktiebolaget Lm Ericsson (Publ) Technique for reconfiguring a virtual machine
CN111143023A (en) * 2018-11-05 2020-05-12 中兴通讯股份有限公司 Resource changing method and device, equipment and storage medium
CN111736950B (en) * 2020-06-12 2024-02-23 广东浪潮大数据研究有限公司 Accelerator resource adding method and related device of virtual machine

Also Published As

Publication number Publication date
WO2023226602A1 (en) 2023-11-30

Similar Documents

Publication Publication Date Title
CN110535679B (en) Slice management method, architecture, network slice sales platform and management system
CN111342992B (en) Method and system for processing equipment information change record
CN110858160B (en) Resource scheduling method and device, storage medium and processor
CN115033352A (en) Task scheduling method, device and equipment for multi-core processor and storage medium
CN115469813A (en) Data processing method and device, storage medium and electronic device
CN113312013A (en) Printing method, printing system and storage medium
CN113407254B (en) Form generation method and device, electronic equipment and storage medium
CN114398397A (en) Data processing method, device, storage medium and system
CN112748961A (en) Method and device for executing starting task
CN113885971A (en) State management method and device based on self-adaptive platform system
CN116089477B (en) Distributed training method and system
CN117170795A (en) Method and device for adjusting acceleration hardware of virtual machine, storage medium and electronic device
CN113064655B (en) BIOS network starting method and device and computer readable storage medium
CN114564249A (en) Recommendation scheduling engine, recommendation scheduling method, and computer-readable storage medium
CN110858201B (en) Data processing method and system, processor and storage medium
CN114594999B (en) Method, device, storage medium and system for issuing file
CN111126604A (en) Model training method, device, server and storage medium
CN110751204A (en) Data fusion method and device, storage medium and electronic device
CN105045629A (en) Diskless workstation equipment startup method and system
CN116339956B (en) Distribution method and device of configuration tasks, electronic equipment and storage medium
CN117687703B (en) Method, device and system for starting server, storage medium and electronic equipment
US11706131B2 (en) Information processing apparatus, information processing system, and information processing method
CN115277408B (en) Agent configuration information updating method, device, equipment and storage medium
CN117130697A (en) Method and device for fixing application on taskbar
JP2017215901A (en) Information processing device, information processing system and program

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication