A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://cloud.google.com/compute/docs/instance-groups/suspended-and-stopped-vms-in-mig below:

About suspending and stopping VMs in a MIG | Compute Engine Documentation

About suspending and stopping VMs in a MIG

Stay organized with collections Save and categorize content based on your preferences.

This document describes the suspend and stop actions on virtual machine (VM) instances in a managed instance group (MIG). It also describes how suspending and stopping VMs in a MIG can help you save costs and reduce the waiting time when you need more VMs in the group.

MIGs let you suspend and stop VMs to achieve the following:

Use cases

The following sections describe typical use cases for the standby pool in a MIG.

Pause an application or a service

You can suspend or stop VMs in a MIG to pause your application and resume it when needed, according to your computation, working hours, peak time, and budget constraints. You can keep the results of your current computations on persistent disks or, in the case of suspended VMs, in memory.

For example, you might want to suspend or stop the VMs in a MIG in the following scenarios:

Accelerate MIG scale out

You can keep a standby pool of pre-initialized VMs ready to start when the MIG resizes up. Instead of creating new VMs and waiting for your app to initialize and become ready to run, the MIG starts or resumes VMs from the standby pool. In such case, the VM initialization is completed in advance, not in a critical moment of increased load.

Standby pools are helpful for applications that take long time to initialize, for example in the following scenarios:

Preserved resources

The following table shows the resources that are preserved when you suspend and stop VMs in a MIG.

Preserved Suspended VM Stopped VM VM name Internal IP External IP (ephemeral) External IP (static*) Disks Metadata Memory Note: You can keep a VM in suspended state for up to 60 days. After 60 days in the suspended state, the VM is terminated. The MIG then creates a new VM and puts it in the suspended state, according to the configuration of the standby pool. If you haven't created a stateful configuration in the MIG, then the MIG doesn't preserve the VM name, IP addresses, and disks when recreating the VM. Behavior and configuration

Standby pool is formed by stopped and suspended pools of VMs. All stopped VMs become a part of the stopped pool, and all suspended VMs become part of the suspended pool. If you configured autoscaling in a MIG, after you suspend or stop a VM, the MIG immediately creates new VMs to maintain the recommended size of the MIG.

Important: If you have a Google Cloud load balancer configured in your MIG, stopped or suspended VMs are automatically excluded from the backend service and don't receive traffic. Target sizes of suspended and stopped pools

Similar to the target size of the MIG, stopped and suspended pools have their own target sizes. You can control the standby pool target size in the following ways:

When you change target sizes for stopped or suspended pools, the MIG behaves as follows:

Standby policy

The standby policy defines the behavior of the standby pool based on the following parameters that you specify:

Mode

You can choose how to manage standby pools by setting the operation mode. There are two possible options: manual mode and scale-out-pool mode.

Manual mode (default)

In manual mode, you have full control over which VMs are stopped and suspended in the MIG. Manual mode is the default mode of standby pool.

Manual mode is useful in the following cases:

With manual mode, MIG doesn't apply any automations to the standby pool:

Scale out pool mode

In scale out pool mode, the MIG uses the VMs from the standby pools to accelerate the scale out by resuming or starting them. Then, the MIG automatically replenishes the standby pool with new VMs to maintain the target sizes.

Scale out pool mode is useful to accelerate the scale out of the MIG in the following cases:

In scale out pool mode, the MIG behaves as follows:

Note: When a regional MIG scales out, depending on its target distribution shape, the scale out might occur in a zone or zones that at that moment don't have stopped or suspended VMs. In that case, the MIG creates VMs from scratch in the required zone or zones. Initial delay

To make sure that your VM is initialized correctly, specify the initial delay in the standby policy. The initial delay is the time that VMs wait before stopping or suspending after they are created. This gives your initialization script the time to complete.

The initial delay occurs in the following cases:

In both cases, the instance is allowed to initialize before it is suspended or stopped.

When you want to use standby pool to accelerate the scale out of MIG it is recommended that you measure the time required for your application to initialize on the selected machine type to assure that it is sufficient for your application to be fully ready before suspending or stopping. Otherwise, resuming or starting VMs from standby pool might take longer that creating VMs from scratch.

Target status for VMs in MIGs

MIGs have a declarative API. This means that you declare the target status for the VMs in the MIG, and the API request is successful when the target status is saved. The MIG then performs the necessary operations to reach the target status, and you can check the current action and current status of all the VMs using API.

Suspending and stopping VMs in a MIG works in the same declarative way. When you send a request to suspend or stop VMs, the MIG stores the information about the target status for each VM and starts the necessary operations to reach it.

When you list managed VMs in a MIG, you can see the targetStatus field. It describes the final status of a VM, when the MIG is stable. It can be one of the following values:

VMs in a MIG can have the same lifecycle statuses of single VMs. The following are examples of possible operations on a MIG, and the associated values of the targetStatus field:

Limitations Pricing

Each stopped and suspended VM is billed for the following items:

What's next

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-08-07 UTC.

[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["Managed Instance Groups (MIGs) allow you to suspend or stop virtual machines (VMs) to save costs by pausing applications or services, and to reduce waiting time by using pre-initialized VMs from a standby pool during scale-out events."],["Suspending or stopping VMs in a MIG preserves resources like VM name, IP addresses, disks, and metadata, with memory also being preserved in the case of suspended VMs, which can remain suspended for up to 60 days."],["MIGs offer a standby pool, composed of stopped and suspended VM pools, that can be managed in either manual mode, allowing for full control over individual VMs, or scale-out-pool mode, which automates the use of standby VMs to accelerate scaling."],["When using scale-out pool mode, MIGs will resume suspended VMs, then start stopped VMs, and finally create new VMs if the target size of running VMs has not yet been met, and it will automatically replenish the standby pools with new VMs after using them for scale out."],["The initial delay setting in the standby policy is crucial, as it determines the time a new VM runs before being suspended or stopped, allowing time for the VM initialization script to complete and ensure the application is ready to run when resumed or started."]]],[]]


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4