Virtualmachine Unique Identity throughout VirtualCenter

I hope this may be a simple question and it is very helpful if somebody can clarify this to me.

The following is the environment,

1. We have a Virtual Center and a ESX server connected to it. ESX server has four virtual machines running on it.

2. Using Java API to connect Virtual Center and ESX server.


I wrote a program to monitor the virtual machines running on ESX server and storing the data in Mysql database with the key of VirtualMachine MOR id.Fi

First I had connected to ESX server and collected all the information of VMs. The list returned with MORs (vm16,vm32,vm48 and vm64).

It was working fine.

Secondly, I added that ESX host to the VirtualCenter.

Now, connected to virtualcenter and try to get the information about the same VMS, the list of MOR returned was (vm128,vm256..)

Now because of the change in the MOR not able to store the data in the correct record.

Can I any one tell me how can I uniquely identify VMs even when It is migrated from one ESX to other and also in the scenario one like above ?

0 Kudos
2 Replies
Hot Shot
Hot Shot

Haven't tested this one out, but I thought it was true.

Have you tried to see if the config.uuid would remain static through vmotions?


0 Kudos

Yup ...

UUID of a VM remains static even after VMotions ...

, You can try with this option which is to identify VMs with their UUID. If you want to be very sure, try +VM Name && VM UUID + this condition should always identify your VM uniquely.

0 Kudos