Setting up a proper virtual machine with QEMU

Ernestbok

Well-known member
Member
Joined
3 yrs. 4 mth. 14 days
Messages
3,934
Reaction score
5,775
Wallet
0$
Well hello there! I recently learned some of you still use Oracle's VirtualBox to create virtual machines. This is unbelievably bad practice, as VirtualBox really isn't the best for creating virtual environments BY FAR. So today I will give this short crash course on setting up a Linux virtual machine using QEMU.
Just a quick "heads up" before I start: this tutorial will cover the installation on both Linux AND Windows, so for all of you Microsoft kiddos out there: I got you. I also won't be covering EVERYTHING, as I already said: this is meant to be a quick crash course, not a comprehensive handbook.

The guide can be broken down to there 3 steps:
1. Installation
2. Configuring VirtManager/qtEmu
3. Emulating

A universal first step, matter what OS are you using, is enabling you Virtualization Technologies in the BIOS menu. After you've done that we can begin with the installation.

Installation and configuration for Linux:

Assuming you use an arch-based Linux distribution(or straight up Arch), you will need to install the following packages: qemu virt-manager virt-viewer dnsmasq vde2 bridge-utils openbsd-netcat .
You can also optionally install libguestfs, which is just a library packed with useful tools for modifying your VM disk images, though, in this tutorial, I WILL NOT cover how to use it.
Note that depending on what init system you are using you might have to install a specific package in order to start the virtual manager's service, so for example if you are using Artix Linux with openrc: you must install libvirtd-openrc. And if you use it with runit: you must install libvirtd-runit. The next step is enabling the libvirtd service.
The last step of the installation will be adding your user to the libvert group with the following command: usermod -aG libvirt {name of user} .


Installation and configuration for Windows:

Over here the things are a bit simpler. You must install: Qemu(you can grab it from their official website) and qtEmu(you can get it from gitlab). After installing them you should be able to open qtemu and begin configuring it. When prompted to select the QEMU, you can paste the location of the qemu folder(by default it should be Program Files/qemu). When asked for the img, which should be the path to the qemu-img.exe file(default should be Program Files/qemu/qemu-img.exe). And then you can simply give it the path to you ISO files for emulating.



This is really it! After completing these steps you can select your ISO and begin emulation! By doing all of this you will be one step ahead to achieving a near native performance on virtual machines! Enjoy!
 
Paid adv. expire in 2 months
CLICK to buy Advertisement !
westernunion carding Verified & Trusted WesternUnion | MoneyGram | Bank - Transferring [299$ BTC for 2000$ WU]
electronics carding Verified & Trusted Electronics Carding, Carding iPhone, Samsung Carding, MacBook Carding, Laptops Carding
Top Bottom