Organiza tus páginas con colecciones
Guarda y categoriza el contenido según tus preferencias.
Linux
Windows
En este documento, se muestra cómo obtener el identificador único universal (UUID) de una instancia de máquina virtual (VM) mediante una herramienta específica del sistema operativo de la VM.
Cada VM tiene un UUID con las siguientes propiedades:
Es único entre las VM de Compute Engine.
Se genera a partir del ID del proyecto, la zona y el nombre de la VM.
Es estable durante el ciclo de vida de la VM. Si la VM se borra y se vuelve a crear en el mismo proyecto, zona y con el mismo nombre, recibe el mismo UUID.
Los UUID solo están disponibles para las VM creadas a partir del 30 de octubre de 2014. Si tienes una VM creada antes de esa fecha, vuelve a crearla para que Compute Engine pueda asignarle un UUID.
Usa las herramientas del sistema operativo para obtener el UUID de una VM
Para obtener el UUID de una VM, ejecuta el comando que corresponde al sistema operativo de la VM:
Linux
Desde la VM de Linux, ejecuta el siguiente comando dmidecode:
sudo dmidecode -t system | grep UUID
Verifica una respuesta similar a esta:
UUID: 3748eb17-a207-5bc3-aa4f-3113a1b9409d
Windows (Cmd.exe)
Desde el símbolo del sistema en la VM de Windows, ejecuta el siguiente comando wmic:
[[["Fácil de comprender","easyToUnderstand","thumb-up"],["Resolvió mi problema","solvedMyProblem","thumb-up"],["Otro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Información o código de muestra incorrectos","incorrectInformationOrSampleCode","thumb-down"],["Faltan la información o los ejemplos que necesito","missingTheInformationSamplesINeed","thumb-down"],["Problema de traducción","translationIssue","thumb-down"],["Otro","otherDown","thumb-down"]],["Última actualización: 2025-09-04 (UTC)"],[[["\u003cp\u003eThis guide provides instructions on how to retrieve the Universally Unique Identifier (UUID) of a virtual machine (VM) instance using operating system-specific tools.\u003c/p\u003e\n"],["\u003cp\u003eEach 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.\u003c/p\u003e\n"],["\u003cp\u003eFor Linux VMs, you can use the \u003ccode\u003edmidecode\u003c/code\u003e command to obtain the UUID, while for Windows VMs, you can use either the \u003ccode\u003ewmic\u003c/code\u003e command in the Command Prompt or a Windows Management Instrumentation (WMI) command in PowerShell.\u003c/p\u003e\n"],["\u003cp\u003eVMs created before October 30, 2014, do not have UUIDs and will require recreation to be assigned one.\u003c/p\u003e\n"]]],[],null,["# Get the UUID of a VM\n\nLinux Windows\n\n*** ** * ** ***\n\nThis document shows you how to get the universally unique identifier (UUID) of a\nvirtual machine (VM) instance by using a tool that is specific to the VM's\noperating system.\n\nEach VM has a UUID that has the following properties:\n\n- It is unique among Compute Engine VMs.\n\n- It is generated from the VM's project ID, zone, and name.\n\n- It is stable for the lifetime of the VM. If the VM is deleted and\n recreated in the same project, zone, and with the same name, the VM receives\n the same UUID.\n\nUUIDs are only available for VMs created on or after October 30, 2014. If you\nhave a VM created before that date, recreate the VM so Compute Engine\ncan assign it a UUID.\n\nUse operating system tools to get the UUID of a VM\n--------------------------------------------------\n\nTo get the UUID of a VM, run the command that corresponds to the VM's\noperating system: \n\n### Linux\n\n1. From the Linux VM, run the following\n [`dmidecode`](http://www.nongnu.org/dmidecode/) command:\n\n ```\n sudo dmidecode -t system | grep UUID\n ```\n2. Verify a response similar to the following:\n\n ```\n UUID: 3748eb17-a207-5bc3-aa4f-3113a1b9409d\n ```\n\n### Windows (Cmd.exe)\n\n1. From the Command Prompt on the Windows VM, run the following\n [`wmic`](https://docs.microsoft.com/windows/win32/wmisdk/wmic) command:\n\n ```\n wmic path win32_computersystemproduct get uuid\n ```\n2. Verify a response similar to the following:\n\n ```\n UUID\n 81CBB42C-73A0-9660-6C7D-2FE94627F3A3\n ```\n\n### Windows (PowerShell)\n\n1. From PowerShell, run the following [Windows Management Instrumentation (WMI)](https://docs.microsoft.com/powershell/scripting/learn/ps101/07-working-with-wmi) command:\n\n ```\n (Get-WmiObject -Class Win32_ComputerSystemProduct).UUID\n ```\n2. Verify a response similar to the following:\n\n ```\n 81CBB42C-73A0-9660-6C7D-2FE94627F3A3\n ```"]]