Virtualising OS X/macOS

Virtual machines are great. We use them for debugging, compatibility testing, isolation, and as a substitute for multi-booting. Windows and Linux have broad support for running as guest operating systems, but it has only recently become possible and practical to run OS X/macOS in such a way, especially in open source virtualisation environments. OS X/macOS now runs in both Qemu/KVM and VirtualBox. The former has become a lot less difficult to achieve recently, especially with Gabriel L. Somlo's efforts in upstreaming patches and excellent instructions. Nevertheless, some inconveniences remain, and we have been working on improving this situation by writing guest drivers. Initially, this was a project for our spare time; more recently, there has been corporate interest in this, so some improvements have been sponsored.

Drivers available so far:

We hope you find these drivers useful!

- Phil & Laura Dennis-Jordan

What's new

Driver for Qemu's usb-tablet absolute pointing device

Latest version: 1.2 - download installer (codesigned).

Source code: github code browser and git repository.

When running a virtual machine in a window, it's useful to simulate an absolute pointing device, so that the host computer's mouse cursor motion through the window is seamless. Qemu offers such a device via the -device usb-tablet option (in contrast to -device usb-mouse). Unfortunately, OS X's HID device drivers don't pick up this device correctly.

To solve the problem, we've written a driver that makes it work.

On OS X 10.8 and earlier, all that is needed is a codeless kext that tells Apple's driver that it already knows how to drive the device.

OS X 10.9 and newer treat the device as an analog stick when you do this, converting distance from the middle of the screen as a velocity to apply to relative motion of the mouse cursor. This is an even worse user experience than with the usb-mouse device, so we've written another kext that subtly rewrites the device's HID report descriptor before Apple's driver has a chance to pick it up. Specifically, the device reports a usage mode of "pointer" (1). OS X's drivers expect either "Mouse" (2) or "Digitiser", so the kext changes that single byte from 1 to 2 and everything starts working. OS

On OS X 10.11 and macOS 10.12, the 10.9/10.10 driver does not work due to the rewritten USB stack. Since version 1.2, the driver therefore contains a third kext, which builds on this new stack but otherwise behaves very similarly to the 10.9 driver.

Supported versions of OS X:

To use this driver:

Release change log:

1.0

Initial release

1.1

Version 1.1 Installer Download

Disabled OS X's pointer coordinate scaling, so that the guest cursor now precisely tracks the host cursor.

1.2