public ComputeState createInstance() throws Exception {
  ManagedObjectReference vm;
  if (isOvfDeploy()) {
    vm=deployOvf();
    this.vm=vm;
  }
 else {
    vm=createVm();
    if (vm == null) {
      return null;
    }
    this.vm=vm;
  }
  ComputeState state=new ComputeState();
  state.resourcePoolLink=VimUtils.firstNonNull(this.state.resourcePoolLink,this.parent.resourcePoolLink);
  return state;
}

public ComputeState createInstance ( ) throws Exception { ManagedObjectReference vm ; if ( isOvfDeploy ( ) ) { vm = deployOvf ( ) ; this . vm = vm ; } else { vm = createVm ( ) ; if ( vm == null ) { return null ; } this . vm = vm ; } ComputeState state = new ComputeState ( ) ; state . resourcePoolLink = VimUtils . firstNonNull ( this . state . resourcePoolLink , this . parent . resourcePoolLink ) ; return state ; }
does provisioning and return a patchable state to patch the resource .
