Unique Linux ID in virtualized environment

Hi

I need to know what is the unique identifier for Linux OS even in a virtualized environment?

eg like Machine GUID for windows. I need to know something similar for linux, AIX, Solaris in virtualized environment.

Thanks

Try...

dmidecode | grep -i uuid

or

lshal |grep -i system.hardware.uuid

On my system, red hat

[josephgr@oc0887178221 ~]$ dmidecode | grep -i uuid
UUID: CACAAB01-521D-11CB-BFE3-E99ACE12806A

[josephgr@oc0887178221 ~]$ lshal |grep -i system.hardware.uuid
system.hardware.uuid = '01ABCACA-1D52-CB11-BFE3-E99ACE12806A'  (string)


since its based on hardware, so i think it won't be unique in virtualised environment. Could you please tell?

The only truly "unique" ID, given emulated hardware, might be the server's public keys.

Could you please details it a bit? How does server public key gurantee unique ID in virtualised environment?

Also, i am looking for a C language API. Kindly guide

It doesn't. It's a unique ID that's usually generated on install, but it can be duplicated. (For that matter, so can the Windows GUID!)

I don't think you can guarantee a unique ID in a virtualized environment, unless you generate a fresh ID every boot.

Thanks for this thread my problem just solved!