一部の Google Cloud サービスには、サービスがリソースにアクセスできるようにする Google が管理するサービス アカウントがあります。これらのサービス アカウントは、サービス エージェントとも呼ばれます。サービス エージェントの詳細については、サービス エージェントをご覧ください。
VM Manager は、ユーザーに代わって VM に関する情報を収集するサービス エージェントを使用して、VM の管理を行っています。この Google マネージド サービス エージェントのメールアドレスは service-PROJECT_NUMBER@gcp-sa-osconfig.iam.gserviceaccount.com です。このアカウントは、Cloud OS Config サービス エージェントのロール(roles/osconfig.serviceAgent)を使用します。
プロジェクトのサービス エージェントとサービス エージェントに付与されているロールは、 Google Cloud コンソールの [IAM] ページで確認できます。ただし、サービス エージェントの Cloud OS Config サービス エージェントのロールを取り消した場合、[IAM] ページでサービス エージェントを確認することはできません。
OS パッケージと更新ソース
Patch と OS ポリシーの両方で、VM がパッケージのソースとリポジトリにアクセスできる必要があります。プライベート ネットワーク内の VM の場合は、限定公開の Google アクセスを設定できます。
VM Manager と Terraform
Terraform を使用すると、VM Manager のスコープを Google Cloud 組織内の複数のプロジェクトに拡張できます。Terraform と VM Manager を使用してパッチジョブと OS ポリシーの割り当てを作成する方法については、OS Config GitHub リポジトリで Terraform の例とチュートリアルをご覧ください。
[[["わかりやすい","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-08-19 UTC。"],[[["\u003cp\u003eVM Manager is a suite of tools designed to efficiently manage operating systems for large virtual machine (VM) fleets on Compute Engine, supporting both Windows and Linux.\u003c/p\u003e\n"],["\u003cp\u003eThe VM Manager suite includes Patch for applying updates and managing compliance, OS inventory management for collecting and reviewing OS information, and OS policies for software package management.\u003c/p\u003e\n"],["\u003cp\u003eEnabling VM Manager, either automatically or manually, activates the OS Config service API and the OS Config agent on selected VMs through instance metadata.\u003c/p\u003e\n"],["\u003cp\u003eThe OS Config agent utilizes OS system utilities to manage patching, maintain OS policy states, and gather inventory data, which is then stored in instance metadata and log streams.\u003c/p\u003e\n"],["\u003cp\u003eVM Manager's functionality can be expanded across multiple projects in a Google Cloud organization using Terraform, allowing for the creation of patch jobs and OS policy assignments.\u003c/p\u003e\n"]]],[],null,["# VM Manager is a suite of tools that can be used to manage operating\nsystems for large virtual machine (VM) fleets running Windows and Linux\non Compute Engine.\n\nVM Manager helps drive efficiency through\nautomation and reduces the operational burden of maintaining these VM fleets.\n\nVM Manager supports projects in\n[VPC Service Controls](/vpc-service-controls/docs/supported-products#table_vm_manager)\nservice perimeters.\n\nOverview\n--------\n\nThe following services are available as part of the VM Manager suite:\n\n- [Patch](/compute/vm-manager/docs/patch): Use this service to apply on-demand and scheduled patches. You can also use Patch for patch compliance reporting in your environment.\n- [OS inventory management](/compute/vm-manager/docs/os-inventory/os-inventory-management): Use this service to collect and review operating system information.\n- [OS policies](/compute/vm-manager/docs/os-policies): Use this service to install, remove, and auto-update software packages.\n\n[](/static/compute/images/manage-os/vm-manager-arch.png) Figure 1. VM Manager architecture overview\n\nWhen you set up or enable VM Manager in your Google Cloud project,\nyou can access the full suite of VM Manager tools: Patch,\nOS policies, and OS inventory management.\n\nEnable VM Manager\n-----------------\n\nYou can set VM Manager to be automatically enabled or manually\nenabled. Automatic enablement applies to your entire project. Manual enablement\ncan be done per VM or for the entire project.\n\nIn summary, when you enable VM Manager, whether automatically\nor manually, the following setup takes place:\n\n- OS Config service API is enabled on the Google Cloud project.\n- The OS Config agent, running on each selected VM, is activated by setting\n the required [instance metadata](/compute/docs/manage-os#enable-metadata)\n values.\n\n | **Note:** OS Config is [preinstalled](/compute/docs/manage-os#check-install) on most VMs but is not activated until instance metadata is set.\n\nFor more information about manually enabling VM Manager,\nsee [Setup overview](/compute/docs/manage-os#overview).\n\nAutomatic enablement is done from the Google Cloud console.\n\nOS Config agent\n---------------\n\nWhen VM Manager is enabled, the OS Config agent functions as follows\nfor each of the services:\n\n- For *Patch* , the OS Config agent uses OS system utilities (such as `yum`, `apt`, `rpm` or the Windows Update Agent) to retrieve patches or updates from the OS package or update source and apply them to the VM. For more information, see [How Patch works](/compute/vm-manager/docs/patch#how_os_patch_management_works).\n- For *OS policies* , the OS Config agent uses OS system utilities (such as `yum`, `apt`, `rpm` or the Windows Update Agent) to maintain the state for the VM that is specified in the OS policy. For more information, see [How OS policies work](/compute/vm-manager/docs/os-policies#how_os_configuration_management_works).\n- For *OS inventory management* , the OS Config agent collects [inventory data](/compute/vm-manager/docs/os-inventory/os-inventory-management#data-collected). This inventory data is then stored in the [instance metadata](/compute/docs/storing-retrieving-metadata) and in various log streams. This data can then be queried using the Google Cloud CLI. For more information, see [How OS inventory management works](/compute/vm-manager/docs/os-inventory/os-inventory-management#how_os_inventory_management_works).\n\nGoogle Cloud OS Config Service Agent\n------------------------------------\n\nSome Google Cloud services have\n[Google-managed service accounts](/iam/docs/service-account-types#google-managed)\nthat allow services to access your resources. These service accounts are\nsometimes known as *service agents* . For more information about service agents,\nsee [Service agents](/iam/docs/service-agents).\n\nVM Manager manages your VMs using a service agent that collects\ninformation about your VMs on your behalf. The email for this Google-managed\nservice agent is\n`service-`\u003cvar translate=\"no\"\u003ePROJECT_NUMBER\u003c/var\u003e`@gcp-sa-osconfig.iam.gserviceaccount.com`.\nThis account uses the Cloud OS Config Service Agent role (`roles/osconfig.serviceAgent`).\n| **Note:** Google creates the service agent for VM Manager only when Patch uses its service to start a patch job and to filter out the VM data. OS policies does not use this service agent.\n\nYou can view your project's service agents and the roles granted to the service\nagents on the [IAM page of the Google Cloud console](https://console.cloud.google.com/iam-admin).\nHowever, if you've revoked the Cloud OS Config Service Agent role for the service agent,\nyou cannot view the service agent on the IAM page.\n\nOS packages and update source\n-----------------------------\n\nFor both Patch and OS policies, your VMs must be\nable to access package sources and repositories. For VMs in private networks,\nyou can set up [Private Google Access](/vpc/docs/configure-private-google-access).\n\nVM Manager and Terraform\n------------------------\n\nYou can use Terraform to extend the scope of VM Manager to multiple projects in\na Google Cloud organization. To learn how to create patch jobs and OS policy\nassignments by using Terraform and VM Manager, see the Terraform\nexamples and tutorials in the\n[OS Config GitHub repository](https://github.com/GoogleCloudPlatform/osconfig/tree/master/examples/Terraform).\n\nFor more information about Terraform configurations and its usage,\nreview the documentation for the following resources:\n\n- [OS patch deployment](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/os_config_patch_deployment)\n- [OS policy assignment](https://registry.terraform.io/providers/hashicorp/google/latest/docs/resources/os_config_os_policy_assignment)\n\nFor a list of available resources to get started with using Terraform,\nsee [Using Terraform with Google Cloud](/docs/terraform).\n\nPricing\n-------\n\nFor pricing information, see [VM Manager pricing](/compute/vm-manager/pricing).\n\nWhat's next?\n------------\n\n- Learn about [OS inventory management](/compute/vm-manager/docs/os-inventory/os-inventory-management).\n- Learn about [Patch](/compute/vm-manager/docs/patch).\n- Learn about [OS policies](/compute/vm-manager/docs/os-policies)."]]