Better than an unraid server? KVM/QEMU in Arch Linux

All things related to software and development.
Windows, Linux and Mac.
User avatar
UraharaUlquiorra
Game Development Club Leader
Posts: 10
Joined: Wed Feb 24, 2016 7:43 pm
Country: South Africa
Firstname: Alano

Better than an unraid server? KVM/QEMU in Arch Linux

Postby UraharaUlquiorra » Thu Oct 27, 2016 3:32 am

Hello everyone,
I thought of writing this post, because I feel that it could help those wanting to run 2 gamers one PC without Unraid server or for those thinking of switching over to Linux, but not losing all of the gaming capability they had before the switch.

I know, I know. It's exams and I should focus on studying, but I just couldn't help myself by writing about this interesting experience I have had this last month with KVM/QEMU on Arch Linux.
Now this is somewhat related to the previous post "Unraid server" discussing how my experiences weren't as I expected them to be.

Synopsis of the article:
My experience of running multiple OS's at once for gaming using KVM/QEMU and Arch Linux.

What is KVM/QEMU?
KVM:
"KVM, Kernel-based Virtual Machine, is a hypervisor built into the Linux kernel."
https://wiki.archlinux.org/index.php/KVM

QEMU:
"QEMU is a generic and open source machine emulator and virtualizer. QEMU can use other hypervisors like Xen or KVM to use CPU extensions (HVM) for virtualization. When used as a virtualizer, QEMU achieves near native performances by executing the guest code directly on the host CPU."
https://wiki.archlinux.org/index.php/QEMU

My PC setup:

Okay, so why did I list my pc specs you ask? Well you should note that I want to achieve running two people on the same system at one time and I only have "one" graphics card. In my case I was fortunate to have a strong CPU delivering a moderately strong graphics output (for an onboard gpu ofc). Most guides will tell you "You need two graphics cards, one to run the main system on and the other for the secondary system." (which is true), but you can also do this headless. Meaning that the main OS (linux) will run without a screen and using some sort of controlling mechanism such as VNC to control it, but who wants to do that? It will kind of defeat the whole "two gamers on one pc". So the only option left is to use the onboard gpu for the linux system and the discrete card for the secondary OS.

So my initial thought was to use OpenSUSE 42.1 Leap to run the kvm on as it is really easy to install and setup the VM (virtual machine). Unfortuantely I learned that the kernal Leap was running on did not support the new Skylake architecture, which for me means no gui from the onboard. On startup I would just recieve the bug splat error message telling me KDE plasma had crashed without doing anything else (just a black background). I researched into the matter and the only real solution I could find to my problem was to move to Arch Linux.

Arch the saviour:
So although the title suggests that Arch sounds like it made my life easy and saved me from this dreadful problem, it wasn't really that straight forward. First issue, I am still but a noobling in the Linux community. Secondly I like getting results fast.

For anyone else that has installed Arch Linux, respect ;) . For those that have never attempted Arch, well google is your friend. But I shall be very kind and give you a video that helped me. Now remember as this post ages and Arch changes, the video will kind of be useless. So I give no gaurantees on it working a few months from now.
https://www.youtube.com/watch?v=MMkST5IjSjY

Some issues to prepare yourself for menatally and physically:
First off you will probably have to set aside about 3 days. For some it might be less or more, but this is how long it took me. Also internet speed is going to play a bit of a role in this one as Arch doesn't come pre-packaged with everything you need. You need to install from the ground up and download everything (about 2GB) before you have a working OS.

GPU passthrough
The GPU passthrough is the hardest thing, especially if you are not so experienced with Linux. You cannot passthrough the onboard GPU as it is attached to other functions of the CPU and you would need to pass the whole CPU through to the guest OS (which seems a bit far fetched). Just remember that do not just type in any command you see on any forum, please do your reading on the forum you are just copying something off of. I have countlessly been saved by a comment from someone else three or four posts down where they explain something like "this command only working for this version...".

Risks
No risks to your physical hardware, but do note that you can destroy your Arch Linux if you do something wrong. In my case, after destroying a Linux distro I always feel best to just re-install. It takes less time to redo the whole thing than to try backtrack the problem and reaching a dead end.

Which OS am I virtualising?
Windows 10 x64 Single Language
The very thing I despise I now depend on. :|

What made you decide to move to Linux
Stability. Open Source. Interest in it and its evolution.

Conclusion
I have been runnig this system for two weeks now. I have had no issues with the system. I can run all my games on the Windows VM with top notch FPS. I am really impressed with the systems resource usage (obviously linux only uses like 500MB RAM) and windows (1~2GB idle).
Worth it? Definitely! :D

I am thinking of gathering all the resources and steps I followed and posting it in the coming days for those who are interested.
Please give me feedback in the comments below of what you thing?

Kind Regards,
Alano (Benehiko)
Summoner Name: Arki Benehiko
:D
Image

MarukoViBrittania
Posts: 18
Joined: Mon Feb 22, 2016 10:04 pm
Country: South Africa
Firstname: Marco

Re: Better than an unraid server? KVM/QEMU in Arch Linux

Postby MarukoViBrittania » Fri Oct 28, 2016 12:43 pm

Please do post your resources. I'm planning on trying something similar after exams
=^.^=


Return to “Software”

Who is online

Users browsing this forum: No registered users and 2 guests