user3720435
user3720435

Reputation: 1476

ovftool export from esxi4 always locator not refer to an object error

I am using ESXI 4 and I have a VM what I want to export to OVF every week or two. I am trying to use ovf tools and write a script to make this easier. No matter what I do, I always get the error "locator does not refer to an object".

My setup is ESXI 4.
VM Name is: SUGARCRM
Datastore path is: [datastore1]/debian/debian.vmx

According the to the instructions, the following should work, but they do not work for me. What is the correct command syntax?

$ ovftool.exe vi://root:[email protected]/ha-datacenter/?ds=[datastore1]/debian/debian.vmx c:\vm\sugarcrm.ovf
Error: Locator does not refer to an object

$ ovftool.exe vi://root:[email protected]/ha-datacenter/vm/debian/debian c:\vm\sugarcrm.ovf
Error: Locator does not refer to an object

$ ovftool.exe vi://root:[email protected]/ha-datacenter/vm/debian/SUGARCRM c:\vm\sugarcrm.ovf
Error: Locator does not refer to an object

$ ovftool.exe vi://root:[email protected]/ha-datacenter/SUGARCRM c:\vm\sugarcrm.ovf
Error: Locator does not refer to an object

Upvotes: 5

Views: 11012

Answers (3)

Tony
Tony

Reputation: 1

my issue was the name of the host resource is case sensitive.

Upvotes: 0

Rahul Raghuvanshi
Rahul Raghuvanshi

Reputation: 56

I was getting same error: just added "host" before cluster name, and it worked fine:

ovftool vi://username:password@vc_ip/datacenter_name/host/cluster_name

Note that i don't have host folder inside datacenter_name

Upvotes: 0

ergohack
ergohack

Reputation: 1378

Before specifying a target, make sure the source is addressable. You can do this by starting at the root path with the server giving you the path options at each step of the way. E.g.:

ovftool.exe vi://root:[email protected]

You will get an Error:Found wrong kind of object (Folder|Datacenter). Possible completions are: Followed by a list of objects at that point in the path. Add one of the options to the path to continue your search for SURGARCRM, step by step.

Whatever the path is explicitly, you will eventually find the SUGARCRM object and have the full path. Then you can specify the second argument for the target local file or target vi:. The datastore argument (-ds|--datastore), if provided is relative to the target vi:.

Upvotes: 10

Related Questions