diff --git a/cloud/cloudlaunch/cloudlaunch.go b/cloud/cloudlaunch/cloudlaunch.go
index <HASH>..<HASH> 100644
--- a/cloud/cloudlaunch/cloudlaunch.go
+++ b/cloud/cloudlaunch/cloudlaunch.go
@@ -35,6 +35,7 @@ import (
 
 	"go4.org/cloud/google/gceutil"
 
+	"cloud.google.com/go/compute/metadata"
 	"cloud.google.com/go/storage"
 	"golang.org/x/net/context"
 	"golang.org/x/oauth2"
@@ -43,7 +44,6 @@ import (
 	"google.golang.org/api/googleapi"
 	"google.golang.org/api/option"
 	storageapi "google.golang.org/api/storage/v1"
-
 )
 
 func readFile(v string) string {
@@ -195,10 +195,13 @@ func (c *Config) MaybeDeploy() {
 }
 
 func (c *Config) restartLoop() {
+	if !metadata.OnGCE() {
+		return
+	}
 	if c.RestartPolicy == RestartNever {
 		return
 	}
-	url := "https://storage.googleapis.com/" + c.BinaryBucket + "/" + c.binaryObject()
+	url := c.binaryURL()
 	var lastEtag string
 	for {
 		res, err := http.Head(url + "?" + fmt.Sprint(time.Now().Unix()))
cloud/cloudlaunch: only run the restart loop on GCE

Change-Id: I0b1f8bf<I>c7f7ba2d<I>b3fca4a1fcb1dcb9a<I>