Using QEMU on Windows

From OLPC
Revision as of 10:19, 7 December 2006 by Tomhannen (talk | contribs) (How to Get Networking to Work in QEmu)
Jump to: navigation, search

The step-by-step guide below has worked for builds 59 and 182, see User_Feedback_on_Images#QEMU_on_Windows


Download QEMU emulator and accelerator

Download QEMU for Windows from http://www.h7.dion.ne.jp/~qemu-win/
QEMU is an open source processor emulator. (Note that people have converted some QEMU images to work with VMWare Player, but the regular OLPC builds are for QEMU.)

Unzip it, and place the files in
C:\Program Files\Qemu
(There is no setup or installation step.)

Then download the QEMU Accelerator Module from http://fabrice.bellard.free.fr/qemu/download.html
KQEMU is a driver allowing the QEMU PC emulator to run much faster when emulating a PC on an x86 host. The latest stable is currently kqemu-1.3.0pre9.tar.gz.

Then uncompress the kqemu-version.tar.gz file. You may need to uncompress it twice, using an application like 7Zip, available from http://www.7-zip.org/
You can place the kqemu-version directory in C:\Program Files\Qemu.

Look through the unzipped files, and right-click on the one called kqemu.inf
Choose "Install" and wait a few seconds.

Then in a command prompt type

net start kqemu

You should get a message saying
The KQEMU virtualisation module for QEMU service was started successfully.

Download an OLPC image

Then you need to download a drive image, so go to Latest Stable Build on the OS Images page and navigate to the ext3 subdirectory (this has images for the ext3 filesystem; if you want to use development tools, navigate to devel_ext3). The image you want will be named something like olpc-redhat-stream-development-build-num-date_ext3.img.bz2

This file will need uncompressing with an application like 7Zip, available from http://www.7-zip.org/

Place the uncompressed ".img" file in the same folder as QEMU.

Starting OLPC environment

In a command prompt type

cd "\Program Files\Qemu"

The command to start the emulator is qemu -L . -hda image_name, where image_name is the newest version you have downloaded. For example:

qemu -L . -hda olpc-redhat-stream-development-build-185-20061117_2030-devel_ext3.img

After a few seconds the emulator will start in a new window, and you will see a boot sequence
The screen should soon display the OLPC 'oX' logo and 'Booting OLPC for qemu target in nn seconds'. (If it does not, then press any key to go to the GRUB menu and choose the 'OLPC for qemu target' option. You need to boot the emulator, not the OLPC hardware.)
Then you will see a typical Linux boot sequence.

You must read Sugar Instructions for instructions on how to use the emulated Laptop -- this is not a typical GUI!

To close the OLPC "window" press Alt+Ctrl+2; to liberate the pointer press Ctrl+Alt.

Please update User Feedback on Images#QEMU_on_Windows with your experience.

--Tomhannen 19:30, 13 August 2006 (EDT)

How to Get Networking to Work in QEmu

If you are having trouble getting an internet connection inside QEmu:

Get the image running in QEmu so that you can see the normal view with the XO icon in the middle. Empty no apps no frame.png

Make sure your mouse is active in QEmu, then press ctrl+alt+2 together.

This will bring up a screen like a command line, called the QEmu monitor.

Type the following:

sendkey ctrl-alt-f1

And press return.

Then with the keyboard hold down the following keys: ctrl+alt+1

Another text based screen will appear, asking you to log-in. Sometimes there can be an extra "1" after the word "Login:", just delete it. Type root and press return

Then type:

dhclient

You should see the screen fill with text. The important bit is at the bottom, where it should say "Bound to XX.XX.XX.XX" where the Xs are some numbers.

Then hold down the following keys on the keyboard: ctrl+alt+2

and type the following:

sendkey ctrl-alt-f7

Then using the keyboard, hold down the following keys: ctrl+alt+1

Now open the browser and you should have internet access. Sugar browser with frame google home page.png

--Tomhannen 09:14, 7 December 2006 (EST) From some info found [here.]