Using QEMU on Windows: Difference between revisions
(cleaned up a bit... and added how to get the keyboard and mouse going) |
|||
Line 1: | Line 1: | ||
The step-by-step guide below has worked for builds 59 and 182, see [[ |
The step-by-step guide below has worked for builds 59 and 182, see [[User Feedback on Images#QEMU on Windows]] |
||
== Setting up QEMU == |
|||
In order to use the [[Build images|provided OLPC images]] in your Windows XP box you must first install an emulator: [[QEMU]] which is an open-source processor emulator. The accelerator, not required, is recommended as a performance booster. |
|||
== Download QEMU emulator and accelerator == |
|||
⚫ | |||
⚫ | |||
http://www.h7.dion.ne.jp/~qemu-win/<BR> |
|||
⚫ | |||
=== QEMU Emulator === |
|||
Unzip it, and place the files in<BR> |
|||
<I>C:\Program Files\Qemu</I><BR> |
|||
(There is no setup or installation step.) |
|||
⚫ | |||
Then download the QEMU Accelerator Module from |
|||
#Since there's no installation step, just [[unzip]] it into any directory (ie: <tt>C:\Program Files\Qemu</tt>) |
|||
⚫ | |||
#if you want, proceed with the accelerator below, if not go to [[Using QEMU on Windows XP#Download an OLPC image|downloading the image]] |
|||
⚫ | |||
=== QEMU Accelerator === |
|||
Then uncompress the <tt>kqemu-''version''.tar.gz</tt> file. You may need to uncompress it twice, using an application like 7Zip, available from |
|||
http://www.7-zip.org/<BR> |
|||
⚫ | |||
⚫ | |||
Look through the unzipped files, and right-click on the one called <I>kqemu.inf</I><BR> |
|||
Choose "Install" and wait a few seconds. |
|||
⚫ | |||
Then in a command prompt type |
|||
⚫ | |||
⚫ | |||
#*may have to [[unzip]] it twice given the file format. |
|||
You should get a message saying<BR> |
|||
#In the target directory, locate <tt>kqemu.inf</tt> and install it (menu/right-click and select <tt>Install</tt>). Let it finish (it'll take just a couple of seconds). |
|||
⚫ | |||
#Open a <tt>command prompt</tt> (aka <tt>cmd.exe</tt>) and type |
|||
⚫ | |||
#*If everything went fine, you should see the following message: |
|||
⚫ | |||
== Download an OLPC image == |
== Download an OLPC image == |
||
Then you need to download a drive image, so go to [[Build_images#Latest_Stable_Build|Latest Stable Build on the OS Images page]] and navigate to the <tt>ext3</tt> subdirectory (this has images for the ''ext3'' filesystem; if you want to use development tools, navigate to <tt>devel_ext3</tt>). |
Then you need to download a drive image, so go to [[Build_images#Latest_Stable_Build|Latest Stable Build on the OS Images page]] and navigate to the <tt>ext3</tt> subdirectory (this has images for the ''ext3'' filesystem; if you want to use development tools, navigate to <tt>devel_ext3</tt>). |
||
The image you want will be named something like |
The image you want will be named something like |
||
<tt>olpc-redhat-stream-development-build-''num''-''date''_ext3.img.bz2</tt> |
<tt>olpc-redhat-stream-development-build-''num''-''date''_ext3.img.bz2</tt> |
||
After you've downloaded the image, you must [[unzip]] it and place the <tt>.img</tt> file in the same directory as [[QEMU]] (ie: <tt>C:\Program Files\Qemu</tt>). |
|||
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 == |
== Starting OLPC environment == |
||
In a command prompt type |
|||
Open a <tt>command prompt</tt> (aka <tt>cmd.exe</tt>) in the QEMU directory. |
|||
cd "\Program Files\Qemu" |
cd "\Program Files\Qemu" |
||
qemu -L . -hda ''image_name''</tt> |
|||
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 |
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<BR> |
|||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
⚫ | |||
To close the OLPC "window" press Alt+Ctrl+2; to liberate the pointer press Ctrl+Alt. |
|||
As a reminder: pressing <tt>Alt + Ctrl</tt> will liberate / return control to Windows. |
|||
'''NOTE:''' There are a '''[[Using QEMU on Windows XP#Troubleshooting|some issues]] (mainly for the first timers)''' on how to get the whole enchilada going. |
|||
== Closing the OLPC image == |
|||
To close the OLPC "window" you must first go into the QEMU monitor screen and then quit. You do that by: |
|||
#Make sure the the window has the focus (label should say <tt>QEMU - Press Ctrl-Alt to exit grab</tt>). |
|||
#Press <tt>Alt + Ctrl + 2</tt> to enter the QEMU Monitor. |
|||
#Type <tt>quit</tt> or <tt>q</tt> to quit. |
|||
Please update [[User Feedback on Images#QEMU_on_Windows]] with your experience. |
Please update [[User Feedback on Images#QEMU_on_Windows]] with your experience. |
||
Line 56: | Line 63: | ||
--[[User:Tomhannen|Tomhannen]] 19:30, 13 August 2006 (EDT) |
--[[User:Tomhannen|Tomhannen]] 19:30, 13 August 2006 (EDT) |
||
== Troubleshooting == |
|||
== How to Get Networking to Work in QEmu == |
|||
=== Keyboard and Mouse === |
|||
A typical case (considering [[User Feedback on Images#QEMU_on_Windows|many who report it]]) is that their keyboard and mouse don't work. A solution to the problem is: |
|||
#Make sure the the window has the focus (label should say <tt>QEMU - Press Ctrl-Alt to exit grab</tt>). |
|||
#Press <tt>Alt + Ctrl + 3</tt> to enter the terminal mode of the OLPC. |
|||
#Make sure that you're logged in. |
|||
#*If not, just hit <tt>enter</tt> and it'll ask you to. |
|||
#*Login as <tt>root</tt> (no password is required) |
|||
#Type <tt>modprobe i8042</tt> |
|||
#Press <tt>Alt + Ctrl + 1</tt> to return to the graphical mode of the OLPC. |
|||
#Your keyboard and mouse should be working fine. |
|||
#*Usually the result is a continuous series of 1's will flow (as if the key is stuck) |
|||
#*Just hit any key (to stop it) and delete the offending 1's |
|||
=== Network === |
|||
The steps below work on QEmu regardless of which operating system you are running. |
The steps below work on QEmu regardless of which operating system you are running. |
||
Line 104: | Line 127: | ||
[[Category:Developers |
[[Category:Developers]] |
||
[[Category:Software development]] |
|||
[[Category:Emulation]] |
Revision as of 20:12, 3 January 2007
The step-by-step guide below has worked for builds 59 and 182, see User Feedback on Images#QEMU on Windows
Setting up QEMU
In order to use the provided OLPC images in your Windows XP box you must first install an emulator: QEMU which is an open-source processor emulator. The accelerator, not required, is recommended as a performance booster.
Note: people have converted some QEMU images to work with VMWare Player, but regular OLPC builds are for QEMU.
QEMU Emulator
- Download QEMU for Windows from here
- Since there's no installation step, just unzip it into any directory (ie: C:\Program Files\Qemu)
- if you want, proceed with the accelerator below, if not go to downloading the image
QEMU Accelerator
The QEMU Accelerator 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.
- Download the QEMU Accelerator Module from here
- Unzip the kqemu-version.tar.gz file into a directory (ie: C:\Program Files\Qemu\KQemu-version)
- may have to unzip it twice given the file format.
- In the target directory, locate kqemu.inf and install it (menu/right-click and select Install). Let it finish (it'll take just a couple of seconds).
- Open a command prompt (aka cmd.exe) and type
- net start kqemu
- If everything went fine, you should see the following message:
- 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
After you've downloaded the image, you must unzip it and place the .img file in the same directory as QEMU (ie: C:\Program Files\Qemu).
Starting OLPC environment
Open a command prompt (aka cmd.exe) in the QEMU directory.
cd "\Program Files\Qemu" 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
The emulator will start in a new window, and will soon display the OLPC 'XO' 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 ending in a dialog asking for your nickname.
We strongly recommend reading through the Sugar Instructions on how to use the emulated laptop -- this does not look like the Windows or Mac operating systems!
As a reminder: pressing Alt + Ctrl will liberate / return control to Windows.
NOTE: There are a some issues (mainly for the first timers) on how to get the whole enchilada going.
Closing the OLPC image
To close the OLPC "window" you must first go into the QEMU monitor screen and then quit. You do that by:
- Make sure the the window has the focus (label should say QEMU - Press Ctrl-Alt to exit grab).
- Press Alt + Ctrl + 2 to enter the QEMU Monitor.
- Type quit or q to quit.
Please update User Feedback on Images#QEMU_on_Windows with your experience.
--Tomhannen 19:30, 13 August 2006 (EDT)
Troubleshooting
Keyboard and Mouse
A typical case (considering many who report it) is that their keyboard and mouse don't work. A solution to the problem is:
- Make sure the the window has the focus (label should say QEMU - Press Ctrl-Alt to exit grab).
- Press Alt + Ctrl + 3 to enter the terminal mode of the OLPC.
- Make sure that you're logged in.
- If not, just hit enter and it'll ask you to.
- Login as root (no password is required)
- Type modprobe i8042
- Press Alt + Ctrl + 1 to return to the graphical mode of the OLPC.
- Your keyboard and mouse should be working fine.
- Usually the result is a continuous series of 1's will flow (as if the key is stuck)
- Just hit any key (to stop it) and delete the offending 1's
Network
The steps below work on QEmu regardless of which operating system you are running.
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.
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.
Some of the numbers have been removed from the screenshot above - they're not important.
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.
--Tomhannen 09:14, 7 December 2006 (EST) From some info found [here.]