= Deploying VM Applications = == Introduction == == Appendix == === Premade BOINC Wrapper === Configuration Options for vboxwrapper can be found [VboxApps here]. ==== Windows ==== ==== Linux ==== === Premade Linux Images === x86: [http://boinc.berkeley.edu/dl/vmimagex86.vdi.gz vmimagex86.vdi.gz] x64: [http://boinc.berkeley.edu/dl/vmimagex64.vdi.gz vmimagex64.vdi.gz] === Hand-build VM Image === The 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]. Main advantages: * Small install size * Virtualbox guest additions installed by default The Virtualbox guest extensions are required in order to use the shared directory feature to communicate between the guest and host operating systems. ==== Role Selection ==== During install you'll be asked what role should this linux machine be configured for, make sure all roles are unselected before continuing. ==== Updating Grub ==== If you want to speed up the boot process you should change the default timeout for grub by modifing /etc/default/grub: {{{ GRUB_TIMEOUT = 0 }}} After saving the update run: {{{ root@boinc-vm-image:/etc/default# update-grub }}} ==== Updating Inittab ==== To configure Linux for automaic login you'll need to install a different terminal handler, mingetty seems to work pretty well for our purposes. You'll need to install mingetty: {{{ root@boinc-vm-image:/etc/default# apt-get install mingetty }}} Next you'll need to change the terminal handler assigned to the first virtual terminal, change line: {{{ 1:2345:respawn:/sbin/getty 38400 tty1 }}} To: {{{ 1:2345:respawn:/sbin/mingetty --autologin root --noclear tty1 }}} ==== Updating .bashrc ==== Adding the following to the end of the .bashrc file for root: {{{ # BOINC VM Initialization echo BOINC VM Initialization [Sleeping 10 seconds] sleep 5 }}} The 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. ==== Shared Directory Usage ==== Adding the following to the end of the .bashrc file for root: {{{ echo -- Mounting shared directory mount -t vboxsf shared /root/shared if [ $? -ne 0 ]; then echo ---- Failed to mount shared directory sleep 5 shutdown -hP 0 fi echo -- Launching boinc_start.sh script if [ -f ~/shared/boinc_start.sh ]; then cd ~/shared bash ./boinc_start.sh else echo ---- Failed to launch script sleep 5 shutdown -hP 0 fi }}} Be sure to create a directory called 'shared' in root's home directory. The 'boinc_start.sh' script should contain whatever is needed to execute your job from within the VM.