Using QEMU on Windows: Difference between revisions
(→Troubleshooting: simpler (?) alternative to enable the network) |
No edit summary |
||
(39 intermediate revisions by 22 users not shown) | |||
Line 1: | Line 1: | ||
''< [[Emulating the XO]] | [[Emulating the XO/Quick Start|Quick Start]]'' |
|||
The step-by-step guide below has worked for builds 59 and 182, see [[User Feedback on Images#QEMU on Windows]] |
|||
{{Translations}} |
|||
{{cleanup}} |
|||
{{__TOCright__}} |
|||
'''QEMU''' is a popular emulation environment for Windows and Linux. This page describes how to set it up on a Windows machine. |
|||
== Setting up QEMU == |
|||
In order to use the [[Build images|provided OLPC images]] in |
In order to use the [[Build images|provided OLPC images]] in a Windows computer, first install an emulator: [[QEMU]] which is an open-source processor emulator. The accelerator for QEMU named KQEMU, while not required, is highly recommended as a performance booster. |
||
'''Note:''' people have converted some QEMU images to work with [[OS images for emulation#VMware Player|VMWare Player]], but regular OLPC builds are for [[QEMU]]. |
'''Note:''' people have converted some QEMU images to work with [[OS images for emulation#VMware Player|VMWare Player]], but regular OLPC builds are for [[QEMU]]. |
||
=== QEMU Emulator === |
|||
== Getting started == |
|||
#Download QEMU for Windows from [http://www.h7.dion.ne.jp/~qemu-win/ here] |
|||
=== Option 1) [[Emulating_the_XO/Quick_Start/Windows|Windows Quick Start]] === |
|||
Instead of downloading QEMU, KQEMU and a filesystem image separately, this '''[[Emulating the XO/Quick Start/Windows|all-in-one version]]''' has everything in one download. |
|||
It is a 190MB download that will then use about 1.5G of your disk after it is unzipped and installed. |
|||
The disk space used is approximately the same for all three options. |
|||
<nowiki>=== Opción 1) [[Emulating_the_XO / Quick_Start / Windows | Windows de inicio rápido]] === |
|||
En lugar de descargar QEMU, KQEMU y una imagen de sistema de archivos por separado, |
|||
este'''[[ Emulando la XO / Quick Start / Windows | todos -en una versión ]]''' |
|||
tiene todo en una sola descarga. Es una descarga de 190MB, que luego se usan cerca de 1.5G de su disco |
|||
después de descomprimido e instalado. El espacio en disco utilizado es de aproximadamente el mismo para las tres opciones.</nowiki> |
|||
=== Option 2) QEMU Manager for beginners === |
|||
#First, download this Manager for QEMU: [http://www.davereyn.co.uk/download.htm QEMU Manager] It will install QEMU as well. |
|||
#*Newer (Sept 2008) OLPC builds use the 2.6.25 kernel which checks for the availability of AMD's 3DNow extension and if the kernel does not find them it refuses to boot. More recent QEMU and KQEMU code in [http://savannah.nongnu.org/svn/?group=qemu SVN] emulates the 3DNow instructions. A newer Windows binary build is available from the [http://n2.nabble.com/Emulating-8.2-images-on-QEMU-for-windows-td1115692.html OLPC forum at Nabble]. (I don't know if QEMU Manager supports the newe emulator+accelerator versions that have 3DNow support - [[User:Mwarren]]). |
|||
#Then create a new virtual machine (red plus on the toolbar). |
|||
#QEMU Manager has a menu option to install the accelerator driver. |
|||
#Then set up the virtual machine options (hammer on the toolbar) to match the following (it worked for me): |
|||
<gallery> |
|||
Image:QEMU_Manager_Image_Setting1.png |
|||
Image:QEMU_Manager_Image_Setting2.png |
|||
Image:QEMU_Manager_Image_Setting3.png |
|||
Image:QEMU_Manager_Image_Setting4.png |
|||
</gallery> |
|||
Press the play icon on the toolbar to start the virtual machine. With these network settings it will able to install packages by using the "yum" command. |
|||
=== Option 3) Piecemeal installation === |
|||
====QEMU Emulator==== |
|||
#Download QEMU for Windows from [http://www.h7.dion.ne.jp/~qemu-win/ here]. (Note: You want the binary installer, with a name like "qemu-0.9.0-windows.zip".) |
|||
#Since there's no installation step, just [[unzip]] it into any directory (ie: <tt>C:\Program Files\Qemu</tt>) |
#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]] |
#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 for QEMU (named KQEMU) ==== |
||
The [http:// |
The [http://bellard.org/qemu/kqemu-doc.html Accelerator for QEMU (named 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 <tt>kqemu-1.3.0pre11.tar.gz</tt>. For newer versions of QEMU with 3DNow support, use <tt>[http://bellard.org/qemu/download.html kqemu-1.4.0pre1.tar.gz]</tt>. |
||
:''kqemu is also available from the same source as qemu. Is there some reason we are using the following instead? [[User:MitchellNCharity|MitchellNCharity]] 15:11, 22 October 2007 (EDT)'' |
|||
#Download the QEMU Accelerator Module from [http://fabrice.bellard.free.fr/qemu/download.html here] |
|||
::''The kqemu release on http://www.h7.dion.ne.jp/~qemu-win/ is an installer. Whereas this release is a simple, portable folder. That's probably why it's preferred'' - BP 20th Nov 2007 |
|||
#Download the QEMU Accelerator Module from [http://bellard.org/qemu/download.html here] |
|||
#[[Unzip]] the <tt>kqemu-''version''.tar.gz</tt> file into a directory (ie: <tt>C:\Program Files\Qemu\KQemu-''version''</tt>) |
#[[Unzip]] the <tt>kqemu-''version''.tar.gz</tt> file into a directory (ie: <tt>C:\Program Files\Qemu\KQemu-''version''</tt>) |
||
#*may have to [[unzip]] it twice given the file format. |
#*may have to [[unzip]] it twice given the file format. |
||
#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). |
#In the target directory on Windows XP, 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). |
||
#*In Windows Vista, install KQEMU with this command line from an Administrator CMD prompt:<br /><tt>rundll32.exe setupapi,InstallHinfSection DefaultInstall 132 kqemu.inf</tt> |
|||
#Open a <tt>command prompt</tt> (aka <tt>cmd.exe</tt>) and type |
#Open a <tt>command prompt</tt> (aka <tt>cmd.exe</tt>) and type |
||
#*<tt>net start kqemu</tt> |
#*<tt>net start kqemu</tt> |
||
#*If everything went fine, you should see the following message: |
#*If everything went fine, you should see the following message: |
||
#**<tt>The KQEMU virtualisation module for QEMU service was started successfully.</tt> |
#**<tt>The KQEMU virtualisation module for QEMU service was started successfully.</tt> |
||
''You can also use an [[Emulating the XO/Quick Start/Windows|all-in-one version]]; see above.'' |
|||
== Download an OLPC image == |
== Download an OLPC image == |
||
To download the latest OLPC environment (aka drive image), visit [[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>). |
After you've downloaded the image, you must [[unzip]] it (using a program that understands the [http://en.wikipedia.org/wiki/Bz2 bz2] format) and place the <tt>.img</tt> file in the same directory as [[QEMU]] (ie: <tt>C:\Program Files\Qemu</tt>). |
||
== Starting OLPC environment == |
==== Starting the OLPC environment ==== |
||
Before you launch the emulated image, we '''strongly''' recommend reading through the '''[[Getting started]]''' pages that explain how to use the OLPC/Sugar GUI environment -- Sugar does not look like the Windows or Mac operating systems! |
|||
Open a <tt>command prompt</tt> (aka <tt>cmd.exe</tt>) in the QEMU directory and launch qemu.exe using the appropriate image and "-L ." as first argument, and further arguments as explained on [[Emulating the XO/Quick Start]]: (At the time of writing, the arguments are as shown below, but this can change/evolve, so please check the Quick Start page for the latest recommended arguments first!) |
|||
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'' |
qemu.exe -L . -m 256 -kernel-kqemu -soundhw es1370 -net user -net nic,model=rtl8139 -hda ''image_name'' |
||
Where ''image_name'' is the newest version you have downloaded. For example: |
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.exe -L . -m 256 -kernel-kqemu -soundhw es1370 -net user -net nic,model=rtl8139 -hda olpc-redhat-stream-development-build-185-20061117_2030-devel_ext3.img |
||
<gallery> |
|||
Image:Bootscreen1.png |
|||
Image:Bootscreen2.png |
|||
Image:Bootscreen3.png |
|||
Image:Login.png |
|||
</gallery> |
|||
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.) |
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.) |
||
Line 46: | Line 96: | ||
Then you will see a typical Linux boot sequence ending in a dialog asking for your nickname. |
Then you will see a typical Linux boot sequence ending in a dialog asking for your nickname. |
||
As a reminder: pressing <tt>Alt + Ctrl</tt> in the emulator will "liberate" the keyboard and mouse, returning control to Windows. |
|||
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 <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. |
'''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. |
||
Line 55: | Line 103: | ||
To close the OLPC "window" you must first go into the QEMU monitor screen and then quit. You do that by: |
To close the OLPC "window" you must first go into the QEMU monitor screen and then quit. You do that by: |
||
#Make sure |
#Make sure 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 |
#Press <tt>Alt + Ctrl + 2</tt> to enter the QEMU Monitor (may need shift as well on some computers: <tt>Alt + Ctrl + Shift + 2</tt>) |
||
#Type <tt>quit</tt> or <tt>q</tt> to quit. |
#Type <tt>quit</tt> or <tt>q</tt> to quit. |
||
Please update [[User Feedback on Images# |
'''Please update [[User Feedback on Images#QEMU on Windows]] with your experience'''. |
||
--[[User:Tomhannen|Tomhannen]] 19:30, 13 August 2006 (EDT) |
|||
== Troubleshooting == |
== Troubleshooting == |
||
See [[Emulating the XO/Help and tips]]. |
|||
=== 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 === |
|||
Chances are that the network will not be enabled. Following are two possible ways to enable it. |
|||
==== Enabling the Network Alternative #1 ==== |
|||
#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>dhclient</tt> |
|||
#Press <tt>Alt + Ctrl + 1</tt> to return to the graphical mode of the OLPC. |
|||
#Your browser / network connection should be working fine. |
|||
==== Enabling the Network Alternative #2 ==== |
|||
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. |
|||
[[Image:Empty_no_apps_no_frame.png|300px]] |
|||
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. |
|||
[[Image:QEmu_running_dhclent.png|400px]] |
|||
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. |
|||
[[Image:Sugar_browser_with_frame_google_home_page.png|300px]] |
|||
--[[User:Tomhannen|Tomhannen]] 09:14, 7 December 2006 (EST) |
|||
From some info found [[http://qemu-forum.ipi.fi/viewtopic.php?t=2645&highlight=olpc here.]] |
From some info found [[http://qemu-forum.ipi.fi/viewtopic.php?t=2645&highlight=olpc here.]] |
||
[[Category:Developers]] |
[[Category:Developers]] |
||
[[Category:Software development]] |
[[Category:Software development]] |
||
[[Category:Emulation]] |
[[Category:Emulation]] |
||
[[Category:Translated Pages]] |
Latest revision as of 01:24, 22 February 2011
< Emulating the XO | Quick Start
QEMU is a popular emulation environment for Windows and Linux. This page describes how to set it up on a Windows machine.
In order to use the provided OLPC images in a Windows computer, first install an emulator: QEMU which is an open-source processor emulator. The accelerator for QEMU named KQEMU, while not required, is highly recommended as a performance booster.
Note: people have converted some QEMU images to work with VMWare Player, but regular OLPC builds are for QEMU.
Getting started
Option 1) Windows Quick Start
Instead of downloading QEMU, KQEMU and a filesystem image separately, this all-in-one version has everything in one download. It is a 190MB download that will then use about 1.5G of your disk after it is unzipped and installed. The disk space used is approximately the same for all three options.
=== Opción 1) [[Emulating_the_XO / Quick_Start / Windows | Windows de inicio rápido]] === En lugar de descargar QEMU, KQEMU y una imagen de sistema de archivos por separado, este'''[[ Emulando la XO / Quick Start / Windows | todos -en una versión ]]''' tiene todo en una sola descarga. Es una descarga de 190MB, que luego se usan cerca de 1.5G de su disco después de descomprimido e instalado. El espacio en disco utilizado es de aproximadamente el mismo para las tres opciones.
Option 2) QEMU Manager for beginners
- First, download this Manager for QEMU: QEMU Manager It will install QEMU as well.
- Newer (Sept 2008) OLPC builds use the 2.6.25 kernel which checks for the availability of AMD's 3DNow extension and if the kernel does not find them it refuses to boot. More recent QEMU and KQEMU code in SVN emulates the 3DNow instructions. A newer Windows binary build is available from the OLPC forum at Nabble. (I don't know if QEMU Manager supports the newe emulator+accelerator versions that have 3DNow support - User:Mwarren).
- Then create a new virtual machine (red plus on the toolbar).
- QEMU Manager has a menu option to install the accelerator driver.
- Then set up the virtual machine options (hammer on the toolbar) to match the following (it worked for me):
Press the play icon on the toolbar to start the virtual machine. With these network settings it will able to install packages by using the "yum" command.
Option 3) Piecemeal installation
QEMU Emulator
- Download QEMU for Windows from here. (Note: You want the binary installer, with a name like "qemu-0.9.0-windows.zip".)
- 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
Accelerator for QEMU (named KQEMU)
The Accelerator for QEMU (named 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.0pre11.tar.gz. For newer versions of QEMU with 3DNow support, use kqemu-1.4.0pre1.tar.gz.
- kqemu is also available from the same source as qemu. Is there some reason we are using the following instead? MitchellNCharity 15:11, 22 October 2007 (EDT)
- The kqemu release on http://www.h7.dion.ne.jp/~qemu-win/ is an installer. Whereas this release is a simple, portable folder. That's probably why it's preferred - BP 20th Nov 2007
- 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 on Windows XP, locate kqemu.inf and install it (menu/right-click and select Install). Let it finish (it'll take just a couple of seconds).
- In Windows Vista, install KQEMU with this command line from an Administrator CMD prompt:
rundll32.exe setupapi,InstallHinfSection DefaultInstall 132 kqemu.inf
- In Windows Vista, install KQEMU with this command line from an Administrator CMD prompt:
- 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.
You can also use an all-in-one version; see above.
Download an OLPC image
To download the latest OLPC environment (aka drive image), visit 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 (using a program that understands the bz2 format) and place the .img file in the same directory as QEMU (ie: C:\Program Files\Qemu).
Starting the OLPC environment
Before you launch the emulated image, we strongly recommend reading through the Getting started pages that explain how to use the OLPC/Sugar GUI environment -- Sugar does not look like the Windows or Mac operating systems!
Open a command prompt (aka cmd.exe) in the QEMU directory and launch qemu.exe using the appropriate image and "-L ." as first argument, and further arguments as explained on Emulating the XO/Quick Start: (At the time of writing, the arguments are as shown below, but this can change/evolve, so please check the Quick Start page for the latest recommended arguments first!)
cd "\Program Files\Qemu" qemu.exe -L . -m 256 -kernel-kqemu -soundhw es1370 -net user -net nic,model=rtl8139 -hda image_name
Where image_name is the newest version you have downloaded. For example:
qemu.exe -L . -m 256 -kernel-kqemu -soundhw es1370 -net user -net nic,model=rtl8139 -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.
As a reminder: pressing Alt + Ctrl in the emulator will "liberate" the keyboard and mouse, returning 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 window has the focus (label should say QEMU - Press Ctrl-Alt to exit grab).
- Press Alt + Ctrl + 2 to enter the QEMU Monitor (may need shift as well on some computers: Alt + Ctrl + Shift + 2)
- Type quit or q to quit.
Please update User Feedback on Images#QEMU on Windows with your experience.
Troubleshooting
See Emulating the XO/Help and tips.
From some info found [here.]