CN110196754A - The direction connection method and device of a kind of GPU equipment at Linux KVM - Google Patents
The direction connection method and device of a kind of GPU equipment at Linux KVM Download PDFInfo
- Publication number
- CN110196754A CN110196754A CN201910334176.3A CN201910334176A CN110196754A CN 110196754 A CN110196754 A CN 110196754A CN 201910334176 A CN201910334176 A CN 201910334176A CN 110196754 A CN110196754 A CN 110196754A
- Authority
- CN
- China
- Prior art keywords
- gpu
- kvm
- virtual machine
- module
- straight
- 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
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/455—Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
- G06F9/45533—Hypervisors; Virtual machine monitors
- G06F9/45558—Hypervisor-specific management and integration aspects
- G06F2009/45591—Monitoring or debugging support
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
The present invention provides the direction connection method and device of a kind of GPU equipment at Linux KVM, includes the following steps: to add virtualization command to GRUB;Establish new GRUB;Create virtual machine;GP configuring U is straight-through.It is led directly under GPU equipment to KVM by virtual technology through physical machine, so that the practical diversification of GPU equipment, reduces the resources idle time of GPU equipment, increases the utilization rate of GPU equipment.
Description
Technical field
The invention belongs to GPU correlative technology fields, and in particular to a kind of direction connection method of GPU equipment at Linux KVM
And device.
Background technique
Graphics processor (English: Graphics Processing Unit, abbreviation: GPU), also known as shows core, vision
Processor, display chip are a kind of specially image operation works in game machine, PC, work station and some mobile devices
The microprocessor of work.The purposes of graphics processor be will show that information carries out conversion driving required for computer system, and to
Display provides line scan signals, controls the correct display of display, is the important member for connecting display and PC mainboard
One of part, and the important equipment of " human-computer dialogue ".
Virtualization refers to computer on the basis of virtual rather than runs on the basis of true.It is one to simplify pipe
Reason optimizes the solution of resource, and virtualization technology can expand the capacity of hardware, simplifies the re-configuration process of software.This
Planned again according to different demands kind the resource of limited fixation to reach the thinking of peak use rate, IT field just
It is called virtualization technology.GPU is substantially carried out floating-point operation and concurrent operation, and floating-point operation and concurrent operation speed can compare
As many as strong hundreds of times of CPU can allow the virtual machine operated on data center server real after GPU vitualization technology
Example is shared to carry out graphic operation, this safety and efficient desktop access mode using same or muti-piece GPU processor, is got over
It is pursued come more users.
In the prior art, GPU equipment uses relatively simple, and the standby time of the resource of GPU equipment is relatively more, to make
The utilization rate of GPU equipment is relatively low, needs to design a kind of method and leads directly under GPU equipment to KVM through physical machine, so that GPU is set
It is standby to use diversification.
Summary of the invention
For GPU equipment using relatively simple, the standby time of the resource of GPU equipment is relatively more, to make GPU equipment
The relatively low problem of utilization rate, the present invention provide the direction connection method and device of a kind of GPU equipment at Linux KVM.
The technical scheme is that
On the one hand, technical solution of the present invention provides a kind of direction connection method of GPU equipment at Linux KVM, including as follows
Step:
Virtualization command is added to boot manager GRUB;
New boot manager GRUB is established, new gurb.cfg file is generated;
Create virtual machine;
GP configuring U is straight-through.It is led directly under GPU equipment to KVM by virtual technology through physical machine, so that GPU equipment is practical
Diversification reduces the resources idle time of GPU equipment, increases the utilization rate of GPU equipment.
Further, the addition virtualization command includes: before to boot manager GRUB
Simultaneously Ethernet mode is arranged in installation RHEL-KVM.Installation RHEL7 selects Ethernet mode for ON.
Further, the creation virtual machine, before further include:
Add KVM script;
Establish storage file system.
It is further, described to establish storage file system, comprising:
OS image file is copied into local folders;
Create virtual disk.
Further, the GP configuring U is straight-through, comprising:
Check virtual machine details;
Straight-through GPU is needed by checking that the details of virtual machine are added.Start virt-manager, selects VM simultaneously
" editor -> virtual machine details " menu is clicked, selects " checking -> details " in the window newly opened.If led to
GPU is crossed, " addition hardware " button please be click;" PCI-Host device " option is selected in the window newly opened, from right side
GPU is selected in pane, if you want to delete the GPU led directly to, only need to be selected GPU and be clicked " deletion " button.
On the other hand, technical solution of the present invention provides a kind of straight-through device of GPU equipment at Linux KVM, including void
Quasi-ization order adding module, GRUB creation module, virtual machine creating module, GPU lead directly to configuration module;
Virtualization command adding module, for adding virtualization command to boot manager GRUB;
GRUB creation module, for establishing new GRUB;
Virtual machine creating module, for creating virtual machine;
GPU leads directly to configuration module, for by checking that the details GP configuring U of virtual machine is straight-through.Pass through virtual technology
It is led directly under GPU equipment to KVM through physical machine, so that the practical diversification of GPU equipment, reduces the resources idle time of GPU equipment,
Increase the utilization rate of GPU equipment.
Further, which further includes RHEL-KVM installation settings module;
RHEL-KVM installation settings module, for installing RHEL-KVM and Ethernet mode being arranged.Install RHEL7 selection with
Too net mode is ON.
Further, which further includes KVM script adding module and storage file system creation module;
KVM script adding module, for adding KVM script;
Storage file system creation module, for establishing storage file system.
Further, storage file system creation module includes copied cells and virtual disk creating unit;
Copied cells, for OS image file to be copied to local folders;
Virtual disk creating unit, for creating virtual disk.
Further, it includes that virtual machine information checks that unit and GPU lead directly to configuration unit that GPU, which leads directly to configuration module,;
Virtual machine information checks unit, for checking virtual machine details;
GPU leads directly to configuration unit, adds for the details by checking virtual machine and needs straight-through GPU.
As can be seen from the above technical solutions, straight-through through physical machine the invention has the following advantages that by VT-D technology
Under GPU equipment to KVM, so that GPU equipment uses diversification.The standby time for reducing the resource of GPU equipment, increase GPU
The utilization rate of equipment.Pressure, performance, stability of the GPU at KVM can also be equally tested, increases diversified method to survey
Try component compatibility.
In addition, design principle of the present invention is reliable, structure is simple, has very extensive application prospect.
It can be seen that compared with prior art, the present invention have substantive distinguishing features outstanding and it is significant ground it is progressive, implementation
Beneficial effect be also obvious.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below
There is attached drawing needed in technical description to be briefly described, it should be apparent that, for those of ordinary skill in the art
Speech, without creative efforts, is also possible to obtain other drawings based on these drawings.
Fig. 1 is a kind of schematic flow of direction connection method of the GPU equipment of one embodiment of the invention at Linux KVM
Figure.
Fig. 2 is a kind of schematic frame of straight-through device of the GPU equipment of one embodiment of the invention at Linux KVM
Figure.
Specific embodiment
Technical solution in order to enable those skilled in the art to better understand the present invention, below in conjunction with of the invention real
The attached drawing in example is applied, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described implementation
Example is only a part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, this field is common
Technical staff's every other embodiment obtained without making creative work, all should belong to protection of the present invention
Range.
The Key Term occurred in the present invention is explained below.
Embodiment one
As shown in Figure 1, technical solution of the present invention provides a kind of direction connection method of GPU equipment at Linux KVM, including such as
Lower step:
S1: installation RHEL-KVM is simultaneously arranged Ethernet mode;
In this step, installation RHEL7 selects Ethernet mode for ON.
Use Base Environment=" Virtualization Host " (selection related software packet) selection Base
Environment is " Server+UI " and selects all software packages under it.
S2: addition virtualization command to boot manager GRUB;
It should be noted that after completing installation, addition " nouveau.modeset=0intel_iommu=on " row, such as
Shown in lower:
#vi/etc/default/grub
GRUB_CMDLINE_LINUX=" rd.lvm.lv=rhel_dhcp-10-24-169-21/swap
Vconsole.font=latarcyrheb-sun16-rd.lvm.lv=rhel_dhcp-10-2 4-169-21/
root
Vconsole.keymap=us $ ([- x/usr/sbin/rhcrashkernel-param] &&/usr/sbin/
Rhcrashkernel-param | | :) rhgb quiet nouveau.modeset=0intel_iommu=on ";
S3: new GRUB is established;
#grub2-mkconfig-o/boot/grub2/grub.cfg is executed, new grub.cfg file is generated;
Reboot Host;
S4: addition KVM script;
Following ini-aliza-ons is copied as into a scriptlet, and runs a script.
#!/bin/bash
service iptables stop
service NetworkManager stop
modprobe kvm-intel
modprobe vfio-pci
rmmod nouveau
rmmod nvidia
S5: storage file system is established.
OS image file is copied into local folders (such as~nvidia/images)
Create virtual disk:
Qemu-img create-f qcow2~nvidia/images/vm1.img 40G
e.g:qemu-img create-f qcow2/home/NMOS/Images/Win7x64_1.img 50G
Any VM IN/root is not created.
S6: creation virtual machine;
It should be noted that the process of creation virtual machine generally comprises: obtaining the information of target virtual machine to be created;Root
Filter is determined according to the information of the target virtual machine of acquisition, and the calculate node in calling system executes the filtering function of filter
And the calculate node for creating target virtual machine is determined according to implementing result, it is empty that target is created in determining calculate node
Quasi- machine.
S7: GP configuring U is straight-through.It is led directly under GPU equipment to KVM by virtual technology through physical machine, so that GPU equipment
Practical diversification reduces the resources idle time of GPU equipment, increases the utilization rate of GPU equipment.
Straight-through GPU is needed by checking that the details of virtual machine are added.Start virt-manager, selects VM simultaneously
" editor -> virtual machine details " menu is clicked, selects " checking -> details " in the window newly opened.If led to
GPU is crossed, " addition hardware " button please be click;" PCI-Host device " option is selected in the window newly opened, from right side
GPU is selected in pane, if you want to delete the GPU led directly to, only need to be selected GPU and be clicked " deletion " button.
Embodiment two
As shown in Fig. 2, technical solution of the present invention provides a kind of straight-through device of GPU equipment at Linux KVM, including void
Quasi-ization order adding module 12, GRUB creation module 13, virtual machine creating module 16, GPU lead directly to configuration module 17;
Virtualization command adding module 12, for adding virtualization command to GRUB;
GRUB creation module 13, for establishing new GRUB;
Virtual machine creating module 16, for creating virtual machine;
GPU leads directly to configuration module 17, for by checking that the details GP configuring U of virtual machine is straight-through.Pass through virtual skill
Art is led directly under GPU equipment to KVM through physical machine, so that the practical diversification of GPU equipment, when reducing the resources idle of GPU equipment
Between, increase the utilization rate of GPU equipment.
The device further includes RHEL-KVM installation settings module 11;
RHEL-KVM installation settings module 11, for installing RHEL-KVM and Ethernet mode being arranged.RHEL7 choosing is installed
Selecting Ethernet mode is ON.
The device further includes KVM script adding module 14 and storage file system creation module 15;
KVM script adding module 14, for adding KVM script;
Storage file system creation module 15, for establishing storage file system.
Storage file system creation module 15 includes copied cells and virtual disk creating unit;
Copied cells, for OS image file to be copied to local folders;
Virtual disk creating unit, for creating virtual disk.
It includes that virtual machine information checks that unit and GPU lead directly to configuration unit that GPU, which leads directly to configuration module 17,;
Virtual machine information checks unit, for checking virtual machine details;
GPU leads directly to configuration unit, adds for the details by checking virtual machine and needs straight-through GPU.
It by VT-D technology, is led directly under GPU equipment to KVM through physical machine, so that GPU equipment uses diversification.It reduces
Standby time of the resource of GPU equipment, increase the utilization rate of GPU equipment.Pressure of the GPU at KVM can also equally be tested
Power, performance, stability increase diversified method and carry out test component compatibility.
Although by reference to attached drawing and combining the mode of preferred embodiment to the present invention have been described in detail, the present invention
It is not limited to this.Without departing from the spirit and substance of the premise in the present invention, those of ordinary skill in the art can be to the present invention
Embodiment carry out various equivalent modifications or substitutions, and these modifications or substitutions all should in covering scope of the invention/appoint
What those familiar with the art in the technical scope disclosed by the present invention, can easily think of the change or the replacement, answer
It is included within the scope of the present invention.Therefore, protection scope of the present invention is answered described is with scope of protection of the claims
It is quasi-.
Claims (10)
1. a kind of direction connection method of GPU equipment at Linux KVM, which comprises the steps of:
Virtualization command is added to boot manager GRUB;
It establishes new boot manager GRUB and restarts;
Create virtual machine;
GP configuring U is straight-through.
2. direction connection method of the GPU equipment according to claim 1 at Linux KVM, which is characterized in that the addition
Virtualization command includes: before to boot manager GRUB
Simultaneously Ethernet mode is arranged in installation RHEL-KVM.
3. direction connection method of the GPU equipment according to claim 1 at Linux KVM, which is characterized in that the creation
Virtual machine, before further include:
Add KVM script;
Establish storage file system.
4. direction connection method of the GPU equipment according to claim 3 at Linux KVM, which is characterized in that the foundation
Storage file system, comprising:
OS image file is copied into local folders;
Create virtual disk.
5. direction connection method of the GPU equipment according to claim 1 at Linux KVM, which is characterized in that the configuration
GPU is straight-through, comprising:
Check virtual machine details;
Straight-through GPU is needed by checking that the details of virtual machine are added.
6. a kind of straight-through device of GPU equipment at Linux KVM, which is characterized in that including virtualization command adding module,
GRUB creation module, virtual machine creating module, GPU lead directly to configuration module;
Virtualization command adding module, for adding virtualization command to boot manager GRUB;
GRUB creation module, for establishing new boot manager GRUB;
Virtual machine creating module, for creating virtual machine;
GPU leads directly to configuration module, for by checking that the details GP configuring U of virtual machine is straight-through.
7. straight-through device of the GPU equipment according to claim 6 at Linux KVM, which is characterized in that the device also wraps
Include RHEL-KVM installation settings module;
RHEL-KVM installation settings module, for installing RHEL-KVM and Ethernet mode being arranged.
8. straight-through device of the GPU equipment according to claim 6 at Linux KVM, which is characterized in that the device also wraps
Include KVM script adding module and storage file system creation module;
KVM script adding module, for adding KVM script;
Storage file system creation module, for establishing storage file system.
9. straight-through device of the GPU equipment according to claim 8 at Linux KVM, which is characterized in that storage file system
Creation module of uniting includes copied cells and virtual disk creating unit;
Copied cells, for OS image file to be copied to local folders;
Virtual disk creating unit, for creating virtual disk.
10. straight-through device of the GPU equipment according to claim 6 at Linux KVM, which is characterized in that GPU is straight-through to be matched
Setting module includes that virtual machine information checks that unit and GPU lead directly to configuration unit;
Virtual machine information checks unit, for checking virtual machine details;
GPU leads directly to configuration unit, adds for the details by checking virtual machine and needs straight-through GPU.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910334176.3A CN110196754A (en) | 2019-04-24 | 2019-04-24 | The direction connection method and device of a kind of GPU equipment at Linux KVM |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910334176.3A CN110196754A (en) | 2019-04-24 | 2019-04-24 | The direction connection method and device of a kind of GPU equipment at Linux KVM |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110196754A true CN110196754A (en) | 2019-09-03 |
Family
ID=67752061
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910334176.3A Pending CN110196754A (en) | 2019-04-24 | 2019-04-24 | The direction connection method and device of a kind of GPU equipment at Linux KVM |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110196754A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113835946A (en) * | 2021-10-26 | 2021-12-24 | 北京淳中科技股份有限公司 | Pressure testing method for data exchange |
CN115659290A (en) * | 2022-11-07 | 2023-01-31 | 海光信息技术股份有限公司 | Code protection system, method, virtual system architecture, chip and electronic equipment |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103577250A (en) * | 2013-11-15 | 2014-02-12 | 浪潮(北京)电子信息产业有限公司 | Device direction connection method applied to virtual machine |
CN104461685A (en) * | 2014-11-19 | 2015-03-25 | 华为技术有限公司 | Virtual machine processing method and virtual computer system |
US20150213275A1 (en) * | 2014-01-30 | 2015-07-30 | Raytheon Pikewerks Corporation | Context aware integrated display keyboard video mouse controller |
CN106803794A (en) * | 2017-01-22 | 2017-06-06 | 郑州云海信息技术有限公司 | A kind of kvm virtual machine network interface card direction connection methods and its device for main frame |
CN109558210A (en) * | 2018-11-21 | 2019-04-02 | 郑州云海信息技术有限公司 | A kind of method and system of virtual machine applied host machine GPU equipment |
-
2019
- 2019-04-24 CN CN201910334176.3A patent/CN110196754A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103577250A (en) * | 2013-11-15 | 2014-02-12 | 浪潮(北京)电子信息产业有限公司 | Device direction connection method applied to virtual machine |
US20150213275A1 (en) * | 2014-01-30 | 2015-07-30 | Raytheon Pikewerks Corporation | Context aware integrated display keyboard video mouse controller |
CN104461685A (en) * | 2014-11-19 | 2015-03-25 | 华为技术有限公司 | Virtual machine processing method and virtual computer system |
CN106803794A (en) * | 2017-01-22 | 2017-06-06 | 郑州云海信息技术有限公司 | A kind of kvm virtual machine network interface card direction connection methods and its device for main frame |
CN109558210A (en) * | 2018-11-21 | 2019-04-02 | 郑州云海信息技术有限公司 | A kind of method and system of virtual machine applied host machine GPU equipment |
Non-Patent Citations (1)
Title |
---|
都市凡尘365: "KVM+显卡直通(passthrough)配置方法及问题说明", 《HTTPS://WWW.JIANSHU.COM/P/FFC37624E5AE》 * |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113835946A (en) * | 2021-10-26 | 2021-12-24 | 北京淳中科技股份有限公司 | Pressure testing method for data exchange |
CN113835946B (en) * | 2021-10-26 | 2023-12-12 | 北京淳中科技股份有限公司 | Pressure test method for data exchange |
CN115659290A (en) * | 2022-11-07 | 2023-01-31 | 海光信息技术股份有限公司 | Code protection system, method, virtual system architecture, chip and electronic equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10754436B2 (en) | Remoting or localizing touch gestures at a virtualization client agent | |
US5627964A (en) | Reduce or fail-safe bootstrapping of a system having a graphical user interface | |
US8830228B2 (en) | Techniques for enabling remote management of servers configured with graphics processors | |
CN112861057B (en) | Page rendering method, device, equipment and storage medium based on applet | |
CN110515667A (en) | A kind of terminal dual system display changeover method and terminal dual system based on linux kernel | |
CN109168328B (en) | Virtual machine migration method and device and virtualization system | |
CN106020829A (en) | System and method for switching between environments in multi-environment operating system | |
WO2014058989A1 (en) | Virtualization of input devices | |
CN106796507A (en) | The multiple operating system environment in computing device is supported without Content Transformation | |
CN110196754A (en) | The direction connection method and device of a kind of GPU equipment at Linux KVM | |
JPH0785217B2 (en) | Method and apparatus for supporting window display and removal | |
CN112486522A (en) | Deployment method and device of OpenStack bare machine with intelligent network card | |
CN103064724A (en) | Virtual mechanism constructing method and device | |
CN111459606A (en) | Method for quickly creating virtual machine under virtualization and server | |
CN111857961A (en) | Display card transparent transmission method, virtual desktop management system and computer equipment | |
CN104102490A (en) | Method for realizing CEN/XFS SP on basis of Windows service | |
US10198220B2 (en) | Storage resource provisioning for a test framework | |
CN111176964A (en) | Virtualization platform hardware compatibility testing method | |
CN114443073A (en) | Device and method for rapidly deploying bare metal server | |
CN103632090A (en) | Method for operating virtual firewall on virtual machine | |
US7886304B1 (en) | Method and system implementing efficient remote procedure call and emulation system therefor | |
CN110045967B (en) | Serial graphical interface interaction method and device of firmware layer | |
US20140195590A1 (en) | Managing a logical client for a virtual machine | |
CN114595036A (en) | Virtualization method and system based on domestic cloud computing operating system | |
CN111008041B (en) | Command processing method and device for host, electronic equipment and storage medium |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190903 |
|
RJ01 | Rejection of invention patent application after publication |