QEMU/KVM Setup

TheProf

Gold Member
Gold Supporter
Credits
1,412
I've been playing around with different virtualization apps like virtualbox, specifically looking to run something on by desktop to test out different distro's and use it as a lab for testing various configs before applying these changes to my personal computer.

I've used VMware workstation quite a bit on Windows, never really liked Hyper-V. When I switched to Linux, I gravitated towards virtualbox because it was quite simple to use and it works quite well, no major issues.

I then discovered kvm/qemu/libvirt along with virt manager and cockpit, makes for a solid option, especially from a performance perspective, definitely an improvement over virtual box.

What do folks on here use for virtual machines software?
 


Tolkem

Well-Known Member
Credits
8,516
What do folks on here use for virtual machines software?
I use QEMU(command line)for Linux VMs, and VirtualBox for a Windows VM. If you plan on using QEMU, I recommend you to read this https://doc.opensuse.org/documentation/leap/archive/15.1/virtualization/html/book.virt/index.html I learned a lot from reading that. :) By the way, KVM is a kernel module, so you don't need to install it, just install QEMU, and if you want/prefer a GUI, install virt-manager, which is a front end for QEMU.
 

TheProf

Gold Member
Gold Supporter
Credits
1,412
I use QEMU(command line)for Linux VMs, and VirtualBox for a Windows VM. If you plan on using QEMU, I recommend you to read this https://doc.opensuse.org/documentation/leap/archive/15.1/virtualization/html/book.virt/index.html I learned a lot from reading that. :) By the way, KVM is a kernel module, so you don't need to install it, just install QEMU, and if you want/prefer a GUI, install virt-manager, which is a front end for QEMU.
Good to know! I could have sworn I thought KVM was part of the QEMU install, but actually it was never installed... I just tried running kvm --version but it could not be found. Good to know about KVM / QEMU and thank you for sharing the link, I definitely need to do some reading up on KVM :)
 

f33dm3bits

Gold Member
Gold Supporter
Credits
25,562
If you use it on your desktop virt-manager will do just fine, that's what I do, it even works fine when using it through X11 forwarding on a remote system although there can be a bit delay in that case.
 

TheProf

Gold Member
Gold Supporter
Credits
1,412
If you use it on your desktop virt-manager will do just fine, that's what I do, it even works fine when using it through X11 forwarding on a remote system although there can be a bit delay in that case.
just virt manager? No need for QEMU?
 

f33dm3bits

Gold Member
Gold Supporter
Credits
25,562
virt-manager is the graphical front-end for QEMU.
 

TheProf

Gold Member
Gold Supporter
Credits
1,412
Ok, so basically:

KVM type 1 hypervisor)

QEMU is the type 2 hypervisor used as an emulation layer. You then use Virt Manager to connect to the emulation layer, in this case QEMU.

I assume you can also use Virt Manager to connect to KVM?
 

f33dm3bits

Gold Member
Gold Supporter
Credits
25,562
Let me show you a screenshot, maybe that will make things clearer for you? If I remember correctly KVM is the kernel part and QEMU is the visualizer/emulator.
 

Attachments

Last edited:

TheProf

Gold Member
Gold Supporter
Credits
1,412
To clarify this a bit.

Let's say I am using ESXi, this hypervisor is type 1, meaning the hypervisor runs directly on the host hardware, no need to load the OS like type 2 (virtualbox). Type 2 on the other hand, relies on the OS layer, so typically you'd have better performance with type 1 hypervisor.

What I am trying to understanding with QEMU / KVM, is if these two services are similar to the way type 1 vs type 2 hypervisors.

When I do some reading online on KVM, I get that it is a kernel module and I see that you dont need KVM to run QEMU. I also see KVM referencesd as Type 1 hypervisor, whereas QEMU is being referenced more as a type 2 hypervisor.

This is what I meant earlier when I was referring to type 1 vs type 2.
 

Tolkem

Well-Known Member
Credits
8,516

TheProf

Gold Member
Gold Supporter
Credits
1,412
QEMU/KVM are type 1. This might help to clarify things a bit https://phoenixnap.com/kb/what-is-hypervisor-type-1-2
I was doing some more reading and thank you for sharing the link above btw. Based on what I understood, that QEMU in itself is a type 2 hypervisor, however if QEMU is used with KVM, it then becomes Type 1.

 

dcbrown73

Well-Known Member
Credits
3,042
I worked for a financial trading platform start-up around 2008. Their budget was almost non-existent and I built their entire virtualization environment out of KVM and libvirt on top of CentOS. The only thing that cost money was the hardware itself. It ran on that setup for 6 years before the company was sold to a larger financial firm.

KVM is a very solid platform to build virtualization out of. I use it on my home server to host VMs, Plex, etc.
 

f33dm3bits

Gold Member
Gold Supporter
Credits
25,562
You can also have a look at Proxmox which has KVM integrated into it, I have never used it but from my understanding it's basically KVM with a detailed web-interface and can do anything that KVM can do.
I currently use KVM as my home lab setup on my desktop and on my home server I use containers to run services such as Plex, Emby and other applications.
 
Last edited:

dcbrown73

Well-Known Member
Credits
3,042
You can also have a look at Proxmox which has KVM integrated into it, I have never used it but from my understanding it's basically KVM with a detailed graphical interface and can do anything that KVM can do.

I currently use KVM as my home lab setup and on my home server I use containers to run services such as Plex, Emby and other applications.
I've used Proxmox also. It's nice but had a few bugs in it. If you want a web-based GUI, it's nice. Back when I used it between 2014-2018. You had to have the pay version to get the clustering features Not sure if that I still true as we've since migrated into a large vSAN clusters.
 

TheProf

Gold Member
Gold Supporter
Credits
1,412
You can also have a look at Proxmox which has KVM integrated into it, I have never used it but from my understanding it's basically KVM with a detailed graphical interface and can do anything that KVM can do.
I use Proxmox with my dedicated server hosts (3 hosts in a cluster), great free option for open source hypervisor. I was using ESXi/vCenter before using the VMUG Advantage subscription to get the 1 year license. But unless you're running enterprise server gear, I found it to be unstable in my lab, I just use lenovo desktop PCs to keep things quiet and consume as little energy as possible. The lab is not always turned on and so I like to use virtualization on my main desktop to do quick testing and for anything that I dont need to run for long periods of time.
 
$100 Digital Ocean Credit
Get a free VM to test out Linux!

Members online


Top