I have an issue with my google cloud VMs: when I try to set a scheduled startup or stop for them via google cloud's "instance schedules" nothing happens at the specified time. I will walk you through what I have done to try to make this work.
I have created a schedule in Compute engine -> VM instances -> Instance schedules
, after that I was prompted to give the service account the appropriate permissions.
To do that I went to IAM
, clicked include Google provided role grants
and started editing the service-<some_numbers>@compute-system.iam.gserviceaccount.com
. It already had the Compute Engine Service Agent
role, so I added a new one called Compute Instance Admin (v1)
.
After doing that I came back to the instance schedules
, opened the schedule that I have created and clicked add instances to schedule
. I have chosen one of the VMs which is in the same region as the schedule. The operation was successful, but at the time when the instance should have started according to schedule nothing happened.
As an additional effort I have created a custom role which I then given to the same service account. This role had compute.instances.start
and compute.instances.stop
permissions.
This also did not help.