A RetroSearch Logo

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

Search Query:

Showing content from https://developers.google.com/compute/docs/metadata/predefined-metadata-keys below:

Predefined metadata keys | Compute Engine Documentation

Skip to main content Predefined metadata keys

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

Linux Windows

Each metadata entry is stored on the metadata server as key-value pairs. Metadata keys are case sensitive. Your keys can be either predefined or custom metadata keys.

Predefined metadata keys are metadata keys that are created by Compute Engine. When you create a VM, Compute Engine automatically sets the metadata values for some of these keys on that VM—for example, the VM instance ID or the project ID. For predefined keys where Compute Engine doesn't automatically set a value, you can choose from a set of values that are available depending on the system configuration. For example, to enable OS login for a VM, you can set the value of the enable-oslogin predefined key to TRUE for that VM. To disable OS login for that VM, you can update the value of the key to FALSE. You can only update the values for these keys but not the keys themselves.

This document provides information about the predefined metadata keys that Compute Engine provides in your instance/ and project/ metadata directories.

For information about how VM metadata for Compute Engine is defined, categorized, and arranged, see About VM metadata.

Predefined metadata keys for project metadata are stored under the following directory:

The following table provides a list of metadata keys and directories that Compute Engine automatically creates in the project/ metadata directory:

Metadata entry Description attributes/

A directory of custom metadata values passed to the VMs in your project during startup or shutdown. These custom values can either be Google Cloud attributes or user-created metadata values.

For a list of project-level Google Cloud attributes that you can set, see Project attributes.

For more information about setting custom metadata, see Set custom metadata.

numeric-project-id The numeric project ID (project number) of the instance, which is not the same as the project name that is visible in the Google Cloud console. This value is different from the project-id metadata entry value. project-id The project ID. Predefined project attribute metadata keys

Predefined metadata keys for project attributes are stored under the following directory:

The following table provides a list of metadata keys that, if set for your project, Compute Engine creates in the project/attributes/ metadata directory, along with its associated effect:

Metadata entry Description disable-legacy-endpoints

Disables legacy metadata server endpoints for all VMs in your project.

Legacy endpoints are deprecated, always set disable-legacy-endpoints=TRUE.

enable-guest-attributes

Sets guest attributes for the project.

Guest attributes are custom VM instance metadata values that you can use to publish infrequent status notifications, low volume data, or low frequency data. These values are useful for indicating when startup scripts have finished or for providing other infrequent status notifications to other applications.

Note: Any user or process on your VM instance can read and write to the namespaces and keys in guest-attributes metadata.

For more information about guest attributes, see Set and query guest attributes.

enable-os-inventory

Enables or disables OS inventory for the project.

Collects and stores OS information. This includes information such as hostname, kernel version, architecture, and installed packages.

For more information about OS inventory, see View operating system details.

enable-oslogin

Enables or disables SSH key management on your project.

For more information about OS Login, see Set up OS Login.

enable-windows-ssh

Preview

This product or feature is subject to the "Pre-GA Offerings Terms" in the General Service Terms section of the Service Specific Terms. Pre-GA products and features are available "as is" and might have limited support. For more information, see the launch stage descriptions.

Enables or disables SSH for Windows VMs.

For more information, see Connect to Windows VMs using SSH.

google-compute-default-data-protection

If set, stores the default option that is used to back up new instances created in the project.

For more information, see Configure the default backup setting for the console.

google-compute-default-region If set, stores the default region that is used by the project.

For more information about setting default regions, see Default region and zone.

google-compute-default-zone If set, stores the default zone that is used by the project.

For more information about setting default zones, see Default region and zone.

ssh-keys

If you are managing SSH keys using metadata, this attribute lets you configure public SSH keys that can connect to VMs in this project. If there are multiple SSH keys, each key is separated by a newline character (\n). The value of the ssh-keys attribute is a string.

Example: "user1:ssh-rsa mypublickey user1@host.com\nuser2:ssh-rsa mypublickey user2@host.com"

SSH keys managed by OS Login aren't visible in metadata.

sshKeys Deprecated: Use ssh-keys. vmdnssetting

Enable zonal DNS and global DNS for the VMs in your project.

For more information about using zonal DNS names for your VMs, see Use Zonal DNS for your internal DNS type.

Predefined metadata keys for instance metadata are stored under the following directory:

The following table provides a list of metadata keys and directories that Compute Engine automatically creates in the instance/ metadata directory:

Metadata entry Description attributes/

A directory of custom metadata values passed to the VM during startup or shutdown. These custom values can either be Google Cloud attributes or user-created metadata values.

For a list of instance-level Google Cloud attributes that you can set, see Instance attributes

For more information about setting custom metadata, see Set custom metadata.

cpu-platform

CPU platform of the VM.

For information about CPU platforms, see CPU platforms.

description The free-text description of an instance that is assigned using the --description flag by using the Google Cloud CLI or the API. disks/

A directory of disks that are attached to the VM. For each disk, the following information is available:

For more information about disks, see Storage options.

gce-workload-certificates/(Preview)

Stores the following endpoints for the managed workload identities feature used by applications running in the VM.

For more information, see Authenticate workloads to other workloads over mTLS.

guest-attributes/

Sets guest attributes for the VM. These custom values can either be Google Cloud attributes or user-created metadata values.

For a list of instance-level Google Cloud attributes that you can set, see Instance guest attributes

Note: Any user or process on your VM instance can read and write to the namespaces and keys in guest-attributes metadata.

For more information about guest attributes, see Set and query guest attributes.

hostname The hostname of the VM. id The ID of the VM. This is a unique, numerical ID generated by Compute Engine for your project and the zone of the VM. You can use this ID to identify your VM, especially if you haven't assigned a custom name to the VM. image The operating system image used by the VM. This value has the following format: projects/IMAGE_PROJECT/global/images/IMAGE_NAME. legacy-endpoint-access/ Stores the list of legacy endpoints. Values are 0.1 and v1beta1. licenses/ A list of license code IDs that are used to attach the licenses to images, snapshots, and disks. machine-type The machine type for this VM. This value has the following format: projects/PROJECT_NUM/machineTypes/MACHINE_TYPE maintenance-event Indicates whether a maintenance event is affecting this VM. For more information, see Live migrate. name The name of the VM. network-interfaces/

A directory of network interfaces. For each network interface the following information is available:

For more information about network interfaces, see Multiple network interfaces overview.

partner-attributes/(Preview)

A directory containing namespaces within which metadata entries are stored. The namespaces are created by Google Cloud services, which use partner-attributes to store their configurations. When there are no services using the partner-attributes, the directory is empty.

For example, managed workload identities use partner-attributes for its configurations.

preempted

A boolean value that indicates whether a VM is about to be preempted.

scheduling/

Sets the scheduling options for the VM.

Scheduling metadata values include the following:

For more information about scheduling options, see Set instance availability policies.

service-accounts/

A directory of service accounts associated with the VM. For each service account, the following information is available:

For more information about how Compute Engine uses service accounts, see Service accounts.

tags

Lists any network tags associated with the VM.

For more information about network tags, see Add network tags.

zone The zone where this VM is located. This value has the following format: projects/PROJECT_NUM/zones/ZONE Predefined instance attribute metadata keys

Predefined metadata keys for instance attributes are stored under the following directory:

The following table provides a list of metadata keys that, if set for your instance, Compute Engine creates in the instance/attributes/ metadata directory, along with its associated effect:

Metadata entry Description physical_host

A hash string that represents the location of a VM created with a compact placement policy.

For more information about this attribute, see Verify the physical location of a VM.

enable-oslogin

Enables or disables SSH key management on your VM.

For more information about OS Login, see Set up OS Login.

enable-windows-ssh (Preview)

Enables or disables SSH for Windows VMs.

For more information, see Connect to Windows VMs using SSH.

enable-workload-certificate (Preview)

Enables or disables managed workload identities on a VM.

For more information, see Enable managed workload identities for individual VMs.

vmdnssetting

Enable zonal DNS and global DNS for the VM.

For more information about using zonal DNS names for your VMs DNS, see Use Zonal DNS for your internal DNS type.

ssh-keys

If you are managing SSH keys using metadata, this attribute lets you configure public SSH keys that can connect to VMs in this project. If there are multiple SSH keys, each key is separated by a newline character (\n). The value of the ssh-keys attribute is a string.

Example: "user1:ssh-rsa mypublickey user1@host.com\nuser2:ssh-rsa mypublickey user2@host.com"

SSH keys managed by OS Login aren't visible in metadata.

block-project-ssh-keys

Block project SSH keys from VMs that use metadata-based SSH keys.

For more information, see Restrict SSH keys from VMs.

disable-https-mds-setup

Disables automatic HTTPS Metadata Server certificate provisioning by Compute Engine.

For more information, see Enable automatic certificate setup.

enable-https-mds-native-cert-store

Enables Compute Engine to add the root certificate to the OS trust store during automatic HTTPS Metadata Server certificate provisioning.

For more information, see Enabling root certificate storage in OS trust store.

Predefined guest attribute metadata keys

Predefined metadata keys for instance guest attributes are stored under the following directory:

The following table provides a list of metadata keys and directories that Compute Engine automatically creates in the instance/guest-attributes/ metadata directory:

Metadata entry Description guestInventory/

Stores OS inventory for the VM.

Collects and stores OS details information. This includes information such as hostname, kernel version, architecture, and installed packages details.

For more information about OS inventory, see View operating system details.

hostkeys/

Stores SSH host keys. Host keys can be used to identify a particular host or machine.

For information host keys, see Storing host keys by enabling guest attributes.

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."],[[["Compute Engine stores VM metadata as key-value pairs, which can be predefined by the system or custom-created by the user, with predefined keys having updatable values, but not modifiable keys."],["Predefined metadata keys are categorized into project metadata, project attribute metadata, instance metadata, instance attribute metadata, and instance guest attribute metadata, each stored in specific directories within the metadata server."],["Project metadata includes information like project ID and custom attributes that are accessible to all VMs within the project, while project attribute metadata includes keys like `enable-oslogin` and `ssh-keys` that govern project-wide features."],["Instance metadata provides details about individual VMs, such as CPU platform, disk configurations, and network interfaces, while instance attributes and guest attributes allow for specific VM settings and OS details respectively."],["Key functionalities like enabling or disabling OS login, SSH for Windows VMs, and setting up default regions or zones are controlled through predefined metadata keys, which are found within the `project/attributes/` or `instance/attributes/` directories."]]],[]]


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