Some or all of the information on this page might not apply to Trusted Cloud by S3NS.
Get the UUID of a VM
This document shows you how to get the universally unique identifier (UUID) of a
virtual machine (VM) instance by using a tool that is specific to the VM's
operating system.
Each VM has a UUID that has the following properties:
It is unique among Compute Engine VMs.
It is generated from the VM's project ID, zone, and name.
It is stable for the lifetime of the VM. If the VM is deleted and
recreated in the same project, zone, and with the same name, the VM receives
the same UUID.
UUIDs are only available for VMs created on or after October 30, 2014. If you
have a VM created before that date, recreate the VM so Compute Engine
can assign it a UUID.
To get the UUID of a VM, run the command that corresponds to the VM's
operating system:
Linux
From the Linux VM, run the following
dmidecode
command:
sudo dmidecode -t system | grep UUID
Verify a response similar to the following:
UUID: 3748eb17-a207-5bc3-aa4f-3113a1b9409d
Windows (Cmd.exe)
From the Command Prompt on the Windows VM, run the following
wmic
command:
wmic path win32_computersystemproduct get uuid
Verify a response similar to the following:
UUID
81CBB42C-73A0-9660-6C7D-2FE94627F3A3
Windows (PowerShell)
From PowerShell, run the following Windows Management Instrumentation (WMI) command:
(Get-WmiObject -Class Win32_ComputerSystemProduct).UUID
Verify a response similar to the following:
81CBB42C-73A0-9660-6C7D-2FE94627F3A3
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-07-02 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-07-02 UTC."],[[["This guide provides instructions on how to retrieve the Universally Unique Identifier (UUID) of a virtual machine (VM) instance using operating system-specific tools."],["Each Compute Engine VM has a unique and stable UUID, which is generated from the VM's project ID, zone, and name, and remains consistent throughout the VM's lifetime."],["For Linux VMs, you can use the `dmidecode` command to obtain the UUID, while for Windows VMs, you can use either the `wmic` command in the Command Prompt or a Windows Management Instrumentation (WMI) command in PowerShell."],["VMs created before October 30, 2014, do not have UUIDs and will require recreation to be assigned one."]]],[]]