Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
  • Blog
  • Pricing
  • Documentation
Yandex project
© 2025 Yandex.Cloud LLC
Yandex Compute Cloud
  • Yandex Container Solution
    • Resource relationships
      • Overview
      • Platforms
      • vCPU performance levels
      • Preemptible VMs
      • VM network interfaces
      • Software-accelerated network
      • Live migration
      • Placement groups
      • Statuses
      • VM maintenance policies
      • Resetting Windows VM passwords
    • Graphics processing units (GPUs)
    • Images
    • Dedicated host
    • Encryption
    • Backups
    • Quotas and limits
  • Access management
  • Terraform reference
  • Monitoring metrics
  • Audit Trails events
  • Release notes
  1. Concepts
  2. Virtual machines
  3. VM maintenance policies

Compute maintenance policies

Written by
Yandex Cloud
Updated at December 4, 2024

Compute Maintenance Policies provide the ability to report the planned impact on the user VM by the cloud infrastructure using the metadata service.

A planned impact means the occurrence of one of the following VM maintenance events:

  • TERMINATE_ON_HOST_MAINTENANCE: User VM restart is scheduled.
  • MIGRATE_ON_HOST_MAINTENANCE: Live migration of user VM to another host (server) is scheduled.

Compute maintenance policy can be defined using:

  • Maintenance policy type: maintenance_policy.
  • Maintenance grace period: maintenance_grace_period.

The following maintenance policy types are supported:

  • RESTART: When a maintenance event occurs, the TERMINATE_ON_HOST_MAINTENANCE line appears in the metadata. After the maintenance_grace_period ends, the VM will be migrated to another host using the VM stop and run procedures.
  • MIGRATE: When a maintenance event occurs, the MIGRATE_ON_HOST_MAINTENANCE line appears in the VM metadata. After the maintenance_grace_period ends, the VM will be migrated to another host using the live migration procedure.
  • MAINTENANCE_POLICY_UNSPECIFIED: No policy is specified. Nothing is supplied to the metadata service; there is no wait time before maintenance.

When setting the maintenance grace period, keep in mind that you can delay the start of maintenance by the following maximum period after the maintenance event occurs:

  • Up to one minute for VMs without GPUs.
  • Up to 24 hours for VMs with GPUs.

Features for preemptible VMsFeatures for preemptible VMs

When maintenance events occur, preemptible VMs simply stop instead of migrating. No maintenance events appear in the VM metadata in this case.

Features for VMs with GPUsFeatures for VMs with GPUs

If the RESTART policy is set for VMs with GPUs (non-preemptible), email notifications about scheduled maintenance works on such VMs are disabled. During scheduled works, the VM will automatically restart following a maintenance_grace_period after a maintenance event appears in the metadata.

How to enableHow to enable

You can enable and configure VM maintenance policies using the CLI and Terraform. Currently you cannot configure maintenance policies from the management console.

LimitationsLimitations

A maintenance event can only be generated in the case of planned impact on a VM. If a VM fails, it may be restarted on another physical host. In this case, nothing appears in the VM metadata service. You will receive a failure notification by email.

Was the article helpful?

Previous
Statuses
Next
Resetting Windows VM passwords
Yandex project
© 2025 Yandex.Cloud LLC