# File lib/fission/action/snapshot/creator.rb, line 33
        def create_snapshot(name)
          unless @vm.exists?
            return Response.new :code => 1, :message => 'VM does not exist'
          end

          running_response = @vm.running?
          return running_response unless running_response.successful?

          unless running_response.data
            message = 'The VM must be running in order to take a snapshot.'
            return Response.new :code => 1, :message => message
          end

          conf_file_response = @vm.conf_file
          return conf_file_response unless conf_file_response.successful?

          snapshots_response = @vm.snapshots
          return snapshots_response unless snapshots_response.successful?

          if snapshots_response.data.include? name
            message = "There is already a snapshot named '#{name}'."
            return Response.new :code => 1, :message => message
          end

          command = "#{vmrun_cmd} snapshot "
          command << "'#{conf_file_response.data}' \"#{name}\" 2>&1"

          command_exec = Fission::Action::ShellExecutor.new command
          Response.from_shell_executor command_exec.execute
        end