anchor.diff:  -export([init/0, get_number_of_vms/0, add_vms/1, remove_vms/1, killall_vms/0]).
   
   -define(cloud_ssh_key, "2a42cb863313526fca96098a95020db2a904b01157f191a9bb3200829f8596c7").
  --define(scalaris_start, "bin/./scalarisctl -e -detached -s -p 14915 -y 8000 -n node start").
  --define(scalaris_stop, "bin/./scalarisctl -n node gstop").
  +-define(scalaris_start, "bin/./scalarisctl -e -detached -s -p 14915 -y 8000 -n node1 start").
  +-define(scalaris_stop, "bin/./scalarisctl -n node1 gstop").
   
   -type status() :: active | inactive.
   -type host() :: tuple(string(), status()).
  
positive.code:         {_, active} ->
              add_or_remove_vms(add, Pending, RemainingHosts, UpdatedHosts ++ [Host]);
          {Hostname, _} ->
              start_scalaris_vm(Hostname),
              add_or_remove_vms(add, Pending - 1, RemainingHosts, UpdatedHosts ++ [{Hostname, active}])
      end;
  add_or_remove_vms(remove, Pending, Hosts, UpdatedHosts) ->
      [Host | RemainingHosts] = Hosts,
      case Host of
          {Hostname, active} ->
              stop_scalaris_vm(Hostname),
              add_or_remove_vms(remove, Pending - 1, RemainingHosts, UpdatedHosts ++ [{Hostname, inactive}]);
          {_, _} ->
              add_or_remove_vms(remove, Pending, RemainingHosts, UpdatedHosts ++ [Host])
  
negative.code: %%%% Helper methods
  %%%%%%%%%%%%%%%%%%%
  
  -spec killall_vms() -> fail | ok.
  killall_vms() ->
  	case get_hosts() of
  		{_, Hosts} ->
      		lists:foreach(fun({Hostname, Status}) ->
                                    case Status of
                                        active ->
                                            scalaris_vm(stop, Hostname);
                                        inactive ->
                                            ok
                                    end
                            end, Hosts),
              ok;
  		fail -> fail
      end.
  
  -spec scalaris_vm(start | stop, string()) -> ok.
  scalaris_vm(Action, Hostname) ->
      Scalaris = get_scalaris_service(),
      Services = [Scalaris | get_additional_services()],
      lists:foreach(fun (Service) ->
  				{StartCmd, StopCmd} = Service,
  				ServiceCmd =
  				case Action of
  								  start -> StartCmd;
  								  stop  -> StopCmd
  							  end,
                            Cmd = format("ssh -n -f ~s \"(~s)\"", [Hostname, ServiceCmd]),
                            io:format("Executing: ~p~n", [Cmd]),
                            _ = exec(Cmd)
                    end, Services),
  