Meta tags:
description= Set the host maintenance policy in a Compute Engine instance to determine its behavior during host events.;
Headings (most frequently used words):
policy, set, the, instance, gcloud, rest, an, console, host, maintenance, for, while, creating, and, required, compute, stay, organized, with, collections, save, categorize, content, based, on, your, preferences, limitations, before, you, begin, available, properties, view, of, what, next, roles, existing, instances, in, bulk, template, products, pricing, support, resources, engage, permissions,
Text of the page (most frequently used words):
the (615), instance (253), create (163), for (160), and (156), vms (138), host (130), set (115), #compute (114), maintenance (94), #instances (87), with (85), following (74), about (70), use (70), you (70), restart (69), local (66), ssd (66), timeout (64), disks (63), troubleshoot (62), engine (59), image (52), using (51), that (50), seconds (48), include (48), disk (48), manage (47), policy (47), data (47), from (47), view (46), behavior (46), cloud (44), one (44), field (43), google (40), server (40), automatically (39), zone (38), recovery (37), can (36), template (36), machine (36), configure (36), this (35), attached (34), your (34), windows (34), error (33), select (33), mig (33), change (31), overview (31), performance (30), automatic (29), more (28), name (28), gcloud (28), creating (28), images (27), reservation (27), migrate (26), hours (26), flag (25), stops (25), value (25), type (25), number (25), network (25), errors (25), programmed (24), spot (24), after (23), must (23), specify (23), example (23), bulk (23), default (22), only (22), preemptible (21), project (21), request (21), restarting (21), between (21), setting (21), hyperdisk (21), sql (21), events (20), options (20), access (20), monitor (20), policies (19), automaticrestart (19), while (19), failure (19), see (18), terminate (18), 330 (18), prevent (18), linux (18), gpu (18), resources (17), during (17), 168 (17), regional (17), support (16), live (16), migration (16), projects (16), unresponsive (16), console (16), doesn (16), maintenance_policy (16), local_ssd_recovery_timeout (16), error_detection_timeout (16), region (16), configuration (16), custom (16), snapshots (16), reservations (16), zones (15), rest (15), stop (15), before (15), management (15), which (15), best (15), existing (15), colon (15), virtual (15), apply (15), groups (15), ssh (15), recommendations (15), information (14), scheduling (14), localssdrecoverytimeout (14), time (14), availability (14), cli (14), practices (14), types (14), list (14), workload (14), creation (14), load (14), connect (14), onhostmaintenance (13), then (13), recover (13), family (13), microsoft (13), cluster (13), metadata (12), instance_name (12), replace (12), hosterrortimeoutseconds (12), command (12), restarts (12), minutes (12), has (12), templates (12), machine_type (12), debian (12), global (12), storage (12), sole (12), persistent (12), page (11), are (11), make (11), boot (11), run (11), update (11), based (11), delete (11), workloads (11), stateful (11), details (10), true (10), project_id (10), when (10), start (10), service (10), h4d (10), install (10), migs (10), machines (10), add (10), logs (10), get (9), click (9), means (9), increments (9), don (9), count (9), snapshot (9), application (9), licenses (9), managed (9), tenant (9), multiple (9), openshift (9), shutdown (9), hpc (9), samples (8), all (8), license (8), fields (8), method (8), crashes (8), section (8), api (8), either (8), spend (8), recovering (8), days (8), second (8), allowed (8), automatic_restart (8), families (8), post (8), available (8), how (8), gpus (8), permissions (8), mode (8), addresses (8), authentication (8), import (8), cpu (8), resource (8), login (8), optimize (8), internal (8), choose (8), disaster (8), high (8), agent (8), guest (8), keys (8), flexibility (8), dns (8), optimized (8), tpu (8), thumb (7), otherwise (7), false (7), version (7), properties (7), advanced (7), pattern (7), property (7), new (7), networking (7), commitments (7), startup (7), balancing (7), benchmark (7), enable (7), manually (7), idle (7), scale (7), deploy (7), back (7), mysql (7), zonal (7), remove (7), backup (7), code (6), send (6), where (6), https (6), specifies (6), non (6), image_project (6), regions (6), networks (6), follows (6), recommended (6), provisioning (6), settings (6), single (6), uses (6), roles (6), external (6), required (6), identity (6), usage (6), security (6), updates (6), instant (6), files (6), nested (6), across (6), applications (6), group (6), demand (6), pools (6), failover (6), extension (6), transfer (6), customized (6), understand (5), other (5), query (5), event (5), exists (5), googleapis (5), com (5), whether (5), any (5), specific (5), also (5), these (5), important (5), off (5), location (5), environment (5), running (5), monitoring (5), databases (5), accounts (5), future (5), drivers (5), virtualization (5), nvidia (5), operations (5), placement (5), node (5), highly (5), build (5), multi (5), modify (5), capacity (5), schedules (5), audit (5), symphony (5), email (5), scripts (5), manager (5), operating (5), systems (5), enhanced (5), capabilities (5), tenancy (5), restore (5), control (5), workstation (5), faq (5), flex (5), português (4), español (4), sign (4), down (4), need (4), standard (4), waits (4), unset (4), wait (4), appears (4), specified (4), let (4), values (4), latest (4), contains (4), supported (4), public (4), instance_template_name (4), instancetemplates (4), creates (4), body (4), same (4), flags (4), stopped (4), model (4), sequence (4), names (4), name_pattern (4), another (4), edit (4), tpus (4), usereadonly (4), account (4), address (4), subnet (4), services (4), apis (4), development (4), authenticate (4), provider (4), plan (4), tools (4), distributed (4), issues (4), ubuntu (4), bandwidth (4), tcp (4), pmu (4), share (4), upgrade (4), autoscaling (4), cross (4), requests (4), calendar (4), metrics (4), health (4), active (4), clusters (4), containers (4), container (4), database (4), postgresql (4), extensions (4), work (4), suspend (4), resize (4), graceful (4), locations (4), plans (4), replication (4), review (4), bound (4), terms (3), except (3), content (3), its (3), apache (3), output (3), similar (3), viewing (3), formatted (3), most (3), recent (3), deprecated (3), used (3), image_family (3), bookworm (3), v20240617 (3), initializeparams (3), sourceimage (3), machinetype (3), networkinterfaces (3), insert (3), methods (3), ignores (3), not (3), period (3), expand (3), setscheduling (3), option (3), customize (3), determines (3), long (3), have (3), bare (3), metal (3), predefined (3), attach (3), read (3), assign (3), static (3), documentation (3), credentials (3), guides (3), infrastructure (3), observability (3), analytics (3), troubleshooting (3), encryption (3), pro (3), serial (3), configurations (3), patterns (3), higher (3), discounts (3), cuds (3), manual (3), scalable (3), resilient (3), autoscale (3), balancer (3), testing (3), ibm (3), spectrum (3), perform (3), deploying (3), prepare (3), deployment (3), rhel (3), protect (3), certificates (3), state (3), disable (3), increase (3), schedule (3), lifecycle (3), design (3), size (3), pool (3), move (3), workstations (3), series (3), product (3), 한국어 (2), 日本語 (2), עברית (2), brasil (2), italiano (2), indonesia (2), français (2), américa (2), latina (2), deutsch (2), english (2), site (2), youtube (2), center (2), started (2), system (2), pricing (2), products (2), last (2), updated (2), 2026 (2), utc (2), licensed (2), under (2), feedback (2), notices (2), process (2), what (2), next (2), provisioningmodel (2), 10800 (2), nanos (2), describe (2), flatten (2), tab (2), column (2), want (2), gives (2), specifying (2), without (2), unspecified (2), enter (2), numbers (2), hash (2), characters (2), generates (2), starting (2), continuing (2), bulkinsert (2), save (2), integer (2), sla (2), downtime (2), pane (2), such (2), than (2), tib (2), titanium (2), might (2), unless (2), labels (2), tags (2), vpc (2), chosen (2), subnetworks (2), useexternalip (2), legacy (2), role (2), iam (2), idp (2), first (2), federated (2), limitations (2), sdk (2), languages (2), frameworks (2), costs (2), industry (2), solutions (2), hybrid (2), multicloud (2), pipelines (2), hosting (2), quota (2), commitment (2), consumption (2), full (2), registration (2), sles (2), export (2), port (2), collecting (2), nodes (2), report (2), arm (2), core (2), rdp (2), general (2), app (2), latency (2), analyze (2), visible (2), cores (2), committed (2), generation (2), underutilized (2), insights (2), utilization (2), globally (2), web (2), autohealing (2), iis (2), shared (2), reserve (2), autoscaler (2), autoscalers (2), activity (2), kubernetes (2), place (2), directory (2), redis (2), cloning (2), writer (2), always (2), alwayson (2), file (2), volumes (2), synchronization (2), switch (2), byol (2), payg (2), byos (2), changes (2), guide (2), securing (2), simulate (2), topology (2), together (2), repairs (2), repair (2), check (2), failures (2), suspended (2), target (2), distribution (2), physical (2), cancel (2), once (2), limit (2), interfaces (2), ipv6 (2), decrease (2), basic (2), consistent (2), scoped (2), copy (2), appliances (2), asynchronous (2), throughput (2), encrypt (2), format (2), mount (2), memory (2), extreme (2), balanced (2), organization (2), user (2), through (2), rdma (2), created (2), models (2), rtx (2), vws (2), constraints (2), accelerator (2), reference (2), technology (2), areas (2), close (2), subscribe, newsletter, our, third, decade, climate, action, join, cookies, privacy, tech, twitter, blog, engage, training, certification, architecture, getting, github, status, release, notes, community, forums, contact, sales, marketplace, easy, easytounderstand, solved, problem, solvedmyproblem, otherup, hard, hardtounderstand, incorrect, sample, incorrectinformationorsamplecode, missing, missingtheinformationsamplesineed, otherdown, tell, noted, java, registered, trademark, oracle, affiliates, developers, creative, commons, attribution, url, parameter, 120, located, amount, stopping, detecting, them, updating, regioninstancetemplates, inherit, namepattern, instanceproperties, machinetypes, navigation, menu, lets, ensure, their, becomes, enough, being, immediately, hour, spent, attempting, towards, phase, cover, level, agreement, applies, encounter, migrates, happens, cause, behaves, scheduled, unexpected, able, write, setserviceaccount, setlabels, settags, setmetadata, exact, ask, administrator, grant, granting, folders, organizations, instanceadmin, admin, haven, already, verifies, selecting, provide, installed, previously, sure, components, note, init, installation, initialize, begin, they, loss, minimize, responds, requires, encounters, configuring, helps, document, explains, determine, learn, categorize, preferences, stay, organized, collections, home, concurrent, operation, renewal, nvme, resizing, common, pay, diagnostic, sudoers, screenshots, generate, bug, blackwell, soft, lockups, bus, locks, rescue, inaccessible, dumps, kernel, panic, fstab, suspension, reboots, shutdowns, connectivity, tips, nics, dpdk, improve, resiliency, communication, reduce, compact, idpf, interface, irdma, driver, nic, threads, per, sustained, merge, split, extend, renew, purchase, cost, savings, dynamic, overcommit, cpus, floating, reliable, udp, backends, routing, scaling, consuming, consume, combine, cud, allow, sharing, decisions, signals, serving, predictions, organize, replica, states, observe, reports, tensorflow, inference, tensorrt5, learning, monte, carlo, spark, forwarding, others, integrate, clustering, exchange, 2016, sharepoint, strategies, passive, inactive, setups, built, integrations, validation, were, deployed, transition, test, hammerdb, bucket, aws, ec2, pacemaker, s2d, block, netapp, hot, standby, drbd, architectures, client, private, mailjet, mailgun, sendgrid, sending, blue, green, deployments, lamp, joomla, asp, net, interactive, mongodb, flask, terraform, servers, over, mtls, random, generator, virtio, rng, accurate, protocol, ntp, append, els, restrictions, packages, deprecate, versions, trusted, red, hat, knowledgebase, functionality, risks, controls, confidential, kek, secure, expiration, shielded, attributes, handle, faulty, unmanaged, affect, preserved, turn, alternate, fails, repairing, maintain, upgrades, override, selectively, applying, accelerate, out, outage, rebalance, reenable, proactive, redistribution, shape, distribute, define, info, accidental, deletion, spread, rename, reset, resume, referrers, source, uuid, corrupted, duplicate, clones, alerts, backups, vss, regionally, different, protection, considerations, synchronous, consistency, failback, replicate, provisioned, iops, limits, evaluate, help, kms, customer, supplied, symbolic, links, practice, device, ram, additional, exapools, verify, ptr, record, rates, restrict, automate, password, require, powershell, sac, securely, apps, root, vpn, bastion, iap, connection, browser, connections, within, iso, imported, prerequisites, importing, exporting, bring, own, path, detach, reattach, constraint, accounting, provision, examples, slurm, reserved, team, slice, slices, adds, scenarios, deterministic, base, requirements, ready, aci, configured, preempted, historical, alternative, displays, ops, logging, gpudirect, enabled, ultra, minimum, platform, hostname, quickstarts, office, licensing, premium, strategy, gemini, accelerators, platforms, scores, purpose, discover, free, skip, main,
Text of the page (random words):
ance issues troubleshoot sudoers files troubleshoot windows vms troubleshoot windows vms collecting diagnostic information troubleshoot using the serial console troubleshoot using the serial console viewing serial port output troubleshoot instance groups troubleshoot managed instance groups migs troubleshoot os management troubleshoot licenses troubleshoot image import and export troubleshooting sles pay as you go registration troubleshooting ubuntu pro registration troubleshoot metadata server troubleshoot metadata server troubleshoot networking issues troubleshoot common networking issues troubleshoot network drivers troubleshoot vm performance issues troubleshoot storage troubleshoot disk creation troubleshoot full disks and disk resizing troubleshoot disk encryption troubleshoot nvme disks troubleshoot instant snapshots troubleshoot standard snapshots troubleshoot reservations and commitments troubleshoot reservation creation troubleshoot reservation consumption troubleshooting reservation monitoring troubleshoot reservation updates troubleshoot future reservation creation and updates troubleshoot automatic commitment renewal troubleshoot quota errors troubleshoot concurrent operation quota errors troubleshoot workload authentication troubleshoot default service accounts troubleshoot workload to workload authentication ai and ml application development application hosting compute data analytics and pipelines databases distributed hybrid and multicloud industry solutions migration networking observability and monitoring security storage access and resources management costs and usage management infrastructure as code sdk languages frameworks and tools home documentation compute compute engine guides send feedback set the host maintenance policy for a compute instance stay organized with collections save and categorize content based on your preferences linux windows this document explains how to set the host maintenance policy for a compute engine instance to determine its behavior during host events to learn more about host maintenance policies see host maintenance policy a host maintenance policy determines how your instance responds when the host on which the instance is running requires maintenance or encounters an error configuring the host maintenance policy for an instance helps you do the following minimize downtime prevent data loss limitations for host maintenance policies the following limitations apply virtual machine instances using e2 machine types can only live migrate during host maintenance events unless they re spot vms or preemptible vms the following instances can only stop during host maintenance events instances that don t support live migration such as h4d instances z3 instances with more than 18 tib of attached titanium ssd bare metal instances or vms that have gpus attached spot vms or preemptible vms spot vms and preemptible vms can t automatically restart after host errors or programmed stops before you begin if you haven t already set up authentication authentication verifies your identity for access to google cloud services and apis to run code or samples from a local development environment you can authenticate to compute engine by selecting one of the following options select the tab for how you plan to use the samples on this page console when you use the google cloud console to access google cloud services and apis you don t need to set up authentication gcloud install the google cloud cli after installation initialize the google cloud cli by running the following command gcloud init if you re using an external identity provider idp you must first sign in to the gcloud cli with your federated identity note if you installed the gcloud cli previously make sure you have the latest version by running gcloud components update set a default region and zone rest to use the rest api samples on this page in a local development environment you use the credentials you provide to the gcloud cli install the google cloud cli if you re using an external identity provider idp you must first sign in to the gcloud cli with your federated identity for more information see authenticate for using rest in the google cloud authentication documentation required roles to get the permissions that you need to set the host maintenance policy for a compute instance ask your administrator to grant you the compute instance admin v1 roles compute instanceadmin v1 iam role on your project for more information about granting roles see manage access to projects folders and organizations this predefined role contains the permissions required to set the host maintenance policy for a compute instance to see the exact permissions that are required expand the required permissions section required permissions the following permissions are required to set the host maintenance policy for a compute instance to create an instance compute instances create on the project to use a custom image to create the vm colon compute images usereadonly on the image to use a snapshot to create the vm colon compute snapshots usereadonly on the snapshot to use an instance template to create the vm colon compute instancetemplates usereadonly on the instance template to assign a legacy network to the vm colon compute networks use on the project to specify a static ip address for the vm colon compute addresses use on the project to assign an external ip address to the vm when using a legacy network colon compute networks useexternalip on the project to specify a subnet for the vm colon compute subnetworks use on the project or on the chosen subnet to assign an external ip address to the vm when using a vpc network colon compute subnetworks useexternalip on the project or on the chosen subnet to set vm instance metadata for the vm colon compute instances setmetadata on the project to set tags for the vm colon compute instances settags on the vm to set labels for the vm colon compute instances setlabels on the vm to set a service account for the vm to use colon compute instances setserviceaccount on the vm to create a new disk for the vm colon compute disks create on the project to attach an existing disk in read only or read write mode colon compute disks use on the disk to attach an existing disk in read only mode colon compute disks usereadonly on the disk to create an instance template compute instancetemplates create on the project to update the host maintenance policy for an instance compute instances setscheduling on the instance you might also be able to get these permissions with custom roles or other predefined roles available host maintenance properties you can customize how your compute instance behaves during scheduled maintenance or unexpected host events unless you specify otherwise compute engine uses default settings when you create an instance instances in bulk or an instance template you can configure the following host maintenance properties maintenance behavior onhostmaintenance what happens to your instance during a maintenance event on its host that might cause the instance to restart you can set this property to one of the following migrate compute engine automatically live migrates your instance to another host this is the default setting for all types of instances except spot vms and preemptible vms important you must configure instances that don t support live migration to stop terminate during maintenance events otherwise you encounter errors terminate compute engine stops your instance this is the default setting for spot vms or preemptible vms and it s the only supported setting for h4d instances z3 instances with more than 18 tib of attached titanium ssd bare metal instances and instances with gpus or tpus attached automatic restart automaticrestart whether your instance restarts if it crashes or compute engine stops it for a programmed stop such as a maintenance event you can set this property to one of the following on compute engine automatically restarts the instance this is the default setting for all types of instances except for spot vms and preemptible vms you specify this setting as follows for the google cloud console in the advanced pane in the automatic restart list select on recommended for the google cloud cli use the restart on failure flag for rest set the automaticrestart field to true off compute engine doesn t restart the instance this is the default setting for spot vms or preemptible vms you specify this setting as follows for the google cloud console in the advanced pane in the automatic restart list select off for the gcloud cli use the no restart on failure flag for rest set the automaticrestart field to false local ssd data recovery timeout localssdrecoverytimeout this setting applies only to instances that have local ssd disks attached it determines how long compute engine waits to recover data from your local ssd disks after host errors by default this property is unset important the time spent attempting to recover local ssd data doesn t count towards instance availability sla downtime while the instance is in this recovery phase the compute engine service level agreement sla doesn t cover the instance you can set the localssdrecoverytimeout property to one of the following unset compute engine uses the default wait time for z3 vms 6 hours for all other types of instances 1 hour an integer from 0 to 168 the number of hours to wait setting this property to 0 means that compute engine doesn t recover local ssd data and restarts the instance immediately host error timeout hosterrortimeoutseconds this property determines how long compute engine waits to restart an unresponsive instance you must configure this setting before the instance becomes unresponsive use a timeout that is long enough for an instance to recover from being unresponsive you can set this property to one of the following unset compute engine waits up to 330 seconds 5 minutes and 30 seconds this is the default setting for any type of instance an integer from 90 to 330 the wait time in seconds in increments of 30 seconds set the host maintenance policy for an instance by default compute instances use the default settings for their host maintenance policy to customize these settings use one of the following methods set the policy for an existing instance set the policy while creating an instance set the policy while creating instances in bulk set the policy while creating an instance template set the policy for an existing instance before you change the host maintenance policy of an existing instance ensure the following you can t change the maintenance behavior onhostmaintenance of the following types of instances vms that use e2 machine types spot vms or preemptible vms instances that don t support live migration you can t configure spot vms or preemptible vms to automatically restart after host errors or programmed stops to change the local ssd data recovery timeout in an instance that has local ssd disks attached use the gcloud cli or rest api otherwise select any of the following options console in the google cloud console go to the vm instances page go to vm instances in the name column click the name of the instance that you want to update a page that gives the details of the instance appears click edit edit a page that lets you edit instance properties appears in the management section you can do one or more of the following to change the behavior during maintenance events select another option from the on host maintenance list to change the timeout period before restarting an unresponsive instance select another option from the host error timeout list to change whether to restart the instance or not after host errors or programmed stops select another option from the automatic restart list click save gcloud to change the host maintenance policy in an existing instance use the gcloud compute instances set scheduling command with one or more of the following flags to change host maintenance behavior include the maintenance policy flag to change automatic restart behavior do one of the following to automatically restart the instance include the restart on failure flag to prevent the instance from automatically restarting include the no restart on failure flag to change the local ssd data recovery timeout if your instance has local ssd disks attached include the local ssd recovery timeout flag to change the host error timeout include the host error timeout seconds flag for example to change host maintenance behavior automatically restart the instance after host errors or programmed stops change the local ssd data recovery timeout and change the host error timeout run the following command gcloud compute instances set scheduling instance_name host error timeout seconds error_detection_timeout local ssd recovery timeout local_ssd_recovery_timeout maintenance policy maintenance_policy restart on failure zone zone replace the following instance_name the name of your instance error_detection_timeout the number of seconds before compute engine restarts an unresponsive instance the value must be between 90 90 seconds and 330 330 seconds or 5 minutes and 30 seconds only 30 second increments are allowed maintenance_policy the maintenance behavior of the instance the value can be either terminate or migrate local_ssd_recovery_timeout the number of hours to spend recovering data from the attached local ssd disks the value must be between 0 0 hours and 168 168 hours or 7 days setting this field to 0 means that compute engine doesn t recover local ssd data zone the zone where your instance exists rest to change the host maintenance policy in an existing instance make a post request to the instances setscheduling method in the request body include one or more of the following fields to change host maintenance behavior include the onhostmaintenance field to change automatic restart behavior do one of the following to automatically restart the instance include the automaticrestart field to prevent the instance from automatically restarting include the automaticrestart field to change the local ssd data recovery timeout if your instance has local ssd disks attached include the localssdrecoverytimeout field to change the host error timeout include the hosterrortimeoutseconds field for example to change host maintenance behavior automatically restart the instance after host errors or programmed stops change the local ssd data recovery timeout and change the host error timeout make a request as follows post https compute googleapis com compute v1 projects project_id zones zone instances instance_name setscheduling automaticrestart automatic_restart hosterrortimeoutseconds error_detection_timeout localssdrecoverytimeout local_ssd_recovery_timeout onhostmaintenance maintenance_policy replace the following project_id the id of the project where your instance exists zone the zone where your instance exists instance_name the name of your ins...
|