VMware Cloud Community
GLNVMguy
Contributor
Contributor

Error: Duplicate name when trying to create OVA/OVF

I cannot figure out the correct syntax to export a VM to an OVA/OVF into a datastore in ESXi. It is a stand alone host and NOT in vCenter.

C:\Users\>"C:\Program Files\VMware\VMware OVF Tool\ovftool.exe"  -ds=datastore1 vi://root:pass@192.168.1.1:443/MyVmFolder vi://root:pass@192.168.1.1:443

Opening VI source: vi://root@192.168.1.1:443/MyVmFolder

Opening VI target: vi://root@192.168.1.1:443/

Error: Duplicate name 'MyVmFolder' on target. Use --overwrite option to delete it.

Completed with errors

I have also tried the syntax for destination to include the host and Resource, but this is what I see:

C:\Users\>"C:\Program Files\VMware\VMware OVF Tool\ovftool.exe"  -ds=storage vi://root:pass@192.168.1.1:443/MyVmFolder vi://root:pass@192.168.1.1:443/VMFolder1/ExportedVM.ova

Opening VI source: vi://root@192.168.1.1:443/MyVmFolder

Error: Locator does not refer to an object: vi://root@192.168.1.1:443ha-datacenter/host/localhost./Resources/VMFolder1/ExportedVM.ova

Completed with errors

0 Kudos
1 Reply
dgold
Enthusiast
Enthusiast

Ovftool doesn't support your use-case. 

You can export a VM from a host to your local directory.  ovftool  vi://myip/myVM  localPath/myVM.ovf

You can also export a VM into another host.    ovftool  -ds=mydatastore  vi://myip/myVM  vi://anotherHost/

 * For import directly into host can't be managed by VC.

However it does not support export a VM from one host into another host with OVA/OVF format.

The syntax for supportes use-cases are pretty well documented in user guide.

0 Kudos