aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/gce
diff options
context:
space:
mode:
authorAleksandr Nogikh <nogikh@google.com>2022-03-22 13:59:17 +0000
committerAleksandr Nogikh <wp32pw@gmail.com>2022-03-22 15:52:52 +0100
commit2a52be25e01b5561772098349fa52ef86d665dc5 (patch)
tree2301579ea65a4f9fca9da2593c2ec251d085b106 /pkg/gce
parent2b144c61b5a61b941f320c1b08b6692600b8e033 (diff)
vm/gce: enable display device configuration
Now we always enable it, make this configurable for GCE instances.
Diffstat (limited to 'pkg/gce')
-rw-r--r--pkg/gce/gce.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/pkg/gce/gce.go b/pkg/gce/gce.go
index 79e4d4b35..b0100b749 100644
--- a/pkg/gce/gce.go
+++ b/pkg/gce/gce.go
@@ -97,7 +97,8 @@ func NewContext() (*Context, error) {
return ctx, nil
}
-func (ctx *Context) CreateInstance(name, machineType, image, sshkey string, preemptible bool) (string, error) {
+func (ctx *Context) CreateInstance(name, machineType, image, sshkey string,
+ preemptible, displayDevice bool) (string, error) {
prefix := "https://www.googleapis.com/compute/v1/projects/" + ctx.ProjectID
sshkeyAttr := "syzkaller:" + sshkey
oneAttr := "1"
@@ -141,7 +142,7 @@ func (ctx *Context) CreateInstance(name, machineType, image, sshkey string, pree
OnHostMaintenance: "TERMINATE",
},
DisplayDevice: &compute.DisplayDevice{
- EnableDisplay: true,
+ EnableDisplay: displayDevice,
},
}
retry: