Gpu Passthrough in Xen

By | 2013年7月22日

Considering that Xen’s gpu passthrough is about one year ahead of kvm, so let us try that.
The process is something like kvm one as I wrote before.
KVM GPU-Passthrough, VGA-Passthrough

Result:
I failed in trying passthrough the graphic card to Win7 or XP.
Now I’m try some patchs and re-compile Xen with my graphic card bios.bin.

HOST:
CPU: i5-3470
GPU: ATI Radeon HD 7850
OS: openSuse 12.3 KDE

0. Disable Radeon Driver

1. Install Xen-utils

Install Xen and its utilities via Yast.

2. Modify grub.cfg

Then reboot the host.

3. Bind the device

Using Scripts

File: bind_lib.sh

Using xen-tools

4. Create VM

File: win7

# xl create win7
# remote-viewer vnc://localhost:5900

Then you should see Windows boot logo in vnc for few seconds, after that it will switch to the second monitor that attached to your ATI card.

gfx_gpupassthru

As Xen wiki said:

When you specify “gfx_passthru=1” the passthru graphics card will be made the primary graphics card in the VM, and the Xen Qemu-dm emulated Cirrus graphics card is disabled.
If you use “gfx_passthru=0”, or don’t have gfx_passthru= option at all, then the Xen Qemu-dm emulated Cirrus graphics card will be the primary in the VM, and the passthru graphics card will be secondary.

So, alter gfx_passthru to 1.

发表评论

邮箱地址不会被公开。