/doc/sphinx/vm.rst

http://github.com/clawpack/clawpack-4.x · ReStructuredText · 251 lines · 183 code · 68 blank · 0 comment · 0 complexity · ad0aef37db4c76a1b82e75095c08ffae MD5 · raw file

  1. .. _vm:
  2. =============================================================
  3. Clawpack Virtual Machine
  4. =============================================================
  5. Using Clawpack requires a variety of other software packages, as summarized in
  6. :ref:`installing`. An alternative to installing the prerequisites is to use the
  7. virtual machine described in this section.
  8. Another alternative is to run Clawpack on the Cloud, see :ref:`aws`.
  9. To do so, you need only download and
  10. install the
  11. `VirtualBox <http://www.virtualbox.org/>`_
  12. software and then `download a Virtual Machine
  13. <http://www.clawpack.org/VM>`_ (VM)
  14. that has been built specifically for Clawpack. VirtualBox will run this
  15. machine, which will emulate a version of Ubuntu Linux that already has
  16. installed all of the software packages needed.
  17. See the `VirtualBox documentation <http://www.virtualbox.org/wiki/Documentation>`_
  18. for more about VMs in general.
  19. System requirements
  20. -------------------
  21. The VM is around 2.5 GB in size, uncompressed, and the virtual disk
  22. image may expand to up to 8 GB, depending on how much data you store
  23. in the VM. Make sure you have enough free space available before
  24. installing. You can set how much RAM is available to the VM when
  25. configuring it, but it is recommended that you give it at least 512
  26. MB; since your computer must host your own operating system at the
  27. same time, it is recommended that you have at least 1 GB of total RAM.
  28. Setting up the VM in VirtualBox
  29. -------------------------------
  30. Once you have downloaded and uncompressed the virtual machine disk
  31. image from `the download site <http://www.clawpack.org/VM>`_,
  32. you can set it up in VirtualBox, by doing the following:
  33. #. Start VirtualBox
  34. #. Click the *New* button near the upper-left corner
  35. #. Click *Next* at the starting page
  36. #. Enter a name for the VM (put in whatever you like); for *OS Type*,
  37. select "Linux", and for *Version*, select "Ubuntu". Click *Next*.
  38. #. Enter the amount of memory to give the VM, in megabytes. Give it
  39. as much as you can spare; 512 MB is the recommended minimum. Click *Next*.
  40. #. Click *Use existing hard disk*, then click the folder icon next to
  41. the disk list. In the Virtual Media Manager that appears, click
  42. *Add*, then select the virtual machine disk image you downloaded
  43. from the class web site. Ignore the message about the recommended
  44. size of the boot disk, and leave the box labeled "Boot Hard Disk
  45. (Primary Master)" checked. Once you have selected the disk image,
  46. click *Next*.
  47. #. Review the summary VirtualBox gives you, then click *Finish*. Your
  48. new virtual machine should appear on the left side of the VirtualBox
  49. window.
  50. Optionally, if you have a reasonably new computer with a multi-core
  51. processor and want to be able to run parallel programs across multiple
  52. cores, you can tell VirtualBox to allow the VM to use additional
  53. cores. To do this, click the VM on the left side of the VirtualBox
  54. window, then click *Settings*. Under *System*, click the *Processor*
  55. tab, then use the slider to set the number of processors the VM will
  56. see. Note that some older multi-core processors do not support the
  57. necessary extensions for this, and on these machines you will only be
  58. able to run the VM on a single core.
  59. Starting the VM
  60. ---------------
  61. Once you have configured the VM in VirtualBox, you can start it by
  62. double-clicking it in the list of VM's on your system. The virtual
  63. machine will take a little time to start up; as it does, VirtualBox
  64. will display a few messages explaining about mouse pointer and
  65. keyboard capturing, which you should read.
  66. After the VM has finished booting, it will present you with a login
  67. screen; click the button in the center labeled "Clawpack User" to
  68. log in as ``clawuser``.
  69. The password is also ``clawuser``.
  70. Shutting down
  71. -------------
  72. Click the green running man in the lower left corner and then click
  73. *"Shut Down"* to exit the VM. You can also *"Suspend"*, which preserves
  74. the memory state and is better if a long job is running in the VM
  75. that you want to restart later where it left off.
  76. Running programs
  77. ----------------
  78. You can access the programs on the virtual machine through the main
  79. menu (the mouse on an *X* symbol in the lower-left corner of the
  80. screen), or by clicking the quick-launch icons next to the menu
  81. button. By default, you will have quick-launch icons for a terminal
  82. window and a web browser. After logging in for the first time, you should start
  83. the web browser to make sure your network connection is working.
  84. .. _vm_network:
  85. Fixing networking issues
  86. ------------------------
  87. Assuming your computer is connected to the internet, you should also be able to
  88. access the internet from the VM. This is necessary if you want to update
  89. Clawpack using Git, or to transfer your results from the VM to the host
  90. computer (or elsewhere) using sftp.
  91. When a Linux VM is moved to a new computer, it sometimes doesn't
  92. realize that the previous computer's network adaptor is no longer
  93. available. If you find yourself unable to connect to the Internet,
  94. open a terminal window and type the following command::
  95. $ sudo rm /etc/udev/rules.d/70-persistent-net.rules
  96. This will remove the incorrect settings; Linux should then autodetect
  97. and correctly configure the network interface it boots. To reboot the
  98. VM, click the running person icon in the bottom-right of the screen,
  99. then click *Restart*.
  100. .. _vm_update:
  101. Versions of Clawpack
  102. --------------------
  103. Starting with Version 4.6.0, the VM comes pre-installed with a specific
  104. version of Clawpack and has a name such as VirtualClaw-4.6.0.
  105. The directory containing Clawpack is then clawpack-4.6.0.
  106. This approach has been chosen since previous versions of Clawpack are then
  107. archived along with an operating system on which everything works. This may
  108. be advantageous is archiving codes that are used to produce the results in a
  109. publication for example, where we recommend that you cite the version of
  110. Clawpack used to obtain them.
  111. Of course you are also welcome to install newer versions of Clawpack in a VM
  112. for your own use if you choose to. Git is also installed if you want to
  113. clone the most recent version from Github, see :ref:`github`.
  114. Using Clawpack on the VM
  115. ------------------------
  116. See the file ``~/clawuser/README.txt`` for more about using Clawpack on the
  117. VM. The file ``~/clawuser/INSTALLED.txt`` has a list of some of the
  118. software installed on the VM.
  119. About the VM
  120. ------------
  121. The virtual machine is running XUbuntu 9.10, a variant of Ubuntu
  122. Linux (`<http://www.ubuntu.com>`_), which itself is an offshoot of
  123. Debian GNU/Linux (`<http://www.debian.org>`_). XUbuntu is a
  124. stripped-down, simplified version of Ubuntu suitable for running on
  125. smaller systems (or virtual machines); it runs the *xfce4* desktop
  126. environment.
  127. .. _vm_additions:
  128. Guest Additions
  129. ---------------
  130. These guest additions are already installed in VirtualClaw, so you should
  131. not have to do the following...
  132. Do the following so that the VM will automatically capture and uncapture
  133. your mouse depending on whether you click in the VM window or outside it,
  134. and to make it easier to resize the VM window to fit your display.
  135. 1. Boot the VM, and log in.
  136. 2. In the VirtualBox menu bar on your host system, select Devices -->
  137. Install Guest Additions... (Note: click on the window for the class
  138. VM itself to get this menu, not on the main "Sun VirtualBox" window.)
  139. 3. A CD drive should appear on the VM's desktop, along with a popup
  140. window. (If it doesn't, see the additional instructions below.)
  141. Select "Allow Auto-Run" in the popup window. Then enter the
  142. password you use to log in.
  143. 4. The Guest Additions will begin to install, and a window will appear,
  144. displaying the progress of the installation. When the installation is done,
  145. the window will tell you to press 'Enter' to close it.
  146. 5. Right-click the CD drive on the desktop, and select 'Eject'.
  147. 6. Restart the VM.
  148. If step 3 doesn't work the first time, you might need to:
  149. Alternative Step 3:
  150. #. Reboot the VM.
  151. #. Mount the CD image by right-clicking the CD drive icon, and clicking
  152. 'Mount'.
  153. #. Double click the CD image to open it.
  154. #. Double click 'autorun.sh'.
  155. #. Enter the VM password to install.
  156. Changing guest resolution/VM window size
  157. ----------------------------------------
  158. This should not be necessary if the Guest Additions are working.
  159. It's possible that the size of the VM's window may be too large for
  160. your display; resizing it in the normal way will result in not all of
  161. the VM desktop being displayed, which may not be the ideal way to
  162. work. Alternately, if you are working on a high-resolution display,
  163. you may want to *increase* the size of the VM's desktop to take
  164. advantage of it. In either case, you can change the VM's display size
  165. by going to the main menu in the lower-left corner, pointing to
  166. *Settings*, then clicking *Display*. Choose a resolution from the
  167. drop-down list, then click *Apply*.
  168. Setting the host key
  169. --------------------
  170. This should not be necessary if the Guest Additions are working.
  171. When you click on the VM window, it will capture your mouse and future mouse
  172. actions will apply to the windows in the VM. To uncapture the mouse you
  173. need to hit some control key, called the *host key*. It should give you a
  174. message about this. If it says the host key is Right Control, for example,
  175. that means the Control key on the right side of your keyboard (it does *not*
  176. mean to click the right mouse button).
  177. On some systems, the host key that transfers input focus between the
  178. VM and the host operating system may be a key that you want to use in
  179. the VM for other purposes. To fix this, you can
  180. change the host key in VirtualBox. In the main VirtualBox window (not
  181. the VM's window; in fact, the VM doesn't need to be running to do
  182. this), go to the *File* menu, then click *Settings*. Under *Input*,
  183. click the box marked "Host Key", then press the key you want to use.