HOW-TO make dual-boot obsolete using XEN VGA passthrough

Questions about virtualization software
Forum rules
Before you post please read how to get help
powerhouse
Level 5
Level 5
Posts: 986
Joined: Thu May 03, 2012 3:54 am
Location: Israel
Contact:

Re: HOW-TO make dual-boot obsolete using XEN VGA passthrough

Postby powerhouse » Sun Sep 20, 2015 5:01 pm

bigtubbin wrote:Alright, I've been looking over this for a couple hours and my eyes keep glazing over the list and using a terminal seriously for the first time with the many restarts to check the BIOS is getting a little frustrating. This could use a cleanup or its own little Wiki page to try and show people how it works. (I've lucked out on the hardware side with an ASUS HERO Maximus 7 (8?) with the Z97 chipset, an i7 4790K, 32GB of RAM, an AMD 280x (or was it 290, I can't remember) and more than enough room spread over 2 SSDs and several HDDs.)

This tutorial seems to have information to other VM software, unless Xen and Qemu are the same thing.

It's also talking about installing Linux Mint on a VM as well, or am I reading that wrong? Is it talking about installing the Xen Hypervisor or booting into that?

I can't tell if IOMMU support has been enabled since I went and activated the VT-d in the Bios (can't tell by some of the documentation if it's the same thing or different), but can't seem to find the terminal command to see if it's activated.

And then there's something to do with shell scripts, something I haven't gotten to work right yet. Got any good tutorials on how to run them?

There doesn't seem to be a GUI that's a part of the system that allows switching or dedicating one graphics processor to something, like putting the system on Intel HD and the Windows VM to the AMD GPU. (Still haven't switched from software rendering to hardware rendering from what the pop keeps saying on every restart. I have no clue if my hardware graphics driver for both is even installed.)

What is he talking about in #2 about the LVM, something with xl toolstack, GRUB, and windows configuration files? Is he talking talking about GRUB as the physical PC itself or inside the VM?

I've been wanting to switch to linux for years, but the only thing that's held me back was that gaming still isn't well supported on this platform. Sorry for the venting, I want this to succeed since I don't want Win10's spyware on my PC.


No, Xen and qemu are not the same thing. But Xen uses the qemu emulator to boot Windows.

Generally there are two ways to run Windows on Linux with hardware graphics support: Xen or KVM. Both are free as in beer. VMware offers a commercial solution, and some people reported success with it.

This tutorial describes using Xen (but you'll find references to KVM tutorials as well).

If you activated VT-d in the BIOS, it should be working. Use the dmesg command in a terminal window to see if it's listed.

Step 2 is confusing: It actually says that you should install Linux Mint using LVM partitions. It doesn't say how to install, but has a link to a tutorial. The rest under step 2 refers to Linux Mint 17. The tutorial was written for Linux Mint 16. The list under step 2 shows the differences when installing on Linux Mint 17. Each number (step) refers to a step in the installation further down in the tutorial. It's confusing, I know. I hope to be able to rewrite that one day.

GRUB is a bootloader. New motherboards use UEFI bootloader by default, but that can be changed in the BIOS. I haven't had much experience with UEFI, which is why I use GRUB. Please use whatever works for you. If you use UEFI, don't follow step 4 but adopt the UEFI configuration to make it work.

"windows configuration file" means the win7.cfg file mentioned in step 12. You need to adopt it to meet your hardware requirements and to specify the amount of CPU resources and memory you want to allocate to your Windows guest.

The reason I wrote this tutorial was to show others like you that you can run Linux on a day-to-day basis as your main OS, and start a Windows virtual machine (VM) when needed for gaming or other applications that currently only run on Windows. It's a pain in the neck to get it working, but I couldn't be more happy now that it's running smooth for more than 3 years.
Asus Sabertooth X79, i7 3930K CPU, 8x4GB Kingston DDR3 RAM, Noctua NH-D14 CPU cooler, Gigabyte GTX 970 + PNY Quadro 2000 GPU, Asus Xonar Essence STX, Sandisk Extreme 120GB + Samsung EVO 850 250GB SSD + 5 HDD, Corsair 500R case, SeaSonic 660W Gold X PS

wow1
Level 1
Level 1
Posts: 3
Joined: Tue Sep 08, 2015 3:59 pm

Re: HOW-TO make dual-boot obsolete using XEN VGA passthrough

Postby wow1 » Sun Sep 27, 2015 9:25 am

powerhouse wrote:
wow1 wrote:hi I am getting stuck on step 20 I successfully boot windows 7 and start installing it but after the first restart it boots on the final step of windows installing "Completing Installation ... " and nothing happens I have waited for an hour and nothing change did it couple of times the same thing I don't get error in the terminal the vncviewer dose not freeze I can move the mouse inside the viewer every thing looks like it is working did some one have the same problem or know what is happening

UPDATE
i have solve the problem by reducing the memory in win7.cfg to 2GB from 4GB now the installation is very quick not like before needing 10 min just to to start and it dose not hang on Completing Installation ... but i still want to have more than 2GB for ram in windows I have 8GB and reserved 2GB for dom0 and want to give the other 6GB to domU


Check your Xen and Windows configuration files. Don't use my win7.cfg configuration file in step 12 without adjusting it to your requirements.

If everything is OK, it might be in issue with Xen and your specific hardware. Post your specs and the config files. Perhaps I or someone else can help.


I will deal with the ram later i thing it is on now but i can no get the windows to work properly every time i install drivers form my video card and restart it just BSOD and i have to go in safe mode and uninstall them can you help me with that i tried some older drivers but with no success i am using Sapphire HD 5750 512MB and drivers from amd

powerhouse
Level 5
Level 5
Posts: 986
Joined: Thu May 03, 2012 3:54 am
Location: Israel
Contact:

Re: HOW-TO make dual-boot obsolete using XEN VGA passthrough

Postby powerhouse » Mon Sep 28, 2015 2:32 am

wow1 wrote:
powerhouse wrote:
wow1 wrote:hi I am getting stuck on step 20 I successfully boot windows 7 and start installing it but after the first restart it boots on the final step of windows installing "Completing Installation ... " and nothing happens I have waited for an hour and nothing change did it couple of times the same thing I don't get error in the terminal the vncviewer dose not freeze I can move the mouse inside the viewer every thing looks like it is working did some one have the same problem or know what is happening

UPDATE
i have solve the problem by reducing the memory in win7.cfg to 2GB from 4GB now the installation is very quick not like before needing 10 min just to to start and it dose not hang on Completing Installation ... but i still want to have more than 2GB for ram in windows I have 8GB and reserved 2GB for dom0 and want to give the other 6GB to domU


Check your Xen and Windows configuration files. Don't use my win7.cfg configuration file in step 12 without adjusting it to your requirements.

If everything is OK, it might be in issue with Xen and your specific hardware. Post your specs and the config files. Perhaps I or someone else can help.


I will deal with the ram later i thing it is on now but i can no get the windows to work properly every time i install drivers form my video card and restart it just BSOD and i have to go in safe mode and uninstall them can you help me with that i tried some older drivers but with no success i am using Sapphire HD 5750 512MB and drivers from amd


Just to make sure we are talking about a known Windows reboot issue related to AMD drivers: Can you boot Linux/Xen, then boot Windows? When you need to reboot Windows, shut down Windows and also shut down Linux and boot both.

Does Windows boot now without issue the second time?
Asus Sabertooth X79, i7 3930K CPU, 8x4GB Kingston DDR3 RAM, Noctua NH-D14 CPU cooler, Gigabyte GTX 970 + PNY Quadro 2000 GPU, Asus Xonar Essence STX, Sandisk Extreme 120GB + Samsung EVO 850 250GB SSD + 5 HDD, Corsair 500R case, SeaSonic 660W Gold X PS

wow1
Level 1
Level 1
Posts: 3
Joined: Tue Sep 08, 2015 3:59 pm

Re: HOW-TO make dual-boot obsolete using XEN VGA passthrough

Postby wow1 » Mon Sep 28, 2015 4:36 am

powerhouse wrote:
Just to make sure we are talking about a known Windows reboot issue related to AMD drivers: Can you boot Linux/Xen, then boot Windows? When you need to reboot Windows, shut down Windows and also shut down Linux and boot both.

Does Windows boot now without issue the second time?


i try it it still crashes with BSOD yes i can boot in xen and then in windows and install the driver but after the rebood it just crashes

powerhouse
Level 5
Level 5
Posts: 986
Joined: Thu May 03, 2012 3:54 am
Location: Israel
Contact:

Re: HOW-TO make dual-boot obsolete using XEN VGA passthrough

Postby powerhouse » Wed Dec 30, 2015 2:42 pm

Xen has been great to me. I've been using it for more than 3 years. Ever since I installed Xen and ran Windows in a VM, I never had to dual-boot. I cannot even imagine how it was before (it must have been hell!). I started out with LM13, then 14, then jumped to 16 and finally 17, 17.1, and LM 17.3 now. My last Xen hypervisor was 4.4. Yes, was :( .

I have come to a point where both practical reasons and curiosity got a hold of me and made me switch sides (no, NOT Microsoft :twisted: :shock: ). My host GPU, a AMD HD7770 (that I got as an upgrade to an AMD HD6450), didn't cut it. Recently it wouldn't even play Youtube videos. The other issue was that it wouldn't communicate with my screen through DDS, which I need to calibrate my monitor. With my Quadro 2000 under Windows monitor calibration works fine.

After several disappointments with AMD hardware and drivers, I decided to switch to Nvidia. Now I run the Nvidia Quadro 2000 as my host GPU and a Nvidia GTX970 in Windows. To make that happen, I removed the Xen hypervisor and started out using kvm. Well, what can I say, yet another learning curve to climb.

Regarding performance, after some tweaking I got the kvm guest more or less on par with a similar Xen guest. Of course I had to reinstall Windows, and since Windows 7 wouldn't want to install in UEFI mode, I chose to upgrade to Windows 10. The installation went surprisingly easy. Only the tweaking took time, and I'm still not done.

If you are interested in benchmarks, see http://forums.linuxmint.com/viewtopic.php?f=225&t=153482&p=1109525#p1109497 for Passmark 8 results. It also shows my old Xen benchmarks (with different GPU and another SSD).

Not running Xen any more means that I won't be able to contribute much more to this thread. I have no objection to someone else picking up the lead, if there is interest.
Asus Sabertooth X79, i7 3930K CPU, 8x4GB Kingston DDR3 RAM, Noctua NH-D14 CPU cooler, Gigabyte GTX 970 + PNY Quadro 2000 GPU, Asus Xonar Essence STX, Sandisk Extreme 120GB + Samsung EVO 850 250GB SSD + 5 HDD, Corsair 500R case, SeaSonic 660W Gold X PS

powerhouse
Level 5
Level 5
Posts: 986
Joined: Thu May 03, 2012 3:54 am
Location: Israel
Contact:

Re: HOW-TO make dual-boot obsolete using XEN VGA passthrough

Postby powerhouse » Sun Oct 02, 2016 1:10 pm

Today I've updated the tutorial and removed references to older versions of Linux Mint. The how-to is now written for Linux Mint 17.3, but should work likewise or very similar with Linux Mint 18.

I've been using KVM for the last 9 months, but I hope to be able to give Linux Mint 18 with Xen a run soon. Why am still interested in Xen, when the crowd is talking about KVM?

KVM is a mess. Yes, it progresses quickly. Yes, it has some sort of a management interface and even a GUI (virt-manager, which can also be used for Xen). But things aren't integrated and documentation sucks, in particular when it comes to performance tuning. Unfortunately KVM does need tuning to get good disk and CPU performance. The only real plus I can see is the way it supports VGA passthrough with Nvidia cards (and AMD cards).

Xen is much easier, provided you got the right hardware. Just follow the steps in the tutorial and you should be good.
Asus Sabertooth X79, i7 3930K CPU, 8x4GB Kingston DDR3 RAM, Noctua NH-D14 CPU cooler, Gigabyte GTX 970 + PNY Quadro 2000 GPU, Asus Xonar Essence STX, Sandisk Extreme 120GB + Samsung EVO 850 250GB SSD + 5 HDD, Corsair 500R case, SeaSonic 660W Gold X PS

removebeforeflight
Level 1
Level 1
Posts: 3
Joined: Thu Dec 29, 2016 6:50 pm

Re: HOW-TO make dual-boot obsolete using XEN VGA passthrough

Postby removebeforeflight » Thu Dec 29, 2016 7:06 pm

Hi,

Thank you for this great tutorial !
I'm going to deploy Xen for the same reason than you (using Lightroom).

I have a question : can I use the hypervisor/Dom0 installation as a "normal" Linux installation (using it for web browsing, word processing...) or should I install a new GNU/Linux instance in a DomU domain ? I have read the OpenSuse Virutalization Book and they say, page 167 : "For best performance, only the applications and processes required for virtualization should be installed on the virtual machine host." Any opinion about that ?

Thank you

powerhouse
Level 5
Level 5
Posts: 986
Joined: Thu May 03, 2012 3:54 am
Location: Israel
Contact:

Re: HOW-TO make dual-boot obsolete using XEN VGA passthrough

Postby powerhouse » Sat Dec 31, 2016 6:53 am

removebeforeflight wrote:Hi,

Thank you for this great tutorial !
I'm going to deploy Xen for the same reason than you (using Lightroom).

I have a question : can I use the hypervisor/Dom0 installation as a "normal" Linux installation (using it for web browsing, word processing...) or should I install a new GNU/Linux instance in a DomU domain ? I have read the OpenSuse Virutalization Book and they say, page 167 : "For best performance, only the applications and processes required for virtualization should be installed on the virtual machine host." Any opinion about that ?

Thank you


I'm glad to read that you are embarking on that route.

You can definitely use the hypervisor as a normal Linux desktop. I've been doing that for several years and there are no disadvantages to it that I can think of. Of course, if you were to run a server within an enterprise network, you would not use Linux as a desktop on the server, and then running as little as possible is the correct approach (referring to the OpenSuse book).

That said, dom0 is the administrative domain which controls the guests as well as the hardware. In an enterprise environment you do not want to have a user work on dom0. In that case you create another domU that runs the Linux desktop. dom0 is then strictly used for administrative purposes and a regular user would not have access to it. I guess you are the only user of that PC, and as long as you stick to good practices of not installing software from unknown resources and make sure you keep the system up-to-date with security updates, you should be good to go. The danger running dom0 as your day-to-day desktop is that someone or some malware might find a way to take control of dom0, which would potentially given them access to the entire system (if they gain root access). Running a Linux desktop in domU would greatly minimize the risk, since taking control over the domU would have no effect on the dom0 or other domUs. Again, for a single user on a PC (or even the occasional use by spouse or child), I'd keep everything as simple as possible and just use dom0 as a desktop.

Xen is extremely good at utilizing the resources. For example, I did a test running Lightroom to convert RAW files to jpegs while using Handbrake to rip movies. domU was given 10 out of 12 VCPUs, the remaining 2 VCPUs for dom0. Handbrake would still run at 50% or more of its native speed when all 12 VCPUs were allocated to dom0. The reason for that is that Xen takes the unused resources and allocates them to dom0 (or perhaps another domU, though I didn't test that scenario). Lightroom under Windows was not able to utilize all the available resources, which is the reason why Handbrake under Linux performed so well. I did not test this under KVM, though.

Now about KVM: You may have noticed (my last post here) that I switched to KVM. I wouldn't have done that if it weren't for a practical reason. Xen had been good to me, and I can't say anything bad about it. However, there are differences between Xen and KVM and their support of certain hardware. Let me try to summarize the support of Xen and KVM below:

domU/VM graphics:
AMD graphics - Xen or KVM (be aware that some AMD cards do not reset the card properly, which can lead to a crash on the host when you restart the domU/VM - there are workarounds under Windows)
Nvidia multi-OS graphics (Quadro 2000 and higher, pro-line of graphics cards) - Xen or KVM (these are the expensive Nvidia cards designed for workstations that won't be crippled by the Nvidia driver)
Nvidia consumer graphics - KVM. The Nvidia driver checks if it's running on a hypervisor and quits with error 43 if so. There is a workaround under KVM that disables some of the hypervisor features and tricks the Nvidia driver into thinking that it runs on bare metal. Any time Nvidia wants to they can update their driver and improve their test, lets hope they won't do it. In the meantime the KVM developers have improved their workaround and today you can enable the hypervisor features and still fool the driver through a simple parameter setting.

As you can see above, if you plan to use a Nvidia consumer GPU to pass through to Windows, then you will have no luck with Xen. Work is being done to fix that, see here: http://www.gossamer-threads.com/lists/xen/devel/439501. From what I know there is no solution yet within Xen. However, just for the completeness, here are two workarounds, if you are an adventurous type:
1. Patch the Windows Nvidia driver - see here: https://forums.linuxmint.com/viewtopic.php?f=231&t=229122. Note that this will most likely violate the EULA for the driver/GPU. Of course you need to do that inside the Windows domU.
2. Modify your Nvidia graphics card to identify as a Quadro or other pro card: http://www.eevblog.com/forum/chat/hacking-nvidia-cards-into-their-professional-counterparts/msg202901/#msg202901. A tiny mistake and you can irreversibly brick you card. So be warned! Note that some old Nvidia cards can also be softmoded via special firmware.

To summarize the above: Depending on your hardware, you should choose between Xen and KVM. For a GPU passthrough performance comparison under Linux, see http://isi.edu/~mkkang/papers/Cloud_2014.pdf. As you can see in the results, both Xen and KVM show minimal overhead.
Asus Sabertooth X79, i7 3930K CPU, 8x4GB Kingston DDR3 RAM, Noctua NH-D14 CPU cooler, Gigabyte GTX 970 + PNY Quadro 2000 GPU, Asus Xonar Essence STX, Sandisk Extreme 120GB + Samsung EVO 850 250GB SSD + 5 HDD, Corsair 500R case, SeaSonic 660W Gold X PS

removebeforeflight
Level 1
Level 1
Posts: 3
Joined: Thu Dec 29, 2016 6:50 pm

Re: HOW-TO make dual-boot obsolete using XEN VGA passthrough

Postby removebeforeflight » Sun Jan 01, 2017 6:27 pm

Hi,

Best wishes for this new year !

Thank you for this very precise answer!
For the moment, I have only one graphic card (the one integrated to my CPU i7 6700K). I will possibly add one more graphic card if I can expect a nice improvement in terms of performances inside the guest, but I'm currently not convincided that I will get a gain for my usages.
I note that in this case, I should use AMD branded card.

I run my computer for personal usage only, not inside a company network.

Currently, I managed to install Windows 7 as a guest OS with Xen. Performances seems to be good inside the guest except for the 3D performance obviously. However, when I boot my Linux with the Xen hypervisor, performances inside the host are simply bad. For example, when I scrool inside to webpage, the scroolling is very jerky. I think I will have a look with KVM, I hope performances inside the host will be better.

Thank you for your great tutorials about this 2 virtualisation technology under Linux.

removebeforeflight
Level 1
Level 1
Posts: 3
Joined: Thu Dec 29, 2016 6:50 pm

Re: HOW-TO make dual-boot obsolete using XEN VGA passthrough

Postby removebeforeflight » Sun Jan 08, 2017 4:41 pm

Hi,

First headache with virtualization : I would like to use a dedicated SATA controler for my VM in order to get best disk performances. I get a SATA controler card plugged on PCI-E interface. The card is based on the Marvell 88SE9128 chipset. When I active the IOMMU support (iommu=on in GRUB command line), the disk plugged on the card became not visible on the hypervisor. After some research, I found that this controler is buggy when activating IOMMU. I will buy another card and will retry !

powerhouse
Level 5
Level 5
Posts: 986
Joined: Thu May 03, 2012 3:54 am
Location: Israel
Contact:

Re: HOW-TO make dual-boot obsolete using XEN VGA passthrough

Postby powerhouse » Tue Jan 10, 2017 1:19 pm

removebeforeflight wrote:...For the moment, I have only one graphic card (the one integrated to my CPU i7 6700K). I will possibly add one more graphic card if I can expect a nice improvement in terms of performances inside the guest, but I'm currently not convincided that I will get a gain for my usages.
I note that in this case, I should use AMD branded card.

I run my computer for personal usage only, not inside a company network.

Currently, I managed to install Windows 7 as a guest OS with Xen. Performances seems to be good inside the guest except for the 3D performance obviously. However, when I boot my Linux with the Xen hypervisor, performances inside the host are simply bad. For example, when I scrool inside to webpage, the scroolling is very jerky. I think I will have a look with KVM, I hope performances inside the host will be better.

Thank you for your great tutorials about this 2 virtualisation technology under Linux.


There is no point in doing VGA passthrough if you don't utilize it. Right now you don't have the graphics card to run VGA passthrough. The question then remains if Xen or kvm is the answer to your needs.

If your use of Windows 7 does not include 3D acceleration, and running Windows 7 in a VNC window is all that you need, you may as well run plain old Linux Mint and install Windows 7 as a VirtualBox guest. VB offers sufficient performance for the day-to-day MS Office and similar stuff. Just don't try to run 3D games. Of course, you can continue to use Xen and when the time comes you can add a graphics card and use VGA passthrough, without reinstalling or even changing your Windows domU.

About the Xen hypervisor and bad graphics performance: When you install a Xen hypervisor, the hypervisor takes over and provides hardware drivers. The Xen hypervisor will NOT use the graphics driver you installed with Linux Mint. You may need to install the graphics driver again while running the Xen hypervisor. Try the driver tool under Linux Mint when running Xen.

KVM works a little different. When you install kvm, kvm uses the existing drivers for Linux. kvm behaves more like an application, though it does provide hypervisor features to the guests.

Both kvm and Xen have advantages and disadvantages. If you do not anticipate to use VGA passthrough, VirtualBox is a popular and easy to use virtualization solution.
Asus Sabertooth X79, i7 3930K CPU, 8x4GB Kingston DDR3 RAM, Noctua NH-D14 CPU cooler, Gigabyte GTX 970 + PNY Quadro 2000 GPU, Asus Xonar Essence STX, Sandisk Extreme 120GB + Samsung EVO 850 250GB SSD + 5 HDD, Corsair 500R case, SeaSonic 660W Gold X PS

powerhouse
Level 5
Level 5
Posts: 986
Joined: Thu May 03, 2012 3:54 am
Location: Israel
Contact:

Re: HOW-TO make dual-boot obsolete using XEN VGA passthrough

Postby powerhouse » Tue Jan 10, 2017 2:27 pm

removebeforeflight wrote:Hi,

First headache with virtualization : I would like to use a dedicated SATA controler for my VM in order to get best disk performances. I get a SATA controler card plugged on PCI-E interface. The card is based on the Marvell 88SE9128 chipset. When I active the IOMMU support (iommu=on in GRUB command line), the disk plugged on the card became not visible on the hypervisor. After some research, I found that this controler is buggy when activating IOMMU. I will buy another card and will retry !


"I would like to use a dedicated SATA controler for my VM in order to get best disk performances."

I had the same or a similar issue with the Marvel controller on my motherboard. However, I'm not so sure that passing through a SATA controller will greatly improve performance. Disk performance under Xen or kvm (when you get the settings right) are almost as good, as good or sometimes even better than bare metal. Unfortunately I can't find the very detailed benchmark study I saw on the Internet.

I never saw the need to pass through a controller. In addition, I prefer the convenience of being able to access my drives from Linux, for example for backup.

EDIT: Here some of my own benchmarks running Xen or kvm:
UserBenchmark - post your results
Post your Passmark results of your Windows VM
Asus Sabertooth X79, i7 3930K CPU, 8x4GB Kingston DDR3 RAM, Noctua NH-D14 CPU cooler, Gigabyte GTX 970 + PNY Quadro 2000 GPU, Asus Xonar Essence STX, Sandisk Extreme 120GB + Samsung EVO 850 250GB SSD + 5 HDD, Corsair 500R case, SeaSonic 660W Gold X PS

xen_wanter
Level 1
Level 1
Posts: 1
Joined: Fri Sep 01, 2017 8:14 pm

Re: HOW-TO make dual-boot obsolete using XEN VGA passthrough

Postby xen_wanter » Fri Sep 01, 2017 8:20 pm

Hey! Thanks for the great guide and thread.
I'm completely new to xen (but with lots of experience using other virtualization stuff).

I'm hoping to set up a xen hypervisor running off debian/ubuntu/mint/etc, then run a GPU passthrough to a Windows 7 VM.
The GPU is an ATI Radeon 290 (think I saw the 200 series in the list of tested hardware).

Some questions:
- I understand the GPU passthrough allows me to run e.g. the ATI GPU driver in the Windows VM. Can I also run a Steelseries mouse driver in Windows for a USB passthrough mouse?
- Can I start off by installing my dom0 OS and hypervisor with no GPU in the machine, then add it later along with the Windows VM?
(so I can start off experimenting with Xen and some Linux VMs before going all-in)
- Has anyone been able to run a decent gaming setup using these techniques? I saw some youtube videos where people run racing games at 60fps and so on. What about Quakeworld at 144+ fps? (On hardware that can run 1000+fps natively in Windows)

Any advice would be greatly appreciated. Thanks again for the guide!

powerhouse
Level 5
Level 5
Posts: 986
Joined: Thu May 03, 2012 3:54 am
Location: Israel
Contact:

Re: HOW-TO make dual-boot obsolete using XEN VGA passthrough

Postby powerhouse » Sat Sep 02, 2017 6:50 am

xen_wanter wrote:Hey! Thanks for the great guide and thread.
I'm completely new to xen (but with lots of experience using other virtualization stuff).

I'm hoping to set up a xen hypervisor running off debian/ubuntu/mint/etc, then run a GPU passthrough to a Windows 7 VM.
The GPU is an ATI Radeon 290 (think I saw the 200 series in the list of tested hardware).

Some questions:
- I understand the GPU passthrough allows me to run e.g. the ATI GPU driver in the Windows VM. Can I also run a Steelseries mouse driver in Windows for a USB passthrough mouse?
- Can I start off by installing my dom0 OS and hypervisor with no GPU in the machine, then add it later along with the Windows VM?
(so I can start off experimenting with Xen and some Linux VMs before going all-in)
- Has anyone been able to run a decent gaming setup using these techniques? I saw some youtube videos where people run racing games at 60fps and so on. What about Quakeworld at 144+ fps? (On hardware that can run 1000+fps natively in Windows)

Any advice would be greatly appreciated. Thanks again for the guide!


If you are familiar with virtualization, you should be able to manage Xen.

Any of the mentioned distributions are fine.

To your questions:
1. You will use the ATI GPU driver under Windows. The best is probably to start with the driver first, and then install the rest of the AMD software, if needed (make a backup of the VM before installing the rest).
I believe you will be able to use the mouse driver under Windows. If not, you will need to pass through a USB controller to your VM, that is if you can spare the controller.

2. You do not need a desktop to install the Xen and the OS. But it might be more convenient to install everything at once with a graphics card installed and used by dom0. But it's your decision.

3. I'm not a gamer, but the benchmarks I've performed both under Xen and now under kvm show that graphics performance should be within 5% that of bare metal. In other words, you won't notice the difference. If your natively installed Windows game runs for example 100 fps, you should get somewhere between 95-100 fps in the VM. If the game is CPU intensive, it will depend on your CPU settings and there will be a little trade-off running a hypervisor, as the latter and the dom0 will also use some of the resources. But to my experience, that is minimal.

Everything depends on hardware - your CPU and motherboard must support IOMMU, that is VT-d on Intel machines or SVM on AMD machines.

I'm currently using kvm for that, but it shouldn't hold you back using Xen. If you feel that Xen doesn't work for you, have a look at my kvm tutorial (sticky thread). It's much like the Xen tutorial, but using the kernel native hypervisor.

Xen is a great system. I sometimes regret that I switched to kvm, though kvm works well too. The problem I see with kvm is that it appears to be pretty messy and lacks proper documentation.

If you run into problems with Xen, you should sign up with the Xen mailing list. There are very helpful and knowledgeable people on that list. Unfortunately I'm not using Xen anymore and am not up-to-date with the latest Xen advances. If you succeed, please share your experience here.
Asus Sabertooth X79, i7 3930K CPU, 8x4GB Kingston DDR3 RAM, Noctua NH-D14 CPU cooler, Gigabyte GTX 970 + PNY Quadro 2000 GPU, Asus Xonar Essence STX, Sandisk Extreme 120GB + Samsung EVO 850 250GB SSD + 5 HDD, Corsair 500R case, SeaSonic 660W Gold X PS


Return to “Virtualization”

Who is online

Users browsing this forum: No registered users and 1 guest