aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/gce
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/gce')
-rw-r--r--pkg/gce/gce.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/gce/gce.go b/pkg/gce/gce.go
index 2e0b397ad..e5194ae00 100644
--- a/pkg/gce/gce.go
+++ b/pkg/gce/gce.go
@@ -92,7 +92,7 @@ func NewContext() (*Context, error) {
return ctx, nil
}
-func (ctx *Context) CreateInstance(name, machineType, image, sshkey string) (string, error) {
+func (ctx *Context) CreateInstance(name, machineType, image, sshkey string, preemptible bool) (string, error) {
prefix := "https://www.googleapis.com/compute/v1/projects/" + ctx.ProjectID
sshkeyAttr := "syzkaller:" + sshkey
oneAttr := "1"
@@ -132,7 +132,7 @@ func (ctx *Context) CreateInstance(name, machineType, image, sshkey string) (str
},
Scheduling: &compute.Scheduling{
AutomaticRestart: &falseAttr,
- Preemptible: true,
+ Preemptible: preemptible,
OnHostMaintenance: "TERMINATE",
},
}