[SOLVED] howto to uniquely identify a VM

shantanu

Renowned Member
Mar 30, 2012
112
12
83
Hi,
Is there a method (like a UUID) which can be associated with a VM to identify it uniquely, besides its VMID.

I know that the VMID itself is unique in a cluster, but can I associate meta data (tag?) or something which
would indicate the uniqueness of the VM.

The scenario I want to guard against (trivially) is that if the existing VM is destroyed and another one re-created with the same VMID, I should be able to identify that the VM is different even before starting the VM.

Basically something similar to an "instance id" of an AWS EC2 instance.

What I have though about:
1. If I can access (ssh into) the machine once, I'll copy a file inside the VM, which I can later query to determine if it is the same VM.
2. Use the SMBIOS field, it seems to generate a uuid=
3. I have also seen the "-digest" parameter to "qm set', but not sure how I could use it to "get the initial digest value"

I just wanted to ask if this is already achievable via a simpler method, before I go ahead and implement something myself.

Regards,
Shantanu Gadgil