VMware Cloud Community
baddspellar
Contributor
Contributor

Unable to export an ova file, either with web client or ovftool

I'm running esxi server 6.5.0 Update 2 (Build 8294253)

I stumbled upon the bug in which I get the "Failed - Network error" message when I attempt to export my ova file.

I search and found the recommended solution is to use ovftool. For example

Export VM ESXI 6.7 erro

When I do that, it still doesn't export my file.

Here's the output:

C:\Program Files\VMware\VMware OVF Tool>ovftool.exe -dm=thin "vi://10.160.78.210/myvm" c:\temp\myvm.ova

Enter login information for source vi://10.160.78.210/

Username: root

Password: ********

Opening VI source: vi://root@10.160.78.210:443/myvm

Opening VI source: vi://root@10.160.78.210:443/myvm

The two

"Opening VI source: vi://root@10.160.78.210:443/myvm"

outputs come quickly, and the program exits but saves nothing. I get no error messages at all.

This ova has two disks, both thin-provisioned.

I know it finds the vm, because if I enter a bogus name, I get a helpful error message. e.g.

C:\Program Files\VMware\VMware OVF Tool>ovftool.exe -dm=thin "vi://10.160.78.210/foo" c:\temp\foo.ova

Enter login information for source vi://10.160.78.210/

Username: root

Password: ********

Opening VI source: vi://root@10.160.78.210:443/foo

Error: Locator does not refer to an object:

Here's my ovftool version:

C:\Program Files\VMware\VMware OVF Tool>ovftool.exe --version

VMware ovftool 4.3.0 (build-7948156)

I'm at a loss. Can anyone suggest a path forward?

Thanks

Tags (2)
0 Kudos
3 Replies
a_p_
Leadership
Leadership

Try to see whether the logging option will provide more insight on what's wrong, e.g.

ovftool.exe --X:logFile=ovftool-log.txt --X:logLevel=verbose "vi://10.160.78.210/myvm" c:\temp\myvm.ova

Note that the diskMode option "-dm=thin" is only relevant for deploying an OVF file.

If this doesn't help, please attach the ovftool's log file, as well as the VM's configuration (.vmx) file to a reply post.

André

baddspellar
Contributor
Contributor

Thank you for this tip.

In looking through the logs it appears that the tool uses curl, and curl was having trouble with the https certificate my IT guy put on my server. He had used "localhost" as the CN, and it was self-signed. I installed a proper certificate, and export was successful.

0 Kudos
zoeypup
Contributor
Contributor

I think you are missing the string "vm" or "host" in the path.  I found it the hard way by doing a list: (using root account for simplicity) (ovftool version 12)

ovftool --X:logFile=ovftool-log.txt --X:logLevel=verbose vi://root@vmesxvc/<DatacenterName>

Enter login information for source vi://xx.xx.xx.xx/

Username: root

Password: *********

Error: Found wrong kind of object (Datacenter). Possible completions are:

  vm/

  host/

The correct path for your VM will be something like this:

• to export: (double quotes are preferred since some folders or vmnames have spaces)

ovftool --noSSLVerify "vi://root@vmesxvc/<DatacenterName>/vm/<subfoldername>/<vmname>"   "<vmname>.ova"

Enter login information for source vi://xx.xx.xx.xx/

Username: root

Password: *********

Opening VI source: vi://root@xx.xx.xx.xx:443/<DatacenterName>/vm/<subfoldername>/<vmname>

Opening VI source: vi://root@xx.xx.xx.xx:443/<DatacenterName>/vm/<subfoldername>/<vmname>

Opening OVA target: <vmname>.ova

Writing OVA package: <vmname>.ova

Transfer Completed

Completed successfully

• OVA export takes 10 minutes for an OVA file of size 5GB compressed, size in datastore is 10GB.  OVF export would have used 20GB and prone to network errors (some of the large files could be missing and out of sequence)

• The OVA file size is the same if the OVA export was done in version 5.5 (not possible in 6.5 and above anymore)

I think this is poorly documented at the moment by vmware.  The reason why this is not available in version 6.5 and above is because in the past it puts a lot of resource overhead in the vcenter server, this way the resource overhead is passed on to the windows machine via ovtfool (not a typo Smiley Happy)

I hope this helps

0 Kudos