Setting up the Virtual Machines

This explains how to set-up a virtual machine (VM) in VirtualBox, to act as either a 'data computer' (server) or 'analysis computer' (client) for DataSHIELD.

Note: you don't have to do the setup manually.

The OBiBa github page provides scripts to automate this:

  • The instructions below give extra information for creating the VMs yourself. If you're using vagrant to create the VMs, you can ignore the rest of this page.

1. Create an Ubuntu Server 14.04 32bit Virtual Machine

  • Give the VM:
    • 20G hard drive
    • 1024G+ RAM
    • In addition to the default NAT adapter, also create a host-only adapter (so the VM has two network interfaces)
  • During installation, ensure you check the box to install OpenSSH. Otherwise, the defaults are all fine.

2. Set up the networking

Give the VM a static ip

  • The NAT adapter can be left as dhcp, however the VM needs a static ip address on the host-only adapter.

Start the VM. Edit /etc/network/interfaces:

$ sudo vi /etc/network/interfaces

For the primary interface it will list the lines:

auto eth0
iface eth0 inet dhcp

This is likely to be the NAT adapter - ensure that eth0 is the correct interface, by checking with the ifconfig or ip addr commands.

Note: You have make sure you get the interfaces the right way round. In this example, eth0 is the NAT adapter; eth1 is the host-only adapter. This depends on the order you set up the adapters for the VM, or whether you cloned the VM from elsewhere and reinitialised the MAC address.

For the host-only interface (likely eth1), you are going to change 'dhcp' to 'static' and add the static configuration. Assuming the host-only adapter has the address (default), then edit the interface (eth1) as follows:

auto eth1
iface eth1 inet static
#   ^^^ IP Address for the VM

To test your changes, restart networking in the virtual machine:

$ sudo service networking restart

And view the interfaces:

$ ip addr

This should list the IP you assigned in /etc/network/interfaces.

SSH access

With the host only network set up you can ssh from the host machine into the VMs (or, of course, from one VM to another):

$ ssh user@

If this fails, check the host is connected to the host-only interface.

3. Install Opal

You can download a script that will perform a basic install of opal and its dependencies.

opal-datashield-vm script

4. Add data to opal

Data can be added to opal using the web interface, accessible at: or :8443

from a browser on the host.

By default:

username: administrator
password: password

Instructions can be found in the opal documentation.