diff options
| author | Aleksandr Nogikh <nogikh@google.com> | 2022-04-11 15:00:55 +0000 |
|---|---|---|
| committer | Aleksandr Nogikh <wp32pw@gmail.com> | 2022-04-12 19:26:40 +0200 |
| commit | dacb3f1c44e9c527b8bb595e3b37a43ca7733cc0 (patch) | |
| tree | 27306da4ed2cde9639842dc94a047f7fdd95a618 /vm/gce | |
| parent | 8d72091bf0f78d7fb78c08295cd9a7751cb1d8b4 (diff) | |
vm/gce: make zone_id configurable
At the moment syzkaller can only use the zone where it's running. Make it a
configurable option instead (with the old behavior as a fallback).
Diffstat (limited to 'vm/gce')
| -rw-r--r-- | vm/gce/gce.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/vm/gce/gce.go b/vm/gce/gce.go index 91f76ff68..ef213d12e 100644 --- a/vm/gce/gce.go +++ b/vm/gce/gce.go @@ -40,6 +40,7 @@ func init() { type Config struct { Count int `json:"count"` // number of VMs to use + ZoneID string `json:"zone_id"` // GCE zone (if it's different from that of syz-manager) MachineType string `json:"machine_type"` // GCE machine type (e.g. "n1-highcpu-2") GCSPath string `json:"gcs_path"` // GCS path to upload image GCEImage string `json:"gce_image"` // pre-created GCE image to use @@ -99,7 +100,7 @@ func ctor(env *vmimpl.Env) (vmimpl.Pool, error) { return nil, fmt.Errorf("both image and gce_image are specified") } - GCE, err := gce.NewContext() + GCE, err := gce.NewContext(cfg.ZoneID) if err != nil { return nil, fmt.Errorf("failed to init gce: %v", err) } |
