in ESX version had the "vmware-cmd" to perform some tasks through the command line. Where would need to run out the steps of the VMX. Now we have ESXi version in vim-cmd vmsvc / getallvms vim-cmd vmsvc / powerZZZ My question is: VMID is a parameter fixed? If I do VMotion it or hang up and call her again, the VMID be the same? Or this one equivalent to VMID PID? Thanks
It's uniquely generated on a per host basis upon a VM's registration and will be persistent until you unregister the VM from an ESX(i) host. I suspect that a vMotion will also caused the VMID to change but I can't confirm at the moment, but you can easily test and validate this.
Lamw, I do a test : doing vmotion VMID changed. there any ID of virtual machine fixed. VMID is dynamic,
Yes - the UUID of the VM will not change on vmotion. It *can* change on re-registration with a host (based on the answer to the question it asks about 'mvoing' vs. 'copying' the VM.
mcowger i run follow test:
Virtual machine A on Host 1 - vim-cmd vmsvc/getallvms = VMID 176
VMOTION virtual machine A to host 2
Virtual machine A on Host 2 - vim-cmd vmsvc/getllvms = VMID 688
VMID change when vmotioned.
understand ?
Thanks
Matt was referring to the VM's UUID, not the vmid. If you're looking to track a particular VM via a unique key, the VMID is NOT the right parameter to use and to be honest, neither is the UUID as you can get duplicates which won't throw an error. Ideally you'll want to use the vSphere API and use instanceUUID which is a new parameter introduced with vSphere 4.x API which is a guaranteed to be unique across a given vCenter instance, this is exposed at a per VM level. If you really need to access this via Service Console of classic ESX or TSm via ESXi, you can query for "vc.uuid" within the .vmx configuration file of a VM. Though if you're using vCenter, recommendatio is to use the high level APIs to access these properties
Yes I understood what Matt said, only wanted to explain the test I did for him to understand.
Only want to know if I could use that instead of pointing VMID the VMX, so was unsure whether the VMID would like a PID or not.
Only then API to perform tasks like the one I need?!
Pretty much, yeah - the APIs is the way that VMware wants you to do these things.