Jump to content

where to get device, and bus ids for gpu passthrough?

I saw a command for virtual box gpu passthrough, and would like to try it but i do not know where to find the required gpu info. 

 

the command is 

 

vboxmanage --pciattach bus number, device and function id. 

 

so where would i get these ids. virtual box 6.1 with ubuntu 16.04 host, windowd 7 guest.

 

to undo the command would it be 

 

--pcidetach (same ids?)

 

want to try this to see if will work for a few windows games.

 

 

main rig:

CPU: 8086k @ 4.00ghz-4.3 boost

PSU: 750 watt psu gold (Corsair rm750)

gpu:axle p106-100 6gbz msi p104-100 @ 1887+150mhz oc gpu clock, 10,012 memory clock*2(sli?) on prime w coffee lake igpu

Mobo: Z390 taichi ultimate

Ram: 2x8gb corsair vengence lpx @3000mhz speed

case: focus G black

OS: ubuntu 16.04.6, and umix 20.04

Cooler: mugen 5 rev b,

Storage: 860 evo 1tb/ 120 gb corsair force nvme 500

 

backup

8gb ram celeron laptop/860 evo 500gb

Link to comment
Share on other sites

Link to post
Share on other sites

3 hours ago, Snowarch said:

I saw a command for virtual box gpu passthrough, and would like to try it but i do not know where to find the required gpu info. 

 

the command is 

 

vboxmanage --pciattach bus number, device and function id. 

 

so where would i get these ids. virtual box 6.1 with ubuntu 16.04 host, windowd 7 guest.

 

to undo the command would it be 

 

--pcidetach (same ids?)

 

want to try this to see if will work for a few windows games.

 

 

VirtualBox PCI Passthrough support, which is essentially what you want, is very limited in terms of what form of hardware it will support. Although I did find some documentation on the matter:
https://www.virtualbox.org/manual/ch09.html#pcipassthrough
There are chapters for any thing you want to do within VirtualBox. 

My Rig: 

CPU: Intel i5 2500k 4 Cores, 4 Threads @ 4.5ghz ( asus uefi regulates BIOS and adjusts it, there is no manual option, so I can't get any higher than 4.5, but I theoretically should be able to get higher once I get a voltage "changeable" mobo

MOBO: Asus P8Z68 LE

RAM: Kingston HyperX Predator 2133mhz ddr3 2x8 16GB

GPU: GTX 980 TI 150+ core, 100-150 ( I forgot )+ mem ( OC ) 

HDD: 500GB 3D MLC Samsung SSD ( soon ) + 2tb 7200rpm Seagate Constellation ES.2 SAS / LSI MegaRaid MR Raid/SAS Controller

CASE: Phanteks P350X

OS: Windows 10 64-bit / Void Linux 

PERIPHERALS: IBM Model M 1984, Logitech G703 Mouse, Logitech G502 Mouse, Philips SHP9500 w/ V-Moda Boom Pro hooked up to my Sony AMP ( forgot model name, to lazy to find out ) 

 

 

 

Laptop: Gateway P-7805u FX 

CPU: 2.26GHz Intel Core 2 Duo P8400 2c/2t

RAM: 8GB DDR2 1066mhz sodimm 

GPU: Nvidia GeForce 9800M GTS

HDD: 320GB 7200rpm hard drive 2.5"

SSD: Kingston A400 250GB SSD

SCREEN: Glossy 16:9 1440x900

OS: Windows XP SP3 / Ubuntu 19.04

PERIPHERALSLogitech G Pro

Link to comment
Share on other sites

Link to post
Share on other sites

lspci or look into /proc/bus/pci/devices

HAL9000: AMD Ryzen 9 3900x | Noctua NH-D15 chromax.black | 32 GB Corsair Vengeance LPX DDR4 3200 MHz | Asus X570 Prime Pro | ASUS TUF 3080 Ti | 1 TB Samsung 970 Evo Plus + 1 TB Crucial MX500 + 6 TB WD RED | Corsair HX1000 | be quiet Pure Base 500DX | LG 34UM95 34" 3440x1440

Hydrogen server: Intel i3-10100 | Cryorig M9i | 64 GB Crucial Ballistix 3200MHz DDR4 | Gigabyte B560M-DS3H | 33 TB of storage | Fractal Design Define R5 | unRAID 6.9.2

Carbon server: Fujitsu PRIMERGY RX100 S7p | Xeon E3-1230 v2 | 16 GB DDR3 ECC | 60 GB Corsair SSD & 250 GB Samsung 850 Pro | Intel i340-T4 | ESXi 6.5.1

Big Mac cluster: 2x Raspberry Pi 2 Model B | 1x Raspberry Pi 3 Model B | 2x Raspberry Pi 3 Model B+

Link to comment
Share on other sites

Link to post
Share on other sites

13 minutes ago, Snowarch said:

want to try this to see if will work for a few windows games

Just a word of warning: if you are using the GPU for Linux already and it's not an Intel iGPU, trying to pass it through to a VM will most likely crash your system. Only Intel iGPU can be used simultaneously for the host and the virtual-machine, and even then it requires a couple of extra steps. For NVIDIA - and AMD - cards, you either need multiple GPUs or you need to prevent your Linux-system from using the GPU.

Hand, n. A singular instrument worn at the end of the human arm and commonly thrust into somebody’s pocket.

Link to comment
Share on other sites

Link to post
Share on other sites

i have 3 diffrent gpus in the system. hopefully that'll be enough.

main rig:

CPU: 8086k @ 4.00ghz-4.3 boost

PSU: 750 watt psu gold (Corsair rm750)

gpu:axle p106-100 6gbz msi p104-100 @ 1887+150mhz oc gpu clock, 10,012 memory clock*2(sli?) on prime w coffee lake igpu

Mobo: Z390 taichi ultimate

Ram: 2x8gb corsair vengence lpx @3000mhz speed

case: focus G black

OS: ubuntu 16.04.6, and umix 20.04

Cooler: mugen 5 rev b,

Storage: 860 evo 1tb/ 120 gb corsair force nvme 500

 

backup

8gb ram celeron laptop/860 evo 500gb

Link to comment
Share on other sites

Link to post
Share on other sites

its not regristering --pciattach as a command. did i do something wrong? 

 

ending command after getting the id was this 

 

vbox manage modifyvm "7" -pciattach 02:00:0@03.01.0

 

tried 

 

02:00:0@03:01:0 as well

 

did i get the wrong id? or 2nd id? 

 

@jj9987

 

 

trying to pass a p106 to the vm. host is using a p104 and igpu.

main rig:

CPU: 8086k @ 4.00ghz-4.3 boost

PSU: 750 watt psu gold (Corsair rm750)

gpu:axle p106-100 6gbz msi p104-100 @ 1887+150mhz oc gpu clock, 10,012 memory clock*2(sli?) on prime w coffee lake igpu

Mobo: Z390 taichi ultimate

Ram: 2x8gb corsair vengence lpx @3000mhz speed

case: focus G black

OS: ubuntu 16.04.6, and umix 20.04

Cooler: mugen 5 rev b,

Storage: 860 evo 1tb/ 120 gb corsair force nvme 500

 

backup

8gb ram celeron laptop/860 evo 500gb

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, Snowarch said:

its not regristering --pciattach as a command. did i do something wrong? 

 

ending command after getting the id was this 

 

vbox manage modifyvm "7" -pciattach 02:00:0@03.01.0

 

tried 

 

02:00:0@03:01:0 as well

 

did i get the wrong id? or 2nd id? 

 

@jj9987

 

 

trying to pass a p106 to the vm. host is using a p104 and igpu.

It's not registering because Virtualbox 6.1 dropped PCI passthrough support for Linux hosts. Also that's not the correct address - should be just 0:2.0 or 02:00.0 or similar (no @ and another address).

Quote

Linux host: Drop PCI passthrough, the current code is too incomplete (cannot handle PCIe devices at all), i.e. not useful enough

https://www.virtualbox.org/wiki/Changelog

HAL9000: AMD Ryzen 9 3900x | Noctua NH-D15 chromax.black | 32 GB Corsair Vengeance LPX DDR4 3200 MHz | Asus X570 Prime Pro | ASUS TUF 3080 Ti | 1 TB Samsung 970 Evo Plus + 1 TB Crucial MX500 + 6 TB WD RED | Corsair HX1000 | be quiet Pure Base 500DX | LG 34UM95 34" 3440x1440

Hydrogen server: Intel i3-10100 | Cryorig M9i | 64 GB Crucial Ballistix 3200MHz DDR4 | Gigabyte B560M-DS3H | 33 TB of storage | Fractal Design Define R5 | unRAID 6.9.2

Carbon server: Fujitsu PRIMERGY RX100 S7p | Xeon E3-1230 v2 | 16 GB DDR3 ECC | 60 GB Corsair SSD & 250 GB Samsung 850 Pro | Intel i340-T4 | ESXi 6.5.1

Big Mac cluster: 2x Raspberry Pi 2 Model B | 1x Raspberry Pi 3 Model B | 2x Raspberry Pi 3 Model B+

Link to comment
Share on other sites

Link to post
Share on other sites

I wouldn't try to achieve GPU pass-through using VB. To pass-through hardware is a rather involved process. I have a tutorial for how to do this using QEMU/KVM and Virt-manager if you're interested. You'll have to adapt it to suit Ubuntu 16.04 though.

 

Link to comment
Share on other sites

Link to post
Share on other sites

@Windows7ge

 

thanks, but kvm wouldn't work at all well. even with same settings, applied to the vm that i'd do with virtual box, slower boot times, and os install times consistantly than virtual box. everything in bios related to virtualisation is enabled on my z-390 board. people always claim kvm is a faster vm manager than virtual box by a huge margin, but it can bearly handle firefox alone.

 

 

and its only the opengl i need passed through.

 

would it be easier to install virtusl box 6.0 in a diffrent directory?

main rig:

CPU: 8086k @ 4.00ghz-4.3 boost

PSU: 750 watt psu gold (Corsair rm750)

gpu:axle p106-100 6gbz msi p104-100 @ 1887+150mhz oc gpu clock, 10,012 memory clock*2(sli?) on prime w coffee lake igpu

Mobo: Z390 taichi ultimate

Ram: 2x8gb corsair vengence lpx @3000mhz speed

case: focus G black

OS: ubuntu 16.04.6, and umix 20.04

Cooler: mugen 5 rev b,

Storage: 860 evo 1tb/ 120 gb corsair force nvme 500

 

backup

8gb ram celeron laptop/860 evo 500gb

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, Snowarch said:

@Windows7ge

 

thanks, but kvm wouldn't work at all well. even with same settings, applied to the vm that i'd do with virtual box, slower boot times, and os install times consistantly than virtual box. everything in bios related to virtualisation is enabled on my z-390 board. people always claim kvm is a faster vm manager than virtual box by a huge margin, but it can bearly handle firefox alone.

 

 

and its only the opengl i need passed through.

 

would it be easier to install virtusl box 6.0 in a diffrent directory?

I don't know about it being faster. I'm just familiar with it having a lot more functionality.

 

I can't comment on using VB on Linux. I've only ever used QEMU/KVM.

Link to comment
Share on other sites

Link to post
Share on other sites

well, kvm's user interface was lacking, and really slow. it can bearly run a browser alone.

 

is yours that slow or is something wrong with kvm itself on my system?

 

is it possible to use the virtual box command for kvm with

 

kvm managevm "7"  --pciattach id numbers

 

since ineed only opengl passwd through.

 

@Windows7ge

main rig:

CPU: 8086k @ 4.00ghz-4.3 boost

PSU: 750 watt psu gold (Corsair rm750)

gpu:axle p106-100 6gbz msi p104-100 @ 1887+150mhz oc gpu clock, 10,012 memory clock*2(sli?) on prime w coffee lake igpu

Mobo: Z390 taichi ultimate

Ram: 2x8gb corsair vengence lpx @3000mhz speed

case: focus G black

OS: ubuntu 16.04.6, and umix 20.04

Cooler: mugen 5 rev b,

Storage: 860 evo 1tb/ 120 gb corsair force nvme 500

 

backup

8gb ram celeron laptop/860 evo 500gb

Link to comment
Share on other sites

Link to post
Share on other sites

Personally I use a 3rd party application known as Looking Glass. It copies the frame buffer directly out of GPU memory and displays it in a window you can move around at will. It also works for Keyboard/Mouse and even copy/paste of text. It's significantly better than the virt-manager display window.

 

Again, I really don't know. I'm not familiar with any CLI tools for VB.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×