LinuxCommandLibrary

quickemu

Download and run optimized operating system images

TLDR

Create and run a virtual machine from a configuration file

$ quickemu --vm [path/to/file.conf]
copy

Do not commit any changes to disk/snapshot but write any changes to temporary files
$ quickemu --status-quo --vm [path/to/file.conf]
copy

Start the virtual machine in full-screen mode ( to exit) and select the display backend (sdl by default)
$ quickemu --fullscreen --display [sdl|gtk|spice|spice-app|none] --vm [path/to/file.conf]
copy

Select a virtual audio device to emulate and create a desktop shortcut
$ quickemu --sound-card [intel-hda|ac97|es1370|sb16|none] --shortcut --vm [path/to/file.conf]
copy

Create a snapshot
$ quickemu --snapshot create [tag] --vm [path/to/file.conf]
copy

Restore a snapshot
$ quickemu --snapshot apply [tag] --vm [path/to/file.conf]
copy

Delete a snapshot
$ quickemu --snapshot delete [tag] --vm [path/to/file.conf]
copy

SYNOPSIS

quickemu [--create-vm <OS_NAME> | --start <VM_NAME> | --download-disk <VM_NAME> | --list-vms | --delete-vm <VM_NAME>] [OPTIONS]

PARAMETERS

--help
    Displays the help message and exits.

--version
    Shows the quickemu version information.

--create-vm <OS>
    Creates a new virtual machine configuration. OS can be linux, windows, macos, android.

--start <VM_NAME>
    Starts the specified virtual machine. The VM_NAME corresponds to the VM's configuration directory.

--download-disk <VM_NAME>
    Downloads a pre-configured or default disk image for the specified virtual machine.

--list-vms
    Lists all currently configured virtual machines and their statuses.

--delete-vm <VM_NAME>
    Deletes the specified virtual machine's configuration and associated disk images.

--disk <SIZE>
    Sets the virtual disk size (e.g., 32G, 200G) for new VMs.

--ram <SIZE>
    Allocates a specified amount of RAM to the VM (e.g., 4G, 8192M).

--cpu <COUNT>
    Sets the number of virtual CPU cores for the VM (e.g., 4, 8).

--full-screen
    Launches the virtual machine directly into full-screen display mode.

--display <TYPE>
    Specifies the display backend to use: sdl for local display or spice for remote access and advanced features.

--spice-port <PORT>
    Sets the SPICE port for remote connections when using --display spice.

--net-user
    Configures user-mode networking, which is simpler but has limitations (e.g., no incoming connections).

--net-tap
    Configures TAP networking for more advanced network configurations, often requiring sudo privileges.

--ssh-port <PORT>
    Enables SSH port forwarding from the host to the guest on the specified port.

--uefi
    Uses UEFI firmware for the virtual machine boot process, compatible with modern operating systems.

--bios
    Uses traditional BIOS firmware for the virtual machine, for older operating systems or specific needs.

--vm-dir <PATH>
    Specifies an alternative directory where VM configuration files and disk images will be stored.

--usb-passthrough <VENDOR_ID:PRODUCT_ID>
    Passes through a physical USB device to the virtual machine using its Vendor ID and Product ID.

DESCRIPTION

quickemu is a powerful yet easy-to-use command-line wrapper designed to streamline the process of creating, configuring, and running QEMU virtual machines. It significantly reduces the complexity associated with raw QEMU commands, making advanced virtualization accessible to users of all skill levels.

Leveraging KVM for hardware-accelerated virtualization on Linux, quickemu provides near-native performance for guest operating systems. It supports a wide range of guests including Windows, macOS, various Linux distributions, and Android. Its features include automatic disk image management, flexible network configuration (user-mode, TAP), display options (SDL, SPICE), USB passthrough, and choice of UEFI or BIOS firmware.

Configurations are stored in simple YAML files, making them easy to inspect and modify. quickemu aims to provide a hassle-free virtualization experience.

CAVEATS

Optimal performance requires KVM (Kernel-based Virtual Machine) to be enabled and configured on the Linux host.

Certain features, particularly advanced networking (--net-tap) and USB passthrough, may require additional host system configuration or sudo privileges.

Virtualizing macOS can be resource-intensive and might require specific bootloader setup (like OpenCore) and a compatible QEMU version.

<I>YAML</I> CONFIGURATION

Each virtual machine's configuration is stored in a simple, human-readable .conf file (using YAML syntax) within its dedicated directory. This allows for easy manual inspection and modification of settings beyond command-line options.

<I>AUTOMATIC DOWNLOADS</I>

For certain guest operating systems, quickemu can automatically download necessary disk images, UEFI firmwares, and bootloaders, simplifying the setup process significantly.

<I>GUEST OS SUPPORT</I>

quickemu offers robust support for a wide array of guest operating systems including Windows (from 7 to 11), various Linux distributions (e.g., Ubuntu, Fedora, Arch), macOS (Intel and ARM, where applicable), and Android (x86_64 images).

HISTORY

quickemu was developed by Martin O'Halloran (martinohalloran) with the primary goal of abstracting away the often complex command-line arguments required to launch QEMU virtual machines. It emerged as a solution to provide an easy and intuitive way to run various guest operating systems, especially notoriously difficult ones like macOS and Windows, on Linux hosts.

Since its inception, it has evolved into a popular open-source project, known for its user-friendliness and active development, continuously adding support for new features and operating systems while maintaining its focus on simplicity.

SEE ALSO

Copied to clipboard