Qemu is a emulator that can be used as a virtual machine or a syscall emulator. Here I will only be concerned with the syscall emulator mode. I will also restrict myself to the use of the unstable Debian packages of qemu to run softwares provided in Debian packages. I will also not use root priviledge even when they would make things a bit easier, for security reason.
Syscall emulation is very different from a virtual machine: syscall are
executed by qemu without mangling. This can be sometime surprising: if you
emulate a binary that perform the syscall
exec("/bin/ls"), qemu will
exec("/bin/ls") which will cause the qemu process to be
replaced with the native ls code (and not an emulated one). Also hard-coded
path in binaries might not point where you want. On the other access to device
is not limited by the emulation, in particular network access does not need any
set up.
The Debian package include three qemu binaries for syscall emulation. qemu-arm, qemu-ppc and qemu-sparc. After testing on a x86, it appears that qemu-arm work the best, qemu-ppc has some issues and qemu-sparc is very limited. Apparently there are architecture-dependent syscalls that are difficult to emulate. Also qemu is only able to emulate a limited number of syscalls.
Using qemu syscall emulation with Debian.
version 0.0, 1 mars 2005ballombe@debian.org