The Mer Wiki now uses your Mer user account and password (create account on https://bugs.merproject.org/)


Platform SDK on VirtualBox

From Mer Wiki
(Difference between revisions)
Jump to: navigation, search
(clarify wording)
(update to NAT)
Line 8: Line 8:
  
 
= Prepare Image =
 
= Prepare Image =
Download the SDK vmdk from http://img.merproject.org/images//sdk/mer-sdk-i486-vm-latest.vdi.bz2
+
Download the SDK vmdk from http://img.merproject.org/images/sdk/mer-sdk-i486-vm-latest.vdi.bz2
  
Then unzip the image (it's a 1Gb file)
+
Then unzip the image (it's a very large file)
  
 
  bunzip2 mer-sdk*vdi.bz2
 
  bunzip2 mer-sdk*vdi.bz2
Line 18: Line 18:
 
   [[File:VboxSDK-new.png]]
 
   [[File:VboxSDK-new.png]]
  
For large builds allocate a substantial amount of memory (eg 2048Mb)
+
For larger builds allocate a substantial amount of memory (eg 2048Mb)
  
 
Select "Use existing hard disk" and pick the vdi you just downloaded/created
 
Select "Use existing hard disk" and pick the vdi you just downloaded/created
Line 34: Line 34:
 
This is not an emulator so there is no point setting any special Display settings.
 
This is not an emulator so there is no point setting any special Display settings.
  
Ideally you should set Networking to "Bridged Adapter" ( see https://www.virtualbox.org/manual/ch06.html#idp17444608 ) since your VM will need to access the internet to perform updates and it will need to act as a server for your local host. In this mode the Mer SDK VM will need to obtain a DHCP address in the same way as the host.
+
In Networking set Adapter 1 to "NAT" ( see https://www.virtualbox.org/manual/ch06.html#network_nat ) since your VM will need to access the internet to perform updates.
  
A more complex NAT setup may be needed for environments where the VM cannot access a DHCP server. In this case the port-forwarding feature can be used to access:
+
Since it will need to act as a server for your local host we must setup port-forwarding too.
  * ssh
+
 
  * (more as introduced eg http)
+
Select 'Advanced' and then 'Port Forwarding'. In the rules box add:
 +
  Name: guestssh
 +
  Protocol: TCP
 +
Host Port: 2222
 +
Guest Port: 22
 +
and
 +
Name: guestwww
 +
Protocol: TCP
 +
Host Port: 8080
 +
Guest Port: 80
 +
 
 +
[[File:VboxSDK-nat.png]]
  
 
== Storage and Sharing your home, source and caches ==
 
== Storage and Sharing your home, source and caches ==
Line 53: Line 64:
 
= Running the SDK VM =
 
= Running the SDK VM =
  
You may now start the SDK VM. It will obtain an IP from DHCP and start an ssh service. The root password is "rootme".
+
You may now start the SDK VM. It will start an ssh service which can be accessed as:
 +
ssh -p 2222 root@localhost
 +
The root password is "rootme".
 +
 
 +
Ensure your ~/.ssh/authorized_keys files has your own public key in it and you can access mersdk user with no passwd:
 +
ssh -p 2222 mersdk@localhost
 +
This is important for QtCreator to work seamlessly.

Revision as of 09:43, 19 October 2012

Contents

Introduction

The Mer VM SDK is intended for use with QtCreator, on non-linux machines and on machines where a chroot-based SDK is not desired.

It uses Oracle VirtualBox as the virtualisation engine. The website at https://www.virtualbox.org/ has a a lot of useful information.

Other virtualisation solutions should work without any issues. The main requirement is the ability to support shared folders.

Prepare Image

Download the SDK vmdk from http://img.merproject.org/images/sdk/mer-sdk-i486-vm-latest.vdi.bz2

Then unzip the image (it's a very large file)

bunzip2 mer-sdk*vdi.bz2

Create the VM

Run the VirtualBox manager and create a new machine called MerSDK with Linux/2.6 (32bit)

 VboxSDK-new.png

For larger builds allocate a substantial amount of memory (eg 2048Mb)

Select "Use existing hard disk" and pick the vdi you just downloaded/created

Now select create to make the VM.

Don't boot/start the VM until you have setup the shared folders or they will not be accessible.

Setting up and Networking

Select the MerSDK VM and then pick Settings

In System/Motherboard enable IO APIC In System/Processor enable PAE/NX and allocate as many CPUs as your host has.

This is not an emulator so there is no point setting any special Display settings.

In Networking set Adapter 1 to "NAT" ( see https://www.virtualbox.org/manual/ch06.html#network_nat ) since your VM will need to access the internet to perform updates.

Since it will need to act as a server for your local host we must setup port-forwarding too.

Select 'Advanced' and then 'Port Forwarding'. In the rules box add:

Name: guestssh
Protocol: TCP
Host Port: 2222
Guest Port: 22

and

Name: guestwww
Protocol: TCP
Host Port: 8080
Guest Port: 80

VboxSDK-nat.png

Storage and Sharing your home, source and caches

Under Settings -> Shared Folders add a Machine Folder with the Folder path of your home and the Folder name 'home' Do not tick the 'automount' box as that simulates a removable media device which will not work.

 VboxSDK-sf.png

The shared folder called 'home' will be mounted as the sdk user's 'mersdk' $HOME directory as the SDK boots.

You may want to share additional source and cache directories from your host.

Running the SDK VM

You may now start the SDK VM. It will start an ssh service which can be accessed as:

ssh -p 2222 root@localhost

The root password is "rootme".

Ensure your ~/.ssh/authorized_keys files has your own public key in it and you can access mersdk user with no passwd:

ssh -p 2222 mersdk@localhost

This is important for QtCreator to work seamlessly.

Personal tools