aboutsummaryrefslogtreecommitdiffstats
path: root/pkg
diff options
context:
space:
mode:
authorKris Alder <kalder@google.com>2022-08-31 09:11:35 -0700
committerDmitry Vyukov <dvyukov@google.com>2022-09-02 12:16:49 +0200
commita577205ebe1f58124fc8b58e3ccc2ac2d690e89d (patch)
tree45ade81ec1daa66079dfb83f0ec9d6c08f86b0fb /pkg
parenta805568e4d02790fde7024112cf476d48c43c06b (diff)
pkg/gce, vm/gce: leave nested virt support up to images
Since this can be enabled on per-image basis, we don't need to specifically add this to the creation RPC. This is basically a revert of https://github.com/google/syzkaller/pull/3328.
Diffstat (limited to 'pkg')
-rw-r--r--pkg/gce/gce.go10
1 files changed, 3 insertions, 7 deletions
diff --git a/pkg/gce/gce.go b/pkg/gce/gce.go
index 542cf1650..7a72f1bfd 100644
--- a/pkg/gce/gce.go
+++ b/pkg/gce/gce.go
@@ -46,7 +46,6 @@ type Context struct {
type CreateArgs struct {
Preemptible bool
DisplayDevice bool
- NestedVirt bool
}
func NewContext(customZoneID string) (*Context, error) {
@@ -109,7 +108,7 @@ func NewContext(customZoneID string) (*Context, error) {
}
func (ctx *Context) CreateInstance(name, machineType, image, sshkey string,
- args CreateArgs) (string, error) {
+ preemptible, displayDevice bool) (string, error) {
prefix := "https://www.googleapis.com/compute/v1/projects/" + ctx.ProjectID
sshkeyAttr := "syzkaller:" + sshkey
oneAttr := "1"
@@ -149,14 +148,11 @@ func (ctx *Context) CreateInstance(name, machineType, image, sshkey string,
},
Scheduling: &compute.Scheduling{
AutomaticRestart: &falseAttr,
- Preemptible: args.Preemptible,
+ Preemptible: preemptible,
OnHostMaintenance: "TERMINATE",
},
DisplayDevice: &compute.DisplayDevice{
- EnableDisplay: args.DisplayDevice,
- },
- AdvancedMachineFeatures: &compute.AdvancedMachineFeatures{
- EnableNestedVirtualization: args.NestedVirt,
+ EnableDisplay: displayDevice,
},
}
retry: