VGA passthrough – situazione

http://ubuntuforums.org/showthread.php?t=2111175

February 1st, 2013

heiko_s

The VGA passthrough club – did you succeed, and how?

I can’t do away with Windoze, but I hate dual-boot. I also need native (or near-native) graphics support in the Windows VM.

In the end I chose Xen to host Linux and a Windows 7 VM which uses a dedicated graphics card for native graphics performance. It works extremely well, with what I consider top-notch performance that doesn’t stand (much) behind a native Windows installation on bare metal.

In fact, I’m so thrilled about it that I wonder why not every dual-booter is switching to virtualization. (I’m actually not that surprised since it was quite challenging to get it working.)

Here my questions:

Has anybody tried VGA passthrough?

If yes, which hypervisor/method did you use (Xen, KVM, VMware, etc.)?

How easy or difficult was it?

In the end I would like to know if there are perhaps better or easier ways to get it working. Thanks in advance for your feedback!
LM14 64bit (Ubuntu 12.10) with Xen hypervisor 4.1.2 and Windows 7 Pro 64 bit guest using VGA passthrough

==================================================================

February 3rd, 2013

heiko_s

Re: The VGA passthrough club – did you succeed, and how?

You indeed need suitable hardware. Here is what you need:

1. CPU with VT-d (Intel) or AMD-Vi (AMD) support. This feature is also called IOMMU. See http://en.wikipedia.org/wiki/IOMMU_hardware_list, or for Intel CPU’s see http://ark.intel.com/search/advanced/?s=t&VTD=true.

2. A motherboard that supports VT-d. See the Wikipedia link above, as well as http://www.overclock.net/t/1338063/v…e-motherboards and http://wiki.xen.org/wiki/VTd_HowTo.

3. A motherboard BIOS that supports VT-d. I’m not joking here, one BIOS release may support VT-d, the next one doesn’t. In some cases there is no way going back to the earlier BIOS that does support it. See links under 2.

4. A graphics card that supports VGA passthrough. In general, most modern AMD (ATI) graphics cards will work, but it’s best to check here http://wiki.xen.org/wiki/XenVGAPasst…TestedAdapters and www.overclock.net/t/1307834/xen-vga-passthrough-compatible-graphics-adapters.
Some Nvidia graphics adapters are also supported, namely the Quadro series of “Multi-OS” capable cards starting with the Quadro 2000 model upwards (the Quadro 600 for example isn’t specified as “Multi-OS”). There are some more Nvidia graphics adapters that work, but first check the links above if it’s listed.
The newer Xen 4.2 hypervisor supposedly improves graphics cards compatibility, though I haven’t tried it.

It is MUCH easier if you have two graphics cards, or a CPU internal GPU (like on most new Intel desktop CPUs) and a discrete graphics card for passthrough.One will serve Linux, the other your Windows guest.

If your hardware doesn’t meet the above, either replace the incompatible part, or forget the whole thing!

I’ve written a how-to for Linux Mint 13/14, which should likewise work with Ubuntu 12.04 and 12.10: http://forums.linuxmint.com/viewtopic.php?f=42&t=112013.

Now to your questions.

My goal was to get fast switching on 2 desktops, the way you would have 2 full OSes booted simultaneously.

My PC works as if I have two PCs. I could hook up two screens, keyboards and mice and two people would be able to use it at the same time, with full video acceleration on both. Right now I switch from one to the other via KVM button and the input selector on my screen, but if I have to go forth and back a lot I run a remote desktop in Windows to connect to my Linux dom0, or vice versa. I use a SAMBA share under Linux to copy files between the two.

Can you confirm your Windows 7 installation behaves as native?

95% yes. Everything except the following two issues work as if I was running Windows directly on the hardware. The two issues I’ve found are:
I) Youtube video stops after a few seconds, hangs for a while, and continues, just to stop again after a few seconds. This is most likely a networking issue with the bridge, though I haven’t figured out what exactly. Somehow Windows “looses” the DNS server, or access to it. One work around would be to pass through a dedicated NIC. I haven’t tried it though.
II) I can’t watch video using VLC when the video file is on a network drive. I believe this is the same network problem as above.
EDIT: Both problems are solved now using the latest GPLPV drivers under Windows.

Other than these two issues I haven’t found any problem.

What about other peripherals? Scanner, printer, gamepad, etc.?

In addition to the graphics card, I’m passing 2 USB controllers through to Windows. Everything connected to these ports is fully controlled by Windows, with Windows native drivers.
Just an example how well this works: I use Windows for photo editing. To calibrate my screen I use a spectrophotometer (some device that measures light / colors) which is connected via USB. The software then shows different color patches on the screen which my calibrating device reads and reports back to the PC (via USB port). At the end, the software loads the corrected color curve directly into my screen via the DVI port of the graphics card. This can only work when the calibration software is able to communicate with the graphics card.
Other external devices I frequently use under Windows are:
– Keyboard and mouse are connected via KVM USB switch;
– CF card reader (to transfer photos from the camera’s CF cards to the PC);
– External hard drive for backup – it’s automatically detected by the backup program when I connect it to the USB port;
– USB audio controller – a low-cost ~5$ USB stick that works without any issues, it’s permanently plucked in;
– USB flash drives – they work as expected.

I haven’t set up my printer yet to work with Windows. But I can’t see any reason why it shouldn’t work. I have both a USB 2.0 and a USB 3.0 controller passed to Windows. The transfer speed is as expected. If you have an external HDD or memory card reader to connect, use a USB 3.0 controller – it makes a huge difference.

Good luck!

==================================================================

February 7th, 2013

hurenkam

Re: The VGA passthrough club – did you succeed, and how?

I can’t do away with Windoze, but I hate Has anybody tried VGA passthrough?

Yes, I have a setup with 2 desktops, each running in their own virtual machine with passed through radeon4350 and usb cards.
Apart from that, a few other virtual machine servers run on the same hardware.

Which hypervisor/method did you use (Xen, KVM, VMware, etc.)?

I’m using Xen 4.2 at the moment, it seems to me that in general Xen is way ahead of the game when it comes to PCI Passthrough.

How easy or difficult was it?

Once i started to use the catalyst driver instead of the open source driver (which complains about not being able to find the bios), everything was pretty straight forward.
I installed ubuntu and windows7 in a vnc session and later installed Catalyst. Windows 8 was even easier, it installed a working vga driver out of the box.
Note that i just used pci-passthrough, not the advanced vga-passthrough patches.
Besides the vga adapter itself, i also passthrough the onboard audio of the adapter (hdmi), and an usb controller, so basically i have 2 seperate terminals, each running their own os (either Ubuntu/Windows7/Windows8).
All operating systems behave asif they run on native hardware, only difference is that the boot screen doesn’t appear on my vga cards, because i chose to do only pci-passthrough. The boot window appears on the VNC session.

Note that as stated above, using the right CPU, Mainboard and VGA Card is essential here.
In my case: Intel Core i7 860, Asus P7P55D Evo, Asus EAH4350 Silent.

*******************
*******************
*******************

http://askubuntu.com/questions/249845/setting-up-xen-vga-passthrough-with-two-different-video-card

You can use any number of cards from any number of manufacturers.

Dom0 won’t care because while it will know that there are devices there, you’ll be passing kernel boot parameters to tell it to ignore looking for and binding drivers to the cards so it will just leave them alone for the domUs to deal with.

Each domU will only know about the card assigned to it so they in turn won’t care that you have multiple video cards from either the same manufacturer or different ones. As long as the domU’s OS has drivers for the card(s) assigned to it, it’ll be able to use it fully.

My Xen server setup has a cheap Nvidia card for the Xen host and a Radeon 7750 driving multiple monitors dedicated to one of the guests. Works like a charm.

Note: there are still some issues with rebooting domUs that have assigned VGA adapters. The video card may not be reset during the reboot process and may fail to initialize properly following the reboot. I haven’t found a solution for this yet so you may want to do some searches on FLR (Function Level Resets) with Xen VGA passthrough.

Cheers,

JustAnotherLinuxAdmin

Lascia un commento

Inserisci i tuoi dati qui sotto o clicca su un'icona per effettuare l'accesso:

Logo WordPress.com

Stai commentando usando il tuo account WordPress.com. Chiudi sessione / Modifica )

Foto Twitter

Stai commentando usando il tuo account Twitter. Chiudi sessione / Modifica )

Foto di Facebook

Stai commentando usando il tuo account Facebook. Chiudi sessione / Modifica )

Google+ photo

Stai commentando usando il tuo account Google+. Chiudi sessione / Modifica )

Connessione a %s...