Stay organized with collections
Save and categorize content based on your preferences.
On Compute Engine you can manage the operating systems that are running on
your virtual machines (VMs) by using
VM Manager.
This page describes how to upgrade
an existing setup of VM Manager.
Google recommends that you use the latest version of the agent.
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:
Install the Google Cloud CLI.
After installation,
initialize the Google Cloud CLI by running the following command:
To update the agent on SLES, run the following command:
sudo zypper -n update google-osconfig-agent
To update the agent on SLES VMs, you can also do a reinstall of the
agent using the Google-provided packages. To do an install
using Google-provided packages, see
Install the OS Config agent.
Ubuntu
To update the agent on Ubuntu operating systems, run the
following commands:
To update the agent on Ubuntu VMs, we recommend that you do a
reinstall of the agent using the Google-provided packages. To do an install
using Google-provided packages, see
Install the OS Config agent.
Windows
To update the agent on Windows operating systems, run the
following command:
googet install google-osconfig-agent
Run a patch job
Another method of updating the OS Config agent is by running a patch job and
specifying the exclusive_packages flag. This patch job only updates the OS
Config agent on the target VMs.
To set the target VMs, you need to specify an INSTANCE_FILTER.
For more information about instance filters,
see instance filters.
CentOS/RHEL/Rocky
To update the agent for CentOS, Rocky Linux and RHEL VMs, run the
following command:
To update the agent on SLES VMs, you can also do a reinstall of the
agent using the Google-provided packages. To do an install
using Google-provided packages, see
Install the OS Config agent.
Ubuntu
To update the agent for Ubuntu VMs, run the
following commands:
To update the agent on Ubuntu VMs, we recommend that you do a
reinstall of the agent using the Google-provided packages. To do an install
using Google-provided packages, see
Install the OS Config agent.
Windows
To update the agent for Windows VMs, run the
following command:
[[["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-26 UTC."],[[["\u003cp\u003eThis page details how to upgrade an existing VM Manager setup, which Google recommends keeping up-to-date for optimal performance.\u003c/p\u003e\n"],["\u003cp\u003eTo update the VM Manager, users must first check the current OS Config agent version installed on their VMs.\u003c/p\u003e\n"],["\u003cp\u003eThe OS Config agent can be updated either by updating the operating system's package directly or by running a patch job.\u003c/p\u003e\n"],["\u003cp\u003eSpecific commands for updating the OS Config agent are provided for CentOS, RHEL, Rocky Linux, Debian, SLES, Ubuntu, and Windows operating systems.\u003c/p\u003e\n"],["\u003cp\u003eCertain OS systems such as SLES and Ubuntu may require a reinstall of the agent using the Google provided packages to have the latest version.\u003c/p\u003e\n"]]],[],null,["# Update VM Manager\n\nOn Compute Engine you can manage the operating systems that are running on\nyour virtual machines (VMs) by using\n[VM Manager](/compute/vm-manager/docs).\n\nThis page describes how to upgrade\n[an existing setup of VM Manager](/compute/vm-manager/docs/setup).\nGoogle recommends that you use the latest version of the agent.\n\nBefore you begin\n----------------\n\n- If you haven't already, set up [authentication](/compute/docs/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:\n 1.\n [Install](/sdk/docs/install) the Google Cloud CLI.\n\n After installation,\n [initialize](/sdk/docs/initializing) the Google Cloud CLI by running the following command:\n\n ```bash\n gcloud init\n ```\n\n\n If you're using an external identity provider (IdP), you must first\n [sign in to the gcloud CLI with your federated identity](/iam/docs/workforce-log-in-gcloud).\n | **Note:** If you installed the gcloud CLI previously, make sure you have the latest version by running `gcloud components update`.\n 2. [Set a default region and zone](/compute/docs/gcloud-compute#set_default_zone_and_region_in_your_local_client).\n\nOverview\n--------\n\nTo update your VM Manager setup, complete the following steps:\n\n1. [Check the current version](#view-version) of the OS Config agent that is installed on your VMs. For more information about the OS Config agent versions, see the [GoogleCloudPlatform/osconfig](https://github.com/GoogleCloudPlatform/osconfig/tags) GitHub repository.\n - To use OS inventory management, your VM must be running an OS Config agent version dated `20201110` or later\n - To use OS policies, your VM must be running an OS Config agent version dated `20210427` or later.\n2. If the version of your OS config agent does not support the new features, [update the OS Config agent](#update-agent).\n\nView OS Config agent version\n----------------------------\n\nIf you have [OS inventory management (earlier version)](/compute/vm-manager/docs/os-inventory/view-os-details#version-one)\nrunning on your VMs, you can check the OS Config agent version by running\nthe following command: \n\n```\ngcloud compute instances os-inventory describe VM-NAME \\\n --zone=ZONE\n```\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003eVM-NAME\u003c/var\u003e: the name of your VM\n- \u003cvar translate=\"no\"\u003eZONE\u003c/var\u003e: the zone where the VM is located\n\nIn the output, search for `OSConfigAgentVersion`. \n\n```\nOSConfigAgentVersion: 20210316.00-g1\n```\n\nIn the preceding output snippet, the OS Config agent version is dated `20210316`\n(2021-03-16).\n\nUpdate the OS Config agent\n--------------------------\n\nTo update the OS Config agent, do one of the following:\n\n- [Update the package](#os-package) for your operating system\n- [Run a patch job](#patch-job)\n\n### Update OS packages\n\nOne method of updating the OS Config agent is to update the package for your\noperating system. \n\n### CentOS/RHEL/Rocky\n\nTo update the agent on CentOS, Rocky Linux, and RHEL operating systems, run\nthe following command: \n\n```\nsudo yum update google-osconfig-agent\n```\n\n### Debian\n\nTo update the agent on Debian operating systems, run the\nfollowing commands: \n\n```\nsudo apt update\nsudo apt install google-osconfig-agent\n```\n\n### SLES\n\nTo update the agent on SLES, run the following command: \n\n```\nsudo zypper -n update google-osconfig-agent\n```\n\n\n| **Note:** The package repository available from SUSE Linux Enterprise Server (SLES) might not have the latest OS Config agent available.\n\n\u003cbr /\u003e\n\nTo update the agent on SLES VMs, you can also do a reinstall of the\nagent using the Google-provided packages. To do an install\nusing Google-provided packages, see\n[Install the OS Config agent](/compute/docs/manage-os#agent-install).\n\n### Ubuntu\n\nTo update the agent on Ubuntu operating systems, run the\nfollowing commands: \n\n```\nsudo apt update\nsudo apt install google-osconfig-agent\n```\n\n\n| **Note:** The package repository available from Ubuntu might not have the latest OS Config agent available.\n\n\u003cbr /\u003e\n\nTo update the agent on Ubuntu VMs, we recommend that you do a\nreinstall of the agent using the Google-provided packages. To do an install\nusing Google-provided packages, see\n[Install the OS Config agent](/compute/docs/manage-os#agent-install).\n\n### Windows\n\nTo update the agent on Windows operating systems, run the\nfollowing command: \n\n```\ngooget install google-osconfig-agent\n```\n\n### Run a patch job\n\nAnother method of updating the OS Config agent is by running a patch job and\nspecifying the `exclusive_packages` flag. This patch job only updates the OS\nConfig agent on the target VMs.\n\nTo set the target VMs, you need to specify an \u003cvar translate=\"no\"\u003eINSTANCE_FILTER\u003c/var\u003e.\nFor more information about instance filters,\nsee [instance filters](/compute/docs/os-patch-management/create-patch-job#instance-filters). \n\n### CentOS/RHEL/Rocky\n\nTo update the agent for CentOS, Rocky Linux and RHEL VMs, run the\nfollowing command: \n\n```\ngcloud compute os-config patch-jobs execute INSTANCE_FILTER \\\n --yum-exclusive-packages=google-osconfig-agent\n```\n\n### Debian\n\nTo update the agent for Debian VMs, run the\nfollowing commands: \n\n```\ngcloud compute os-config patch-jobs execute INSTANCE_FILTER \\\n --apt-exclusive-packages=google-osconfig-agent\n```\n\n### SLES\n\nTo update the agent for SLES VMs, run the following command: \n\n```\ngcloud compute os-config patch-jobs execute INSTANCE_FILTER \\\n --zypper-exclusive-patches=google-osconfig-agent\n```\n\n\n| **Note:** The package repository available from SUSE Linux Enterprise Server (SLES) might not have the latest OS Config agent available.\n\n\u003cbr /\u003e\n\nTo update the agent on SLES VMs, you can also do a reinstall of the\nagent using the Google-provided packages. To do an install\nusing Google-provided packages, see\n[Install the OS Config agent](/compute/docs/manage-os#agent-install).\n\n### Ubuntu\n\nTo update the agent for Ubuntu VMs, run the\nfollowing commands: \n\n```\ngcloud compute os-config patch-jobs execute INSTANCE_FILTER \\\n --apt-exclusive-packages=google-osconfig-agent\n```\n\n\n| **Note:** The package repository available from Ubuntu might not have the latest OS Config agent available.\n\n\u003cbr /\u003e\n\nTo update the agent on Ubuntu VMs, we recommend that you do a\nreinstall of the agent using the Google-provided packages. To do an install\nusing Google-provided packages, see\n[Install the OS Config agent](/compute/docs/manage-os#agent-install).\n\n### Windows\n\nTo update the agent for Windows VMs, run the\nfollowing command:\n**Note:** This command also updates all the Google-provided software on the VM. \n\n```\ngcloud compute os-config patch-jobs execute INSTANCE_FILTER \\\n --windows-exclusive-patches=google-packages\n```"]]