axxyhtrx / pysphere

Automatically exported from code.google.com/p/pysphere
0 stars 0 forks source link

vCenter appliance, server.get_vm_by_path() not working #67

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
With vCenter(5.5) installed on Windows everything is working fine:

>>> server.get_vm_by_path("[datastore1] linux/linux.vmx").get_property('name')
'LINUXVM'

But same thing will not work with vCenter(5.1) appliance

>>> server.get_vm_by_path("[datastore1] linux/linux.vmx").get_property('name')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.6/site-packages/pysphere-0.1.7-py2.6.egg/pysphere/vi_server.py", line 291, in get_vm_by_path
    FaultTypes.OBJECT_NOT_FOUND)
pysphere.resources.vi_exception.VIException: [Object Not Found]: Could not find 
a VM with path '[datastore1] linux/linux.vmx'

But command 

>>> print server.get_registered_vms()

Is working on  vCenter appliance and I see object("[datastore1] 
linux/linux.vmx") it is reporting missing.

Any ideas about this ?

>>> print server.get_api_version()
5.1

Original issue reported on code.google.com by sta...@gmail.com on 15 Jul 2015 at 8:22