A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://cloud.google.com/compute/docs/troubleshooting/vm-manager/verify-setup below:

Verifying VM Manager setup | Google Cloud

Skip to main content Verifying VM Manager setup

Stay organized with collections Save and categorize content based on your preferences.

Use this document to verify that VM Manager is set up properly. For information about setting up VM Manager, see Set up VM Manager.

To verify the setup, you can either use the troubleshoot command or perform manual checks on the virtual machine (VM) instance.

Before you begin Use the troubleshoot command

Use the os-config troubleshoot command to verify the setup. If any of the checks fail, you are provided with feedback on how to fix the issue.

gcloud compute os-config troubleshoot VM_NAME \
   --zone=ZONE

Replace the following:

Examples Example 1

To troubleshoot a VM instance called my-instance-1 in zone asia-east2-b, run the following:

gcloud compute os-config troubleshoot my-instance-1 \
    --zone=asia-east2-b

The output resembles the following:

OS Config troubleshooter tool is checking if there are issues with the
VM Manager setup for this VM instance.

> Is the OS Config API enabled? Yes
> Is the OS Config agent enabled? Yes
> Is the OS Config agent up to date? No

The version of OS Config agent running on this VM instance is not the
latest version.
See https://cloud.google.com/compute/docs/manage-os/upgrade-vm-manager#update-agent
on how to update the agent.
Example 2

To troubleshoot a VM instance called my-instance-2 in zone us-west1-b, run the following:

gcloud compute os-config troubleshoot my-instance-2 \
    --zone=us-west1-b

The output resembles the following:

OS Config troubleshooter tool is checking if there are issues with the
VM Manager setup for this VM instance.

> Is the OS Config API enabled? Yes
> Is the OS Config agent enabled? Yes
> Is the OS Config agent up to date? Yes
> Is a service account present on the instance? Yes
> Is the OS Config Service account present for this instance? Yes
> Does this instance have a public IP or Private Google Access? Yes
This instance has a public IP.
Manual verification

To manually verify that VM Manager is properly set up, complete the following checks:

If VM Manager is properly setup but you still have issues, see Troubleshooting VM Manager.

Check if OS Config API is enabled

In your Google Cloud project, check if the API is enabled.

Console

In the Google Cloud console, go to the OS Config API page.

Go to OS Config API

gcloud
gcloud services list --enabled

If the API is enabled, the output resembles the following:

osconfig.googleapis.com              OS Config API

If the API is not enabled, enable the OS Config API.

Check if metadata is enabled Linux

For project metadata, on the VM, complete the following steps:

  1. Query the project attributes endpoint:

    curl "http://metadata.google.internal/computeMetadata/v1/project/attributes/" \
    -H "Metadata-Flavor: Google"
    

    If the agent metadata value is set, the output resembles the following:

    enable-osconfig
    
  2. If the enable-osconfig value displays, query the endpoint:

    curl "http://metadata.google.internal/computeMetadata/v1/project/attributes/enable-osconfig" \
    -H "Metadata-Flavor: Google"

    If enabled, the endpoint returns TRUE.

Note: To check the instance metadata setting, replace /project/attributes/ with /instance/attributes/ in the request URL.

If the metadata is not enabled, enable the OS Config metadata.

Windows

For project metadata, on a VM, open a PowerShell terminal as an administrator and run the following command:

  1. Query the project attributes endpoint:

    $value = (Invoke-RestMethod `
             -Headers @{'Metadata-Flavor' = 'Google'} `
             -Uri "http://metadata.google.internal/computeMetadata/v1/project/attributes/")
    $value
    

    If the agent metadata value is set, the output resembles the following:

    enable-osconfig
    
  2. If the enable-osconfig value displays, query the endpoint:

    $value = (Invoke-RestMethod `
             -Headers @{'Metadata-Flavor' = 'Google'} `
             -Uri "http://metadata.google.internal/computeMetadata/v1/project/attributes/enable-osconfig")
    $value
    

    If enabled, the endpoint returns TRUE.

    Note: To check the instance metadata setting, replace /project/attributes/ with /instance/attributes/ in the request URL.

If the metadata is not enabled, enable the OS Config metadata.

Check if the OS Config agent is installed and running Linux

To check whether your Linux VM has the agent installed, run the following command:

sudo systemctl status google-osconfig-agent

If the agent is installed and running, the output resembles the following:

google-osconfig-agent.service - Google OSConfig Agent
Loaded: loaded (/lib/systemd/system/google-osconfig-agent.service; enabled; vendor preset:
Active: active (running) since Wed 2020-01-15 00:14:22 UTC; 6min ago
Main PID: 369 (google_osconfig)
 Tasks: 8 (limit: 4374)
Memory: 102.7M
CGroup: /system.slice/google-osconfig-agent.service
        └─369 /usr/bin/google_osconfig_agent

If the agent is not installed, install the OS Config agent.

Windows

To check whether your Windows VM has the agent installed, run the following command:

PowerShell Get-Service google_osconfig_agent

If the agent is installed and running, the output resembles the following:

Status   Name               DisplayName
------   ----               -----------
Running  google_osconfig... Google OSConfig Agent

If the agent is not installed, install the OS Config agent.

Check if the service account is enabled

For information about service account requirements, see Setup overview.

Linux

On the VM, run the following:

curl "http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/" \
-H "Metadata-Flavor: Google"

The output should at least include the default service account.

default/
Windows

On the VM, open a PowerShell terminal as an administrator and run the following command:

$value = (Invoke-RestMethod `
         -Headers @{'Metadata-Flavor' = 'Google'} `
         -Uri "http://metadata.google.internal/computeMetadata/v1/instance/service-accounts/")
$value

The output should at least include the default service account.

default/
Check if the VM can communicate with the OS Config API

To check if the VM can communicate with the OS Config API, run the following command on your Linux or Windows VM:

ping osconfig.googleapis.com

To stop pinging the OS Config API, press Control + C.

If your VM is running within a private VPC network and does not have public internet access, check that you have enabled Private Google Access.

After you enable Private Google Access, check that the VM can communicate with the OS Config API.

Linux

On the VM, run the following:

 curl --ssl 'https://osconfig.googleapis.com/$discovery/rest' | head

If the VM can communicate with the OS Config API, the command output is similar to the following:

% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                             Dload  Upload   Total   Spent    Left  Speed
0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0{
"discoveryVersion": "v1",
"baseUrl": "https://osconfig.googleapis.com/",
"ownerName": "Google",
"version": "v1beta",
"schemas": {
  "GooSettings": {
    "description": "Googet patching is performed by running `googet update`.",
    "properties": {},
    "id": "GooSettings",
100  9569    0  9569    0     0   198k      0 --:--:-- --:--:-- --:--:--  198k
Windows

On the VM, open a PowerShell terminal as an administrator and run the following:

 Invoke-RestMethod  -Headers @{'Metadata-Flavor' = 'Google'}
 -Uri 'https://osconfig.googleapis.com/$discovery/rest'
What's next?

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-08-07 UTC.

[[["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-07 UTC."],[[["This document provides methods to verify that VM Manager is properly set up, including using the `os-config troubleshoot` command or performing manual checks on the VM instance."],["Before using the verification methods, you may need to set up authentication, and for Windows VMs, PowerShell 3.0 or later is required."],["The `os-config troubleshoot` command is used with a specific VM name and zone to check for setup issues, and if any problems are detected, feedback is provided on how to resolve them."],["Manual verification involves checking if the OS Config API is enabled, OS Config metadata is enabled, the OS Config agent is installed and running, the service account is enabled, and the VM can communicate with the OS Config API."],["If VM Manager is correctly set up but issues still arise, further troubleshooting steps are available in the linked \"Troubleshooting VM Manager\" document."]]],[]]


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4