Your application is running on Google Cloud in a managed instance group (MIG). You see errors in Cloud Logging for one VM that one of the processes is not responsive. You want to replace this VM in the MIG quickly. What should you do?
Your application is running on Google Cloud in a managed instance group (MIG). You see errors in Cloud Logging for one VM that one of the processes is not responsive. You want to replace this VM in the MIG quickly. What should you do?
To quickly replace a non-responsive VM in a managed instance group (MIG) in Google Cloud, you should use the gcloud compute instance-groups managed recreate-instances command. This command allows you to recreate specific VM instances in the managed instance group, effectively replacing the problematic VM with a new one. This action ensures that the new VM is based on the latest instance template and configuration settings, maintaining consistency within the group.
I think its C, because the question talk of "Replace the VM". In B you recreate the same VM, so i think the C is more sense.
B is the correct answer , as the question demands in MIG managed instance group. B
https://cloud.google.com/sdk/gcloud/reference/compute/instance-groups/managed/recreate-instances
Following the document below is B:https://cloud.google.com/sdk/gcloud/reference/compute/instance-groups/managed/recreate-instances
Answer is B. B: You can recreate one or more VMs C: Only option to replace each VMs in MIG Compare it: https://cloud.google.com/sdk/gcloud/reference/compute/instance-groups/managed/recreate-instances https://cloud.google.com/sdk/gcloud/reference/compute/instance-groups/managed/rolling-action/replace
I think option C is correct, since gcloud CLI might take some extra time to reinitiate the instance, option B looks wrong
The underlying virtual machine instances are deleted and recreated based on the latest instance template configured for the managed instance group.
B hoga common sense
You can recreate specified instance(s) in a managed instance group. https://cloud.google.com/sdk/gcloud/reference/compute/instance-groups/managed/recreate-instances
should be B.