How can I find the uuid of a vm installed on ESX 3.5? I could see this id through the configuartion file of the vm, but is there a command that provides this info?
Thanks!
You can use "vmware-cmd" to do a "getconfig" on "uuid.location" and awk out the 3rd column. If you want to get all UUID values you can do the following:
#!/bin/sh
IFS=$'\n'
for vm in `vmware-cmd -l`;
do
VM_NAME=`vmware-cmd -l "$vm" getconfig displayName | awk '{print $3}'`
VM_UUID=`vmware-cmd -l "$vm" getconfig uuid.location | awk '{print $3}'`
echo -e "$VM_NAME\t$VM_UUID"
done
unset IFS