VMware {code} Community
manfred9999
Contributor
Contributor
Jump to solution

Find VM object on ESX Host by vmx fullpath

Hello

I have the location of the VM ( directory/vm.vmx)

Is it possible to find the VM Object (Virtualmachin) on the ESX Host by this vmx full path?

Regards

Manfred

Reply
0 Kudos
1 Solution

Accepted Solutions
lamw
Community Manager
Community Manager
Jump to solution

Yep, take a look at FindByDatastorePath which allows you to search by datastore path and returns a VM MOR

=========================================================================

William Lam

VMware vExpert 2009,2010

VMware scripts and resources at:

Twitter: @lamw

Getting Started with the vMA (tips/tricks)

Getting Started with the vSphere SDK for Perl

VMware Code Central - Scripts/Sample code for Developers and Administrators

VMware Developer Community

If you find this information useful, please award points for "correct" or "helpful".

View solution in original post

Reply
0 Kudos
1 Reply
lamw
Community Manager
Community Manager
Jump to solution

Yep, take a look at FindByDatastorePath which allows you to search by datastore path and returns a VM MOR

=========================================================================

William Lam

VMware vExpert 2009,2010

VMware scripts and resources at:

Twitter: @lamw

Getting Started with the vMA (tips/tricks)

Getting Started with the vSphere SDK for Perl

VMware Code Central - Scripts/Sample code for Developers and Administrators

VMware Developer Community

If you find this information useful, please award points for "correct" or "helpful".

Reply
0 Kudos