Virtual Machines

This page is still under construction, please be patient while more is added.

The Basics

Introduction

A Virtual Machine is just like an everyday physical computer, however, there is the benefit of running multiple VM's on a singular computer via virtualization. This virtualization is done by your CPU, and allows the VM to be designated CPU Cores, Memory, Drives, PCIe Devices, Network Cards, etc.

Virtual Machines can either be run on top of a Host OS, or directly off a Hypervisor.

  • If a Hypervisor is running on top of a Host OS, then it is a Type-2 Hypervisor
  • If a Hypervisor is running natively (bare-metal) without a Host OS, then it is a Type-1 Hypervisor

Type-1 Hypervisors are preferred if bare-metal performance is wanted. (Like for Gaming VM's)

Type-2 Hypervisors are great for the convenience of firing a VM up while inside of your favorite OS.

The Hypervisor "types" can get a bit confusing when you look at some Hypervisors like Kernel-based Virtual Machine (KVM). KVM converts Linux into a Type-1 Hypervisor, but KVM can also be a Type-2 Hypervisor when it is ran on top of a Host OS.

Choosing a host/Components

Choosing a host for these VM's requires some prior planning as it depends on what you need out of these VM's.

If you daily drive Windows, you probably don't need to build a Gaming VM, which you can give a whole GPU to, as typically the Host (Windows) would be used for that. If you daily drive Linux for say work, but you want to play some games that Linux does not have support for, then you can either Dual Boot or simply boot up a VM with a separate physical GPU given you have the memory, storage, and cores for it. This VM way on Linux is favorable as most Linux distros natively support KVM, which can turn the distro into a Type-1 Hypervisor for running these VM's.

  • If you plan to not even use a host OS and to just strictly use VM's, then a dedicated Type-1 Hypervisor is preferred.
  • Some Type-1 Hypervisors are for commercial use, so they are paid. VMware vSphere/ESXi is a great example of this. It is a very powerful Hypervisor, but is not free. Windows Server 2008/2012 Hyper-V is another example of a Commercial based Hypervisor.
  • Since KVM is directly integrated into Linux, it can be found everywhere. It is also used in storage based systems like unRAID, which has the ability to run VM's while also hosting a NAS/Media server. You can also use your unRAID from any computer on the network, so you don't need a dedicated screen/GPU.
  • A free Type-1 Hypervisor without the need of a Linux based Host with KVM, would be XenServer. It has a free and a enterprise version, both with their own set of features.

It is recommended to use a free Hypervisor for starting out or for a hobby. The commercial Hypervisors are typically expensive as they add a ton of features the typical hobbyist would never need, such as 512 VM's per host for ESXi...

More Hypervisors can be found here.


Picking your hardware components is as important as choosing your host for your VM's, this is where IOMMU Groupings come into play.

Storage configs, extra considerations

Software

USB Pass-through

GPU/PCI Pass-through

Advanced Methods