Page 1 of 1

Virtual Machine hangs while starting with GPU attached via PCI passthrough

Posted: 20. Jul 2017, 13:45
by ambuj
I have a Linux Host (Ubuntu 14.04). I've installed CentOS 7 guest on VirtualBox 5.1.22 (with extension pack).

I've two NVIDIA K20X GPU on my system:

Code: Select all

lspci -nn | grep NVIDIA
84:00.0 3D controller [0302]: NVIDIA Corporation GK110GL [Tesla K20Xm] [10de:1021] (rev a1)
85:00.0 3D controller [0302]: NVIDIA Corporation GK110GL [Tesla K20Xm] [10de:1021] (rev a1)
I tried to attach one of the GPUs to my VM:

Code: Select all

VBoxManage modifyvm "VM name" --pciattach 85:00.0@01:05.0
I have IOMMU enabled in BIOS and system boots with it:

Code: Select all

dmesg | grep IOMMU
[    0.000000] DMAR: IOMMU enabled
[    0.097288] DMAR-IR: IOAPIC id 3 under DRHD base  0xfbffe000 IOMMU 0
[    0.097292] DMAR-IR: IOAPIC id 0 under DRHD base  0x97ffc000 IOMMU 1
[    0.097295] DMAR-IR: IOAPIC id 2 under DRHD base  0x97ffc000 IOMMU 1
[   48.699760] vboxpci: IOMMU found
Now when I start my VM it is stuck in a dialog box at 20% saying "Starting Virtual Machine ... 2/2"

The VBox.log has the last entry as:

Code: Select all

00:00:00.920798 ACPI: enabling 64-bit prefetch root bus resource 0x00000004bcc00000..0x0000000fffffffff
I'm unable to figure out the issue. Can anyone please help? The dmesg log at the end shows the dump after starting the VM. I've attached the logs.

Re: Virtual Machine hangs while starting with GPU attached via PCI passthrough

Posted: 25. Jul 2017, 13:10
by frank
Passing through a GPU is unlikely to work. The PCI passthrough code is a bit outdated.