I will review QEMU 5 by using it to boot the Manjaro Linux ISO on Mac OS Catalina.
Introduction to QEMU
QEMU (short for quick emulator) is an emulator that you can use to run different operating systems on your machine. It is Open Source software licensed under the GPLv2 and runs on Linux, Mac OS and Windows. See the downloads page for options on how to install QEMU.
Version 5.0.0 was released on April 28th 2020 and has a long list of changes.
Install QEMU on Mac OS
Homebrew is a package manager for Mac OS. Visit Homebrew’s homepage for more information, including how to install it.
Installing QEMU is then a single command:
brew install qemu
Download the Manjaro ISO
Manjaro is based on Arch Linux and is a great Linux distribution. QEMU makes it easy to try Manjaro on another OS. Download the latest ISO for the Desktop Environment (DE) you’d like to try. The DE you use is a personal choice and depends on your preference.
For this review I decided to go with Manjaro Gnome.
Create a QEMU Harddisk file
I created a directory for the VM, and under that directory created a QEMU harddisk file with a size of 20GB (typically enough to test out almost any Linux distro).
qemu-img create -f qcow2 manjaro-gnome.qcow2 20G
Booting Manjaro in a QEMU VM
I’ve found it useful to create a startup script for each VM. This script starts QEMU with a list of optimal settings.
qemu-system-x86_64 \ -m 2048 \ -usb \ -device usb-tablet \ -cdrom "/path/to/manjaro-gnome-20.0.2-200531-linux56.iso" \ -drive file=./manjaro-gnome.qcow2,if=virtio \ -accel hvf \ -smp 4 \ -show-cursor \ -vga virtio \ -full-screen
A description of each setting:
-m: The amount of memory in KB. 1GB is the recommended minimum, while 2GB is more than enough if you have the RAM to spare.
-usb: Enable the VM to use the physical machine’s USB devices.
-cdrom: the path to the ISO file to mount.
-accel: use HVF (Mac OS’ hypervisor framework).
-smp: multiprocessor support: more cores equates to better performance. I recommend setting this to the full number of cores available, which can always be reduced if you need heavy processing on the host while the guest is running.
-show-cursor: show the guest mouse cursor.
-vga: display driver to use.
-full-screen: use fullscreen mode.
An interesting blog article on the available display drivers: https://www.kraxel.org/blog/2019/09/display-devices-in-qemu/
Booting the Manjaro ISO with QEMU
Start QEMU using the shell script created earlier:
The virtual machine should start and boot to the provided ISO. The boot screen is displayed:
Select Boot to start Manjaro from the ISO.
Once Manjaro has started you can either try the system directly, or click on Launch Installer to install the system on the virtual harddisk.
QEMU 5 is a very capable virtual machine emulator. This review was performed on Mac OS Catalina, but Windows and Linux are also supported hosts. QEMU has many more options that you can experiment with, for example, emulating a different CPU architecture than what the host provides.
Don’t be afraid to try a higher SMP setting for better performance. You can even specify the total number of cores available on the host and QEMU will handle it gracefully. Memory of 1G is the minimum recommended setting for a desktop OS.