                                             p.once 'opened', () =>
                                                 # TODO: some danger that this will never happen, e.g., in case
                                                 # of socket disconnect while waiting.
+                                                state = 'opened'
                                                 cb()
-                            if state.state == 'closed'
+                            if state == 'closed'
                                 f()
-                            else if state.state == 'closing'
+                            else
                                 p.once 'closed', () =>
+                                    f()
+            (cb) =>
+                if not opts.running
+                    cb()
+                else
+                    p.state
+                        cb : (err, s) =>
+                            if err
+                                cb(err)
+                                return
+                            state = s.state
+                            if state == 'starting'
+                                p.once 'running', () =>
+                                    cb()
+                                return
+                            if state != 'opened' and state != 'stopping'
+                                cb(err)
+                                return
+                            # This is tricky: in close state, we request open and wait
+                            # for project to open; in closing state, we wait until closed
+                            # then request open and wait until open.
+                            f = () =>
+                                p.start
+                                    cb : (err) =>
+                                        if err
+                                            cb(err)
+                                        else
+                                            p.once 'running', () =>
+                                                # TODO: some danger that this will never happen, e.g., in case
+                                                # of socket disconnect while waiting.
+                                                cb()
+                            if state == 'opened'
+                                f()
+                            else
+                                p.once 'opened', () =>
                                     f()
         ], (err) =>
             if err

                                @_project_cache[opts.project_id] = project
                                cb()
            (cb) =>
                if not opts.open
                    cb()
                else
                    p.state
                        cb : (err, state) =>
                            if err or state.state != 'closed' and state.state != 'closing'
                                cb(err)
                                return
                            # This is tricky: in close state, we request open and wait
                            # for project to open; in closing state, we wait until closed
                            # then request open and wait until open.

                    dbg("getting other project and ensuring that it is already opened")
                    @compute_server.project
                        project_id : opts.target_project_id
                        opened     : true
                        cb         : (err, target_project) =>
                            if err
                                dbg("error ")
