Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Install ops agent in MIG instances

Hi Team,

I am using MIG for one of my app. I inastalled the ops agent on my VM, created an Image out of it, and used it in the template for my Instance group. I see that ops agent installation does not get replicated to the VMs created with this template/Image. Do we have any way, such that the VMs created in the instance group already has an ops agent installed. However startup script is doing the job, just wanted to know if this the right way of doing it or is there some other way also.

NOTE :  I do not want to use project level policies as they affect all the VMs. I just want to do it on selected VMs which are present in MIGs.

Thanks in advance!

0 2 1,049
2 REPLIES 2

Howdy @aabhasjohar ... oooh ... that surprises me.   What I think I'm hearing you say you did was that you started with a GCP Compute Engine instance, installed the Ops Agent and then created a bootable image from the state at this point.  You then created a new Compute Engine instance from this bootable image and find that the ops agent was not installed.

Is that about the summary?

Can you add some more details?  What kind of base image did you use?  (Linux (flavor?), Windows ...) How did you install the Ops Agent?  How do you know that the new Compute Agent doesn't have the Ops Agent installed? (What is the core / negative / failing symptom)

Hello @kolban The issue is resolved now, seems to be an issue related to service account. As the required SA was missing. SA is used to integrate with ops agent.