About Flex-start VMs Stay organized with collections Save and categorize content based on your preferences.
This document provides an overview of Flex-start VMs, detailing theirkey characteristics, as well as the requirements and limitations that you applywhen you create them.
Flex-start VMs are virtual machine (VM) instances that you createby using the flex-start provisioning model. This model uses theDynamic Workload Scheduler (DWS)to provision discounted compute resources from a secure pool of capacity,improving your chances of obtaining high-demand resources like GPUs. After youcreate Flex-start VMs, Compute Engine attempts to allocate yourrequested resources within a specific timeframe. If it succeeds, then yourFlex-start VMs start running and keep running for a maximum ofseven days.
For workloads that require resources for longer than seven days, or with ahigher capacity assurance, you cancreate a future reservation request in calendar modeto still benefit from DWS discounts.
Flex-start VMs use cases
Flex-start VMs are ideal for running workloads that can start atany time, such as the following:
Small model pre-training
Model fine-tuning
High performance computing (HPC) simulation
Batch inference
Flex-start VMs key characteristics
Compared to other types of Compute Engine instances,Flex-start VMs have the following characteristics:
A wait time for allocating resources: you can createFlex-start VMs before Compute Engine can allocate therequested resources. However, VMs only start if resources become availablewithin your specified timeframe. If resources aren't available, then the VMcreation request fails.
For more information, seeFlex-start VM wait time in this document.
A limited run duration: Flex-start VMs can run for up toseven days. After that time, Compute Engine automatically stops ordeletes the VMs based on the termination action that is specified in theVM properties.
For more information, seeFlex-start VM limited run duration in thisdocument.
How Compute Engine allocates VMs: based on how you createFlex-start VMs, Compute Engine allocates resourceseither in close proximity to minimize network latency, or on a best-effortbasis depending on availability.
For more information, seeFlex-start VM allocation in this document.
The flex-start provisioning model: you createFlex-start VMs by using the flex-start provisioning model.This provisioning model provides improved resource availability anddiscounted prices compared to VMs that you create by using the standardprovisioning model.
For more information about each provisioning model, seeCompute Engine instances provisioning models.
Flex-start VM wait time
When you create a Flex-start VM, the VM doesn't immediately start.Compute Engine attempts to allocate your requested resources and startthe VM within a specific timeframe. If you have sufficient quota for yourrequested resources and Compute Engine allocates them by the end of thewait time, then the Flex-start VM starts within two minutes ofcapacity becoming available. Otherwise, the VM creation request fails.
The wait time varies based on the method that you use to create VMs:
Standalone Flex-start VMs wait time
To create a standalone Flex-start VM, you must specify a wait timeby using therequestValidForDuration field. You can set a wait time of eitherzero seconds, or between 90 seconds and 7,200 seconds (two hours).
Based on your workload's zonal requirements, we recommend the following waittimes to help increase the chances that your Flex-start VMcreation request succeeds:
Strict zonal requirements: if your workload requires you to create aFlex-start VM in a specific zone, then we recommend that youset the
requestValidForDurationfield to 90 seconds or higher, up to twohours. Longer wait times help increase your chances of obtaining resources.The VM remains in thePENDINGstatethroughout this time.No zonal requirements: if the Flex-start VM can run in anyzone in the region, then we recommend that you set the
requestValidForDurationfield to zero seconds. This value specifies thatCompute Engine only allocates resources if they are immediatelyavailable. If your request fails because resources are unavailable, then trycreating the Flex-start VM in a different zone.
To stop a VM creation request while Compute Engine attempts to allocateresources, delete the Flex-start VM.
MIG resize requests wait time
If you add Flex-start VMs all at once to a managed instance group(MIG) by using resize requests, then the wait time to provision all yourrequested resources is indefinite. After you create a MIG resize request, therequest remains in theACCEPTED state until resources become available. If andwhen your requested resources become available, the MIG resize request statechanges toSUCCEEDED and Compute Engine creates theFlex-start VMs.
To stop a VM creation request while Compute Engine attempts to allocateresources, cancel the MIG resize request. For more information, seeAbout MIG resize requests.
Flex-start VM limited run duration
When you create a Flex-start VM, you must specify the following:
The VM run duration: you must specify how long the VMs can run. The runduration can be between 10 minutes and 7 days. If you no longer need theVMs, then you can optionally stop or delete the standalone VMs, or deletethe VMs created by using a MIG resize request.
The VM termination action: you must choose whetherCompute Engine automatically stops or deletes the VMs at the end oftheir run duration.
Important: After Compute Engine stops a VM and changes its state toSTOPPING, you keep incurring charges for any resources that are attachedto the VM, such as disks or GPUs. To avoid unnecessary costs, detach anddelete any resources that you no longer need, or delete the VM altogether.For more information, see thepricing for a VM's uptime.
Flex-start VM allocation
Based on the method that you use to create Flex-start VMs,Compute Engine allocates resources as follows:
Standalone Flex-start VMs: Compute Engine createsFlex-start VMs as close as possible based on availability,which is the standard placement for VMs. This placement may cause your VMsto be located far apart in a single zone.
MIG resize requests: Compute Engine allocates resources in closeproximity. This dense placement minimizes network hops and optimizes for lowlatency, which is ideal for workloads that require constant VMcommunication, such as artificial intelligence (AI) and machine learning(ML).
Quota
To create or restart a Flex-start VM, you must have sufficientpreemptible quotafor the requested vCPUs, memory, and any attached GPUs or Local SSD disks.
If you attempt to create or restart a Flex-start VM withoutsufficient quota, then one of the following occurs:
VM creation requests: your request remains pending until you acquiresufficient quota. If you don't acquire the required quota before the waittime ends, then your request fails.
VM restart requests: your request fails immediately.
Pricing
For Flex-start VMs, you incur charges as follows:
You pay as you go (PAYG). For more information about a VM pricing during itslifecycle, seePricing.
For A4, A3, A2, G4, and H4D machine types, you obtain vCPUs, memory, and anyattached GPUs at a discounted price. Other supported accelerator-optimizedmachine types aren't eligible for discounts. For more information, seeDWS pricing.
Limitations
Flex-start VMs have the following limitations:
Flex-start VMs can only use the following machine types:
Any accelerator-optimized machine type, except A4X Max and A4X
H4D machine types
You must create Flex-start VMs by using theflex-start provisioning model.
You must specify whether to stop or delete Flex-start VMs atthe end of their run duration by using the
instanceTerminationActionandmaxRunDurationfields.You must stop Flex-start VMs duringhost maintenance events.
You can't applyplacement policies toFlex-start VMs.
You can't usereservations.
What's next
To learn how to create a standalone Flex-start VM, seeCreate a Flex-start VM.
To learn more about creating multiple Flex-start VMs at oncein a MIG, seeAbout MIG resize requests.
Try it for yourself
If you're new to Google Cloud, create an account to evaluate how Compute Engine performs in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.
Try Compute Engine freeExcept as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2026-02-18 UTC.