You want to distribute your VMs across multiple zones in a region in order to protect against zonal failure or to automatically find zones with limited resource like Spot VMs.
Your application is compatible with multiple machine types. You want the MIG to automatically use one of the compatible machine types based on real-time availability.
Your workload needs a group of GPU VMs all at once—for example, you want to run batch workloads, such as training machine learning models or high performance computing workloads, on GPU VMs.
Your workload needs stateful configuration—for example, you need disks that must retain their data whenever VMs are autohealed, updated, or recreated.
Limitations
MIGs have different limitations depending on which features you use. The
following lists show general MIG limitations as well as additional limitations
if you use regional or stateful features.
By default, you can create up to 1,000 VMs in a zonal MIG. If you need more,
use one of the following options:
You must select which zones
are associated with a regional MIG when you create the MIG. After you choose
specific zones during creation, you cannot change or update the zones later.
But you can set the MIG's
target distribution shape
to specify how the group distributes its managed instances across the zones
that you selected.
If you want to autoscale a regional MIG, you must set the group's
target distribution shape to BALANCED or EVEN.
Load balancing
with a regional MIG doesn't support the max-rate target capacity in
RATE and UTILIZATION balancing modes. To learn more about the usage
guidelines for each load balancer, see
Balancing modes and target capacity settings.
You cannot use autoscaling if your MIG has stateful configuration.
If you want to use automated rolling updates, you must set the
replacement method
to RECREATE.
For stateful regional MIGs, you must
disable proactive redistribution
(set the redistribution type to NONE) to prevent deletion of stateful
instances by automatic cross-zone redistribution.
If you use an all-instances configuration
to override instance template properties, you cannot specify those properties
in any per-instance configuration and at the same time in the group's
all-instances configuration.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-26 UTC."],[[["\u003cp\u003eA Managed Instance Group (MIG) is a group of virtual machine (VM) instances treated as a single entity, where each VM is based on an instance template.\u003c/p\u003e\n"],["\u003cp\u003eMIGs offer various configurations for different scenarios, including single-zone (zonal) or multi-zone (regional) deployments, multiple machine types, autoscaling, and the use of preemptible or GPU VMs.\u003c/p\u003e\n"],["\u003cp\u003eMIGs have limitations such as a default maximum number of VMs per group (1,000 for zonal, 2,000 for regional), restrictions on changing networks or zones after creation, and specific limitations for regional and stateful MIGs.\u003c/p\u003e\n"],["\u003cp\u003eAfter creating a MIG, you can manage it by viewing its information, resizing it, updating VM configurations, and adding features like health checks and load balancing.\u003c/p\u003e\n"],["\u003cp\u003eMIGs provide options for stateful configuration to retain data on disks and also offer the capability to include VMs with IPv6 addresses using the dual-stack setting in the instance template.\u003c/p\u003e\n"]]],[],null,["# Basic scenarios for creating managed instance groups (MIGs)\n\n*** ** * ** ***\n\nA [managed instance group (MIG)](/compute/docs/instance-groups#managed_instance_groups)\nis a group of virtual machine (VM) instances that you treat as a single entity.\nEach VM in a MIG is based on an\n[instance template](/compute/docs/instance-templates).\n\nIf you only need to create multiple VMs, but don't want them grouped together in\na MIG, see the [bulk instance API](/compute/docs/instances/using-bulk-api).\n\nTo learn about other Compute Engine options, see\n[Choose a Compute Engine deployment strategy for your workload](/compute/docs/choose-compute-deployment-option).\n\nTo get started with creating a MIG, read this document to find a basic\nconfiguration that works for you.\n\nBasic scenarios for creating a MIG\n----------------------------------\n\nMIGs have many configuration options. See the following guides to quickly get a\nMIG up and running for various scenarios:\n\n| **Note:** By default, Compute Engine creates--and when necessary recreates--each VM in a MIG based on the configuration that you set in the MIG's instance template. The default behavior for all persistent disks in a MIG is to delete or recreate them when the corresponding VM is deleted or recreated, so you shouldn't rely on attached disks as persistent data. To retain your data in a MIG, you can back up the data in another centralized location, such as Cloud Storage, or add configuration for stateful disks.\n\nLimitations\n-----------\n\nMIGs have different limitations depending on which features you use. The\nfollowing lists show general MIG limitations as well as additional limitations\nif you use regional or stateful features.\n\n- By default, you can create up to 1,000 VMs in a zonal MIG. If you need more,\n use one of the following options:\n\n - [Increase the size limit](/compute/docs/instance-groups/add-remove-vms-in-mig#increase_the_groups_size_limit) of your MIG.\n - [Create a regional MIG](/compute/docs/instance-groups/distributing-instances-with-regional-instance-groups), which allows twice as many VMs as a zonal MIG.\n - Create multiple MIGs and split your workload across them.\n - [Contact support](/support-hub) to make a request.\n- When updating a MIG, you can specify up to 1,000 VMs in a single request.\n\n- Once the MIG is created, you cannot change its networks or subnetworks.\n All VMs in the MIG are assigned to the same subnetworks.\n\n- Shared VPC on interfaces other than `nic0` for managed instance\n groups is supported in gcloud CLI and the API, but not in\n Google Cloud console.\n\nA MIG that is spread across multiple zones---a *regional MIG*---has the following\nlimitations:\n\n- By default, you can create up to 2,000 VMs. If you need more, [increase the size limit of your MIG](/compute/docs/instance-groups/add-remove-vms-in-mig#increase_the_groups_size_limit) or [contact support](/support-hub).\n- You must select which [zones](/docs/geography-and-regions#regions_and_zones) are associated with a regional MIG when you create the MIG. After you choose specific zones during creation, you cannot change or update the zones later. But you can set the MIG's [target distribution shape](/compute/docs/instance-groups/regional-mig-distribution-shape) to specify how the group distributes its managed instances across the zones that you selected.\n- If you set the group's target distribution shape to `BALANCED`, `ANY`,\n or `ANY_SINGLE_ZONE`, review the\n [target distribution shape limitations](/compute/docs/instance-groups/regional-mig-set-target-distribution-shape#limitations).\n\n- If you want to autoscale a regional MIG, you must set the group's [target distribution shape](/compute/docs/instance-groups/regional-mig-set-target-distribution-shape) to `BALANCED` or `EVEN`.\n\n[Load balancing](/load-balancing/docs/backend-service)\nwith a regional MIG doesn't support the `max-rate` target capacity in\n`RATE` and `UTILIZATION` balancing modes. To learn more about the usage\nguidelines for each load balancer, see\n[Balancing modes and target capacity settings](/load-balancing/docs/backend-service#balancing-mode-combos).\n\nA MIG with\n[stateful configuration](/compute/docs/instance-groups/stateful-migs#what_makes_a_mig_stateful)---a\n*stateful MIG*---has the following limitations:\n\n- You cannot use autoscaling if your MIG has stateful configuration.\n- If you want to use automated rolling updates, you must set the [replacement method](/compute/docs/instance-groups/rolling-out-updates-to-managed-instance-groups#replacement_method) to `RECREATE`.\n- For stateful regional MIGs, you must [disable proactive redistribution](/compute/docs/instance-groups/regional-mig-enable-disable-proactive-redistribution) (set the redistribution type to `NONE`) to prevent deletion of stateful instances by automatic cross-zone redistribution.\n- If you use an [all-instances configuration](/compute/docs/instance-groups/set-mig-aic) to override instance template properties, you cannot specify those properties in any per-instance configuration and at the same time in the group's all-instances configuration.\n\nIf you want to configure an autoscaler for your MIG, review the\n[autoscaler specifications](/compute/docs/autoscaler#specifications), too.\n\nIPv6 support\n------------\n\nIf you want your MIG to include VM instances that use IPv6\naddressing, you must use the dual-stack setting\nwhen you create your instance template\n\nAdditional MIG tasks\n--------------------\n\nAfter you've created a MIG, you might want to do the following:\n\n### Learn about the group and its VMs\n\n- [View info](/compute/docs/instance-groups/getting-info-about-migs) about your MIG and its managed VM instances\n- [Learn what a managed instance is](/compute/docs/instance-groups/working-with-managed-instances) and how to work with managed instances\n\n### Resize the group\n\n- [Add or remove VMs](/compute/docs/instance-groups/add-remove-vms-in-mig)\n from the group\n\n - [Automatically resize a MIG](/compute/docs/instance-groups/add-remove-vms-in-mig#autoscaling) based on increases or decreases in load by configuring an autoscaler\n - [Manually set the size of a MIG](/compute/docs/instance-groups/add-remove-vms-in-mig#resize_managed_group)\n - [Disable creation retries mode during resize](/compute/docs/instance-groups/add-remove-vms-in-mig#disabling_creation_retries_mode_during_resize)\n - [Create instances with specific names in a MIG](/compute/docs/instance-groups/add-remove-vms-in-mig#creating_instances_with_specific_names_in_migs)\n - [Delete specific instances from a group](/compute/docs/instance-groups/add-remove-vms-in-mig#delete_from_group)\n - [Abandon instances from a group](/compute/docs/instance-groups/add-remove-vms-in-mig#abandoning_instances)\n- [Increase the group's size limit](/compute/docs/instance-groups/add-remove-vms-in-mig#increase_the_groups_size_limit)\n\n- [Delete the group](/compute/docs/instance-groups/delete-mig)\n\n### Change the group's VM configuration\n\n- [Change the instance template for the group](/compute/docs/instance-groups/updating-migs)\n\n- [Apply configuration updates to the VMs in a MIG](/compute/docs/instance-groups/updating-migs)\n\n - [Automatically apply configuration updates to VMs in a MIG](/compute/docs/instance-groups/rolling-out-updates-to-managed-instance-groups)\n - [Selectively apply configuration updates to specific VMs](/compute/docs/instance-groups/updating-selected-instances-in-a-mig)\n - [Understand the `instanceTemplate` and `versions` fields](/compute/docs/instance-groups/updating-migs#relationship_between_versions_and_instancetemplate_fields)\n\n - [Recreate instances in the group](/compute/docs/instance-groups/working-with-managed-instances#recreate_instances)\n\n - [Canary test a new instance template in a MIG](/compute/docs/instance-groups/rolling-out-updates-to-managed-instance-groups#canary_updates)\n\n- [Learn how to add stateful configuration](/compute/docs/instance-groups/stateful-migs)\n in order to preserve disks, IP addresses, and metadata when VMs are recreated\n\n### Add MIG features\n\n- [Set up an application-based health check](/compute/docs/instance-groups/autohealing-instances-in-migs) to automatically recreate VMs if your application does not respond as expected\n- [Set up a load balancer](/compute/docs/instance-groups/adding-an-instance-group-to-a-load-balancer) to distribute user traffic across multiple instances of your application\n\nTutorials\n---------\n\nTry a tutorial:\n\n- [Use autohealing for highly available applications](/compute/docs/tutorials/high-availability-autohealing)\n- [Use load balancing for highly available applications](/compute/docs/tutorials/high-availability-load-balancing)\n- [Use autoscaling for highly scalable applications](/compute/docs/tutorials/high-scalability-autoscaling)\n- [Migrate an existing workload to a stateful managed instance group](/compute/docs/tutorials/migrate-workload-to-stateful-mig)"]]