Hosts/W32

From QEMU
Revision as of 20:23, 9 February 2011 by Stefan Weil (talk | contribs) (added some initial documentation (WiP))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

QEMU on W32 hosts

This documentation is work in progress - more information will be added soon. It will finally replace the old documentation from the QEMU user manual. I think that a wiki is better in keeping evolving documentation like this one up to date.

While QEMU's main host platform is Linux, it is sometimes also useful to build or run it on members of the W32 family of operating systems (MS Windows 2000, Windows XP, Windows Vista, Windows 7, ...) or on ReactOS (a W32 clone).

Running QEMU on the 64-bit variants similar but needs additional documentation.

Please note that less developers work on QEMU for W32 hosts, so it might be less stable (but I don't think it is).

Some system emulations on Linux use KVM, a special emulation mode which claims to reach nearly native speed. KVM is mainly used for x86 (32 and 64 bit) emulation on x86 hosts running Linux. It is not available for W32.

Building QEMU for W32

QEMU for W32 needs a fairly complete MinGW (or MinGW-w32) based development environment with tools (make, compiler, linker, ...) and some additional libraries.

Cross builds

Compilation of QEMU for W32 on non-W32 hosts (e.g. Linux hosts) is called cross compilation. Some Linux distributions (Debian, Ubuntu, Fedora and maybe others) already include packages needed for cross compilation, so the installation of these packages is the first step.

SDL support is not included in standard MinGW, but packages for MinGW are available on the SDL homepage.

Native builds

Get and install MinGW. Get the QEMU source code (git or tarball), configure and make.

Installation

Installation is easy with the experimental installers from qemu.weilnetz.de.

Running QEMU for W32

User mode emulation is unsupported: it only works on BSD, Darwin and Linux.

System emulation

All QEMU system emulation should be working (that simply means I don't know of emulations which don't work, and those which I tried, namely x86 and mips, work well).

Special W32 devices

QEMU is based on MinGW, so some commonly used UNIX device names like /dev/null or /dev/zero can be used. W32 device names also work, especially names like //./PhysicalDrive0 for the first hard disk of the host (this name must be used with extreme care or you will likely crash your system).

Text which is normally printed by QEMU to the console output channels (normally known as standard output = stdout and standard error output = stderr) might be written to files called stdout.txt and stderr.txt. If you want to see QEMU's help messages or if it does not work as expected, you should look for these files in the directory where your exe file is installed.