VMware vSphere

 View Only
  • 1.  VMID fixed or dynamic ?

    Broadcom Employee
    Posted Jun 08, 2011 01:46 PM

    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



  • 2.  RE: VMID fixed or dynamic ?

    Broadcom Employee
    Posted Jun 08, 2011 02:53 PM

    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.



  • 3.  RE: VMID fixed or dynamic ?

    Broadcom Employee
    Posted Jun 08, 2011 04:10 PM

    Lamw, I do a test :  doing vmotion VMID  changed.  there any ID of virtual machine fixed. VMID is dynamic,



  • 4.  RE: VMID fixed or dynamic ?

    Posted Jun 08, 2011 04:44 PM

    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.



  • 5.  RE: VMID fixed or dynamic ?

    Broadcom Employee
    Posted Jun 08, 2011 04:46 PM

    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



  • 6.  RE: VMID fixed or dynamic ?
    Best Answer

    Broadcom Employee
    Posted Jun 08, 2011 04:53 PM

    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



  • 7.  RE: VMID fixed or dynamic ?

    Broadcom Employee
    Posted Jun 08, 2011 05:02 PM

    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?!



  • 8.  RE: VMID fixed or dynamic ?

    Posted Jun 08, 2011 05:54 PM

    Pretty much, yeah - the APIs is the way that VMware wants you to do these things.