Starting down the Linux KVM road. But first

I am playing a bit of getting the cart before the horse. Maybe the wheel before the cart.

Ultimately, my goal is going to be to build a new system (probably going to be threadripper/volta) in the next year or so which I want to be linux based with a handful of VM’s- pretty much exactly what Wendell has shown lately. I play a fair amount of games, do drafting/AutoCAD 3d Modeling, and also work on photo and video editing. I’d like to run a couple of specialized iterations of windows 7 and 10, as well as an android and perhaps steam OS.

I am pretty well versed in windows platforms, but though I have played with a fair number of VM’s in windows, have a pretty poor sense of linux distros. Watching a ton of of KVM material has helped me grasp the ideas behind the PCI passthrough, but I am struggling to get to a point where I could have any intuition with a console, the general framework of a linux install, managing resources, etc. I can follow tutorials, but I would rather have some intuition and deeper knowledge of what I am doing.

Does anyone have a suggestion as to where I can watch some videos going over good fundamentals? I feel like the youtube videos are either “this is a mouse, this is a keyboard” or tutorials that simply list off commands and switches without any context to their function or the abstracts of how the operating system works.

As of now I built a functional Archlinux VM that I am playing with in VMWare, so learning within the context of Archlinux would be great, but frankly if there are better resources relating to Ubuntu or Debian or anything else, I am wide open. I think I need to start with the core of linux.

Sorry for the long winded first post. Thanks for reading, and hello!

Operating systems like ArchLinux and Gentoo are excellent for learning how a linux system operates from the ground up. I actually really really like this concept, but in my day to day work, I simply don’t have time to run these platforms, the upkeep is quite high.

For a daily system I swear by Debian, I have and do work with Ubuntu, RedHat, CentOS on a daily basis providing Level3 tech support and consulting services for large companies running these systems. Out of all of them, Debian is still my go to and as such I will continue along this line.

Please do also note that Arch has some of the best technical documentation around for this kind of thing, and most if not all of it can be applied to a Debian platform also.

KVM under Debian is pretty easy, there are pre-compiled packages that just wrap everything up. You have two paths you can go down:

  1. libvirt - This is a wrapper/management interface to qemu
  2. qemu - You are able to just run qemu directly, but for a beginner I recommend against it.

I am going to assume you already know how to install packages under Debian, if not google “Aptitude”. Personally my command of choice is apt-get. The apititude command is a wrapper around apt-get and doesn’t provide as much fine grained control.

So to get started install libvirt-daemon and qemu-kvm:

[email protected]:~# apt-get install libvirt-daemon qemu-kvm

Once that is done you will want a way to manage the VMs, you can do this using virsh on the command line, or the more commonly used virt-manager.

  [email protected]:~# apt-get install virt-manager

At this point you will also need to give yourself access to KVM and libvirt by adding your user to the groups kvm, libvirt, libvirt-qemu. You then will be able to run virt-manager as your general user and create a VM.

Further on from this you may want to look at setting up a dedicated bridge device rather then relying on libvirt to do this for you.


I guess our roles are reversed.

I used to be a Windows user and then some time before Vista I stopped using Windows (went with a Linux+Mac combination since) - Windows just wasn’t a requirement for my work or anything I was into over time.

Recently, I’ve started looking into Windows out of curiosity. Things that are simple in Linux like “oh I just want a simple small script to run as a service in the background when the system starts and then stop when system stops” are shrouded behind tons of hard to find documentation and less than “helpful” libraries. Hello Microsoft is it so hard to provide an API reference somewhere that is developer IDE / language agnostic.

In Linux, in comparison, lots more of the system is exposed to the user, the veil is much thinner.

Now that I’m rediscovering Windows again after years of using Linux, I’m noticing analogies between the two. For example, Windows registry is just a database-ish implementation equivalent to a combination of /etc/ , dotfiles, xrdb, gconf… ; IO completion ports / iocp are similar to epoll on Linux… And so on.

I stopped using Windows right before powershell became a thing, whenever I’m in Windows I find myself reaching for the terminal and stopping these days, I wasn’t aware how dependant I’ve become on it over the years.

Possibly, Linux things will just become more natural to you over time and with use, ask if you get stuck trying to solve a specific problem.


I agree with @gnif on how to reason about operating systems. Today most up-to-date and widely used distros can do passthrough with KVM straightforwardly, so it becomes more a matter of what kind of Linux you are comfortable of using. I have been using (X)Ubuntu since I started with KVM virtualisation 5 years ago, to me it represents the sweet spot between newness of software and predictability of the upgrade cycle.

Before that I used Gentoo and XEN, however with Gentoo being rolling-release, it was hard to plan on beforehand which weekly system updates would run smoothly and which would need some additional consideration due to a major library or daemon subsystem upgrade. I did not always have the time when the machine needed it. Arch is probably similar in this respect, though I have never used it. With Ubuntu I know that I will upgrade every 6 months (or 12-18 months if I choose to) and can plan for that.

Last time I tested Debian I had to rely on unstable packages to get passthrough to work, but this was several years ago so I doubt this is a problem anymore.

I also agree regarding Arch as a source of documentation. The Arch wiki pages on KVM virtualisation and passthrough are great, I usually follow them when setting up or tweaking passthrough on Ubuntu. I believe their usefulness owe to the fact that Arch is a very lean and “generic” Linux system, so its documentation can be almost be seen as a documentation for Linux in general. When I recently set up a new machine I alternated between these two guides:

The second guide I used to check up any Ubuntu-specific procedures, however using these together makes it very clear which are generic steps for any Linux and which are specific for Ubuntu. Note that the Ubuntu link is older and describes some procedures no longer needed, you don’t have to download UEFI roms manually for example. If in doubt, trust the Arch pages, they are most likely to be up to date.

Apparently Fedora is also quite popular for KVM virtualisation, especially among this forum’s users. There is a logic in that as a lot of the enterprise development of KVM virtualisation is carried out by RedHat.The bottom line is that you need not worry much about distro choice, as long as you stick to a fairly supported one.

1 Like

Proxmox is built on Debian if that says anything.

I’m with @gnif. his assessment is spot on.

Wow thanks so much for the all the input. Predictably, I am dealing with the flu as all this great stuff is presenting itself.

Sounds like a good way forward is going to be continuing to use my Arch build as an “anatomical” tool, but perhaps add something like a Debian build to the mix start getting a little more of the everyday, real world application. And perhaps when things are crystallizing a little more I may be able to get a little more practical use out of Arch.

Are there any thoughts as to some worthwhile youtube channels to help me get a little more conceptual material? I am obviously following @wendell closely on the Level1 channels, and I used gloriouseggroll’s guide on arch. I have watched some stuff on Joe Collins’ channel regarding appimage (I am very interested in keeping things portable) but was hoping to find some other good viewing options. I can understand that folks here are probably not 100% keyed in on this given your levels of proficiency- but perhaps there are some better known Linux channels that most people feel are dependable or frame things in a sensible manner?

@gnif I plan to donate to your campaign as soon as the phlegm allows. It’s really exciting to see this stuff developing right as I am deciding to start learning this stuff. Thanks for your work and I look forward to watching this unfold! :slight_smile:

I can tell you what to avoid! :stuck_out_tongue: Linus Scetch Tips.

Thank you kindly! :slight_smile: Every bit helps, we are slowly getting there, only 36 hours and we have already reached > 50% of the final goal.

I don’t want to side-track the thread, because I’d be interested in something similar (although I have spent more time on debian-based linux, mostly Mint).

I’m curious about the stability of the new AMD platforms though, especially threadripper? As to be expected I heard a lot of moaning about the stability issues of threadripper in particular when it first arrived. Is this still an issue, is it mostly solved in linux but perhaps more prevalent in Windows? Or is this something that has been addressed already?

It has been addressed, TR has a single issue that we know about that is causing problems which is the PCI power state issue for VMs, which is partly what this fund raising campaign is about.

1 Like