VMware: Difference between revisions
(Cut down on the chatty and redundant text, reorganise, references to emulation and dev handbook) |
DanielDrake (talk | contribs) No edit summary |
||
(26 intermediate revisions by 12 users not shown) | |||
Line 1: | Line 1: | ||
<big><b><font color=red>For current information on emulation of OLPC software images, see [[Emulating the XO]]</font></b></big> |
|||
{{Deprecated}} |
|||
{{emulation-nav}} |
{{emulation-nav}} |
||
= Emulation with VMWare = |
|||
[http://www.vmware.com/ VMWare] (Workstation, Player) is an emulator released as commercial software. The player version is distributed free of charge (Gratis). It runs on either Win32 or Linux host machines, allowing you to run OLPC images within the virtual machine. A Mac version is also available, VMWare Fusion, however this is not provided free of charge (a free 30-day evaluation is available). |
|||
You can decide either to emulate an XO via downloaded images, or to build a [[#Developer's Desktop Emulation|developer's desktop image]] starting from a stock Fedora 7. Both approaches are discussed here. |
You can decide either to emulate an XO via downloaded images, or to build a [[#Developer's Desktop Emulation|developer's desktop image]] starting from a stock Fedora 7. Both approaches are discussed here. |
||
See Also: |
|||
== Emulating the XO == |
|||
* There is [http://www.moka5.com:80/products/getstarted.html apparently] a free wrapper that lets you use the VMWare player similarly to VMWare Workstation on MS Windows platforms. |
|||
An emulated XO image is recommended for developers working on Activities (as distinct from Sugar and other core libraries). It is also recommended for those who want to test their software or who may not have enough computer power to run a developer's image. |
|||
The XO images have the advantage of being faster than a "developer's desktop" image. They are also much easier to maintain (sugar-jhbuild can be quite time consuming). You should be sure to use source-code-control storing to another machine (such as your host machine) for all of your code so that you do not lose work when updating to a newer image. |
|||
=== Compatibility === |
|||
* [[OS_images|Official OLPC build]] 616 is known to work under VMWare workstation 5 on Linux AMD64 with networking and (non-csound) sound with a workaround (sound service needs to be restarted) |
|||
* [[OS_images|Official OLPC build]] 602 is known to work under VMWare workstation 6 on Vista and MacOS using VMWare Fusion. |
|||
* [[OS_images|Official OLPC build]] 557 is known to work under VMWare with networking (tested on Linux AMD64 host w/). |
|||
* A kernel driver (Ensoniq ES1371) has been added to allow sound support https://dev.laptop.org/ticket/3034. |
|||
= Caveats = |
= Caveats = |
||
On Linux, VMWare setup requires a package of kernel modules (as do all high-speed emulation options we are aware of) |
On Linux, VMWare setup requires a package of kernel modules (as do all high-speed emulation options we are aware of). |
||
== File Sharing == |
|||
You can use your host machine to edit files and "upload" them to your virtual XO via and IP-based file-transfer mechanism: |
|||
* source-code-control (git, bzr, svn) |
|||
* sftp, scp |
|||
* rsync |
|||
* editor-based virtual file-systems |
|||
VMWare seems to have the highest performance of the emulation solutions available, but the difference between it and Qemu + KQemu is fairly minimal. |
|||
hl |
|||
= Setup = |
= Setup = |
||
The VMWare/VirtualBox images are converted from the official images using a simple downloading script. You can either download and convert the official images yourself |
The VMWare/VirtualBox images are converted from the official images using a simple downloading script. You can either use a pre-converted image (recommended) or download and [[VMware/Convert|convert the official images yourself]]. |
||
⚫ | |||
Pre-converted images [http://dev.laptop.org/pub/virtualbox/ are made available] periodically to support those who do not have Qemu's tools installed on their workstations. Choose the .zip file for the version you require. |
|||
Read bug [https://dev.laptop.org/ticket/3470 #3470] before choosing builds 578-581! |
|||
== Building an Image from Scratch == |
|||
Mac Users may want to check out [http://www.edgargonzalez.com/2006/11/21/emulating-the-olpc-xo-on-a-mac-osx/ this article] or use [[User:Probono|OLPC4Mac]], a script that creates an OLPC image for VMware Fusion on the Mac automatically. |
|||
* Download an official [[OS_images|devel-ext3]] image (<thefile>.img.bz2) |
|||
* bunzip2 <thefile>.img.bz2 |
|||
* use the qemu-img function from [[Qemu|Qemu]] to convert the image into a vmdk file |
|||
** qemu-img convert <thefile>.img -O vmdk <thefile>.vmdk |
|||
⚫ | |||
Now create a new VMWare "Machine": |
|||
Pre-converted images ''used to be'' generated from the latest release and made available at http://dev.laptop.org/pub/virtualbox/ |
|||
* "New Virtual Machine", "Typical", OS Type "Other Linux 2.6.x kernel" |
|||
* Network Address Translation (NAT) networking (recommended, try others if you like) |
|||
* Disk configuration (irrelevant, we're going to overwrite it) |
|||
[[OS images]] explains the different kinds of builds. |
|||
Edit "Machine" Settings: |
|||
Choose a reasonably recent version (within the last few weeks) whenever possible. Keep in mind that Joyride builds may be broken! Discussions on the OLPC-devel mailing list will discuss broken builds when they happen. |
|||
* Memory 512MB (recommended for development work, 256 more closely simulates an XO) |
|||
* Remove the auto-generated hard-disk |
|||
* Add a new hard disk, "Existing Disk Image", choose <thfile>.vmdk |
|||
* Ensure that audio is enabled |
|||
Images created after 2007-12-22 should have a VMWare 6.0-format -6.vmx and -6.vmxf file in the downloadable zip file. These files are not yet tested, but VMWare 6.0 should allow you to use USB keys and the like more reliably within the emulated images. |
|||
=== Configure === |
|||
See: [[Developers/Setup# Configuration and Usage|Configuration and Usage]] -- describes how to set up the new image for development work |
|||
Once you have booted the machine, you will need to specify a name for yourself and choose an XO colour. You will then need to configure the collaboration server. To do this, pull up the developer's console, and use the "vi" editor to change the configuration file ~/.sugar/default/config to change the "server=" line to "server=olpc.collabora.co.uk". |
|||
⚫ | |||
When this is done, reboot. The virtual XO should now have networking support and should show you a network view with other XOs logged on. |
|||
⚫ | |||
⚫ | |||
⚫ | |||
Use full-screen mode: |
|||
⚫ | |||
* ctrl-alt-enter to enter/exit full-screen mode |
|||
⚫ | |||
* Use an Editor on your HOST machine to edit code. Much nicer user experience. Quite a few editors support 'remote' files using SCP, for example. Setup 'samba' in your virtual machine and you can just use network drives. |
|||
* Use full screen mode to make working with the emulated machine more pleasant. |
|||
== OLPC Clones == |
|||
VMware Workstation has a nifty feature called "Linked Clones." This enables users to deploy virtual machines based on the "template virtual machine" that take up very little space. For example, I can make a OLPC virtual machine, turn it into a template, make a clone, and the clone will take up ~6 megs of disk space when not running. When running, it will consume more diskspace as ram. |
VMware Workstation has a nifty feature called "Linked Clones." This enables users to deploy virtual machines based on the "template virtual machine" that take up very little space. For example, I can make a OLPC virtual machine, turn it into a template, make a clone, and the clone will take up ~6 megs of disk space when not running. When running, it will consume more diskspace as ram. |
||
=== Why? === |
|||
It is now extremely easy to test mesh networking and networking activities in general. The folks at OLPC Austria have done something similar with qemu, but that requires additional software to manage a virtual ethernet network. VMware workstation provides more networking support out the box. |
It is now extremely easy to test mesh networking and networking activities in general. The folks at OLPC Austria have done something similar with qemu, but that requires additional software to manage a virtual ethernet network. VMware workstation provides more networking support out the box. |
||
Line 86: | Line 54: | ||
In addition, the clones would take less disk space than it would to run multiple instances of qemu images. |
In addition, the clones would take less disk space than it would to run multiple instances of qemu images. |
||
=== Creating the Template OLPC Virtual Machine === |
|||
* Follow the above steps for creating a OLPC virtual machine, but when done, '''do not boot it up'''. This is extremely important! Booting it up and making a clone of that will cause unpredictable behavior such as no setup username screen ever displaying. |
* Follow the above steps for creating a OLPC virtual machine, but when done, '''do not boot it up'''. This is extremely important! Booting it up and making a clone of that will cause unpredictable behavior such as no setup username screen ever displaying. |
||
Line 93: | Line 61: | ||
* You now have a template VM for cloning! |
* You now have a template VM for cloning! |
||
=== Deploying Clones From The Template OLPC Virtual Machine === |
|||
* With the OLPC VM still selected, Goto VM -> Clone. |
* With the OLPC VM still selected, Goto VM -> Clone. |
||
Line 102: | Line 70: | ||
* Now you can boot the clone! |
* Now you can boot the clone! |
||
== VMWare Tools == |
|||
* install the VMWare tools if you prefer |
* install the VMWare tools if you prefer |
||
Line 130: | Line 98: | ||
* The next steps will take the better part of a day to complete, if not more on a slower machine (You'll be running an emulator ''within'' an emulator!) |
* The next steps will take the better part of a day to complete, if not more on a slower machine (You'll be running an emulator ''within'' an emulator!) |
||
* Create a new virtual machine and do a base Fedora |
* Create a new virtual machine and do a base Fedora (or Ubuntu) install on it |
||
** Do not install any extra packages (will be done later) |
** Do not install any extra packages (will be done later) |
||
** Make sure you give the disk at least 15GB max size. If you have the disk space, preallocate it now. That will give you a twofold increase in performance |
** Make sure you give the disk at least 15GB max size. If you have the disk space, preallocate it now. That will give you a twofold increase in performance |
||
Line 139: | Line 107: | ||
Once you have your working Fedora 7 or Ubuntu image under emulation, see the instructions for setting up [[Sugar with sugar-jhbuild]] for your new (emulated) platform: |
Once you have your working Fedora 7 or Ubuntu image under emulation, see the instructions for setting up [[Sugar with sugar-jhbuild]] for your new (emulated) platform: |
||
* [[Sugar on Fedora |
* [[Sugar on Fedora]] |
||
* [[Sugar on Ubuntu]] |
* [[Sugar on Ubuntu Linux]] |
||
The <code>update</code> step will download approximately 1.6GB of data (using compression so probably around 400MB in actual download). The build phase will also take a few hours. On a 2.4Ghz Core2 duo iMac with 3GB ram it took about two hours. |
The <code>update</code> step will download approximately 1.6GB of data (using compression so probably around 400MB in actual download). The build phase will also take a few hours. On a 2.4Ghz Core2 duo iMac with 3GB ram it took about two hours. |
Latest revision as of 16:15, 8 February 2011
For current information on emulation of OLPC software images, see Emulating the XO
You can decide either to emulate an XO via downloaded images, or to build a developer's desktop image starting from a stock Fedora 7. Both approaches are discussed here. See Also:
CaveatsOn Linux, VMWare setup requires a package of kernel modules (as do all high-speed emulation options we are aware of). VMWare seems to have the highest performance of the emulation solutions available, but the difference between it and Qemu + KQemu is fairly minimal. hl SetupThe VMWare/VirtualBox images are converted from the official images using a simple downloading script. You can either use a pre-converted image (recommended) or download and convert the official images yourself. Mac Users may want to check out this article or use OLPC4Mac, a script that creates an OLPC image for VMware Fusion on the Mac automatically. Pre-converted ImagesPre-converted images used to be generated from the latest release and made available at http://dev.laptop.org/pub/virtualbox/ OS images explains the different kinds of builds. Choose a reasonably recent version (within the last few weeks) whenever possible. Keep in mind that Joyride builds may be broken! Discussions on the OLPC-devel mailing list will discuss broken builds when they happen. Images created after 2007-12-22 should have a VMWare 6.0-format -6.vmx and -6.vmxf file in the downloadable zip file. These files are not yet tested, but VMWare 6.0 should allow you to use USB keys and the like more reliably within the emulated images. See: Configuration and Usage -- describes how to set up the new image for development work TipsTo get access to the root console, that is, virtual console 1:
Use full-screen mode:
OLPC ClonesVMware Workstation has a nifty feature called "Linked Clones." This enables users to deploy virtual machines based on the "template virtual machine" that take up very little space. For example, I can make a OLPC virtual machine, turn it into a template, make a clone, and the clone will take up ~6 megs of disk space when not running. When running, it will consume more diskspace as ram. Why?It is now extremely easy to test mesh networking and networking activities in general. The folks at OLPC Austria have done something similar with qemu, but that requires additional software to manage a virtual ethernet network. VMware workstation provides more networking support out the box. In addition, the clones would take less disk space than it would to run multiple instances of qemu images. Creating the Template OLPC Virtual Machine
Deploying Clones From The Template OLPC Virtual Machine
VMWare Tools
Ed Borasky, 5 December 2007: I've downloaded ship2 build650 and built a virtual machine from it following the above instructions. Unfortunately:
Developer's Desktop EmulationFor development on the core Sugar system (as distinct from activities), you likely need an emulated sugar-jhbuild system so that you can keep up to the most recent versions of all core packages. System Requirements:
The quickest way to get started creating a jhbuild (developer's desktop) is:
Once you have your working Fedora 7 or Ubuntu image under emulation, see the instructions for setting up Sugar with sugar-jhbuild for your new (emulated) platform: The See:
|