So here’s the deal: For some time, I’ve been running Windows as my main desktop OS with Gentoo Linux in a VM. I’ve been thinking that running the systems concurrently in a hypervisor instead of one on top of the other would be better. For this reason, I’ve been looking at Xen, but I’m not quite sure if it’s the right thing to use here.
A few things to consider:
- I need to be able to bring up a full-blown desktop view of each VM.
- I need to be able to easily switch between VMs.
- I do play the occasional game and mess with game dev, so I need hardware graphics acceleration (I have a PCIe-based NVIDIA GTX 580).
- I have a Gigabyte Z68X-UD3-B3. I’m honestly not sure if it supports VT-d. The manual doesn’t seem to mention it.
- My CPU does support VT-x.
- The whole setup needs to have performance comparable to my current setup. I can tolerate some performance loss, but it shouldn’t be outright slow.
Is Xen the right thing for me? If not, what else could I use (preferably something free, or at least affordable for a student)?
VT-d support will be required for the things that you want to do.
Known working compatibility can be found here:
You generally need to enable this support in the BIOS (for Intel chips). Typically the BIOS option is “IO virtualization” or “Directed IO” or similar.
Another good references on getting Xen to work well for your needs:
Quite a few Xen users do have setups like you describe, but be prepared to work through driver issues and adding patches manually (if you card isn’t supported out of the box).
The Xen mailing lists are a great resource if you go with Xen via Xen.org.http://lists.xensource.com/.http://xen.markmail.org
You can also get help on ##xen on Freenode. Quite a few people discuss those types of setups there. Ask and be patient (you may also need to be persistent – time of day can matter)
If instead you are looking for an out of the box free (not fully open source) solution you could take a look at Citrix XenClient:http://www.citrix.com/English/ps2/products/product.asp?contentID=2300325
VGA passthrough is where you disconnect your current Dom0 graphics card from Dom0 and supply it for use to a VM; the VM sees this as their only video adapter, rather than having Cirrus as the primary with passoff to the secondary. It’s main benefit is that you don’t have to VNC into your DomUs if they have trouble booting (linux takes long to come up, VNC in and see that an fsck is taking place; windows isn’t booting, VNC in and see that it needs you to hit enter to Start Windows Normally).
VGA passthrough relies upon PCI passthrough, and VT-d is necessary for both. VGA passthrough is touted as being more difficult to setup than PCI passthrough; I have PCI passthrough working for multiple USB hubs as well as multiple graphics cards. I have yet to be able to establish VGA passthrough, although that might be because my xen config files are setup in a very weird way (initially created the VMs through virt-manager, which doesn’t handle xen config files in the standard way).
As I haven’t gotten VGA passthrough to work, I’ll speak to the PCI passthrough:
to have a single card work for multiple VMs, you should be able to assign the device to both VMs, you then just can’t run both at the same time. If you have no other graphics card, Domain0 runs headless and you can ssh in from another device to manage your VMs or just have your favorite VM start automatically and manage the shutdown/start of your other VM with a bash script that waits until the first VM is down before trying to bring the second one up.