Reese Knowledgebase

Exporting OVF Template via vSphere Client Times Out

View Kristian Reese's profile on LinkedIn


If you like this article, please +1 or Recommend via FB with the provided buttons above:

Article ID: 98
by: Reese K.
Posted: 21 Mar, 2013
Last updated: 05 Jul, 2013
Views: 10299

Failed to export Virtual Machine:  The operation timed out

The version of the ovftool this document covers is:

C:\Users\Kreese>ovftool -v
VMware ovftool 3.0.1 (build-801290)

This issue is well documented in the VMware Communities, to which I credit the solution I used to correct this time out.  Inevitably, the solution came down to using the ovftool to complete the OVF export:

The ovftool can be downloaded from VMware Communities with documentation and a download link here.  After it's installed, you may want to add the install path to your System Environment.  In short, to perform the export using this tool, open the Windows command line:

D:\ovftool "vi://esxhost.dev.com/emmruby.int.com" "D:\localfolder"
Please enter login information for souce vi://esxhost.dev.com/
Username: root
Password: ********
Opening VI source: vi://root@esxhost.dev.com:443/emmruby.int.com

Opening OVF taraget: D:\localfolder
Writing OVF package: D:\localfolder\emmruby.int.com\emmruby.int.com.ovf

Caveats:

curl error: couldn't connec to server:

"When you use URIs as locators, you must escape special characters using % followed by their ASCII hex value.
For instance, if you use a "@" in your password, it must be escaped with %40 as in vi://foo:b%40r@hostname,

and a slash in a Windows domain name (\) can be specified as %5c as in DOMAIN%5cUSERNAME"

syntax:

The example shown above worked for the version of the ovftool I have installed.  I have seen other posts noting the syntax as follows when you specify the server as the vCenter.  Note that the example above connects directly to the ESX host in which the virtual machine resides and I didn't have to specify the vmx file directly in the command.  Your results may vary, but inevitably, the documentation should be consulted for proper syntax.

ovftool "vi://<username>:<pass>@<server>/ha-datacenter?ds=\[datastore\] vm/vm.vmx" <local path>

Datacenter object not found:

This one was a bit tricky.  For me, I stopped using the vCenter as the server name passed to 'ovftool "vi://' and instead, used the ESX host on which the VM I was attempting to export resided.  You can also just specify the ESX host to get a list of valid objects

C:\Users\Kreese>ovftool "vi://esxhost.dev.com"
Please enter login information for source vi://esxhost.dev.com/
Username: root
Password: ********
Error: Found wrong kind of object (ResourcePool). Possible completions are:
  ad1.int.com
  jserv1.dte3.com
  mail2pod3.dte2.com
  mycdb1.dev.com
  emmruby.int.com


C:\Users\Kreese>

If you want to use your vCenter, don't forget about escaping special characters if you login with your domain credentials.  You'll notice you'll have to traverse from the Datacenter object all the way down:

C:\Users\Kreese>ovftool "vi://localhost"
Please enter login information for source vi://myvcenter.dev.com/
Username: mydomain%5ckreese
Password: *********
Error: Found wrong kind of object (Folder). Possible completions are:
  QTS/

C:\Users\Kreese>ovftool "vi://localhost/QTS"
Please enter login information for source vi://myvcenter.dev.com/
Username: mydomai%5ckreese
Password: *********
Error: Found wrong kind of object (Datacenter). Possible completions are:
  vm/
  host/

C:\Users\Kreese> so and and so forth...

This article was:   Helpful | Not Helpful
Prev   Next
Copying or moving the virtual machine and virtual disks     How to reformat local datastore ESXi 5.5

RSS