Si aún no lo hiciste, configura la autenticación.
La autenticación verifica tu identidad para acceder a los Google Cloud servicios y las APIs. Para ejecutar código o muestras desde un entorno de desarrollo local, puedes autenticarte en Compute Engine seleccionando una de las siguientes opciones:
Instala Google Cloud CLI.
Después de la instalación,
inicializa Google Cloud CLI ejecutando el siguiente comando:
Para actualizar la configuración de VM Manager, completa los siguientes pasos:
Verifica la versión actual del agente de configuración del SO que está instalado en tus VM. Para obtener más información sobre las versiones del agente de configuración del SO,
consulta
el repositorio de GitHub GoogleCloudPlatform/osconfig.
Para usar OS Inventory Management, tu VM debe ejecutarse en una versión del agente de configuración del SO con fecha 20201110 o posterior.
Para usar las políticas del SO, tu VM debe ejecutarse en una versión del agente de configuración del SO con fecha 20210427 o posterior.
Visualiza la versión del agente de configuración del SO
Si OS Inventory Management (versión anterior)
se ejecuta en tus VM, puedes verificar la versión del agente de configuración del SO mediante la ejecución
del siguiente comando:
Para actualizar el agente en SLES, ejecuta el siguiente comando:
sudo zypper -n update google-osconfig-agent
.
Para actualizar el agente en las VM de SLES, también puedes volver a instalar el agente con los paquetes que proporciona Google. Para realizar una instalación con los paquetes que proporciona Google, consulta Instala el agente de configuración del SO.
Ubuntu
Para actualizar el agente en los sistemas operativos Ubuntu, ejecuta los siguientes comandos:
Para actualizar el agente en las VM de Ubuntu, te recomendamos que vuelvas a instalar el agente mediante los paquetes que proporciona Google. Para realizar una instalación con los paquetes que proporciona Google, consulta Instala el agente de configuración del SO.
Windows
Para actualizar el agente en los sistemas operativos Windows, ejecuta el siguiente comando:
googet install google-osconfig-agent
Ejecuta un trabajo de aplicación de parche.
Otro método de actualización del agente de configuración del SO es ejecutar un trabajo de aplicación de parche y especificar la marca exclusive_packages. Este trabajo de aplicación de parche solo actualiza el agente de configuración del SO en las VM de destino.
Para configurar las VM de destino, debes especificar un INSTANCE_FILTER.
Para obtener más información sobre los filtros de instancia, consulta Filtros de instancia.
CentOS/RHEL/Rocky
A fin de actualizar el agente para las VMs de CentOS, Rocky Linux y RHEL, ejecuta el
siguiente comando:
Para actualizar el agente en las VM de SLES, también puedes volver a instalar el agente con los paquetes que proporciona Google. Para realizar una instalación con los paquetes que proporciona Google, consulta Instala el agente de configuración del SO.
Ubuntu
Para actualizar el agente de las VM de Ubuntu, ejecuta los siguientes comandos:
Para actualizar el agente en las VM de Ubuntu, te recomendamos que vuelvas a instalar el agente mediante los paquetes que proporciona Google. Para realizar una instalación con los paquetes que proporciona Google, consulta Instala el agente de configuración del SO.
Windows
Para actualizar el agente de las VM de Windows, ejecuta el siguiente comando:
[[["Fácil de comprender","easyToUnderstand","thumb-up"],["Resolvió mi problema","solvedMyProblem","thumb-up"],["Otro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Información o código de muestra incorrectos","incorrectInformationOrSampleCode","thumb-down"],["Faltan la información o los ejemplos que necesito","missingTheInformationSamplesINeed","thumb-down"],["Problema de traducción","translationIssue","thumb-down"],["Otro","otherDown","thumb-down"]],["Última actualización: 2025-09-04 (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```"]]