QEMU (was: OpenOSX)

From: Michael Koenig (mikenospam_at_email.de)
Date: 11/22/04


Date: Mon, 22 Nov 2004 15:21:35 +0100

Michael Paine wrote:
> Has anyone had experience with OpenOSX?
> http://www.openosx.com/wintel/

I haven't used it but it's basically just an optimized version of Bochs
with a different frontend:
http://bochs.sourceforge.net/

The last time I tried Bochs on my 2GHz G5 it was so horribly slow that
the installation of Win98 took several hours, and it was even slower
than on my 550MHz Pentium 3 under BeOS, despite the fact that Bochs is
an interpretive emulator without dynamic recompilation or virtualization.

> Seems to be an alternative to VPC

If you want an alternative to VPC I'd recommend QEMU. It uses a more
portable form of binary translation, which makes it slower than VPC, but
still miles faster than Bochs.
<http://fabrice.bellard.free.fr/qemu/>

If you want to make your own build of the current version (I think there
is no binary package for OSX yet), you'll need to build SDL first
(because the OSX build only works for Xcode not with make), of course
you are required to have the free Apple developer tools installed:
1. Download the SDL source:
   http://www.libsdl.org/release/SDL-1.2.7.tar.gz
2. Extract it and change to the directory in the Terminal.
3. Type: ./configure
4. Type: make
5. Type: sudo make install
   (This will ask you for the administrator password.)

Building the current QEMU is quite similar:
1. Download the QEMU source:
   http://fabrice.bellard.free.fr/qemu/qemu-0.6.1.tar.gz
2. Extract the archive and change to the new directory in the Terminal.
3. Type: ./configure --target-list=i386-softmmu
4. Type: make
5. Type: sudo make install
   (This will ask for the administrator password again.)

You might have to log off and log on again before you can use the 'qemu'
command from the Terminal.

To install an operating system you need an empty disk image and an image
of the CD-ROM.

You can create a disk image in the Terminal like this (in this case a
512MB image called PCHD.img):
dd of=PCHD.img bs=1024 seek=524288 count=0

To create an image from the CD-ROM (eg. Win98) you'll need to unmount
the CD using Disk Utility (in Applications/Utilities). While you're in
Disk Utility also take a look at the information about the CD in the
context menu and copy the Disk Identifier.
Once you know the identifier, you can enter the following in the Termial
(where Win98.img will be the name of the image file and disk3s0 is the
identifier):
dd of=Win98.img if=/dev/disk3s0

If you've completed all these steps, you can now launch QEMU for the
terminal to install the OS by telling it which hard disk image (-hda)
and which CD-ROM image (-cdrom) to use and where to boot from (-boot d):
qemu -fda PCHD.img -cdrom Win98.img -boot d

When the OS installed you can boot without the CD-ROM image:
qemu -fda PCHD.img

I've noticed that Win95 is much faster on QEMU than Win98, but in this
case you'll also need the image of a boot floppy (-fda floppy.img -boot
a) because Win95 CD-ROMs aren't bootable unlike Win98 or newer ones.

I also managed to install and run QNX (not that fast but usable),
ReactOS (a bit slow and not that practical), and FreeDOS (quite fast). I
ran Linux from a Live CD image, but it was horribly slow once it entered
KDE. Unfortunately BeOS doesn't boot correctly.

If you run Win9x or DOS you should use a tool to let the CPU idle,
because otherwise QEMU will eat lots of processor time even if you don't
do anything in the emulated system.

QEMU certainly isn't nearly as fast as VPC (it reports a 33MHz Pentium
Pro, but should be a little bit faster on my 2GHz G5), but if you don't
need too much speed it's worth a look, and definately faster than Bochs.

-- 
M.I.K.e


Relevant Pages

  • Re: QEMU
    ... >>Seems to be an alternative to VPC ... > If you want an alternative to VPC I'd recommend QEMU. ... Type: sudo make install ... > To install an operating system you need an empty disk image and an image ...
    (microsoft.public.mac.virtualpc)
  • Re: virtual machine software
    ... QEmu crashes when I try to boot the CD. ... -Jim Stapleton ... I tried QEmu, but XP wouldn't install. ... Bochs works, but it is slow. ...
    (freebsd-questions)
  • Re: How should we run Windows XP from Linux Desktop?
    ... >> Can you load Windows programs with QEMU emulating W2k? ... > qemu emulates a machine, ... > in qemu and then you install programs in windows. ...
    (alt.os.linux)
  • Re: testing qemu svn r6636 on FreeBSD; future of qemu on FreeBSD...
    ... I applied the patches and installed qemu. ... I did not use kqemu. ... It got up to the point where it actually started the install and then ... Linux kernel. ...
    (freebsd-current)
  • Re: How should we run Windows XP from Linux Desktop?
    ... > Can you load Windows programs with QEMU emulating W2k? ... qemu emulates a machine, not a SO... ... in qemu and then you install programs in windows. ...
    (alt.os.linux)