9

I was wondering which is the best method to go about if I want to play win based games.

I do not want to go with the dual boot method as this will cost me time to restart, login and run a os to do my work or pass the time, and some of my apps rely on win and my graphics to run. for example Daz3d, Photoshop, Flash etc.

Now I read about HVM(hardware virtual machines) and then I know about the 3D Virtualization of VMware and VirtualBox. However, the 2 later virtualize the 3D and do not using the full power of the GPU. So this option wont perform perfect for latest games like D3.

I was wondering if anyone has experience in HVM(like xen if i am not mistaken) and tried something similar to access the full power of the GPU and successfully run newer games and other products relying on the GPU?

Will be the first time setting up a HVM, no experience in this so don't know what to expect.

This will help a lot as I do not want to revert back to win or as mentioned do dual boot.

4 Answers 4

13

Xen hypervisor allows you to run a Windows VM with direct access to your graphics card (hardware). This is called VGA passthrough. You can also directly access other PC hardware using PCI passthrough, for example USB host controllers, SATA controllers, etc., all of which will then be available under Windows, with Windows-native drivers.

BUT, as mentioned before, you need to carefully select your hardware. Here some basic guidelines to check if your hardware is compatible:

  1. Your CPU must support VT-d (Intel) or AMD-Vi / IOMMU (AMD) !!! Don't confuse it with VT-x - these are two different things. For Intel, see ark.intel.com. Note: The 3930K with C2 stepping also supports VT-d, but it's not listed when using the VT-d filter.

  2. Your motherboard (and motherboard BIOS) must have an option to enable VT-d (sometimes called IOMMU). Some BIOS implementations have been reported buggy, though. Still, if the option shows up, chances are good.

  3. A VGA-passthrough compatible graphics adapter. Many (most?) AMD graphics cards are supported, and some Nvidia cards, namely the professional "multi-OS" Quadro series (starting from the Quadro 2000 upwards). The Intel onboard graphics is supposedly also compatible. Search for "Xen VGA passthrough tested adapters". Note: It's best to have a another GPU (Intel onboard or separate graphics card) for your Linux, and pass-through the secondary GPU (the one NOT used by Linux).

If you got compatible hardware, it's definitely worth the effort. Search for "VGA passthrough" or "virtual gaming" to find tutorials, or try this here HOW-TO make dual-boot obsolete which is based on Linux Mint 13 (should be similar for Ubuntu).

4

With PCI/VGA Passthrough on Xen (and afaik kvm, too), people is playing on vm with direct hardware access passed to vm. With little to none decrese in performance. Vmware and Virtualbox are tools to toy.

1
  • beware: you'd gain these advantages by carefully choosing hardware iommu/vt-d capable..
    – Arakno
    Nov 27, 2012 at 19:28
4

Windows can be installed as a HVM guest with Xen, but your hardware needs to support virtualization technologies for this to be useful for your intended purposes.

Using Xen with a Windows HVM domU, you can use VGA and PCI pass-through in order to give the Windows virtual machine direct access to a GPU. However, the catch is that your Processor, Motherboard, and potentially GPU need to support Intel VT-d or AMD's equivalent.

Tracking down the proper hardware will probably be the largest prohibiting factor. I say this because, while the technology has existed for quite some time, it's not a feature that many consumer users are interested in and therefore has not been supported well among manufacturers, specifically speaking motherboard manufacturers. You can find hardware that the Xen community has found to work, but technology moves so quickly, it may be difficult to find parts that have been verified to work, available to purchase. Many parts may have been discontinued. Also, just because the chipset and cpu support vt-d, that doesn't mean that the BIOS for the motherboard supports vt-d, which makes tracking down the proper hardware all the more difficult.

Assuming you obtain the proper hardware, it is then simply a matter of installing a linux distribution to act as the dom0 or host that you will then install the Xen hypervisor on. You will need to fiddle around a bit to get the GRUB loader to load the Xen bootstrap, since by default the standard bootstrap will load first, thus trumping the Xen bootstrap.

The documentation is varied and contradictory as this process is fairly niche and as of 4.2+ some significant changes have been made as to how certain tools and systems operate, namely network bridging, routing, NAT translation, etc. There is current documentation in existence, but there is also plenty of old and outdated information available.

Once you get the network configuration setup, you will need to ensure that you have at least two GPUs. This ties in with the proper hardware I spoke of earlier. The ideal way to go is to have an Intel CPU with integrated graphics to support your Xen dom0, while having a nice gaming GPU to VGA and PCI passthrough to your Windows domU. However, as I stated before vt-d is necessary in order to perform the VGA and PCI passthrough.

I currently have an HP dv7-3085dx from 2009 that I have Ubuntu as the dom0 with Xen and Windows 8 as an HVM. While this HP laptop supports vt-d and I can pass hardware through to the Windows HVM, I cannot pass-through a GPU to the Windows HVM without crippling my dom0, as this laptop only has one VGA supportable GPU. This leaves me with a Windows HVM that works well other than choppy graphical performance, which unfortunately makes the Windows HVM rather useless.

With the proper hardware you can have a Windows HVM that can play brand new games on Ultra with 60+ FPS. I unfortunately do not currently possess the proper hardware to take advantage of the vt-d technologies, but there are plenty of YouTube videos of people that do. You can search for their benchmark tests to get an idea of how well this technology works when you have proper hardware.

--EDIT--

To follow up with this, it may be technically possible to use a single graphics processor for the dom0 and domU. However, you would need to setup the dom0 to allow you to SSH from a separate machine in order to launch the domU, since you would have to blacklist the GPU in the dom0 boot sequence in order to make it available to the domU. This would mean that you need to use two machines in order to make the single machine usable.

So, you would SSH into the dom0, launch the domU. Assuming that you have the VGA pass-through setup properly, once you have the domU running, you will VNC into it from the second machine. Then you ensure that your passed through GPU shows up and has drivers installed. Then you select that GPU as the default display adapter and hope that you get video output to the monitor physically attached to the machine the domU is running on.

2
3
  • Xen HVM is...exactly the same virtualization as VMware and Virtualbox; there's no difference. It's only called that because there's another kind called Xen PVM (para-virtualized), which can only run Linux VMs and is more efficient in some cases.

  • To be honest, while both VMWare and Vbox have rudimentary 3D support (Xen HVM has none -- it's mostly meant for servers), it will 99.9% be insufficient to run modern 3D games, no matter how powerful your CPU or GPU. You will have to dual-boot, unless your favorite games are Wolfenstein, Doom and Quake 1 :p

4
  • Thats kinda a -1 for linux on my side then, apart from the games i have the 3D applications in which I invested a fair amount of money. And they only support win and mac. And switching back to win is my very last option. Id rather have it as a vm than on my HD
    – Marchosius
    Jul 30, 2012 at 12:41
  • FWIW, I use Photoshop and Flash (playing, not authoring) in a Win 7 VM on Ubuntu regularly and have no problems -- Photoshop does find the OpenGL support it needs.
    – ish
    Jul 30, 2012 at 12:44
  • This i Know yes but it does not utilise the full power of the graphics card, which I need. Is there no way to be able to run two operating systems at the same time and be able to use the actual hardware of the box at the same time? Like a Cylon version of VMware lol
    – Marchosius
    Jul 30, 2012 at 12:52
  • 6
    I don't think this answer is correct nor up-to-date. AFAIK VMWare and probably Vbox too have more than just rudimentary support, but I'm not sure. And what it comes to XEN I believe your statement is 100% false: wiki.xen.org/wiki/Xen_VGA_Passthrough youtube.com/watch?v=L_g7ZBMWoLk&feature=related
    – Timo
    Oct 23, 2012 at 7:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .