VisualKernel QEMU Integration

VisualKernel is fully integrated with QEMU – an open-source virtualization engine.

QEMU has a very basic GUI compared to VMWare and VirtualBox, however it is the only virtualization platform that supports kernel debugging on hosts that have the Windows Hyper-V platform enabled. See the Acceleration section for more details.

Overview

You can manage the installed QEMU virtual machines via Tools->VisualKernel->Manage Qemu Virtual Machines:

Editing Settings

VisualKernel provides basic GUI for creating new QEMU virtual machines and editing their settings. You can customize the basic parameters (CPU/RAM/Storage) or tweak the command line directly:

Network Connection

Unlike VMWare and VirtualBox that require installing a dedicated network driver, Qemu works by virtualizing individual TCP connections. E.g. it can be configured to map port 22 on the guest to port 2222 on the Windows machine. You can then connect to the guest using the localhost:2222 syntax.

VisualKernel will normally manage the SSH ports automatically. Each time you start a VM, it will find an unused port on the Windows machine, allocate it for the QEMU VM and set the project-level $(SSHPort) variable to the allocated port number. You can override this behavior via the Network page of the QEMU VM settings:

Acceleration

In order to provide reasonable performance on Windows hosts, QEMU requires the Hyper-V platform to be enabled via Control Panel -> Add/Remove Programs -> Turn Windows features on or off:

Note that enabling the Hyper-V platform (also needed for WSL 2) forces any other virtualization software to use the Hyper-V engine (WHPX). As of September 2022, QEMU is the only engine that supports kernel debugging when using Hyper-V.

Snapshots

Like many other virtualization tools, QEMU supports creating snapshots of the virtual machines. You can use the Snapshots view under the VisualGDB QEMU Manager to create, restore or delete snapshots:

QEMU Monitor

QEMU provides a way to fine-tune the VM behavior by running commands via the QEMU monitor. You can find the comprehensive list of supported commands on this page. You can use the “Launch QEMU Monitor” link in the bottom right part of the QEMU VM Manager window to automatically connect to the QEMU monitor and issue commands to it:

Troubleshooting

VisualKernel stores the QEMU VM configuration in the XML files with the .qvm extension. The directory with the .qvm file typically also contains the following files with the same name:

File Meaning
<VM>.cmd Contains the exact command line used to launch the QEMU executable. You can run this file manually to reproduce various issues.
<VM>.log Contains the debug output from QEMU.
<VM>.run Contains the PID of the QEMU process and the port numbers allocated to SSH and other services.
<VM>.snap Assigns meaningful names and descriptions to the internal QEMU snapshot IDs.