Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Sorry for the long question.

With the coming of Steam for Linux I may have been over optimistic and got rid of windows installation. The problem is that I have about 100 Steam games that are not (and may never be) ported to Linux. Anyway I got tired of dual boot, and Wine solutions (wineprefix and playonlinux) don't always work. So I was wondering if there is any solution to use a virtual machine (or something similar) with direct access to hardware spec in order to run windows games in it. (something like what Parallels do on mac). Re-installing windows is not a huge problem but I was hoping to avoid it as I would like use Ubuntu as my everyday OS together with more "difficult" distros..to learn more about Linux.

Edit: Thanks for all your answers: I'll think about the solution you proposed. Honestly to this day I never heard of Xen, so I'll have to read about it...and maybe buy a new graphic card...and a new monitor. I think I'll end up re-installing windows on one of my drives...It's a pity though. thanks again.

share|improve this question
2  
See this question on heavy limitations for being able to access the GPU from Virtual Box. –  Takkat Mar 26 '13 at 13:55
    
@Takkat Did you ever get a chance to try the PCI pass-through? Did it work out well? –  hydroparadise Mar 26 '13 at 19:05
    
@hydroparadise: no my hardwares do not support IOMMU. I guess it is not really easy to achieve, and you need 2 graphic cards. –  Takkat Mar 26 '13 at 19:07
add comment

5 Answers

up vote 11 down vote accepted

The short answer is: No.
The longer answer is: Not yet...

VBox's 3D support barely counts. It does provide 3D support but absolutely no performance. VMWare seems to perform a lot better (note the benchmark is on a Mac) and that might be playable. The downside here is a large pile of cash (I'm not sure what 3D support is like in their free offerings).

But if you want to take full advantage of your hardware for Windows-only games, there's only one solution and that's to boot into Windows. I'm afraid to say that's likely always going to be the case for that subset of games.

The only other near-acceptable solutions available:

  • Fight Wine (when it does work, it tends to work really well)
  • Buy a console.
  • Lobby the developer for a port.

There are all sorts of server technologies that may filter through in time:

  • Nvidia+Vmware are working on a multi-head virtualised gaming platform but I honestly don't expect this level of integration to be in consumers' hands for another decade, if not longer. Graphics manufacturers want us to buy dozens and dozens of cards and virtualising hurts that aim.

  • You could reverse it and have a Windows Server host VM and paravirt a Ubuntu desktop, with shared 3D but again, I'm not sure what the performance would be like. And it's a ton of cash to do legally. The desktop-host isn't as good at all.

  • Xen won't paravirt a Windows install, so there's no point looking there yet. It does have PCI and VGA passthrough modules but they're locked to one VM so you'd have to have a graphics card for each install. Urgh.


Note I'm really only talking about 3D graphics here because the rest are solved or nearly-solved problems. CPU virtualisation is mature with paravirtualisation and CPU extensions like Intel VT-x and AMD-V. Peripheral passthrough is fairly low bandwidth so is simple to share.

Graphics are lagging because sharing them in the way we're talking about is not a commercial necessity for manufacturers. It does seems to be going that way though (for high-end render farms and server-based workstation consolidation) so watch that space.

share|improve this answer
    
As for wine, PlayOnLinux is definitely worth looking at... playonlinux.com/en –  hydroparadise Mar 26 '13 at 19:02
    
@Oli your answer was very complete, thanks. Anyway, I saw that it is possible to mount an existing Windows installation into a virtual machine (after proper work). In that case would hardware acceleration be the same as palin virtualization? –  psylockeer Mar 26 '13 at 20:41
    
@psylockeer You mean mounting a physical drive (with a real install of Windows on it) inside a VM? That can be done in all the major virtualisation software but you might find Windows flips out. The last time I tried to change the hardware on a Windows install it flipped out and never made it further than a bluescreen. Hopefully MS have improved things since then. The access still isn't direct (AFAIK) as the VM client is still accessing the drive through Linux - it's just not on another filesystem too (if that makes any sense) - so don't expect a large performance boost. –  Oli Mar 27 '13 at 10:21
    
@Oli, ok thank you for the clarification :-) –  psylockeer Mar 27 '13 at 15:52
add comment

If both your hardware and your software support IOMMU (a.k.a. PCI passthrough, AMD-Vi and Intel VT-d), you can assign assign I/O devices (e.g., the graphics card) to VMs.

On the current versions of Ubuntu, you can use Xen, as long as both your motherboard and your CPU support IOMMU.

I'm currently using a Windows 7 VM with two AMD 7950 GPUs, and it works very well for gaming and Bitcoin/Litecoin mining.

Tutorials, etc.:

Note that you can use the GPU on in that VM is you pass it through.

share|improve this answer
    
I believe he won't be able to share a single GPU between VMs. However, if he has two video cards (especially if he has multiple monitors or a monitor with two suitable inputs), or he's fine with accessing GNU/Linux GUI solely over VNC, SPICE or alike, Xen's GPU passthrough seems to be a a way to go. –  drdaeman Mar 26 '13 at 16:51
    
@drdaeman: True. When passing though a GPU, it can be accessed only from that VM. –  Dennis Mar 26 '13 at 17:41
    
thnks guys, sadly for the moment this solutionis out of my knowledge...and my pockets :-) –  psylockeer Mar 27 '13 at 15:54
add comment

Your windows VM mostly runs on emulated hardware. That hardware is usually relative simple.

Having said that:

  1. It is possible to emulate 3D functions. Performance is usually sub par, and sometimes it does not work as expected. (E.g. running Baldur's Gate 1 with 3D acceleration enabled in Vmware workstation 8 crashes my whole host. Not just the VM). This will improve over time for all VMs.
    In fact, vmware workstation 9 claims significant improvements, but I have not tested that version yet. I know 5.5 and 8 did not suffice.
  2. Instead of emulating you can directly access hardware from a VM. The keyword is is PCI[e] passthough. This is a feature usually used to pass though special cards, 10 Gbit NICs etc, but it should also work for graphics cards.. Note that will use a card only for the VM. With graphics cards this means using a second graphics card for the VM.
share|improve this answer
    
so I would need 2 monitors too right?...anyway I checked and I don't think my CPU (first Gen i5 750) supports vt-d. –  psylockeer Mar 26 '13 at 23:42
    
That 2 monitor thing is a good point. I never considered it since I lump PCI passthough to NICs, RAID cards and such. --- Note that most monitors have more than one signal input. E.g. DVI, DP, composite, S-Video and component... Not that switching the input of a monitors between two sources is all that great of an solution. –  Hennes Mar 27 '13 at 11:49
add comment

Have you tried Virtual Box ? By reading feature list it looks like that it has what you need ... access to GPU and CPU.

share|improve this answer
    
Virtualbox does indeed let you install windows, but as far as I know 3d gaming in it is not that easy to achieve. –  psylockeer Mar 26 '13 at 13:05
    
Honestly, I have never tried that. I've always preferred dual booting with Windows just to play games. And it looks like that some games will work some will not so mostly it depends on which games you want to run –  JackLock Mar 26 '13 at 13:11
add comment

Try Gaming Anywhere. It is not exactly a VM, rather a open source could gaming solution, but you still could stream your whole desktop or games.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.