/**
  * Run method for this thread: if this thread is set to stop, then stop a VM and wait for it to
  * stop. If this thread is set to start then start a VM and wait for it to start. Any errors are
  * placed in the blackboard errStr.
  */
 public void run() {
   try {
     Log.getLogWriter().info("Started " + getName());
     try {
       if (stop) {
         ClientVmMgr.stop(
             "Test is synchronously stopping "
                 + targetVm
                 + " with "
                 + ClientVmMgr.toStopModeString(stopMode),
             stopMode,
             ClientVmMgr.ON_DEMAND,
             targetVm);
       }
       VMotionUtil.doVMotion(targetVm);
       if (start) {
         ClientVmMgr.start("Test is synchronously starting " + targetVm, targetVm);
       }
     } catch (hydra.ClientVmNotFoundException e) {
       Log.getLogWriter()
           .info("Caught in thread " + getName() + ":" + TestHelper.getStackTrace(e));
       StopStartBB.getBB().getSharedMap().put(StopStartBB.errKey, TestHelper.getStackTrace(e));
     }
   } catch (Throwable e) {
     Log.getLogWriter().info("Caught in thread " + getName() + ":" + TestHelper.getStackTrace(e));
     StopStartBB.getBB().getSharedMap().put(StopStartBB.errKey, TestHelper.getStackTrace(e));
   }
   Log.getLogWriter().info(getName() + " terminating");
 }