Give a Win guest VM VT-d access to the sole graphics card?
Linux - Virtualization and CloudThis forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Give a Win guest VM VT-d access to the sole graphics card?
I'm pretty much a complete novice to VT-d (I've often run VirtualBox on a Windows host, and tried VMware on a Win host once or twice a while back, but that's the extent of my virtualization experience. Never touched VT-d). So I wanted to see if something like the following was feasible or even theoretically possible at all:
Assuming a computer that supports VT-d (not *just* VT-x) in the CPU, motherboard and BIOS: Suppose this computer has just one video card (integrated, although with multi-monitor support...but I'm guessing the multi-monitor part wouldn't make any difference), and you wanted to run Linux as the host OS, but [either permanently or temporarily, either way] give a virtualized Windows guest VT-d-based access to the (3d accelerated) graphics card.
Would that be:
- Entirely doable?
- Theoretically possible, but tricky or uncharted territory?
- Some major reason it cannot be done without an additional GFX card?
Or: What if the linux host was set up to (optionally?) work as headless, and the windows guest (with VT-d access to the GFX card) could simply ssh and/or vnc back into the linux host when necessary? Would that be any more feasible?
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680
Rep:
Theoretically if you had a headless Linux install you could allow a guest to use a graphics card but I've not seen evidence that anyone has done it and certainly not in VirtualBox. I've often toyed with the idea of having two graphic cards and giving one to a Windows guest but last time I tried it (which admittedly was a few years ago) I couldn't get it to work.
Not sure there is a great reason for this. Most folks might just run windows OS as host and run vm on linux. Or they may just make a windowless client.
I guess it should be possible but I've never tried it.
The point of vt-d is to more integrate hardware with a vm. That does assume that you have some of the most advanced boards and most current software.
Don't see any reason why you couldn't do that, but it'd be tricky to setup, though I guess you could ssh into the host with another computer after binding the graphics card to the guest. I would use KVM for that and follow one of the several threads out there. This one
I've played around with xen, but my hardware doesn't support vga passthough
My laptop has 'better; xen support using open source ati drivers..
Since only one gpu I've not put much effort into vga passthrough, but xen vms work (hvm pvm), and the dom0 is useable 'as normal'
Although other constraints (memory) limit the experience, one ,, maybe 3 small vms
My desktop 'fails', basically the nvidia gt620 'bombs out' regardless of driver
Xen vms work, but I have no 'local' access, only over network
Still it is good as headless system where I can run multiple servers
Not sure there is a great reason for this. Most folks might just run windows OS as host and run vm on linux.
Perhaps, but (speaking purely for my own self here) I've had my fill of Windows as the main host.
To be clear (and I realize this sorta contradicts what I said earlier), I wouldn't always be running things this way, just for things like Unity3D, or the occasional videogame, etc.
I just thought it might be an interesting "escape hatch" option when/if the usual solutions fail:
- Running 3D accel inside a VM *without* using VT-d (or AMD equivalent) has notable limitations, AIUI.
- I've heard good things about running games and such under Wine, which sounds awesome. But of course there's no guarantee I won't run into anything less Wine-friendly.
So I figured this could be a nice "middle ground" solution between those options versus having to completely shut down the entire Linux system to dual-boot into Windows. At least, in theory.
BTW, (warning: novice question ahead, I'm still learning about VT-d) it's my understanding that VT-d does *not* provide any way for the guest and host to share access to a hardware device (other than just simply not using VT-d). VT-d is apparently *just* for assigning a device *exclusively* to a single specific VM guest (and, as the main benefit, allow the VM to access it directly instead of through the host acting as a proxy). Is this all correct?
BTW, (warning: novice question ahead, I'm still learning about VT-d) it's my understanding that VT-d does *not* provide any way for the guest and host to share access to a hardware device (other than just simply not using VT-d). VT-d is apparently *just* for assigning a device *exclusively* to a single specific VM guest (and, as the main benefit, allow the VM to access it directly instead of through the host acting as a proxy). Is this all correct?
Yes, this is correct and the reason why you need a separate videocard for the VM, at least for now, this may change in the future.
From my experience: I am a gamer and I have tried to go Windows-less, but it isn't worth the hassle. I have tried gaming in a VM, which works for some older games, but this is rather the exception. Not all of my games work with Wine sufficiently, so this is out of question either. In the end I just reinstalled Windows in a dual-boot setup, but I reboot into Windows only rarely since most of my favorite games got a Linux edition (thanks to 2K Games for porting Civilization V and XCOM, thanks to Valve for porting all their stuff, thanks to the many independent developers that release for Linux also).
As VM technology advances, more and more hardware is being made available to the vm client directly. Currently one can attach a few components directly or indirectly to a client. The cpu is exposed directly and usb can be exposed. Adding in support for pci cards is next part of this progress.
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 7,680
Rep:
It was something like this I started with: https://www.virtualbox.org/manual/ch...pcipassthrough
I was trying to use my (I think) NVIDIA 7300 GTX for the guest and my 9800 GTX for the host but I couldn't get a handle on exactly how to see the guest before and during configuration. I did only play for less than an hour but, as I mentioned, I haven't seen any indication anyone has got PCI passthrough for a graphics card working.
The first column is a PCI address (in format bus:device.function). This address could be used to identify the device for further operations. For example, to attach a PCI network controller on the system listed above to the second PCI bus in the guest, as device 5, function 0, use the following command:
I too played around with it (my mobo has IOMMU support it seems, required for kvm/qemu to pass devices), but couldnt get it work (2 cards an old nvidia nvs 285 and an ati x1200, same result). Maybe because i used fglrx (it is said that it hogs the pci bus and prevents certain stuff from working, radeon is recommended) or some config problem. I was able to see the card in the VM and even install drivers for it but "Device couldnt start" after reboot.
Other devices like a pci network card worked though.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.