VMware

From OLPC
(Redirected from VMWare)
Jump to: navigation, search

For current information on emulation of OLPC software images, see Emulating the XO

Stop hand.png WARNING:
The content of this section is considered
DEPRECATED and OBSOLETE
It is preserved for historical or documenting reasons.

modify 

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:

  • There is apparently a free wrapper that lets you use the VMWare player similarly to VMWare Workstation on MS Windows platforms.

Caveats

On 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

Setup

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 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 Images

Pre-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

Tips

To get access to the root console, that is, virtual console 1:

  • You can use CTRL-ALT + space then F1, that is, hold down CTRL-ALT while you press the spacebar and then the F1 key. You can do the same with F3 to get back to your normal X session.

Use full-screen mode:

  • ctrl-alt-enter to enter/exit full-screen mode

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?

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

  • With the OLPC VM still selected, Goto VM -> Clone.
  • In the 'Clone Virtual Machine Wizard' 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!

VMWare Tools

  • install the VMWare tools if you prefer
    • Note, experiences of most developers seem to suggest this isn't necessary, and it's a bit involved

Ed Borasky, 5 December 2007: I've downloaded ship2 build650 and built a virtual machine from it following the above instructions. Unfortunately:

  1. The image of 1 GB is almost full. The VMware tools RPM won't install -- there isn't enough space.
  2. I can build a new virtual disk (2 GB) and copy the original image to it, using a Fedora 8 rescue CD. After that, I can install the VMware tools RPM.
  3. Once you have the RPM installed, you have to run a Perl configure script. Well, the XO doesn't have Perl. So you have to install Perl. After that, you discover that the script needs "gcc", "make" and kernel headers. I got "gcc" and "make" in there, but the repositories don't seem to have the right kernel headers.
  4. I am about to try this with the latest Joyride build -- I think I can get all the dependencies installed, although I still will need a larger virtual disk than the stock 1 GB.
  5. The good news is that even without VMware tools, the virtual machines come up in Workstation and the Player. I have not been able to connect to a host sound card yet, but that's probably a VMware configuration issue and not something in the emulated XO guest.

Developer's Desktop Emulation

For 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:

  • Windows hosts: if your machine was considered 'fast' two years ago, you'll do fine
  • Mac hosts: don't even think about this on a G4 or even a G5: use an Intel-Mac
  • Memory: 2GB is a realistic minimum. 3GB is recommended.

The quickest way to get started creating a jhbuild (developer's desktop) is:

  • 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 (or Ubuntu) install on it
    • 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
    • If you have more than 1GB of RAM, set the virtual machine to 800MB, if not give it 400MB.
    • Give the image access to all your CPUs too, if you have them (default is one).
    • There is a preinstalled 'virtual appliance' F7 available via vmware.com, but you'll need to increase its disk size first. It maxes out at 4.7GB. 2GB short of a working sugar-jhbuild environment.

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 update 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.

See: