* If this environment is a single VM environment (only contains one VM) this methode will return the VM object.
* @return the object for the VM in this environment.
*/
public VagrantVm getPrimaryVm() {
try {
RubyObject rubyVm = (RubyObject) vagrantEnvironment.callMethod("primary_vm");
if(rubyVm == null || rubyVm instanceof RubyNil) {
throw new VagrantException("No primary vm found. Maybe there is no vm defined in your configuration or you are working with a multi vm environment.");
}
return new VagrantVm(rubyVm);
} catch (RaiseException exception) {