Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

vmware

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
like image 687
user3720435 Avatar asked Feb 06 '23 12:02

user3720435


1 Answers

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:.

like image 109
ergohack Avatar answered Apr 09 '23 03:04

ergohack