def Exec(self, feedback_fn):
    if not self.op.no_remember:
      self.instance = self.cfg.MarkInstanceUp(self.instance.uuid)

    if self.primary_offline:
      assert self.op.ignore_offline_nodes
      self.LogInfo("Primary node offline, marked instance as started")
    else:
      if self.requires_cleanup:
        result = self.rpc.call_instance_shutdown(
          self.instance.primary_node,
          self.instance,
          self.op.shutdown_timeout, self.op.reason)
        result.Raise("Could not shutdown instance '%s'" % self.instance.name)

        ShutdownInstanceDisks(self, self.instance)

      StartInstanceDisks(self, self.instance, self.op.force)
      self.instance = self.cfg.GetInstanceInfo(self.instance.uuid)

      result = \
        self.rpc.call_instance_start(self.instance.primary_node,
                                     (self.instance, self.op.hvparams,
                                      self.op.beparams),
                                     self.op.startup_paused, self.op.reason)
      if result.fail_msg:
        ShutdownInstanceDisks(self, self.instance)
        result.Raise("Could not start instance '%s'" % self.instance.name)
Start the instance.
dataset/ETHPy150Open ganeti/ganeti/lib/cmdlib/instance_operation.py/LUInstanceStartup.Exec