CN116795440A - Multi-type display card driving adaptation method, device and equipment based on virtualization technology - Google Patents

Multi-type display card driving adaptation method, device and equipment based on virtualization technology Download PDF

Info

Publication number
CN116795440A
CN116795440A CN202310782727.9A CN202310782727A CN116795440A CN 116795440 A CN116795440 A CN 116795440A CN 202310782727 A CN202310782727 A CN 202310782727A CN 116795440 A CN116795440 A CN 116795440A
Authority
CN
China
Prior art keywords
card
display card
virtual machine
preset
target
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
CN202310782727.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.)
Shenzhen Ruiyun Technology Co ltd
Original Assignee
Shenzhen Ruiyun Technology Co ltd
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 Shenzhen Ruiyun Technology Co ltd filed Critical Shenzhen Ruiyun Technology Co ltd
Priority to CN202310782727.9A priority Critical patent/CN116795440A/en
Publication of CN116795440A publication Critical patent/CN116795440A/en
Pending legal-status Critical Current

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Controls And Circuits For Display Device (AREA)

Abstract

The application relates to the technical field of program software, and particularly discloses a method, a device and equipment for adapting multi-type display card drive based on a virtualization technology, wherein the method comprises the following steps: firstly, determining a target display card ID; then configuring a target display card driver in a preset virtual machine, wherein the target display card driver can drive a display card with an ID (identity) being the ID of the target display card; and modifying a configuration file in the preset virtual machine through a preset virtualization component, so that when the preset virtual machine carries out video card transparent transmission, determining the actual ID of the video card in the transparent transmission process as the target video card ID, and driving the video card through the target video card drive. Therefore, in the process of transparent transmission of the display cards, all the display cards can be driven by one target display card to complete tasks, the installation of the display card driving is simplified, and the subsequent operation and maintenance are faster and simpler.

Description

Multi-type display card driving adaptation method, device and equipment based on virtualization technology
Technical Field
The application relates to the technical field of program software, in particular to a method, a device and equipment for adapting multi-type display card drive based on a virtualization technology.
Background
With the rapid development of cloud computing, the demand for graphics card computing is increasing. For example, when a cloud desktop is used, the desktop is generally released outwards through a mode of virtualized templates and graphic card transparent transmission, different graphic card drivers are required to be installed in a virtual machine for unused graphic cards, if only one type of graphic card is arranged in one data center, only one corresponding driver is required to be installed in the templates, if multiple types of graphic cards are arranged in one data center, multiple templates are required to be deployed, each template corresponds to one type of graphic card, and complex machine room operation and maintenance are also brought.
Disclosure of Invention
In view of the above, the present application aims to provide a method, a device and equipment for adapting multi-type graphics card drive based on virtualization technology, so as to overcome the problems of complex process and high difficulty in operation and maintenance of machine room caused by the need of installing multiple types of graphics card drive in the process of transparent transmission of the graphics card.
In order to achieve the above purpose, the application adopts the following technical scheme:
in a first aspect, an embodiment of the present application provides a method for adapting a multi-type graphics card driver based on a virtualization technology, including:
determining the ID of a target display card;
configuring a target display card driver in a preset virtual machine, wherein the target display card driver can drive a display card with an ID (identity) being the ID of the target display card;
and modifying a configuration file in the preset virtual machine through a preset virtualization component, so that when the preset virtual machine carries out video card transparent transmission, determining the actual ID of the video card in the transparent transmission process as the target video card ID, and driving the video card through the target video card driver.
Further, the determining the target graphics card ID includes:
determining a display card ID on a server of a preset data center;
and determining any one ID of the display card IDs on the server of the preset data center as the target ID.
Further, the preset virtualization component includes libvirt.
Further, the modifying, through the preset virtualization component, the configuration file in the preset virtual machine includes:
and modifying the configuration file in the preset virtual machine through the virsh command of the libvirt.
Further, the configuration file comprises an xml configuration file.
Further, the modifying, by a preset virtualization component, the configuration file in the preset virtual machine includes:
modifying a configuration file in one preset virtual machine through a preset virtualization component, and taking the virtual machine with the configuration file modified as a template;
the virtual machines are published as templates to modify configuration files with the remaining virtual machines in the data center.
In a second aspect, an embodiment of the present application further provides a multi-type graphics card driving adapting device based on a virtualization technology, including:
the determining module is used for determining the ID of the target display card;
the driving module is used for configuring a target display card driver in a preset virtual machine, and the target display card driver corresponds to the target display card ID;
and the modification module is used for modifying the configuration file in the preset virtual machine through the preset virtualization component so that the actual ID of the display card in the transparent transmission process is determined as the target display card ID when the preset virtual machine is transparent to the display card, and the display card is driven through the target display card.
In a third aspect, an embodiment of the present application further provides a multi-type graphics card driver adapting device based on a virtualization technology, where the multi-type graphics card driver adapting device includes a processor and a memory, where the processor is connected to the memory:
the processor is used for calling and executing the program stored in the memory;
the memory is used for storing the program, and the program is at least used for executing the multi-type display card driving adaptation method based on the virtualization technology.
The application relates to the technical field of program software, and particularly discloses a method, a device and equipment for adapting multi-type display card drive based on a virtualization technology, wherein the method comprises the following steps: firstly, determining a target display card ID; then configuring a target display card driver in a preset virtual machine, wherein the target display card driver corresponds to the target display card ID; and modifying a configuration file in the preset virtual machine through a preset virtualization component, so that when the preset virtual machine carries out video card transparent transmission, determining the actual ID of the video card in the transparent transmission process as the target video card ID, and driving the video card through the target video card drive. Therefore, in the process of transparent transmission of the display cards, all the display cards can be driven by one target display card to complete tasks, the installation of the display card driving is simplified, and the subsequent operation and maintenance are faster and simpler.
Drawings
In order to more clearly illustrate the embodiments of the application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic flow chart of a method for adapting multi-type graphics card drive based on virtualization technology according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of a multi-type graphics card driving adapter device based on a virtualization technology according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of a multi-type graphics card driving adapter device based on a virtualization technology according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the technical solutions of the present application will be described in detail below. It will be apparent that the described embodiments are only some, but not all, embodiments of the application. All other embodiments, based on the examples herein, which are within the scope of the application as defined by the claims, will be within the scope of the application as defined by the claims.
Fig. 1 is a flow chart of a method for adapting a multi-type graphics card driver based on a virtualization technology according to an embodiment of the present application, referring to fig. 1, the method may include the following steps:
s101, determining the ID of the target display card.
Specifically, in a specific application scenario of cloud desktop, cloud rendering and cloud game, a plurality of data centers are involved, each data center is correspondingly provided with a machine room, hardware such as a server is deployed in the data centers, and programs or software related to a virtual machine, such as software running the virtual machine, are deployed on the server.
In a scenario involving a cloud desktop, for example, the desktop is typically published externally by way of a virtualized template and graphics card pass-through. In the process of the transparent transmission of the display card or after the transparent transmission is finished, the virtual machine needs to operate the transparent transmission of the display card, and the corresponding display card drive is needed to drive the display card.
In the above application scenario, when determining the target video card ID, any one of the entity video cards included in the server of the data center may be used as the target video card ID.
S102, configuring a target display card driver in a preset virtual machine.
And the target display card drives a display card with the ID of the target display card.
After determining the target video card ID, configuring a target video card driver corresponding to the target video card ID on the virtual machine, namely configuring a driver capable of driving the video card with the ID as the target video card ID on the virtual machine so as to ensure that the video card with the ID as the target video card ID can run on the virtual machine.
S103, modifying a configuration file in the preset virtual machine through the preset virtualization component.
Specifically, through a preset virtualization component, a configuration file in a preset virtual machine is modified, so that when the preset virtual machine carries out video card transparent transmission, the actual ID of the video card in the transparent transmission process is determined as a target video card ID, and the transparent transmission video card is driven through the target video card.
The application relates to the technical field of program software, and particularly discloses a method, a device and equipment for adapting multi-type display card drive based on a virtualization technology, wherein the method comprises the following steps: firstly, determining a target display card ID; then configuring a target display card driver in a preset virtual machine, wherein the target display card driver corresponds to the target display card ID; and modifying a configuration file in the preset virtual machine through a preset virtualization component, so that when the preset virtual machine carries out video card transparent transmission, determining the actual ID of the video card in the transparent transmission process as the target video card ID, and driving the video card through the target video card drive. Therefore, in the process of transparent transmission of the display cards, all the display cards can be driven by one target display card to complete tasks, the installation of the display card driving is simplified, and the subsequent operation and maintenance are faster and simpler.
In some embodiments, the xml configuration file of the virtual machine may be modified by a virsh command of a virtualized component such as libvirt, thereby implementing quick and accurate configuration modification of the virtual machine.
The above procedure for modifying xml configuration files of a virtual machine by a virsh command of a virtualized component such as libvirt will be described in detail in a complete embodiment:
first, the first step: and determining the ID of the target display card, for example, planning the ID of the fixed display card device to be 10de:21c4.
Then, the second step: editing virtual machine configuration by virtualized component libvirt: virsh edit instance-000001. For example, the modification of the configuration file in the virtual machine is realized through the following code files, so that when the virtual machine passes through the display cards, all the display card IDs are determined to be 10de:21c4.
The method comprises the following steps:
<qemu:commandline>
<qemu:arg value='-set'/>
<qemu:argvalue='device.hostdev0.x-pci-vendor-id=0x10de'/>
<qemu:arg value='-set'/>
<qemu:argvalue='device.hostdev0.x-pci-device-id=0x21c4'/>
</qemu:commandline>
and a third step of: the virtual machine is restarted and the RTX1660s graphics card driver is installed, and then the virtual machine is templated.
Fourth step: and releasing the virtual machines based on the mode of the template and the graphics card transmission, wherein each virtual machine needs to execute the second step operation and then is started. Therefore, different types of display cards at the bottom layer are shielded, and the situation that the corresponding display cards are installed in the virtual machine for driving all the different types of display cards in a transparent way is not needed.
It should be noted that, when the display cards are matched and driven, the display card IDs are used for identification in the prior art, that is, different types of display cards have different display card IDs, and when the display cards are matched and driven, different display card drives are matched for different display card IDs, so that various display cards perfectly run under the driving of the respective drives.
In practical application, because the related computing tasks are different, the computing of the cloud desktop, the cloud rendering, the cloud game and the like in the application does not need some special functions of the display card, namely only the display card is needed to realize some basic functions thereof, so the requirements on the perfection degree of the display card driving to the operation of the display card are not high. Therefore, the calculation task can be realized by driving different types of display cards through the set target display card driver.
In the application, under the scenes of a high-performance cloud desktop and the like, by combining a virtualization technology (such as libvirt, qemu-kvm), when the graphics card is transmitted, a fixed graphics card device id is virtualized in a virtualization layer so as to achieve the diversity of shielding the underlying graphics card, so that a virtual machine operating system only recognizes the fixed graphics card device id to achieve the model of the fixed graphics card in the virtual machine (the graphics card device id can identify the model of the graphics card, for example, 10de:21c4 identifies the-Geforce GTX 1660 SUPER-type graphics card), and the virtual machine operating system only needs to install a graphics card driver of RTX1660s in a virtual machine template so as to achieve the purpose of shielding the type of the underlying graphics card, and reduce the working dimension of the adaptive graphics card driver installation, no matter which the graphics card is transmitted into the virtual machine.
Based on the same inventive concept, the present application further provides a multi-type graphics card driving adapting device based on a virtualization technology, and fig. 2 is a schematic structural diagram of the multi-type graphics card driving adapting device based on a virtualization technology provided by the embodiment of the present application, as shown in fig. 2, the multi-type graphics card driving adapting device based on a virtualization technology provided by the present application includes:
the determining module 21 is configured to determine the target graphics card ID.
The driving module 22 is configured to configure a target graphics card driver in a preset virtual machine, where the target graphics card driver corresponds to the target graphics card ID.
The modifying module 23 is configured to modify, through a preset virtualization component, a configuration file in the preset virtual machine, so that when the preset virtual machine performs graphics card transparent transmission, an actual ID of a graphics card in the transparent transmission process is determined as the target graphics card ID, and the graphics card is driven through the target graphics card drive.
The application provides a multi-type display card driving adapting device based on a virtualization technology, which comprises the steps that a determining module 21 is used for determining a target display card ID; then, configuring a target display card driver in a preset virtual machine through a driving module 22, wherein the target display card driver corresponds to the target display card ID; and modifying the configuration file in the preset virtual machine through a preset virtualization component by a modification module 23, so that when the preset virtual machine carries out the transparent transmission of the display card, the actual ID of the display card in the transparent transmission process is determined as the target display card ID, and the display card is driven through the target display card drive. Therefore, in the process of transparent transmission of the display cards, all the display cards can be driven by one target display card to complete tasks, the installation of the display card driving is simplified, and the subsequent operation and maintenance are faster and simpler.
The specific implementation manner of the multi-type graphics card driving adapting device based on the virtualization technology provided by the embodiment of the present application may refer to the implementation manner of the multi-type graphics card driving adapting method based on the virtualization technology in any of the above embodiments, which is not described herein.
Further, the specific process of determining the target graphics card ID by the determining module 21 includes: firstly, determining a display card ID on a server of a preset data center; and then determining any one ID in the display card IDs on the server of the preset data center as a target ID.
Wherein the preset virtualization component comprises libvirt, and the modification module 23 modifies the configuration file comprising xml and the like in the preset virtual machine through a virsh command of the libvirt.
In some embodiments, the modification module 23 modifies a configuration file in a preset virtual machine through a preset virtualization component, and takes the virtual machine after the configuration file modification as a template; and publishing the virtual machines as templates to modify configuration files with the remaining virtual machines in the data center.
Based on the same inventive concept, the present application further provides a multi-type graphics card driving adapting device based on a virtualization technology, and fig. 3 is a schematic structural diagram of the multi-type graphics card driving adapting device based on a virtualization technology provided by the embodiment of the present application, as shown in fig. 3, where the multi-type graphics card driving adapting device based on a virtualization technology provided by the present application includes:
comprising a processor 31 and a memory 32, said processor 31 being connected to the memory 32. Wherein the processor 31 is configured to call and execute a program stored in the memory 32; and a memory 32 for storing the program at least for executing the multi-type graphics card drive adaptation method based on the virtualization technology provided in the above-described method embodiment.
The specific implementation manner of the multi-type graphics card driving adapting device based on the virtualization technology provided by the embodiment of the present application may refer to the implementation manner of the multi-type graphics card driving adapting method based on the virtualization technology in any of the above embodiments, which is not described herein.
It is to be understood that the same or similar parts in the above embodiments may be referred to each other, and that in some embodiments, the same or similar parts in other embodiments may be referred to.
It should be noted that in the description of the present application, the terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. Furthermore, in the description of the present application, unless otherwise indicated, the meaning of "plurality" means at least two.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and further implementations are included within the scope of the preferred embodiment of the present application in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present application.
It is to be understood that portions of the present application may be implemented in hardware, software, firmware, or a combination thereof. In the above-described embodiments, the various steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, may be implemented using any one or combination of the following techniques, as is well known in the art: discrete logic circuits having logic gates for implementing logic functions on data signals, application specific integrated circuits having suitable combinational logic gates, programmable Gate Arrays (PGAs), field Programmable Gate Arrays (FPGAs), and the like.
Those of ordinary skill in the art will appreciate that all or a portion of the steps carried out in the method of the above-described embodiments may be implemented by a program to instruct related hardware, where the program may be stored in a computer readable storage medium, and where the program, when executed, includes one or a combination of the steps of the method embodiments.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing module, or each unit may exist alone physically, or two or more units may be integrated in one module. The integrated modules may be implemented in hardware or in software functional modules. The integrated modules may also be stored in a computer readable storage medium if implemented in the form of software functional modules and sold or used as a stand-alone product.
The above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, or the like.
In the description of the present specification, a description referring to terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present application. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiments or examples. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
While embodiments of the present application have been shown and described above, it will be understood that the above embodiments are illustrative and not to be construed as limiting the application, and that variations, modifications, alternatives and variations may be made to the above embodiments by one of ordinary skill in the art within the scope of the application.

Claims (8)

1. A method for adapting multi-type display card drive based on a virtualization technology is characterized by comprising the following steps:
determining the ID of a target display card;
configuring a target display card driver in a preset virtual machine, wherein the target display card driver can drive a display card with an ID (identity) being the ID of the target display card;
and modifying a configuration file in the preset virtual machine through a preset virtualization component, so that when the preset virtual machine carries out video card transparent transmission, determining the actual ID of the video card in the transparent transmission process as the target video card ID, and driving the video card through the target video card driver.
2. The method for adapting multi-type graphics card driver based on virtualization technology according to claim 1, wherein determining the target graphics card ID comprises:
determining a display card ID on a server of a preset data center;
and determining any one ID of the display card IDs on the server of the preset data center as the target ID.
3. The method for adapting a multi-type graphics card driver based on a virtualization technology according to claim 1, wherein the preset virtualization component comprises libvirt.
4. The method for adapting multi-type graphics card driver based on virtualization technology according to claim 3, wherein said modifying, by a preset virtualization component, a configuration file in a preset virtual machine comprises:
and modifying the configuration file in the preset virtual machine through the virsh command of the libvirt.
5. The method of claim 1, wherein the configuration file comprises an xml configuration file.
6. The method for adapting multi-type graphics card driver based on virtualization technology according to claim 1, wherein said modifying, by a preset virtualization component, a configuration file in the preset virtual machine comprises:
modifying a configuration file in one preset virtual machine through a preset virtualization component, and taking the virtual machine with the configuration file modified as a template;
the virtual machines are published as templates to modify configuration files with the remaining virtual machines in the data center.
7. A multi-type graphics card drive adaptation device based on a virtualization technology, comprising:
the determining module is used for determining the ID of the target display card;
the driving module is used for configuring a target display card driver in a preset virtual machine, and the target display card driver corresponds to the target display card ID;
and the modification module is used for modifying the configuration file in the preset virtual machine through the preset virtualization component so that the actual ID of the display card in the transparent transmission process is determined as the target display card ID when the preset virtual machine is transparent to the display card, and the display card is driven through the target display card.
8. The utility model provides a many types of display card drive adaptation equipment based on virtualization technique which characterized in that includes treater and memory, the treater links to each other with the memory:
the processor is used for calling and executing the program stored in the memory;
the memory is configured to store the program, and the program is configured to at least execute the multi-type graphics card driving adaptation method based on the virtualization technology as set forth in any one of claims 1 to 6.
CN202310782727.9A 2023-06-28 2023-06-28 Multi-type display card driving adaptation method, device and equipment based on virtualization technology Pending CN116795440A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310782727.9A CN116795440A (en) 2023-06-28 2023-06-28 Multi-type display card driving adaptation method, device and equipment based on virtualization technology

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310782727.9A CN116795440A (en) 2023-06-28 2023-06-28 Multi-type display card driving adaptation method, device and equipment based on virtualization technology

Publications (1)

Publication Number Publication Date
CN116795440A true CN116795440A (en) 2023-09-22

Family

ID=88049395

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310782727.9A Pending CN116795440A (en) 2023-06-28 2023-06-28 Multi-type display card driving adaptation method, device and equipment based on virtualization technology

Country Status (1)

Country Link
CN (1) CN116795440A (en)

Similar Documents

Publication Publication Date Title
KR101296025B1 (en) Improving nested virtualization performance in a computer system
DE102012218379B4 (en) Paravirtualized virtual GPU
US9823940B2 (en) Reconfiguring a snapshot of a virtual machine
US8635395B2 (en) Method of suspending and resuming virtual machines
US20110246988A1 (en) Hypervisor for starting a virtual machine
US8904159B2 (en) Methods and systems for enabling control to a hypervisor in a cloud computing environment
US20150339144A1 (en) Maintaining virtual hardware device id in a virtual machine
US11132231B2 (en) Reconfiguring processing groups for cascading data workloads
CN106201653A (en) A kind of method that vmware virtual machine turns kvm virtual machine
CN108255574A (en) A kind of virtual machine migration method and device
US20150007174A1 (en) Single click host maintenance
WO2017045272A1 (en) Virtual machine migration method and device
US20230116221A1 (en) Virtual machine update while keeping devices attached to the virtual machine
CN106598658A (en) Method for reducing ghost file of Windows to virtual machine
CN116560803B (en) Resource management method and related device based on SR-IOV
US10635560B2 (en) Techniques for accurately apprising a user of progress in booting a virtual appliance
CN116795440A (en) Multi-type display card driving adaptation method, device and equipment based on virtualization technology
US11106380B2 (en) Migration of storage for workloads between desktop and cloud environments
CN111752623B (en) Display configuration method, device, electronic equipment and readable storage medium
US11080082B2 (en) Cross-hypervisor virtual machine conversion
US11238015B2 (en) Instant hyper-v streaming
CN110362324A (en) A kind of network interface card upgrade method and device
CN114064202A (en) Hard disk mounting method, system, device and medium
CN111190693B (en) Method and device for building cloud platform based on Kunpeng platform
CN111787065B (en) Cloud desktop deployment method and cloud desktop system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination