Deploy Trove to VirtualBox

Note: this guide assumes you are familiar with building Baserock systems, for more information on building Baserock systems see: Building a Baserock system

You may also want to read the Deploy to VirtualBox guide before continuing.

First, build the Trove:

morph build systems/trove-system-x86_64.morph

Before you can deploy trove you will need to generate keys for some of the accounts trove uses, see prepare trove accounts for more details.

Next, write the following cluster into a file (e.g. virtualbox-trove-cluster.morph ):

name: trove-virtualbox
kind: cluster
systems:
- morph: systems/trove-system-x86_64.morph
  deploy:
    trove:
      type: extensions/virtualbox-ssh
      location: vbox+ssh://user@host/ct-fb-1/path/to/vms/example-trove.vdi
      HOST_IPADDR: 192.168.100.1
      NETMASK: 255.255.255.0
      NETWORK_CONFIG: "lo:loopback;eth0:static,address=192.168.100.2,netmask=255.255.255.0;eth1:dhcp,hostname=$(hostname)"
      DISK_SIZE: 40G
      RAM_SIZE: 4G
      TROVE_ID: example-trove
      TROVE_COMPANY: Company name goes here
      LORRY_SSH_KEY: ssh_keys/lorry.key
      TROVE_ADMIN_USER: adminuser
      TROVE_ADMIN_SSH_PUBKEY: ssh_keys/id_rsa.pub
      WORKER_SSH_PUBKEY: ssh_keys/worker.key.pub

Then run morph deploy, with name of the file you just created

morph deploy virtualbox-trove-cluster.morph

The NETWORK_CONFIG option is used to set up the VM's network interfaces. It's useful to configure one interface to use NAT to give the VM access to the outside world and another interface to use the Virtual Box host adapter to allow you to access the Trove from the host machine.

The NAT interface eth1 is set up to use dhcp, the host-only adapter interface is configured statically.

Note: you must give the host-only adapter interface an address that lies on the same network as the host adapter. So if the host adapter has an IP of 192.168.100.1 eth0 should have an address such as 192.168.100.42.

The settings of the host adapter, including its IP can be changed in VirtualBox manager by selecting the VM and choosing Settings → Network.