Installing The Linux Virtual Machine For Labs
Installing The Linux Virtual Machine For Labs
3. Start Oracle VritualBox. Click File -> Import Appliance and select the file ‘vmint.ova’ that
you downloaded in step 2. It will ask you about VM details, just click OK. Note: when
imported the virtual machine will take up 10Gb of your disk. At this point you can erase
the ‘vmint.ova’ file you are low on disk space, it is no longer needed.
4. Run the Virtual machine by clicking on it and then the green arrow Start. The first time
you run it will be confused about the new hardware it sees, since it was created on a
different machine. Click “change networking” to get it recognize the new hardware on
your computer.
Note that sometimes laptops have VT-x (Virtualization) disabled in the BIOS settings by
default. In such cases VirtualBox will give you an error when you try to start the VM. To
fix this, go to your BIOS settings (before the machine is booted) and enable
virtualization.
Using Virtualbox
You can ‘suspend’ a VM, so that it will remember its current state and dump the memory to a
file on your disk. That file will depend on the amount of RAM your VM is allocated, so make
sure you have e.g. 2-4 Gb additional space for this.
Please do save your work often, even if you suspend/resume your machine.
When the VM is off (not running or suspended) you can adjust the resources available to it. For
instance, if you have 4 cores on your computer CPU, you can give 2 cores to your VM to make it
faster and allow for parallelization. Likewise you can allocate more memory to it. These and
other options can be changed by selecting the Vmint CM and doing Right-click -> Settings.
For Networking settings you can select NAT (uses the host OS’s current connection, including
any VPN) or Bridged (directly goes to the network card bypassing anything in the host OS). Just
leave it on NAT settings if you don’t have any special security issues.
In the Display-Screen settings make sure both 2D and 3D accelerations are checked off.
You will be logged in with the username 'bond'. To perform any command as system-level admin (root), in
Ubuntu you need to type 'sudo'.
Run the command below download and install the package needed to plot results in Matplotlib in
Python:
You may run into a problem where the library download does not progress. This is because by
default the Vmint uses IPv6 network protocol. To bypass this and force Vmint to use the old
IPv4 protocol instead, convert the line above to the following line:
In the /home/bond/Software directory you will find the computational and visualization codes already compiled
and configured.
Environment variables
Your home directory contains a useful file /home/bond/.profile which defines shortcuts and paths
for the codes we will use. In particular ‘py’ is a shortcut for Python3.5 which we will be using.
Running 'python' will not work, since that command points to an old Python2.7 version.
export LAMMPS_POTENTIALS=$HOME'/Software/lammps-17Nov16/potentials'
Now let's change the PYTHONPATH to include the location of the helper libraries for the labs.
This is where we will put the scripting utilities
export PYTHONPATH=$PYTHONPATH:$HOME'/3320'
after you change the .profile file you need to restart the Xterm window to refresh your
environment
Lab materials
To get the lab libraries and samples go to the ~/3320 directory and type:
To get the latest updates to the scripts and libraries in the future go into the ‘labutil’ director and
type: