Changes between Initial Version and Version 1 of InstallationGuidelines/VirtualMachine


Ignore:
Timestamp:
11/06/11 13:09:31 (13 years ago)
Author:
Pat Tressel
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • InstallationGuidelines/VirtualMachine

    v1 v1  
     1[[TOC]]
     2= Virtual Machine =
     3
     4== Summary ==
     5This virtual machine has been built to allow Developers to get operational quickly:
     6
     7It is in the Open Virtual Machine format for use in either [http://virtualbox.org VirtualBox] or [http://vmware.com VMWare].
     8
     9It is currently running the Ubuntu 10.04 OS with Web2Py-r2717, Eden-r1560 & Eclipse 3.5. (Note that both Web2Py & Eden are very old & should be updated before development starts!)
     10
     11== Download ==
     12409Mb OVF format for !VirtualBox:
     13 * http://eden.sahanafoundation.org/downloads/eden_dev_env_-_l_vb.tar.gz (UK)
     14385MB Vmx format for VMWare:
     15 * http://eden.sahanafoundation.org/downloads/eden_dev_env_l.tar.gz (UK)
     16
     17Original source site with the original patches available [http://9while9.com here], along with documentation and usage notes.
     18
     19== Usage Notes ==
     20
     21=== Introduction ===
     22The dev env virtual machines for Virtualbox and VMware are based on a [BluePrintlivecdinstaller blueprint] and are configured to use about 512MB of RAM. The virtual disk is configured to expand to 20GB. The virtual machine is built on [http://www.turnkeylinux.org/core TurnKey Linux's Core], which in turn is based on Ubuntu 10.04 (Lucid -- the most recent long-term support release). The machine runs [http://code.google.com/p/shellinabox/ Shellinabox], [http://www.webmin.com/ Webmin], and SSH/sftp as services from startup.
     23
     24The development environment is configured to launch [http://lxde.org LXDE], a lightweight desktop environment after the first boot. From LXDE, Eclipse with Pydev, Firefox with Firebug, iPython and irssi are accessible.
     25
     26After installation you will need to configure the included !Eclipse/PyDev:
     27 * DeveloperGuidelinesEclipse#Configuration
     28
     29=== Getting Started ===
     30 1. [InstallationGuidelinesVirtualMachine#download Download] the Image
     31 2. Uncompress the image: [http://www.7-zip.org/download.html 7zip] is a very effective FOSS tool for systems running Microsoft OSs. In Linux distros, the following command should work:
     32{{{
     33tar xvzf eden-dev-env.tar.gz (for example) #extract to current working directory
     34}}}
     35To run the image, you need to install either !VirtualBox or VMWare:
     36
     37==== !VirtualBox Installation ====
     38 3. Download [http://download.virtualbox.org/virtualbox/vboxdownload.html VirtualBox]
     39 4. Install !VirtualBox
     40 5. Import the Virtual Appliance:
     41 * File menu | Import Appliance
     42 * Click on the Choose button and navigate to and select the uncompressed image (the .ovf file)
     43 * Next
     44 * Accept the default appliance options unless you have a reason to make a specific change
     45 6. The VM will appear in the left window pane, and the settings will appear in the right. Scroll down on the right side until you see "Network." Click network to specify the NIC (e.g. switch to wireless) and choose between bridged and NAT mode.
     46 7. Start the Virtual Appliance by double-clicking the icon on the left.
     47
     48===== Troubleshooting !VirtualBox =====
     49It's been reported that VMs derived from patched ISOs, as these have, may have network problems. Read [http://www.turnkeylinux.org/docs/virtualization/udev-persistent-net-generation this] article to work the solution. Contact us if you still have problems. There's no way for us to test whether there will be problems in your case.
     50
     51''Network Configuration''
     52
     53Solutions will be here.
     54
     55''Import Fails''
     56
     57'''Scenario'''
     58
     59After first step of import, !VirtualBox OSE 3.1.6 reports the following:
     60"Failed to import appliance /path/to/appliance/!NewDev.ofg. Too many IDE controllers in OVF; import facility only supports one."
     61
     62'''First Solution''':
     63 1. File | Virtual Machine Manager: Select the hard disks tab and press add disk icon. Browse to and select !NewDev.vmdk. Click OK.
     64 2. Click the New icon. Click next. Name: !NewDev; Operating System: Linux; Version: Ubuntu. Click next.
     65 3. Base Memory Size: 384MB. Click Next.
     66 4. Select "Use Existing Hard Disk"; choose !NewDev.vmdk. Click Next. Click finish.
     67 5. Selct !NewDev on the left; scroll down to network on the right. Ensure the appropriate network adapter and settings for your circumstances are selected.
     68
     69''Boot Process Halts''
     70
     71'''Scenario'''
     72
     73When started in !VirtualBox OSE 3.1.6, !NewDev boot process halts at "Starting Initialization Hooks".
     74
     75'''Solution'''
     76
     77Coming soon.
     78
     79==== VMWare Installation ====
     80''Import''
     81
     82To import the download VM into VMware (e.g. Fusion), use the following steps.
     83 3. File > New
     84 4. Click Continue without disc
     85 5. Select Use an existing virtual disk
     86 6. Select !NewDev.vmdk
     87 7. Select Make a separate copy of the virtual disk
     88 8. Click Choose
     89 9. Click Continue
     90 10. OS=Linux and Version=Ubuntu should be selected, click Continue, Click Finish
     91 11. Enter name for new VMware image e.g. Eden in the Virtual Machines directory
     92 12. Click Save
     93 13. Press the green play icon to start the virtual machine.
     94
     95Remember to install the Linux VMware Tools after starting up the Eden machine using Virtual Machine > Install VMware Tools
     96{{{
     97sudo su -
     98./vmware-install.pl
     99}}}
     100And accept all the default options
     101
     102''VMWware Converter''
     103Version 4.0.1: "Cannot be deployed on the target hardware"
     104
     105''VMware Player 3.1.1 (Ubuntu)''
     106
     107No File|Import option. Nor can one build a VM with a preexisting VMDK.
     108
     109''VMware Workstation 7.1.1''
     110
     111 1. File | New | Virtual Machine
     112 2. Custom, click Next
     113 3. Workstation 7.x, click Next
     114 4. I will install the operating system later, click Next
     115 5. Name: !NewVM; Location: /path/to/virtualmachines/; click Next; click Next.
     116 6. 360 MP; click Next
     117 7. Select appropriate network connection for your scenario (bridged or NAT), click Next.
     118 8. LSI Logic, click Next.
     119 9. Use an existing virtual disk; click Next.
     120 10. Browse to !NewDev.vmdk; click Next.
     121 11. Finish; Close.
     122 12. Press the play icon or "Power on this virtual machine".
     123
     124===== Troubleshooting VMware Tools Install =====
     125 * Open LXTerminal and browse to the folder containing vmware-install.pl.
     126{{{
     127pwd #displays the current location in the filesystem
     128cd /absolut/path/to/folder # change directory to the one containing vmware-install.pl
     129sudo ./vmware-install.pl #start installation script
     130}}}
     131 * Download Build Tools
     132 *Option 1: Open Synaptic in the LXDE menu, update, then search for build-essential
     133 *Option 2: Open LXTerminal and install build-essential from the command line:
     134{{{
     135sudo apt-get update
     136sudo apt-get install -y build-essential
     137}}}
     138
     139=== User Accounts ===
     140Root password is set through a dialog box on first boot.
     141
     142The user named ''dev'' should have it's password set from the command line when first boot is complete with the command:
     143{{{
     144passwd dev
     145}}}
     146
     147You should then reboot & use the Graphical User Interface to login as the user 'dev'.
     148
     149Web2py administration password is set during the debugging process with either of the following commands and arguments, both of which would set the admin password to "admin":
     150{{{
     151/home/dev/web2py.py -a admin -i 127.0.0.1 -p 80
     152
     153/home/dev/web2py.py --password admin -i 127.0.0.1 -p 80
     154}}}
     155
     156Credentials for the previous version:
     157||Username: ''dev''||||Password: ''eden''||
     158||Username: ''root''||||Password: ''root''||
     159
     160==== Root User ====
     161There is no practical reason to login in as ''root''.
     162
     163If one needs root privileges, ''dev'' can have them. The following lines offer strategies for escalating ''dev''s privileges from the command line. Start LXTerminal and use one of the following strategies.
     164{{{
     165sudo command-to-execute-as-root #executes on command or pipeline of commands as root.
     166su - root #Switch user to root
     167command to execute #1 command executed as root
     168command to execute #2nd command to execute as root
     169command to excecute #3rd command to execute as root
     170exit # Exit using root's account and shell
     171}}}
     172
     173==== Secure the System ====
     174Change the default passwords to secure the system.
     175Log in as ''dev'', start LXTerminal, and enter the following commands to change passwords:
     176{{{
     177sudo passwd root #interactive change root password
     178passwd #Interactive change dev password
     179}}}
     180It's also important to keep get security updates from online; login as ''dev'' and execute the following:
     181{{{
     182sudo apt-get update
     183sudo apt-get upgrade
     184}}}
     185
     186=== Filesystem ===
     187Web2py is located in /home/web2py. Eden is located in /home/web2py/applications/eden. Eclipse and PyDev are preconfigured with this information.
     188
     189=== Scripts ===
     190/usr/local/bin contains three helpful scripts. To run them, start LXTerminal (in the accessories menu) and simply enter the commands as demonstrated below. They are in all users' paths, so may be executed from any working directory.
     191==== Update web2py ====
     192Enter the command with or without a revision number, as demonstrated below:
     193{{{
     194update_web2py 2717 # updates web2py to revision 2717
     195update_web2py # updates web2py to current revision
     196}}}
     197==== Update Eden ====
     198{{{
     199update_eden 1560 # updates Eden to revision 1560
     200update_eden # updates Eden to current revision
     201}}}
     202
     203==== Web2Py shell ====
     204launch a Web2py shell in the Eden environment
     205{{{
     206import_eden
     207}}}
     208NB Script seems oddly named
     209
     210== Troubleshooting older Releases ==
     211Note: If you get a ticket when running the application for the 1st time with a message like "!OperationalError: Cannot add a UNIQUE column" then you need to stop the debugger, delete the contents of the databases folder & then start debugging again (there was an old database accidentally left on the system which cannot be auto-migrated - a new image without this issue has been uploaded):
     212{{{
     213rm -rf ~/Desktop/web2py/applications/eden/databases/*
     214}}}
     215
     216If you get an error like "!AttributeError: SQLCustomType instance has no attribute 'startswith'" then:
     217{{{
     218cd ~/Desktop/web2py/gluon
     219rm sql.py
     220wget http://eden.sahanafoundation.org/sql.py
     221}}}
     222Then can proceed as above: Stop Eclipse, empty databases folder & restart Eclipse
     223
     224A new image without this issue has now been uploaded.
     225
     226----
     227Procedure for making a new virtual machine image:
     228
     229InstallationGuidelinesVirtualMachineMaintenance