View and query VM metadata

Every virtual machine (VM) stores its metadata in directories on a metadata server. Your VM automatically has access to this metadata server API without any additional authorization. You can use the methods explained in the following sections of this document to view and query VM metadata values:

If you encounter errors when accessing the metadata server, review Troubleshooting metadata server access issues.

Before you begin

  • Learn more about VM metadata.
  • Learn how to set custom metadata.
  • Learn how to set and query guest attributes.