Se o grupo não estiver balanceado e você quiser reativar a distribuição proativa de instâncias,
primeiro reequilibre o grupo manualmente para atingir uma distribuição uniforme
de instâncias entre zonas.
Reequilibrar manualmente excluindo VMs ou redimensionando o grupo
É possível reequilibrar o grupo manualmente para alcançar uma distribuição
uniforme de instâncias entre zonas
excluindo VMs
das zonas com mais instâncias ou
redimensionando
para adicionar instâncias a zonas com menos VMs até que a distribuição esteja uniforme.
Quando você redimensiona um MIG com a redistribuição proativa de instâncias desativada,
o grupo ainda converge de forma oportunista para o equilíbrio, tratando cada
operação de redimensionamento como uma oportunidade para equilibrar o grupo:
Quando o grupo cresce, o grupo sempre tenta adicionar VMs às zonas com
o menor número de VMs.
Quando o grupo diminui, o grupo sempre remove as VMs das zonas com o
maior número de VMs.
Exemplo de redimensionamento manual de um grupo para conseguir redistribuição uniforme
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Informações incorretas ou exemplo de código","incorrectInformationOrSampleCode","thumb-down"],["Não contém as informações/amostras de que eu preciso","missingTheInformationSamplesINeed","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 2025-08-19 UTC."],[[["\u003cp\u003eA regional managed instance group (MIG) is considered unbalanced when the difference in virtual machines (VMs) between two zones is two or more.\u003c/p\u003e\n"],["\u003cp\u003eManually rebalancing an unbalanced MIG involves deleting VMs from zones with more instances or resizing the group to add instances to zones with fewer VMs.\u003c/p\u003e\n"],["\u003cp\u003eEven with proactive instance redistribution turned off, resizing a MIG will cause it to opportunistically converge toward balance by adding VMs to zones with the fewest or removing them from the zones with the most.\u003c/p\u003e\n"],["\u003cp\u003eRe-enabling proactive redistribution requires an initial manual rebalancing of the MIG to ensure an even distribution of instances across zones.\u003c/p\u003e\n"]]],[],null,["# Manually rebalance a regional MIG\n\n*** ** * ** ***\n\nA\n[regional managed instance group (MIG)](/compute/docs/instance-groups#managed_instance_groups)\nis not balanced if the difference in the number of VMs between\ntwo zones is 2 or more VMs. A regional MIG can fall out of balance if you\ndisable\n[proactive instance redistribution](/compute/docs/instance-groups/regional-migs#proactive_instance_redistribution)\nand then delete or abandon instances to cause an uneven distribution across\nzones.\n\nIf your group is not balanced and you want to re-enable proactive instance\ndistribution, you must first manually rebalance your group to achieve an even\ndistribution of instances across zones.\n\nManually rebalance by deleting VMs or resizing the group\n--------------------------------------------------------\n\nYou can manually rebalance your group to achieve an even distribution of\ninstances across zones by\n[deleting](/compute/docs/instance-groups/add-remove-vms-in-mig#delete_from_group)\nVMs from zones with more instances or by\n[resizing](/compute/docs/instance-groups/add-remove-vms-in-mig#resize_managed_group)\nto add instances to zones with fewer VMs until the distribution is even.\n\nWhen you resize a MIG that has proactive instance redistribution turned off,\nthe group still *opportunistically* converges toward balance, treating each\nresize operation as an opportunity to balance the group:\n\n- When the group grows, the group always tries to add VMs to the zones with the smallest number of VMs.\n- When the group shrinks, the group always removes VMs from the zones with the largest number of VMs.\n\n[](/static/compute/images/rmig-manual-redistribution.svg) *Example of manually resizing a group to achieve even redistribution*\n\nWhat's next\n-----------\n\n- Learn how to re-enable or disable [proactive redistribution](/compute/docs/instance-groups/regional-mig-enable-disable-proactive-redistribution).\n- Learn how to set a regional MIG's [target distribution shape](/compute/docs/instance-groups/regional-mig-set-target-distribution-shape)."]]