While Debian based distributions do run QEMU/KVM, they are for the most part not up to date in comparison to Arch based distributions. You can manually build the latest QEMU and its depends for your Debian based distro, or continue with whatever version is installed by the following command. Issues regarding the QEMU distributed on Ubuntu/Linux Mint, are not priority.
To get started, we'll use the default package manager apt
to install varaious packages/software including but not limited to Virt-Manager and QEMU itself.
Package | Description |
---|---|
ovmf | UEFI firmware for virtual machines. Without this package, you cannot use UEFI on QEMU. |
qemu-utils | Additional utilities for QEMU. |
dosfstools | Utilities for managing FAT/32 file systems. This is used for formatting our images. |
virt-manager | GUI-based virtual machine manager for QEMU and remote VMMs. |
bridge-utils | Tools for configuring network bridges. |
libvirt-clients | Command-line tools for managing virtual machines with libvirt. |
qemu-system-x86 | QEMU system emulator and virtualizer, specifically for x86 architecture. |
libvirt-daemon-system | Libvirt daemon and related system services. |
libvirt-daemon-config-network | Libvirt configuration for networking features. |
You can install all the necessary packages using apt
by running the following command:
sudo apt install qemu-system-x86 qemu-utils libvirt-clients libvirt-daemon-system libvirt-daemon-config-network bridge-utils virt-manager ovmf dosfstools
For those interested in running macOS Mojave (10.14) or older
If you're interested in working with OS X / macOS releases prior to macOS Mojave (10.14), You will need to install the following package to use DarwinUDK's fork of OVMF in Virt-Manager and QEMU CLI. This build of OVMF was modified by the DarwinKVM team with
-D LINUX_LOADER
at compile time. Acidanthera's AUDK source code implements a new PE/COFF loader which can prevent the loading/execution of HfsPlusLegacy.efi which is required to create the MacPro5,1 configuration that DarwinKVM provides. This issue is not present in non-Acidanthera UEFI firmware, but we do use it here as the fork is based on AUDK, so this is a required step for the most vanilla configuration of Legacy OS X / macOS when it comes to properly loading via QEMU.The flag sets the image protection policy. If a bit is set, the image will be protected by DxeCore if it is aligned. The code section becomes read-only, and the data section becomes non-executable (or non-bootable), leading to issues when trying to boot older OS X / macOS. The Policy required to allow legacy, non-aligned, non-signed Apple images such as HfsPlusLegacy.efi can be set in the DSC under Ovmf, but DarwinUDK simply compiles with the flag and provides you a precompiled package to install for ease of use on any Linux distribution.
To get started, cd to the
extras
folder at the root of DarwinKVM, and under the appropriate distribution folder to find the required package file under the DUDK-Firmware submodule.cd extras/DUDK-Firmware/Debian
You'll now be able to use
dpkg
to install the DUDK-Firmware package.sudo dpkg -i DUDK-Firmware-1.0.0-1-x86_64.deb
You'll now be able to successfully import LegacyDarwinKVM.xml and use DUDK-Firmware in Virt-Manager! For those using CLI QEMU, you can find the firmware file at
/usr/share/DarwinUDK/DUDK_CODE.fd
and NVRAM at/usr/share/DarwinUDK/DUDK_VARS.fd
If you use any other package manager on Debian based distributions, and would like to contribute to this page, please request a PR review for accelerated addition. It's understandable that some people may already be on an existing installation for a while now, and use entirely different package managers.