Ausführen einer virtuellen Maschine

Übersicht

This Quick Start describes one way to run OSGeoLive within a VirtualBox virtual machine (VM). For other methods, follow links from the „See Also“ section below.

Bemerkung

To learn more about the benefits of virtualization, see Virtualization in Wiki

Voraussetzungen

Software

  • Download Virtual Box for your platform, and install the software. On Windows run the installer, or on Ubuntu-like Linux systems run the following:

    apt-get install virtualbox-ose

  • Download the OSGeo Virtual disk file (vmdk) from live.osgeo.org.

    • Under osgeolive-vm, download the 7-zip file. Then unzip the downloaded file (using 7zip ).

Hardware

  • RAM: Minimum 2 GB. The Lubuntu system runs well with 1 GB of RAM, and you’ll need to keep at least the same amount of memory for some of your applications (such as GeoServer). So a total of 2 GB is recommended for a smooth operation.

  • Spare: Minimum 20 GB Hard Disk Space. The virtual disk file (vmdk) from live.osgeo.org unzips to almost 10 GB. You’ll also want more space to allow some room to work on the virtual machine. So a total of 20 GB is a good recommendation.

  • CPU: Any CPU will do, but a processor which supports „Virtualization Technology“ will be faster. Check if your computer supports Virtualization Technology

Bemerkung

Most machines produced after 2010 will meet these requirements.

Step 1 : Create a Virtual Machine

  1. Start the VirtualBox application and click New. Create Virtual Machine pop up is displayed.

../../_images/virtualbox.png
  1. Enter a name such as OSGeoLive, and select Linux as the „Operating system“, and Ubuntu as the „Version“, and then click Next.

../../_images/virtualbox_select_name.png
  1. In the next screen set the memory to at least 1024 MB (or more if your host computer has more than 4GB, like in the screenshot below).

../../_images/vmdk_memory.png
  1. Continue to the next screen and select Use an existing virtual hard disk file. Click the folder icon to browse to where you saved the OSGeoLive vmdk-file. Select the file, click Next and Create.

You should now be able to view the OSGeoLive listed in your virtual box.

../../_images/vmdk_disk.png

Step 2: Configure VM

VM Settings

  1. Once the VM is created, click the Settings button. In the User Interface section, click to select Show at top of screen for the Mini toolbar.

../../_images/vmdk_user_interface.png
  1. Go to the Display section and increase video memory to 32 or 64 MB. In some host operating systems, it may be required to „Enable 3D Acceleration“ for display to work properly.

../../_images/vmdk_display.png

Add shared folders to access files from host

  1. Go to the Shared Folders section, and click the Add folder (green + icon on the right) to find a directory on your host computer that you wish to share inside the VM.

../../_images/vmdk_shared_folders.png

Dabei können gemeinsame Ordner wahlweise nur lesend und automatisch verbunden werden. Klicken Sie ok, sobald der „Ordnerpfad“ und „Ordnername“ definiert wurde und nochmals OK, um die Einstellungen zu speichern und das Fenster zu schließen.

Step 3 : Running the Virtual Machine

Now bootup the VM by clicking the Start (green arrow) button.

  • The OSGeo-Live virtual display (i.e., the window size) may be very small, and will not be able to increase until you install Guest Additions. You should install the virtualbox guest additions, this will allow you to use full-screen mode.

    sudo apt-get install --yes virtualbox-guest-utils virtualbox-guest-x11

(Alternative) If the above command does not work, use the following alternative:

  1. From the VirtualBox Devices menu, select Insert Guest Additions CD Image

  2. Click OK when prompted to open the removable media in File Manager.

  3. In File Manager, select ToolsOpen Current Folder in terminal.

  4. In the terminal type:

sudo ./VBoxLinuxAdditions.run

  1. Press ENTER.

Step 4 : Set OSGeoLive user

Bemerkung

Some tools configured on OSGeoLive rely of „user“ to be in the „users“ group so they can write into the data directory. If not set, these tools will fail when run.

  1. Starten Sie ein Terminal.

  2. Run sudo adduser user users.

  3. Wenden Sie diese Änderung an, indem Sie eine neue Desktopsitzung starten: Starten Sie entweder die virtuelle Maschine neu oder melden Sie sich ab und melden Sie sich wieder an (Benutzername „user“, Kennwort „user“).

Step 5: Access shared folders

  • Add yourself to the vboxsf group so that the shared folders (defined above) are accessible by running in a terminal window:

    user@osgeolive:~$ sudo usermod -a -G vboxsf user

Step 6: Mount shared folder

  • Im oberen Beispiel wurde ein gemeinsamer Ordner auf dem Gastrechner mit Namen „GIS“ in den VM Einstellungen definiert. Der gemeinsame Ordner wird im Dateisystem unter /media/sf_GIS/ auftauchen. Um das Verzeichnis in das Home-Verzeichnis zu leiten, geben Sie Folgendes im Befehlsfenster ein:

    user@osgeolive:~$ mkdir GIS

    user@osgeolive:~$ sudo mount -t vboxsf -o uid=user,rw GIS /home/user/GIS

Now files on your host machine in the chosen folder will also be available in the VM in the „GIS“ folder in the user’s home directory.

Congratulations, you should now have OSGeoLive running in a Virtual Machine.

Next steps:

Why don’t you try running some applications, as described in the OSGeoLive Quickstart

Weiterführende Links: