Overclock.net › Forums › Software, Programming and Coding › Operating Systems › {Guide} Create a Gaming Virtual Machine
New Posts  All Forums:Forum Nav:

{Guide} Create a Gaming Virtual Machine - Page 61

post #601 of 778
This is how i got my VM working perfectly using kvm with qemu git + seabios patches using the new vfio-pci with vga support, kernel 3.9, doing a primary vga passthrough (no cirrus emulated card) on Archlinux, with a RADEON 6950.

EDIT: This post is outdated see my archlinux guide here: https://bbs.archlinux.org/viewtopic.php?id=162768

[/code]



Bonus: Vmware using svm, runing under kvm (with -cpu host,-hypervisor)


Edited by nbhusain - 12/3/13 at 8:16pm
post #602 of 778
@nbhusain: Thanks for the kvm tutorial! I hope to be able to make use of it sometime soon.

Question: Can you use an existing Windows VM from Xen? (I think I already asked this before.) I would hate to re-install Windows.
post #603 of 778
Im pretty sure you can, just uninstall gplpv drivers and make sure you use a utility called glplv-uninstall.bat as admin( RUNNING THIS IS VERY IMPORTANT OTHERWISE U'LL GET A BSOD), also, u might need to setup the registry to load the ide,achi or scsi drivers take a look at http://www.ocztechnologyforum.com/forum/showthread.php?57789-How-to-enable-Ide-Ahci-n-m-raid-mode-without-reinstalling&s=c04b19e98dbbb716ef3192bb40b60f15
post #604 of 778
Quote:
Originally Posted by nbhusain View Post

Im pretty sure you can, just uninstall gplpv drivers and make sure you use a utility called glplv-uninstall.bat as admin( RUNNING THIS IS VERY IMPORTANT OTHERWISE U'LL GET A BSOD), also, u might need to setup the registry to load the ide,achi or scsi drivers take a look at http://www.ocztechnologyforum.com/forum/showthread.php?57789-How-to-enable-Ide-Ahci-n-m-raid-mode-without-reinstalling&s=c04b19e98dbbb716ef3192bb40b60f15

Thanks, great info. I totally forgot about the GPLPV drivers.
post #605 of 778
Good news! i just got a Geforce 470 GTX from my brother and it works using the guide i posted, reboot/shutdown works fine, the only game i tested was bioshock infinite and it was working great @ max settings.

This is how i started qemu:
Code:
qemu-system-x86_64 -m 8192 -M q35 -mem-path /dev/hugepages/ -enable-kvm 
-cpu host -name hvm -vga none -nographic 
-bios /usr/local/share/qemu/seabios/bios.bin 
-smp 6,sockets=1,cores=6,threads=1 
-device ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=pcie.1
-device vfio-pci,host=00:11.0,bus=pcie.0,addr=1f.4
-device vfio-pci,host=07:00.0,bus=pcie.1,multifunction=on,addr=00.0,x-vga=on
-device vfio-pci,host=07:00.1,bus=pcie.1,addr=00.1
-device vfio-pci,host=04:00.0,bus=pcie.0
-device vfio-pci,host=05:00.0,bus=pcie.0
-device vfio-pci,host=06:00.0,bus=pcie.0
-netdev bridge,br=br0,id=hostnet0 -device virtio-net-pci,netdev=hostnet0,id=net0

Results:


Edited by nbhusain - 5/2/13 at 10:27pm
post #606 of 778
outdated
Edited by nbhusain - 12/3/13 at 8:17pm
post #607 of 778
Quote:
Originally Posted by nbhusain View Post

... EDIT2: Archlinux guide https://bbs.archlinux.org/viewtopic.php?id=162768

Thanks for all the information and the link to your Archlinux guide. This is awesome!

Since you are familiar with both Xen and kvm, do you see advantages in moving to kvm? So far Xen has been good to me, except the latest update (Xen hypervisor 4.1.3-3ubuntu1.5) which prevented my Windows guest from loading. I had to roll back.

Anyway, I'm interested in your thoughts.
post #608 of 778
First of all i want to say that performance with xen was never an issue, it works great for me, it feels almost native, but so does kvm.
I moved away from xen initially because, like i mentioned in previous posts, it doesnt support ( as of today ) s3 resume ( on my machine at least ), and using
cool'n quiet crash my host, i cant even get to X before it crashes, i never had any issue using kvm (KVM IS LINUX!)
Second, kvm/qemu is moving way faster than xen/qemu, xen is still using qemu 0.12 i believe ( xen 4.3 supports upstream qemu but its buggy as hell), which is like 4 years old, so its missing a lot of features from upstream (GL USING AUDIO PASSTHROUGH ON WIN7 X64), and xen supposed "vga-passthrough support" involves tons of hacks that have never been merged in like 3-4 years.

Intitially what i wanted to achieve was to "partition" my machine ( each one independent as possible from the other ) using 2 cards, so for example
if wanted to say play on my windows vm and build a kernel on my dom0 using make -j128 (lol) the host wouldnt slow down the vm, or the other way arround, so i though hell why dont i passthrough my sata controller to the vm, dedicate 6 of my 8 cores to it ( and leave 2 for the host + 4GB of ram ). Well unfortunately i could never get rombios from xen to boot from it, i also tried to force it to load the optiomrom for the controller ( from a file ), and it did load but the boot table got corrupted and it wouldnt boot anything, then i found out i could use a edk2 duet image to recognize my controller on ahci mode, and boot windows 7 x64 uefi, and yeah that worked, but power management and audio passthrough still didnt work.

So then i found kvm, and it could do eveything everything xen did + more ( seabios does boot my sata controller, audio passthrough works w00t ) but PRIMARY vga passthrough didnt work, until a month ago, when i found a message on qemu-devel implementing this upstream ( without 3'rd party unmantained hacks ) so im happy with it and its working great.

EDIT: i'd like to add that gplpv drivers are horrible! HORRRIBLEEEEEEEEEE OMG SRSLY THEY MAKE ME CRY, never had a problem with virtio drivers though.
Edited by nbhusain - 5/6/13 at 1:02pm
post #609 of 778
I found another blog doing using the same method, apparently this guy managed to passthrough a geforce 660 but didnt succeed with fermi cards, which is weird cause it did work on my 470 gtx, anyway here's the link http://www.frankdtech.org/?p=6
post #610 of 778
@nbhusain: Thanks for your detailed answer. Yes, the lack of S3 support and power management when using AMD CPUs looks like a good enough reason to switch to kvm.

It's a real pity that a year ago the kvm documentation was so much behind (I hope for the sake of kvm that it improved), else I would have definitely started with kvm instead of Xen. But once I have a little more time I will give kvm a try. You definitely raised my curiosity!

It looks like kvm has better support for Nvidia cards?

About the link you posted (re Nvidia passthrough with kvm): It seems that Frank has some issues with the video performance under kvm, at least with certain games and benchmarks. Is this performance inconsistency something one has to expect with kvm, or just an exception to the rule?

One thing you may have missed about kvm: Nvidia doesn't support Xen (at least not that I'm aware of), so if you want to use a Nvidia card for dom0 you'd have to use the nouveau (or nv) driver. I don't think this is an issue with kvm, which gives kvm a clear advantage with regard to graphics adapters support.

Edit: What's holding me back from trying kvm is that I couldn't use a standard, off the shelf Linux distro like Ubuntu or Linux Mint, but that I would have to compile my kernel etc. I'm using Xen on a production machine so it needs to be solid as a rock. kvm seems to be still a little bleeding edge.
Edited by powerhouse - 5/7/13 at 5:14am
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Operating Systems
Overclock.net › Forums › Software, Programming and Coding › Operating Systems › {Guide} Create a Gaming Virtual Machine