VMware: Difference between revisions

From OLPC
Jump to navigation Jump to search
Line 3: Line 3:
= Emulation with VMWare =
= 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 in development.
[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.


== Compatibility ==
== Compatibility ==

Revision as of 11:12, 10 October 2007

Merge-arrows.gif
It has been suggested that this article or section be merged with Emulating the XO/UsingVMware. (Discuss)


Emulation with VMWare

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.

Compatibility

  • Official OLPC build 557 is known to work under VMWare with networking (tested on Linux AMD64 host).
  • A kernel driver (Ensoniq ES1371) has been added to allow sound support https://dev.laptop.org/ticket/3034.
  • Fedora 7 (with some hiccups) and Ubuntu Feisty both run under VMWare, you can thus use VMWare to create a sugar-jhbuild developer's desktop environment (recommended only for those wishing to do work on the core software.

Caveats

  • You will need to use ssh, rsync, or another standard Unix mechanism to share files with the image under the Player version of the software.
  • On Linux, VMWare setup requires a package of kernel modules

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 or use a pre-converted image.

Downloading a Pre-converted Image

Pre-converted images 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 #3470 before choosing builds 578-581!

Building an Image from Scratch

  • Download an official devel-ext3 image (<thefile>.img.bz2)
  • bunzip2 <thefile>.img.bz2
  • use the qemu-img function from Qemu to convert the image into a vmdk file
    • qemu-img convert <thefile>.img -O vmdk <thefile>.vmdk

Now create a new VMWare "Machine":

  • "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)

Edit "Machine" Settings:

  • 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

Configure

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.

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.

Why Are OLPC Virtual Machine Clones Useful?

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

  • 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.
  • Now, edit the virtual machine's settings and go to the options tab. Choose "Advanced" and check the "Enable template mode" checkbox and hit OK.
  • Go to the snapshot manager for this virtual machine and choose to take a snapshot in its powered off state. Give it a useful name like, "OLPC Base Template" with a description of perhaps "Not booted yet." Save this.
  • You now have a template VM for cloning!

Deploying Clones From The Template OLPC Virtual Machine

  • Select the template OLPC VM and choose to clone it.
  • In the dialog box that pops up, select next.
  • Choose the existing snapshot (It will be called "OLPC Base Template" if you followed the above instructions exactly) and hit next.
  • Choose "Create a linked clone" - This will greatly save on disk space.
  • Give the clone a name and a place to live in and click through.
  • Now you can boot the clone!

See Also

  • VirtualBox is an emulation system with similar performance and usage
  • Qemu is an Open Source emulation system