Changes between Version 1 and Version 2 of Tutorial/DeployingVMApplications


Ignore:
Timestamp:
Aug 9, 2011, 11:42:24 AM (13 years ago)
Author:
romw
Comment:

checkpoint

Legend:

Unmodified
Added
Removed
Modified
  • Tutorial/DeployingVMApplications

    v1 v2  
    1 = Deploying VM Guests within BOINC =
     1= Deploying VM Applications =
     2
     3== Introduction ==
     4
     5
     6
     7
     8
     9== Appendix ==
     10
     11=== Premade BOINC Wrapper ===
     12
     13Configuration Options for vboxwrapper can be found [VboxApps here].
     14
     15==== Windows ====
     16
     17==== Linux ====
     18
     19
     20=== Premade Linux Images ===
     21
     22x86: [http://boinc.berkeley.edu/dl/vmimagex86.vdi.gz vmimagex86.vdi.gz]
     23
     24x64: [http://boinc.berkeley.edu/dl/vmimagex64.vdi.gz vmimagex64.vdi.gz]
     25
     26=== Hand-build VM Image ===
     27
     28The easiest way to begin putting together a Linux VM is to install the network install of Debian within the VM.  You can find the netinst images [http://www.debian.org/distrib/netinst here].
     29
     30Main advantages:
     31 * Small install size
     32 * Virtualbox guest additions installed by default
     33
     34The Virtualbox guest extensions are required in order to use the shared directory feature to communicate between the guest and host operating systems.
     35
     36==== Role Selection ====
     37
     38During install you'll be asked what role should this linux machine be configured for, make sure all roles are unselected before continuing.
     39
     40==== Updating Grub ====
     41
     42If you want to speed up the boot process you should change the default timeout for grub by modifing /etc/default/grub:
     43{{{
     44GRUB_TIMEOUT = 0
     45}}}
     46
     47After saving the update run:
     48{{{
     49root@boinc-vm-image:/etc/default# update-grub
     50}}}
     51
     52==== Updating Inittab ====
     53
     54To configure Linux for automaic login you'll need to install a different terminal handler, mingetty seems to work pretty well for our purposes.
     55
     56You'll need to install mingetty:
     57{{{
     58root@boinc-vm-image:/etc/default# apt-get install mingetty
     59}}}
     60
     61Next you'll need to change the terminal handler assigned to the first virtual terminal, change line:
     62{{{
     631:2345:respawn:/sbin/getty 38400 tty1
     64}}}
     65
     66To:
     67{{{
     681:2345:respawn:/sbin/mingetty --autologin root --noclear tty1
     69}}}
     70
     71==== Updating .bashrc ====
     72
     73Adding the following to the end of the .bashrc file for root:
     74{{{
     75# BOINC VM Initialization
     76echo BOINC VM Initialization [Sleeping 10 seconds]
     77sleep 5
     78}}}
     79
     80The basic gist here is to give yourself time to break into a console session via CTRL-C to be able to make changes to the VM in the future.  After executing any job you want the VM to accomplish you'll need to shutdown the VM.  If you encounter an error shutdown the VM.
     81
     82==== Shared Directory Usage ====
     83
     84Adding the following to the end of the .bashrc file for root:
     85{{{
     86echo -- Mounting shared directory
     87mount -t vboxsf shared /root/shared
     88if [ $? -ne 0 ]; then
     89    echo ---- Failed to mount shared directory
     90    sleep 5
     91    shutdown -hP 0
     92fi
     93
     94echo -- Launching boinc_start.sh script
     95if [ -f ~/shared/boinc_start.sh ]; then
     96    cd ~/shared
     97    bash ./boinc_start.sh
     98else
     99    echo ---- Failed to launch script
     100    sleep 5
     101    shutdown -hP 0
     102fi
     103}}}
     104
     105Be sure to create a directory called 'shared' in root's home directory.
     106
     107The 'boinc_start.sh' script should contain whatever is needed to execute your job from within the VM.
     108