From 1b51e9a3ba38bfe09679fe437cece6645a6105d5 Mon Sep 17 00:00:00 2001 From: Alexander Potapenko Date: Thu, 15 Jan 2026 13:32:54 +0100 Subject: pkg/gce: vm/gce: allow specifying instance tags in manager config GCE instance tags can be used for various purposes, such as applying network firewall rules or filtering VMs for scheduling onto specific hosts. To support these use cases, syzkaller needs the ability to set instance tags during VM creation. This patch introduces a new tags field to the gce VM configuration that allows users to specify a list of tags to be attached to GCE instances created by syz-manager. --- pkg/gce/gce.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'pkg') diff --git a/pkg/gce/gce.go b/pkg/gce/gce.go index 7100665ef..4a5491e25 100644 --- a/pkg/gce/gce.go +++ b/pkg/gce/gce.go @@ -118,7 +118,7 @@ func NewContext(customZoneID string) (*Context, error) { } func (ctx *Context) CreateInstance(name, machineType, image, sshkey string, - preemptible, displayDevice bool) (string, error) { + tags []string, preemptible, displayDevice bool) (string, error) { prefix := "https://www.googleapis.com/compute/v1/projects/" + ctx.ProjectID sshkeyAttr := "syzkaller:" + sshkey oneAttr := "1" @@ -165,6 +165,7 @@ func (ctx *Context) CreateInstance(name, machineType, image, sshkey string, DisplayDevice: &compute.DisplayDevice{ EnableDisplay: displayDevice, }, + Tags: &compute.Tags{Items: tags}, } retry: if !instance.Scheduling.Preemptible && strings.HasPrefix(machineType, "e2-") { -- cgit mrf-deployment