Possibility of making a linux distro with automatic graphics pass-through to virtual machine

In my opinion, the only thing stopping the switch to linux is application support for things like adobe. The way round this is vms or wine. With Wendell's video on skylake graphics passthrough it made me think that it would be beneficial to make an application or full distro orientated around support for unsupported apps through a vm with hardware accelerated / full gpu access.

Imagine taking virtual box's seamless mode where the apps are drawn directly onto the linux desktop rather than on a vm window and having full graphics processing out of the box. Although at the moment there would be some strange requirements - like two gpus and windows licencing for a linux distro - I'm sure people would jump through the hoops to get away from windows.

Another feature could be the handling of .exe files through the vm, so when you click to run a .exe it runs just like it would on windows, on the windows vm. I'm sure there would be a way to completely shut down the guest os so you only run applications through it and linux handles everything else. I don't see why it wouldn't be possible to literally only have the application windows from the guest. Also, I'm not sure whether any vms do this but there could also be a way of listing all of the guest os's applications with the linux ones say like in the gnome show application thing. The same thing could be done rather less legitimately with OSX as well to get apps like logic pro.

Unfortunately as a student I lack both experience with vms and money to purchase new hardware with the virtualization capabilities. Do any of you guys have any thoughts / experience with this sort of thing? or have any advice for stuff that I could read or do to maybe have a crack at developing this myself?

Currently in order for a VM to use your graphics card you have to pass it through to the VM. This is essentially the equivalent of unplugging it from the host machine and plugging it in to the virtual machine. This means that you have to have two graphics cards and two displays, meaning you can't have seamless mode with passed through graphics.

In the future you will be able to use virtualisation on your GPU in the same way that you can the CPU and you won't have to pass it through any more.

By the time that happens though I'd hope that most of the stuff everyone wants will run natively on linux anyway.

Are there no ways round this? Like doing some sort of streaming from the guest to host? What is the difference between passed through graphics and normal virtualization that allows the seamless mode?

The difference is that when you pass a graphics card to the VM the video output comes from that graphics card, therefore it will be on the display which is physically plugged in to it. Normally the video output is virtual is is outputted as VNC or something similar to the host.

There's no reason why you couldn't stream the video output to the host though, but it will be just like using VNC or remote desktop on a real computer.

When virtualisation on the gpu is a thing, how will they get round this problem? And if standard desktop vms do this any way is it a big deal and do you think VNC or similar would be bad?

The same way it currently works for CPU virtualisation. The VM can use the CPU with only a small increase in overhead. But this doesn't currently exists for GPUs. So the only way for a VM to have a GPU is to give it the card, making it unavailable to the host machine. As if you were to physically remove the card and place it in another computer.

'Standard desktop VMs' don't do this, the virtual display adapter is software, it can't use the GPU on the host machine that's why pass though is used if you need a GPU.

VNC and similar things have a lot of latency, for basic stuff it's okay but you couldn't use it for video or 3D graphics, not very well anyway. If you've got two computers then install VNC and give it a try, you'll see what I mean.

Even if you could do all that you still wouldn't be able to run an .exe file on linux, you have to think of a VM as a separate computer, it won't have access to the files. Virtual Box's seamless mode just crops the VNC window to the size of the windows of whatever application you're running, giving the impression that the application is running on the desktop of the host machine, but it's just a VNC window displaying another computer.

My idea with the .exe files was to make like a translation layer between the host and guest. So there is an application or just part of the vm that you can open the .exe with and the app is then available to the vm and it can run the it, like when you put a dvd with an autorun into a pc. I don't think that would be particularly problematic to implement. My thinking was that things like steam in home streaming are good enough so something like that would allow applications like adobe premiere to be used.

Like I said, a VM is for all intents and purposes a separate computer. There is no way to pass an executable file to it, even if you could most programs need to be installed on whatever machine they're running on, they have dependencies, registry keys, libraries, etc. And computers generally don't like remote execution for security reasons. What you want is to be able to install windows applications on a linux machine, have it execute via a VM and output back on the host machine. It's not possible. Wine is a much better solution for that.

As for streaming from the VM to the host, completely possible, however for something like premier or photoshop where you are dealing with images and video having the output transcoded into video is going to degrade the image so you're not going to see it the way it really is. Also the latency would probably be annoying for stuff like that. For games it's okay.