このページの情報の一部またはすべては、S3NS の Trusted Cloud には適用されない場合があります。
VM の UUID を取得する
このドキュメントでは、VM のオペレーティング システムに固有のツールを使用して仮想マシン(VM)インスタンスの Universally Unique Identifier(UUID)を取得する方法について説明します。
各 VM には、次のプロパティを持つ UUID があります。
これは、Compute Engine VM の中で一意です。
VM のプロジェクト ID、ゾーン、名前から生成されます。
VM の存続期間中は安定しています。VM が削除され、同じプロジェクト、ゾーン、同じ名前で再作成されると、VM は同じ UUID を受け取ります。
UUID は、2014 年 10 月 30 日以降に作成された VM でのみ使用できます。この日付より前に VM が作成されている場合は、Compute Engine から UUID を割り当てられるように VM を再作成します。
VM の UUID を取得するには、VM のオペレーティング システムに対応するコマンドを実行します。
Linux
Linux VM から、次の dmidecode
コマンドを実行します。
sudo dmidecode -t system | grep UUID
次のようなレスポンスが返されます。
UUID: 3748eb17-a207-5bc3-aa4f-3113a1b9409d
Windows(cmd.exe)
Windows VM のコマンド プロンプトから次の wmic
コマンドを実行します。
wmic path win32_computersystemproduct get uuid
次のようなレスポンスが返されます。
UUID
81CBB42C-73A0-9660-6C7D-2FE94627F3A3
Windows(PowerShell)
PowerShell から、次の Windows Management Instrumentation(WMI)コマンドを実行します。
(Get-WmiObject -Class Win32_ComputerSystemProduct).UUID
次のようなレスポンスが返されます。
81CBB42C-73A0-9660-6C7D-2FE94627F3A3
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンスにより使用許諾されます。コードサンプルは Apache 2.0 ライセンスにより使用許諾されます。詳しくは、Google Developers サイトのポリシーをご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-08-18 UTC。
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["必要な情報がない","missingTheInformationINeed","thumb-down"],["複雑すぎる / 手順が多すぎる","tooComplicatedTooManySteps","thumb-down"],["最新ではない","outOfDate","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["サンプル / コードに問題がある","samplesCodeIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-08-18 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."]]],[]]