Re: How to assign a GPU to a KVM Windows virtual machine

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello. I successfully pass to vitual machine AMD HD 6770 video card in Windows 7 virtual machine

I wrote a few articles on russian about this topic. You can translate it by google translate or other service:
http://umvirt.ru/node/92 - passing through VM AMD HD 6770 video card
http://umvirt.ru/node/69 - passing through VM USB onboard controller

Also you can view Tavi-tech.blog [http://tavi-tech.blogspot.com/]. After reading his articles i was inspired to bought HD6770.

>  I want to know:
>
>  (1) The version of kernel you use.

You can use standard Fedora 17 or Ubuntu 12.04 kernel.

>  (2) The version of qemu-kvm

Version is does not matters. Only patches applied to source are matters.

You can use qemu-kvm package, or package composed only from standard Fedora 17 or 18 alpha. I don't know how fedora maintainers compose the patches but nor standard qemu, nor spiced-qemu, nor qemu-kvm are not support PCI-passthrough because not have "--enable-kvm-device-assignment" configure option. But "--enable-xen-pci-passthrough" configure option was found.

>  (3) Did I need to disable the video card on the host and how?

In some sources are written that before starting passthrough is needed to disable radeon kernel module. But i found that this module is helps KVM to work with IOMMU because AMD HD 6770 has no FLR funcionality needed to move videocard between real & virtual environments.

If you want, you can use spice-xserver to work with Xsession of your host remotely. I wrote small article on russian how to configure xorg to use qxl virtual card as physical card [http://habrahabr.ru/post/147185/].

After VGA-passthrough and setup is needed to access to host over network because Windows 7 is not using VNC- or SPICE-client, but it use physical video card to output video.

>  (4) The command line of qemu-kvm.

Can't remember. It's like on passing ordinary PCI-device. On experiments i was using virt-manager launched on server and remotely connect to it thru spice-Xserver. Also you can use SSH as reserve channel to control host.

In order to reach success in PCI-passthrough, please note: 
1. Before passing videocard, try to pass to VM ordinary onboard devices to virtual machine like USB-controller, soundcard to check host functionality. Only if ordinary device is passing you can try to pass videocard.
2. Update bios of your motherboard. Only after update i have got ability to use IOMMU properly on ASUS M5A97PRO.
3. Use emty host for experiments. Currently vm with passed videocard can hang host within it running, and therefore all runned VM's and tasks may be hanged and big portion of data  may be lost.

Small Ad: If you using Ubuntu Precise family distro on Spiced vm, host or client, you can play with repo.umvirt.org packages. 

Best regards, Boris Morozov.

01.11.2012, 16:32, "徐舫" <xufango@xxxxxxxxx>:
>  Hello,
>
>  I saw you have passtrough AMD HD 6770 video card in Windows 7 virtual machine.
>
>  It's fantacitic. Could you tell me how to do that?
>
>  I want to know:
>
>  (1) The version of kernel you use.
>
>  (2) The version of qemu-kvm.
>
>  (3) Did I need to disable the video card on the host and how?
>
>  (4) The command line of qemu-kvm.
>
>  Thanks, waiting for your reply.
>
>  --
>  Xu Fang
>  School of Computer Science and Engineering, Beihang University
>  State Key Laboratory of Virtual Reality Technology and Systems,
>  Beijing,P.R.China
>  Address:
>      Beihang University
>      Room727, NewMain Building,
>      No. 35 Xueyuan Road, Haidian Distric,
>      Beijing,P.R.China,100191

-- 
Best regards, Boris Morozov.
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]