Virtual Tiles@Home - Ubuntu

From OpenStreetMap Wiki
Jump to: navigation, search

Virtual Tiles@Home - Ubuntu

It would be nice if more people ran Tiles@home on their PCs. But manually installing Tiles@home can be kind of complicated, especially if you are not familiar with Linux. It is possible to install it on Windows, but is said to be even more complicated. Virtual Tiles@Home (vt@h) is a new approach to this problem.

How does Virtual Tiles@home work?

Software like VirtualBox allows you to emulate (simulate) a complete PC inside your real PC. The real PC is also called host PC. You may install any OS on your virtual PC, which may be different from your host OS. Whatever operating system you may be running (Windows, Mac, Linux), you can have a virtual PC running Linux, and you can use the host PC and the virtual PC at the same time.

Virtual tiles@home uses this possibility. You don't have to create a virtual PC and install Linux on it. We are creating a virtual PC that you can download and run without Linux knowledge. You start the virtual PC, and the PC starts rendering and uploading. Inside this virtual PC, there is a completely normal Tiles@home installation.

You only need three things:

keep in mind: one can also convert the image to other formats and so use other virtualization software (e.g. qemu)

This version is based on ubuntu server (Ubuntu 10.04). Anyone interested can download the VDI and give feedback on the Talk page.

What's new

  • based on Ubuntu 10.04 LTS server optimized for virtual machine (virtual-kernel with PAE enabled - you have to enable it in VirtualBox)
  • using now a partition with 4 GB, no swap added
  • default swapfile 2048MB automatically createt on first boot
  • autostart using upstart
  • "sudo osm stop" waits up to 1 hour
  • "sudo osm stop-now" aborts after 10 seconds
  • MaxTilesetComplexity=5000000 removed (default is again 0)
  • directory of osm is in /home/openstreetmap/tilesAtHome
  • don't update/reinstall programs after publishing to public, security updates will still install automatically
  • http-proxy question
  • crontab not any more used
  • password entry not any more visible on typing

See also Talk page.


Old Versions

  • (compressed: size 191MB, uses 1GB HD space; SHA1: 8cd6243a5df82abfb6344a2bca0818be97b72677)


Enable PAE/NX in VirtualBox 3.0.2
  • Download and install VirtualBox
  • Download the Virtual Drive (VDI) above
  • Extract the file
  • Create a new virtual machine inside VirtualBox
    • select Operating System Linux and version Ubuntu
    • add the extracted VDI file as disk to VirtualBox
    • configure a memory of at least 256MB RAM to be used by the virtual machine
    • enable PAE/NX checkbox (in System/Processor, see picture beside)
    • leave everything else at default values
  • start the virtual machine
  • Halt the Virtual Machine with: HOST-H.
  • Restart rendering when starting the VM.

Problems with the installation

  • It can happen that you followed the instructions above, but get an error like this:
 Gave up waiting for root device. Common problems:
 - Boot args (cat /proc/cmdline)
 - check rootdelay= (did the system wait long enough?)
 - check root= (did the system wait for the right device?)
 - Missing modules (cat /proc/modules; ls /dev)
 ALERT! /dev/disk/by-uuid/87b55cc9-82be-47cc-a55f-3bccf5ec976b does not exist. Dropping to a shell! 
  • The solution is to edit the virtual machine
    • unlink the extracted VDI file from the virtual machine
    • delete the SATA storage controller
    • create a SCSI storage controller
    • link the extracted VDI file to the SCSI storage controller
    • start the virtual machine again

Requirements for the 64bit version

  • 64bit CPU that supports virtualization techniques (AMD-V; VT-x)
  • 64bit OS like WindowsXP x64 or Windows Vista x64 or Linux 64
  • the installed 64bit version of VirtualBox
keep in mind: one can also convert the image to other formats and so use other virtualization software (e.g. qemu)
  • in VirtualBox enable
    • PAE/NX checkbox
    • VT-x/AMD-V checkbox

Running two Instances on a Multicore CPU

If you have a Multicore Cpu, you may want to run more Instances simultaneously. The Problem is that the VM Image has a unique Number, so you can not use the same Image as a simple Copy. You must clone it with the vbox Tool "VBoxManage.exe" which is automatically installed together with VBox.

  • Creating the first Machine as shown above. Name eg. OSM1
  • Start and setup this Machine. After Testing; shutdown the VM
  • Check in the global Setting of Vbox, where the Path to the VMs is. Here you find OSM1 eg :F:\VirtualBox VMs\OSM1
  • Create a new Folder OSM2 parallel to OSM1 eg: F:\VirtualBox VMs\OSM2
  • open a CMD Prompt. and enter in one Line(Path depending on youre Installation):

C:\Programme\Oracle\VirtualBox\VBoxManage.exe clonehd F:\VirtualBox VMs\OSM1\openstreetmap.vdi F:\VirtualBox VMs\OSM2\openstreetmap.vdi

  • Now create a new Machine like the first, but Name is OSM2 and select the cloned vdi File.
  • Edit this new VM->network->advanced->click on the green symbol right of the mac address


Setting up

You can use the following commands (but you don't need them).

for the non usa ... be carreful. Its qwerty not azerty so for the account and password ...

Before you enter a command, you must stop the output, press CTRL-C, you will see the prompt ($).

If you want to render with your own account (from enter

 $ sudo osm setuser

and give your email (not your username!) and password (yes it's cleartext).

Increase Swap to 1GB with (be careful, this will decrease your HD space and may cause the program not to work properly)

 $ sudo osm swap 1024

For other commands enter

 $ sudo osm

See the log again:

 $ tail -f /tmp/tiles.log

If you have a national keyboard layout you can use

 $ sudo dpkg-reconfigure console-setup


Another console session

If you want to leave Tiles@Home running but do some other stuff, press ALT+F2, ALT+F3, ... to get another console session. Use openstreetmap as user and openstreetmap as password. There is no root login available (use sudo su to become root).

Modifying configuration file

All configuration files are stored at /var/tmp/tilesAtHome/. Just edit them if you KNOW what you are doing! You can use sudo joe filename and exit joe with CTRL-K,X.


Stores your login information used for uploading the finished work units.


URLs for contacting various servers to receive and send work.


How the different layers should be rendered.


Common configuration file for Tiles@Home.

Modifying /etc/init.d/tiles-gen-client file

When stoping the VM /etc/init.d/tiles-gen-client stop is called to stop calculating. Actually its kind of a stop-later, which is aborted (processes are killed) after some time (default 120s). You can play with the value.

 # timeout to wait for the client to finish on shutdown

Exit virtual machine

To exit the virtual machine and continue working on your host system press the Host key which is displayed in the lower right corner of your VM window. Default values are:

HOST-KEY and H       (default is the right hand Ctrl)
Ctrl-H               (use right hand Ctrl)

Running Headless

It is possible to run Tiles@Home without having a X-session running.

VB <3 uses 'vboxheadless', from 3.0 on use 'VBoxHeadless'

To be able to login to the osm when it is headless you have to install SSH:

sudo apt-get install ssh

And to figure out your current IP of the osm:


You are now ready to run it headless (well, after you have got everything running in Virtualbox first).

In a console session run

vboxheadless -s name-of-your-vm

In my case that would be

vboxheadless -s osm

It is also possible to detach it and run it in the background

vboxheadless -s osm > /dev/null 2>&1 &

On a machine running a X-Session, you can also connect with rdesktop (or from a remote machine, then replace localhost with your hosts IP)

rdesktop -a 16 -g 640x480 localhost