From 1d2b823edd7b3936545a8b4d9901d53640334ee6 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Thu, 26 Nov 2020 12:47:39 +0100 Subject: pkg/gce: enable DisplayDevice Enabling DisplayDevice can give us some more coverage. Requires switching to v1 API which is a good idea anyway. --- pkg/gce/gce.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'pkg') diff --git a/pkg/gce/gce.go b/pkg/gce/gce.go index c940bdeaf..79e4d4b35 100644 --- a/pkg/gce/gce.go +++ b/pkg/gce/gce.go @@ -8,7 +8,7 @@ // In particular, API reference: // https://cloud.google.com/compute/docs/reference/latest // and Go API wrappers: -// https://godoc.org/google.golang.org/api/compute/v0.beta +// https://godoc.org/google.golang.org/api/compute/v1 package gce import ( @@ -22,7 +22,7 @@ import ( "golang.org/x/net/context" "golang.org/x/oauth2" "golang.org/x/oauth2/google" - "google.golang.org/api/compute/v0.beta" + "google.golang.org/api/compute/v1" "google.golang.org/api/googleapi" ) @@ -140,8 +140,10 @@ func (ctx *Context) CreateInstance(name, machineType, image, sshkey string, pree Preemptible: preemptible, OnHostMaintenance: "TERMINATE", }, + DisplayDevice: &compute.DisplayDevice{ + EnableDisplay: true, + }, } - retry: if !instance.Scheduling.Preemptible && strings.HasPrefix(machineType, "e2-") { // Otherwise we get "Error 400: Efficient instances do not support -- cgit mrf-deployment