Is there a way to get a VM's name or UUID from within the VM itself, for a VM that is running on a VMWare ESX server? If so, what is the way?
My use case is: I'm cloning a bunch of VMs. A program running inside the clones connects to a server. I want to know which cloned VM that program is running on. What would be the best way to do that? I can assign it a number from the server automatically, print it out from the VM, and type it in manually, but that seems lame.
Best Answer
Run dmidecode and grep for UUID.
This should be the same UUID assigned to the uuid.bios of the VM.