Container-Optimized OS では、アクティブ - パッシブ ルート パーティション スキームが使用されます。従来の Linux ディストリビューションでのパッケージごとの更新とは異なり、この OS イメージはカーネルを含めて全体が更新されます。イメージは、自動更新機能が有効化された状態で提供されます。つまり、デフォルトの Container-Optimized OS インスタンスは、常に最新バージョンの OS のリリース直後にこれをダウンロードして、パッシブ パーティションにインストールします。
LTS マイルストーンのイメージまたは cos-stable イメージ ファミリーのイメージを使用している場合は、同じマイルストーンから最新の OS バージョンの更新が得られます。cos-dev と cos-beta のイメージ ファミリーの場合、更新は、対応するイメージ ファミリーの最新の OS バージョンになります。
自動更新の動作の変更
Container-Optimized OS チームは、自動更新を可能にするバックエンド インフラストラクチャの改善に積極的に取り組んでいます。こういった変更の一環として、更新ペイロードの署名と検証に使用する鍵をローテーションしています。ただし、鍵のローテーション前にリリースされたイメージは、ローテーション後にリリースされたイメージに自動的に更新されることはありません。影響を受けるイメージの一覧を以下に示します。
以下のイメージは、最新バージョンに更新できません。
マイルストーン 77: cos-772371-1000-0 より前のイメージ
マイルストーン 81: cos-81-12871-1000-0 より前のイメージ
マイルストーン 85: cos-85-13310-1000-0 より前のイメージ
マイルストーン 86: cos-dev-86-15053-0-0 より前のイメージ
以下のイメージは、今後は更新されません。
77 より前のすべてのマイルストーン(サポート終了済みのマイルストーンを含む)
影響を受けるいずれかのバージョンでスタンドアロン Container-Optimized OS を実行し、自動更新機能を有効にしている場合は、インスタンスが新しいバージョンに更新されません。このような場合、ユーザーは、より新しいイメージで VM インスタンスを再作成して、より新しい OS バージョンを手動で選択する必要があります。自動更新は、新しいリリースに対してサポートされているすべてのマイルストーンで引き続き機能します。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["わかりにくい","hardToUnderstand","thumb-down"],["情報またはサンプルコードが不正確","incorrectInformationOrSampleCode","thumb-down"],["必要な情報 / サンプルがない","missingTheInformationSamplesINeed","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-09-04 UTC。"],[[["\u003cp\u003eContainer-Optimized OS images can automatically update to newer versions for security and bug fixes, but this feature is disabled by default in milestone 117 and later.\u003c/p\u003e\n"],["\u003cp\u003eAutomatic updates are managed by default when Container-Optimized OS is used with managed services like Google Kubernetes Engine or Cloud SQL.\u003c/p\u003e\n"],["\u003cp\u003eUsers who need controlled kernel upgrades and rollouts should disable automatic updates.\u003c/p\u003e\n"],["\u003cp\u003eAutomatic updates can be enabled or disabled on new instances, existing instances, or all instances within a project using the \u003ccode\u003ecos-update-strategy\u003c/code\u003e metadata flag.\u003c/p\u003e\n"],["\u003cp\u003eCertain older Container-Optimized OS image versions released before specific key rotations cannot be automatically updated and require manual recreation with newer images.\u003c/p\u003e\n"]]],[],null,["# Automatic updates\n\nContainer-Optimized OS images have the built-in capability to automatically\nupgrade to a newer version when released. This capability, when enabled, allows\nuser instances to stay up-to-date with respect to security fixes and bug fixes.\n\nWhen Container-Optimized OS is used as part of a managed service (for example,\nGoogle Kubernetes Engine, Cloud SQL, etc.), the managed service takes care of updating\nthe Container-Optimized OS instance for the users. So, automatic updates are\ndisabled on those by default.\n\nUsers running production workloads that are sensitive to kernel upgrades and\nrequire controlled qualification and rollout should also disable automatic\nupdates. For more information, see the [Disabling automatic updates](#disabling_automatic_updates)\nsection.\n| **Note:** In-place updates are not supported on Container-Optimized OS VMs with Unified Extensible Firmware Interface (UEFI) Secure Boot enabled. UEFI Secure Boot is not enabled on Container-Optimized OS VMs by default. To learn more about UEFI Secure Boot, see the [Shielded VM documentation](/security/shielded-cloud/shielded-vm#secure-boot).\n| **Note:** In-place updates are not supported on Container-Optimized OS Arm-based images.\n\nEnable or disable automatic updates\n-----------------------------------\n\nIn milestone 117 and later, the automatic updates feature is disabled by default\non all Container-Optimized OS images. In milestones earlier than 117, the\nfeature is enabled by default. You can enable or disable automatic updates by\nsetting the `cos-update-strategy` metadata on new instances, existing instances,\nor on all instances in a project, as described in the following sections.\n\n### Configure auto-updates on a new instance\n\nCreate a new instance with automatic updates enabled: \n\n gcloud compute instances create \u003cvar translate=\"no\"\u003eINSTANCE_NAME\u003c/var\u003e \\\n --metadata cos-update-strategy=update_enabled\n\nCreate a new instance with automatic updates disabled: \n\n gcloud compute instances create \u003cvar translate=\"no\"\u003eINSTANCE_NAME\u003c/var\u003e \\\n --metadata cos-update-strategy=update_disabled\n\n### Configure auto-updates on an existing instance\n\nEnable automatic updates for an existing instance: \n\n gcloud compute instances add-metadata \u003cvar translate=\"no\"\u003eINSTANCE_NAME\u003c/var\u003e \\\n --metadata cos-update-strategy=update_enabled\n\nDisable automatic updates for an existing instance: \n\n gcloud compute instances add-metadata \u003cvar translate=\"no\"\u003eINSTANCE_NAME\u003c/var\u003e \\\n --metadata cos-update-strategy=update_disabled\n\n### Configure auto-updates on all instances in a project\n\nStarting from [milestone 97](/container-optimized-os/docs/release-notes/m97),\nyou can enable or disable auto-updates for all instances in a project using\nmetadata flags in project metadata.\n\nEnable updates for all instances in a project: \n\n gcloud compute project-info add-metadata \\\n --metadata cos-update-strategy=update_enabled\n\nDisable updates for all instances in a project: \n\n gcloud compute project-info add-metadata \\\n --metadata cos-update-strategy=update_disabled\n\n| **Note:** Metadata flags defined at the instance level take precedence over metadata flags defined at project level.\n\nAutomatic update design\n-----------------------\n\nContainer-Optimized OS uses an active-passive root partition scheme. The OS\nimage is updated in its entirety, including the kernel, as opposed to\npackage-by-package updates like on traditional Linux distributions. The image\nships with the automatic updates feature enabled; this means that a default\nContainer-Optimized OS instance always downloads the latest OS version and\ninstalls it on the passive partition soon after it's released.\n\nIf you are using\nan image from [LTS milestone](/container-optimized-os/docs/concepts/versioning#lts_milestones)\nor cos-stable image family, then you will get an update of the latest OS version\nfrom the same milestone. On cos-dev and cos-beta image family, the update will\nbe the latest OS version from the corresponding image family.\n| **Note:** The update does not take effect until the instance is rebooted, and the auto-updater does not force reboot when an update is installed. After an updated version has been installed, the instance must be rebooted before it can update to a newer version.\n\n### Changes to automatic update behavior\n\nThe Container-Optimized OS team is actively working on improving our backend\ninfrastructure that makes automatic updates possible. As part of these changes,\nwe are rotating the keys used to sign and validate the update payloads. However,\nimages released before the key rotation cannot be automatically updated to\nimages released after the rotation. The affected list of images are as followings:\n\n- These images cannot be updated to latest versions:\n\n - On Milestone 77: images prior to cos-77-12371-1000-0\n - On Milestone 81: images prior to cos-81-12871-1000-0\n - On Milestone 85: images prior to cos-85-13310-1000-0\n - On Milestone 86: images prior to cos-dev-86-15053-0-0\n- These images will no longer receive any updates:\n\n - All milestones before 77, including any previously deprecated milestones.\n\nUsers running standalone Container-Optimized OS with any of the affected versions, and\nhaving the auto-update feature enabled, will not see their instances being updated to newer versions.\nIn these cases, users should manually choose newer OS versions by recreating their\nVM instances with the newer image. Automatic updates will continue to work on all supported\nmilestones for new releases.\n| **Note:** Users using Container-Optimized OS as part of a managed service (for example, Google Kubernetes Engine, Cloud SQL, etc.) are not affected."]]