VMware Cloud Community
Sany_1973
Enthusiast
Enthusiast

Is it Possible to get vcenter/host info from .vmx file

Hi,

Is it possible to get the details for registered vcenter / host info from the VM's .vmx file?

Thanks

Tags (1)
0 Kudos
5 Replies
LucD
Leadership
Leadership

Afaik, that would require accessing the vCenter database.

And the schema for the vCenter databse is not public.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
Sany_1973
Enthusiast
Enthusiast

Just Checking, when we register a VM to a vCenter, it is writing any info about the vCenter/Host to .VMX file (like UUID)

0 Kudos
LucD
Leadership
Leadership

Yes, afaik the vc.uuid is changed.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
Sany_1973
Enthusiast
Enthusiast

So by looking a vmx file, we can't say whether it registered with a vCenter?

0 Kudos
LucD
Leadership
Leadership

No, when you unregister a VM, the vc.uuid entry is not cleared or removed.
Only when it will be registered to a vCenter will the vc.uuid value be updated.

The only thing you can conclude from the vc.uuid is that the VM is or was registered to a vCenter.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference