[Esbox-commits] r2165 - in www/2nd_edition: . css images images/vm

eswartz at garage.maemo.org eswartz at garage.maemo.org
Fri Sep 11 18:55:08 EEST 2009


Author: eswartz
Date: 2009-09-11 18:54:58 +0300 (Fri, 11 Sep 2009)
New Revision: 2165

Added:
   www/2nd_edition/images/vm/
   www/2nd_edition/images/vm/dialog-select-build-machine.png
   www/2nd_edition/images/vm/prefs-esbox-build-machines-autoselect-bridged.png
   www/2nd_edition/images/vm/prefs-esbox-build-machines-autoselect-nat.png
   www/2nd_edition/images/vm/prefs-esbox-build-machines-machine-access.png
   www/2nd_edition/images/vm/prefs-esbox-build-machines-qemu.png
   www/2nd_edition/images/vm/prefs-esbox-build-machines-shared-folders.png
   www/2nd_edition/images/vm/prefs-esbox-build-machines-virtualbox.png
   www/2nd_edition/images/vm/prefs-esbox-build-machines-vmware.png
   www/2nd_edition/images/vm/prefs-esbox-build-machines.png
   www/2nd_edition/images/vm/shared_folders.png
Modified:
   www/2nd_edition/css/main.css
   www/2nd_edition/virtual_machines.html
Log:
Move ESbox virtual machine docs to main page and update for prefinal

Modified: www/2nd_edition/css/main.css
===================================================================
--- www/2nd_edition/css/main.css	2009-09-11 14:48:57 UTC (rev 2164)
+++ www/2nd_edition/css/main.css	2009-09-11 15:54:58 UTC (rev 2165)
@@ -151,7 +151,7 @@
 	text-align: left;
 	 border: 2px; border-style: solid; }
 
-#warning { padding: 4px; background-color: #dda; color: #e44;
+#warning { padding: 4px; background-color: #ee8; color: #d22;
 	text-align: left;
 	 border: 2px; border-style: solid; }
 

Added: www/2nd_edition/images/vm/dialog-select-build-machine.png
===================================================================
(Binary files differ)


Property changes on: www/2nd_edition/images/vm/dialog-select-build-machine.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: www/2nd_edition/images/vm/prefs-esbox-build-machines-autoselect-bridged.png
===================================================================
(Binary files differ)


Property changes on: www/2nd_edition/images/vm/prefs-esbox-build-machines-autoselect-bridged.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: www/2nd_edition/images/vm/prefs-esbox-build-machines-autoselect-nat.png
===================================================================
(Binary files differ)


Property changes on: www/2nd_edition/images/vm/prefs-esbox-build-machines-autoselect-nat.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: www/2nd_edition/images/vm/prefs-esbox-build-machines-machine-access.png
===================================================================
(Binary files differ)


Property changes on: www/2nd_edition/images/vm/prefs-esbox-build-machines-machine-access.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: www/2nd_edition/images/vm/prefs-esbox-build-machines-qemu.png
===================================================================
(Binary files differ)


Property changes on: www/2nd_edition/images/vm/prefs-esbox-build-machines-qemu.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: www/2nd_edition/images/vm/prefs-esbox-build-machines-shared-folders.png
===================================================================
(Binary files differ)


Property changes on: www/2nd_edition/images/vm/prefs-esbox-build-machines-shared-folders.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: www/2nd_edition/images/vm/prefs-esbox-build-machines-virtualbox.png
===================================================================
(Binary files differ)


Property changes on: www/2nd_edition/images/vm/prefs-esbox-build-machines-virtualbox.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: www/2nd_edition/images/vm/prefs-esbox-build-machines-vmware.png
===================================================================
(Binary files differ)


Property changes on: www/2nd_edition/images/vm/prefs-esbox-build-machines-vmware.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: www/2nd_edition/images/vm/prefs-esbox-build-machines.png
===================================================================
(Binary files differ)


Property changes on: www/2nd_edition/images/vm/prefs-esbox-build-machines.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: www/2nd_edition/images/vm/shared_folders.png
===================================================================
(Binary files differ)


Property changes on: www/2nd_edition/images/vm/shared_folders.png
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Modified: www/2nd_edition/virtual_machines.html
===================================================================
--- www/2nd_edition/virtual_machines.html	2009-09-11 14:48:57 UTC (rev 2164)
+++ www/2nd_edition/virtual_machines.html	2009-09-11 15:54:58 UTC (rev 2165)
@@ -1,13 +1,60 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml"><head>
 
+  
+  
+  
+  
+  <script></script>
+  
+  
+  
+  
+  <meta http-equiv="content-type" content="text/html; charset=utf-8">
+  <title>ESbox Virtual Machines</title>
 
-<meta http-equiv="content-type" content="text/html; charset=utf-8"><title>Virtual Machines</title>
+  
 
-<meta name="description" content="">
-<meta name="keywords" content="">
-<link href="css/main.css" rel="stylesheet" type="text/css">
-<link rel="shortcut icon" href="images/favicon.ico"></head><body>
+  
+
+  
+
+  
+  
+  
+  
+  <meta name="description" content="">
+
+
+
+
+  
+  
+  
+  
+  <meta name="keywords" content="">
+
+
+
+
+  
+  
+  
+  
+  <link href="css/main.css" rel="stylesheet" type="text/css">
+
+
+
+
+  
+  
+  
+  
+  <link rel="shortcut icon" href="images/favicon.ico">
+
+
+
+</head><body>
 <script type="text/javascript">
 			var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
 			document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
@@ -28,32 +75,643 @@
 </ul>
 </div>
 
+
+
+
+
 <div id="banner">
 <div class="wrap">
-<div id="box"></div>
+<div id="box">
 </div>
 </div>
+</div>
 
+
+
+
+
 <div class="wrap">
 
 <div id="container">
 <div id="content">
 
 <br>
+<h2>Setting up ESbox Using a Virtual Machine
+</h2>
+
+<p>This page covers the concepts and configuration for running ESbox on
+Windows and Mac OS X (or Linux x86/64) and hosting the Maemo SDK in a
+virtual machine.</p>
+<p>(This does not apply to environments where Eclipse and the Maemo SDK are <span style="font-weight: bold;">both </span>inside a virtual machine.&nbsp; There is no special setup in those cases.)<br>
+</p>
+
+
+
+<ul>
+<li><a href="#overview">Overview</a></li><li><a href="#engines">Virtual Machine Engines Supported<br>
+</a></li><li><a href="#images">Virtual Machine Images<br>
+</a></li><li><a href="#config">ESbox Build Machine Configuration</a></li><li><a href="#behavior">ESbox Virtual Machine Behavior</a></li><li><a href="#indexing">Configuring for C/C++ Indexing</a></li><li><a href="#pcconn">PC-Connectivity Interaction</a></li><li><a href="#troubleshoot">Troubleshooting</a></li>
+</ul>
+
+
+<p id="overview">
+</p>
+<h3 id="heading">Overview</h3>
+
+<p>The Maemo SDK, Scratchbox, and rootstraps only run on Linux/x86.
+If you want to use ESbox in Windows&nbsp; or MacOS X -- or even Linux/x86-64 -- then you
+can do this by hooking up ESbox with an appropriately configured virtual
+machine.</p>
+
+<p>ESbox has the concept of <em>Build Machines</em> to distinguish the Eclipse host from the machine where C/C++ programs are built and Python programs are interpreted. For
+Linux/x86 hosts, the host can serve as a build machine. For other hosts,
+only a virtual machine can be a build machine.</p>
+
+<p>ESbox will use an SSH connection with the virtual machine to
+perform builds, launch/debug applications, and configure Scratchbox 1 or 2 installations and
+rootstraps, and a Samba connection to share project files between the machines.<br>
+</p>
+
+<p>In order to use project features in Eclipse, projects must be
+visible both to the host and
+the VM.&nbsp; ESbox
+projects must live on a local host filesystem which is visible to the
+VM over a shared
+folder. (This choice exposes occasional problems when Unix filesystem
+semantics are not fully emulated over shares, and is a little slower
+than native filesystem builds.&nbsp; Butwe chose to optimize for ease
+of Eclipse integration and speed of IDE/editor/debugger-time activity
+over build-time activity.) <br>
+</p>
+
+<p>Shared folders on the SDK environment, exposed from the VM to the host, may be used for <a href="#indexing">C/C++ indexing</a>.</p>
+
+
+
+<p id="engines">
+
+</p>
+<h3 id="heading">Virtual Machine Engines Supported<br>
+</h3>
+
+<p>ESbox supports VMware, QEMU, and VirtualBox.
+</p>
+
+<ul>
+<li>VMware 6.x is supported and recommended for speed.  </li><li>VirtualBox 2.1 or newer is supported and recommended for freedom and consistency of behavior across OSes.</li><li>QEMU 0.9.0 and newer is recommended for freedom and
+ease of setup, but is quite slow, even when accelerated.</li>
+</ul>
+
+
+<p id="images">
+
+</p>
+<h3 id="heading">Virtual Machine Images</h3>
+
+<p>ESbox runs best with a preconfigured "server" virtual 
+machine image, which has a minimal footprint and is configured
+to provide the best interaction with ESbox.</p>
+<p>These images may be used with any of the engines above.&nbsp; <br>
+</p>
+
+
+
+
+<p>The wizard <em>File &gt; New &gt; Other &gt; Maemo Installers &gt; Maemo SDK Virtual Image </em>will let you fetch and install the recommended images maintained by the <a href="http://maemovmware.garage.maemo.org/">Maemo SDK Virtual Machine project</a>
+in concert with the Maemo Eclipse Integration project. These images
+come "bare", without any pre-installed Maemo SDK. ESbox supports
+installing
+these from the installer wizard.</p><p>Alternately, you can try a "desktop" image if you want a full
+environment pre-installed.&nbsp; (This contains ESbox inside.&nbsp; If
+you use that embedded ESbox, then this document does not apply.)<br>
+</p>
+
+
+<p>If you want to use your own VM image, ensure it has SSH and Samba
+support. For SSH the <tt>UseDNS</tt> flag should be turned off, and
+to support Samba, you may need an often-running cron job to resynchronize
+the clock with the host, to avoid timestamp drift issues when building.</p>
+
+
+
+ 
+
+
+
+
+
+<p id="config">
+
+</p>
+<h3 id="heading">ESbox Build Machine Configuration</h3>
+
+<ul>
+<li>
+	Configuration is under <em>ESbox&nbsp;&gt;&nbsp;Build Machines</em>. 
+	If you
+	navigate here before configuring anything, or try to create a project
+	and launch first, you will get a message directing you to the page.
+	
+	<p>
+	<img style="width: 443px; height: 224px;" src="images/vm/dialog-select-build-machine.png" alt="select build machine">
+	
+	</p></li><li>
+	You need to select a virtual machine engine (or "Manual
+	configuration") and
+	adjust the settings on all the pages accordingly.
+	<p>
+	<img style="width: 644px; height: 545px;" src="images/vm/prefs-esbox-build-machines-vmware.png" alt="vmware">
+	</p><p>
+	<img style="width: 643px; height: 545px;" src="images/vm/prefs-esbox-build-machines-virtualbox.png" alt="virtualbox">
+	</p><p>
+	<img style="width: 640px; height: 543px;" src="images/vm/prefs-esbox-build-machines-qemu.png" alt="qemu">
+	
+	</p></li><li>
+	Any selected build machine has a unique configuration in <em>Machine Access</em> (the user name,
+	password, target/host addresses and ports) and <em>Shared Folders</em> (the shares providing
+	a mapping between the host and target filesystems) tabs.  All machines except for <em>Manually
+	Launched</em> have a VM-specific configuration tab as well.
+	</li>
+</ul>
+
+
+<div id="group">
+
+<h3 id="heading">Machine Access</h3>
+
+<p>Some fields in the <em>Machine Access</em> settings should be preconfigured to match the images from the Maemo SDK Virtual Image project, but you need to edit the
+address and port settings  depending on your networking configuration.</p>
+
+<p>
+<img style="width: 641px; height: 541px;" src="images/vm/prefs-esbox-build-machines-machine-access.png" alt="qemu">
+</p><ul><li>
+	Use the <em>Autoselect Network Settings</em> button 
+	to try to guess the networking settings from current virtual machine settings
+	and the host machine's network interfaces.  This assumes the virtual machine
+	engine, image, and configuration have all been specified correctly.  In any case,
+	<span style="font-weight: bold;">this is a guess</span>, so read the diagnostic messages.
+	
+	<p>
+<img style="width: 500px; height: 400px;" src="images/vm/prefs-esbox-build-machines-autoselect-nat.png" alt="NAT autoselection">
+
+	</p><p>Note, when configuring a virtual machine using Bridged networking,
+	it's impossible to guess the actual address the machine will have.  By default,
+	ESbox selects the <em>network address</em> (*.0) and warns you to update it.</p>
+<img style="width: 500px; height: 401px;" src="images/vm/prefs-esbox-build-machines-autoselect-bridged.png" alt="Bridged autoselection">
+	
+	
+	</li>
+  <li>
+	After closing the dialog, use the <em>Apply</em> button to accept the changes and immediately
+	launch the virtual machine.
+	</li>
+<li>
+	Use the <em>Apply and Validate</em> button to apply the changes
+	and launch the machine, and immediately run through a
+	series of tests to validate that the machine is configured properly.</li></ul>
+
+<h4>More details</h4>
+
+<p>The Machine Access tab allows you to configure the networking and
+authentication with the VM.</p>
+<p><em>User</em> is the account which acts as the agent for all
+operations with the VM.&nbsp; It should be the same user who owns the Scratchbox installation(s).<br>
+ </p>
+<p><em>Password</em> is the password for the user account.&nbsp; (Note: for Maemo SDK Virtual Images, the password is "maemo".)<br>
+ </p>
+
+<p><em>Target address</em> is the address used to access the VM.
+This may be an IP address or a name. If the "Autoselect Settings"
+button cannot figure it out, you will need to discover
+this experimentally, by watching the boot-time messages, or logging in
+and using "/sbin/ifconfig" to see what address is assigned to "eth0".</p>
+
+<p><em>Target SSH port</em> is the SSH port. This defaults to 2222 for NAT configurations.
+</p><p>
+(The default for normal SSH usage is 22, but if the Target address is
+127.0.0.1, this port must be remapped to avoid conflicts with the host.)
+</p>
+<ul><li>For VirtualBox, this port must match 
+the configuration established for a machine via VBoxManage before the machine is launched.  (See
+<a href="http://maemovmware.garage.maemo.org/2nd_edition/vbox_installers.html" target="_blank">the maemovmware VirtualBox configuration utility</a>, 
+the 
+<a href="http://maemovmware.garage.maemo.org/2nd_edition/create_vbox_machine.html#portforwarding" target="_blank">the maemovmware port forwarding instructions</a>,
+or  
+the Network Address Translation chapter of the VirtualBox manual.)  
+</li><li>For VMware, the port must be configured using the Virtual
+Network Editor&nbsp;&gt;&nbsp;NAT &gt; Edit &gt;
+Port&nbsp;Forwarding... dialog.&nbsp; Redirect SSH by adding an <em>Incoming TCP port</em> entry with <em>Host Port</em> 22, <em>Virtual Machine Address</em> matching the Target Address,
+and a <em>Port</em> like 2222 or 2244 matching the Target SSH Port setting.</li>
+  <li>Note: if you use both VirtualBox and VMware, be sure
+to use different SSH ports when enabling port forwarding; otherwise
+they will conflict.</li>
+  <li>
+For QEMU, this option dicates which port is used, since it is controlled when the machine is launched.  
+  </li>
+
+</ul>
+
+<p><em>Host address</em> is the name of the host as seen from the VM
+-- this is never 127.0.0.1! The value depends on the kind of networking
+you're using with the VM.</p>
+<ul><li> 
+For VMware, see the 
+    <em>VM&nbsp;&gt;&nbsp;Removable&nbsp;Devices&nbsp;&gt;&nbsp;Network&nbsp;Adapter</em> menu.
+</li><li>
+For VirtualBox, see the <em>machine&nbsp;&gt;&nbsp;Settings&nbsp;&gt;&nbsp;Network&nbsp;&gt;&nbsp;Adapter</em> dialog.
+Probably
+you'll need to find this by logging into the VM (maemo/maemo) and
+invoking <tt>/sbin/ifconfig</tt>.</li>
+  <li>For QEMU, the default is 10.0.2.2 since the IP
+is shared with the VM and a private subnet is used to reference the
+host.</li>
+</ul>
+
+
+</div>
+
+
+
+<div id="group">
+
+<h3 id="heading">ESbox Shared Folders</h3>
+
+
+<p>
+On the <em>Shared Folders</em> tab, specify the shared folders that ESbox uses
+to map filesystem paths between the host and VM filesystem.</p>
+<p>We require Eclipse projects to be visible to <span style="font-weight: bold;">both the
+host and target</span>, so all projects need to live on a path <i>shared from the host</i> and 
+<i>mapped to the VM</i>. <br>
+</p>
+
+<p>(Most Eclipse code assumes that all project files are visible
+on the host. We don't support the notion of a project fully hosted
+on the VM, since this has an unacceptable performance cost
+for the majority of IDE operations.)</p>
+
+
+
+<p>The mappings on this tab are essential for allowing ESbox to 
+create and access projects, launch builds, perform debugger source lookups, autoconfigure SBRSH,
+etc. so that the host Eclipse and the target Maemo SDK can work on the same files and directories.
+</p>
+
+<p>The shares allow the virtual machine to see the host filesystem, and optionally, these
+allow ESbox (via CDT and PyDev) to see rootstraps from the virtual machine for the purpose of indexing C/C++ and Python.
+</p>
+<p>
+<a href="images/vm/shared_folders.png">See a diagram explaining how this works in an example Win32 configuration here.</a>
+
+</p>
+<p>
+<img style="width: 679px; height: 576px;" src="images/vm/prefs-esbox-build-machines-shared-folders.png" alt="qemu"><br>
+</p><ul><li>The default configuration recommends two shared folders that map a <tt>.../maemo/shared</tt>
+folder from the host to two locations on the target.&nbsp; There is
+nothing special about the host path; use whatever suits you. </li><li>These
+target locations have been selected to point into the user's home on
+the VM to allow ESbox to create projects under the host so that
+Scratchbox 1 and Scratchbox 2 can see the projects in the same
+Scratchbox-relative directory at build time. (You may edit these if
+needed but it's up to you to ensure the necessary mappings are defined
+so all targets can see the same path, so you can switch between targets without reconverting the project.) </li><li>ESbox can automatically mount folders from the host to the virtual machine by running <tt>smbmount</tt>
+	or <tt>mount -t cifs</tt> on the Linux VM.  It currently cannot mount folders from the VM onto the
+	host.  To prevent ESbox from trying this and reporting helpful failure messages, set the <em>Mount automatically?</em>
+	setting to <em>No</em>.
+	</li></ul>
+
+<h4>More details</h4>
+
+
+<p>ESbox has some support for automatically mounting shares into the
+VM, since this is a commonly needed task when the VM is started and
+stopped. Note, however, ESbox will not configure VM -&gt; host shares for you or
+validate whether your settings make any sense -- you must manually configure such shares.<br>
+</p>
+<p>If <em>Local share?</em> is yes, you need to configure file
+sharing on your host and expose a share which can be mounted by the VM.
+This typically should be <em>yes</em> for normal usage (since the
+Eclipse workspace must be on the local machine).</p>
+<p>Be sure to validate the <em>Share name</em>. In Windows this
+is the base name of the directory by default. On Mac OS X, the name is chosen by OS X (e.g. "&lt;user&gt;'s Public Folder").</p>
+
+
+</div>
+
+
+<p id="behavior">
+
+</p>
+<h3 id="heading">ESbox Virtual Machine Behavior</h3>
+
+
+<p>ESbox will accept any running virtual machine responding to the target
+address and port in the current Machine Access settings (it
+doesn't have to be the specific one you have selected). If no machine
+responds to the target address and port, then ESbox will launch the
+configured machine.<br>
+
+</p>
+
+
+<p>
+Usually, only an explicit user action (like starting a wizard or viewing ESbox or Maemo
+preference panels) will require the VM to be running.</p>
+<p>ESbox will attempt to restart the virtual machine if it detects that the machine has been terminated.</p>
+
+
+<p id="indexing">
+</p>
+
+
+<h3 id="heading">Configuring for C/C++ Indexing</h3>
+
+
+<p>
+To configure projects for C/C++ indexing, the system includes from Scratchbox need to 
+be visible in the local filesystem.  Since the Maemo SDK is inside a virtual machine,
+you can expose the directories using Samba shares <em>from the VM</em>.
+You need to add entries for those shares; they aren't
+set up by default.
+</p>
+
+
+<h4>Shared folder mapping</h4>
+<p>
+Set up two shared folder entries, with <em>Local Share?</em> set to <em>No</em>,
+and <em>Mount automatically?</em> set to <em>No</em>:
+</p>
+
+
+<ul>
+<li>One from <tt>/scratchbox</tt> (share name: <tt>scratchbox</tt>) (for Scratchbox 1) 
+</li><li>One from <tt>/home/maemo</tt> (share name: <tt>maemo</tt>) (or whatever your user name is under the VM) (for Scratchbox 2)
+</li>
+</ul>
+
+<p>
+The Maemo SDK virtual images expose these shares already.  In a custom image, add
+entries like this to <tt>/etc/samba/smb.conf</tt>:
+</p>
+
+<tt class="cmdbox"><br>[scratchbox]<br>writable = yes<br>public = yes<br>browseable = yes<br>path = /scratchbox<br><br>
+[maemo]<br>writable = yes<br>public = yes<br>browseable = yes<br>path = /home/maemo</tt>
+<p>and then restart Samba with <tt>sudo /etc/init.d/samba restart</tt>.
+</p>
+   
+<h4>Mounting shares<br>
+</h4>
+<p>
+Also, you will need to manually mount these shares on your host.
+</p>
+
+
+<p>
+In Windows, you can mount shares like this:
 <br>
+<tt>net use s: \\<em>target.address</em>\scratchbox</tt>
+</p>
+
+<p>In Mac OS X, you can mount shares with <strong>Finder &gt; Go &gt; Connect to Server...</strong> or:</p>
+<p><tt>sudo mount_smbfs //maemo:maemo@<em>target.address</em>/scratchbox /your/path/to/scratchbox</tt>
+</p>
+<p>
+When you create a new project, these shares should be automatically integrated
+into the project preferences (<em>C/C++ Indexer</em>) to allow
+indexing.  The indexing operation and source lookup will be slower, though, due to the access over a network.</p>
+<h4>Updating project settings<br>
+</h4>
+<p>Currently, ESbox only fully establishes the C/C++ indexer settings (<em>Project &gt; Properties &gt; C/C++ Include Paths and Symbols</em>) when creating new projects from templates, since at this time it knows what software will be used.<br>
+ </p>
+<p>If you make any changes to the shared folders as described above,
+they will not be reflected in your projects unless you re-convert them (<em>File &gt; New &gt; Convert to ESbox C/C++ Projects</em>).&nbsp;
+Also, the conversion will only add basic mappings for /usr/include and
+libstdc for C++ projects.&nbsp; You will need to add other paths if
+needed.<br>
+</p>
 <br>
+
+
+
+ 
+
+
+<p id="pcconn">
+</p>
+<h3 id="heading">PC-Connectivity Interaction</h3>
+
+Here are some tips and tricks for using <a href="http://pc-connectivity.garage.maemo.org">PC Connectivity</a>
+with ESbox and virtual machines.
+
+
+<ul>
+<li>Using USB, Bluetooth, WLAN ad-hoc networking (static IPs)
+	<p>
+	USB, WLAN Ad-Hoc, and Bluetooth connections use static addresses (192.168.*.15).  The default
+	network routing configurations for the host mean that they will only be able to directly communicate
+	back and forth with one "machine" at a time.  
+	</p>  
+	<p>
+	In most cases, you should <b>connect the machine to the host</b>, rather than the virtual machine.
+	Eclipse manages most of the SSH traffic with the device, so the host needs to be able to see the device at its static address.
+	The host cannot see network traffic inside the VM.
+	</p>
+	<p>Conversely, from the device point of view, it can only see the machine it is connected to.  For
+	cases where the device needs to open a socket from the host, the device must be able to see the
+	host at the host address (192.168.*.14).  This includes Python debugging and SBRSH.
+	</p>
+	<p>
+	Note: if you are using NAT networking with the virtual machine, the VM will <i>also</i> be able to see the
+	device at the static address.  This is the best of both worlds.
+	</p>
+	<div id="warning">
+	<i>When using SBRSH,</i> you must ensure the device is visible on the network inside the virtual machine <span style="font-weight: bold;">and </span>the host machine, since 
+	SBRSH runs on under Scratchbox, and the device needs to mount filesystems from the VM and host.
+	</div>
+	<p>
+	</p>
+	<p>
+	
+
+	
+	</p></li><li>Using WLAN networking
+	<p>
+	WLAN networking is the most flexible option, as long as your virtual machine is configured for Bridged
+	networking, where it has its own DHCP-acquired address.  In this model, the host, the VM, and the 
+	device are all peers on the LAN.  Thus, the device will be visible to the host and the VM, and the 
+	device can see the host and the VM.
+	</p>
+	<p>Unfortunately, of course, WLAN is very slow and prone to packet loss.  It is nearly unusable for 
+	debugging, for example.
+	</p>
+	</li>
+</ul>
+
+
+
+<p id="troubleshoot">
+</p>
+<h3 id="heading">Troubleshooting</h3>
+
+<ul><li><span style="font-weight: bold;">Cannot access the machine</span><ul><li>
+		If ESbox can't guess your network properly, look at the boot screen for
+		the VM or login to the VM (maemo/maemo) and run <tt>sudo dhclient</tt>
+		to validate the assigned IP address for the VM, if you're not getting a
+		connection. Only in the case of NAT should you enter 127.0.0.1 as the
+		Target address in ESbox. For non-NAT cases, usually the host address is
+		xx.xx.xx.2 of the target address.
+		</li><li>
+"ping" is your friend. If you have connection problems, cross-check the
+address displayed, e.g., in a launch configuration or in the RSE
+connection, and verify that you can see if from your host or your VM
+(depending on context). </li><li>
+		If you're having trouble accessing port forwarding over SSH, then note that VMware's virtual
+		network port mappings apply even when it is not hosting a running VM, so select different 
+		target ports for other VM engines.
+		</li></ul>
+	</li>
+  <li style="font-weight: bold;">Scratchbox not found?
+  <ul style="font-weight: normal;">
+<li>If you have first set up a machine and have had some
+difficulties with configuring it, you may need to poke ESbox to make it
+detect Scratchbox and targets.&nbsp; Go to <em>Window &gt; Preferences &gt; Maemo &gt; Installed Targets</em> and hit <em>Refresh</em>.</li>
+  </ul>
+</li>
+<li><span style="font-weight: bold;">Shared folder configuration problems</span>
+	<ul><li>If you cannot mount to shared folders published from Windows, and
+		you get the error <tt>"mount error 12 = cannot allocate memory"</tt>,
+		then this is a host issue.  You can fix this in your Windows registry.
+		<p>Edit the key 
+		</p><pre>		<big>HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanmanServer\Parameters\IRPStackSize</big><br>		</pre>
+		<p>
+		Define it as a DWORD value (if missing).  Set it to a value in
+		the decimal range 15 to 18.  (The documentation is unclear what this
+		value indicates, so it may require some experimentation.)
+		</p>
+		<p>The new setting will only be read when the sharing service
+		is restarted.  You may do this via 
+		<strong>Control Panel &gt; Administrative Tools &gt; Services &gt;
+		Server</strong> and restart, or if you've got more time to kill,
+		reboot your system.
+		</p>
+		<p>
+		Also see <a href="http://support.microsoft.com/default.aspx?scid=kb;en-us;177078">the Microsoft Knowledge Base article</a>
+		for more information.
+		
+		</p></li><li>Be careful about the time synchronization configuration in the VM or the timezone
+		used in the VM image.
+		<p>
+		If you see warnings like:
+		</p>
+		<tt class="cmdbox">make: Warning: File `Makefile' has modification time 1.1e+07 s in the future<br>rm -f *.o helloworld<br>make: warning:  Clock skew detected.  Your build may be incomplete.		</tt>
+		<p>
+		then investigate the Linux configuration inside the virtual machine.
+		</p>
+		<p>When using VirtualBox, please install Guest Additions to fix the time synchronization.&nbsp; In VMware, install VMware Tools.<br>
+</p></li><li>
+		You may need to be connected to a LAN for the PC &lt;-&gt; VM communication to
+		work properly.  Otherwise shared folders will not be mountable and you may get mysterious
+		timeouts instead. 
+		</li><li>
+		If you use Windows and your VM uses NAT, it's unlikely you'll be able to mount folders from the VM
+		without significant advanced networking setup effort.  (You would need to use port forwarding to see ports 139 and 445 from
+		the VM without conflicting with the host's own sharing protocol -- but Windows doesn't provide 
+		an obvious way to use SMB with different ports.  From what I know, you'd need to set up some sort
+		of virtual host over SSH to forward SMB traffic.  Any tips are welcome :) )
+		</li></ul>
+	</li><li><span style="font-weight: bold;">Autotools projects fail to build Makefile?</span>
+<ul>
+<li><span style="font-family: monospace;">make: *** No rule to make target `all'.&nbsp; Stop.</span><br>
+
+</li>
+      <li>In any modern version of Linux, there is a known file truncation issue that occurs
+when using <tt>autoconf</tt> 2.62 or older over Samba shares.</li>
+      <li>Due to trying to rename files before closing them, the 
+        <tt>configure</tt> files will be truncated, preventing Makefiles from
+being generated.
+Current Maemo SDKs ship these old versions of autoconf.
+</li>
+<li>ESbox can repair the <tt>autoconf</tt>
+installation in Scratchbox for you if you install it using the Scratchbox 1 installer <strong><span style="font-weight: normal;"></span></strong>wizard.
+</li>
+<li>Or, if you have an old image or have manually installed Scratchbox 1, you can
+right-click the Scratchbox node (for example, in 
+<em>Window&nbsp;&gt;&nbsp;Preferences&nbsp;&gt;&nbsp;Maemo&nbsp;&gt;&nbsp;Installed Targets</em>)
+and select <em>Patch&nbsp;autoconf...</em>.  A wizard will guide you through
+the process of repairing the installation.
+</li>
+
+</ul>
+
+ </li>
+  <li><span style="font-weight: bold;">Device access issues<br>
+    </span><ul><li>
+		Watch out for firewall software thwarting you.  It may block all access to your device.  Allow traffic to
+		the 192.168.* IP range.
+		</li><li>
+		If your LAN uses 192.168.{2,3,4}.* for its own DHCP server, and you want to use the static USB, Bluetooth,
+		or WLAN ad-hoc connections, you need to have separate subnets.  Reconfigure these static addresses 
+		in the PC-Connectivity Manager and in your host configuration.
+		</li><li>
+		Avoid host-only networking configurations in your VM.  Otherwise you will not be able to contact
+		the device or the Internet.
+		</li><li>
+			SBRSH needs to communicate in three ways: between the host (running Eclipse),
+			the VM (hosting Scratchbox and running the sbrsh client), and the device (running
+			the sbrsh daemon).  In most cases, <b>you must use WLAN</b> for this to work,
+			unless you know how to manually configure routing tables to do this over
+			USB or bluetooth or the ad-hoc WLAN connection.<br>
+</li></ul></li>
+
+  <li style="font-weight: bold;">Virtual machines launching when not using ESbox?
+  <ul style="font-weight: normal;">
+<li>Eclipse sometimes triggers builds for all projects in the
+workspace, which may be a problem if you are using other products in
+your installation and do not want to
+launch the VM automatically. <br>
+    </li><li>The easiest solution is to switch the <em>Build Machine</em> to <em>None</em>.
+(With this setting, you will not be able to use most ESbox actions,
+since no installed targets except for Remote Connections will be
+recognized.) An alternative is to use the <em><span style="font-style: italic;">Manually Launched Machine</span></em> 
+setting.&nbsp; (If you use ESbox commands, it will fail to connect immediately if no machine responds to the address.)</li>
+<li>Alternately, a configured build machine can live alongside other products if you avoid allowing
+Eclipse to build ESbox projects:
+  <ul><ul><li>Close ESbox projects
+  </li><li style="list-style-type: none;">or
+  </li><li>Disable <em>Project&nbsp;&gt;&nbsp;Build Automatically</em> and
+      </li><li>Disable 
+<em>Window&nbsp;&gt;&nbsp;Preferences&nbsp;&gt;&nbsp;Run/Debug&nbsp;&gt;&nbsp;Build&nbsp;(if&nbsp;required)&nbsp;Before&nbsp;Launching</em>
+  </li></ul></ul>
+</li>
+
+  </ul>
+
+</li></ul>
+
 <br>
-	<a href="https://garage.maemo.org/svn/esbox/tags/2.0.0-M6/org.maemo.esbox.help/html/tasks/UsingVirtualMachines.html">
-	Visit this topic in the <strong>ESbox User Guide</strong>.</a>
-<br>
-<br>
-<br>
-<br>
 
 </div>
 </div>
 </div>
 
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
 <div id="footer">
 <div class="part">
 <table style="" cellspacing="5" width="100%">
@@ -72,4 +730,22 @@
 </div>
 <p class="right">© Copyright 2007 - 2009, INdT, 2008 - 2009 Nokia</p>
 </div>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
 </body></html>
\ No newline at end of file



More information about the Esbox-commits mailing list