Vmware-iso failing with "Target already exists"

Hi,

I have been testing VMWare ESXi deployments and it’s been going very well. I made some final tweaks and all of a sudden I get this:

==> vm_name: Exporting virtual machine…
vm_name: Executing: ovftool --noSSLVerify=true --skipManifestCheck -tt=ovf vi://root:%3Cpassword%3E@192.168.4.5/vm_name output/live-server/vm_name.ovf
==> vm_name: Error performing ovftool export: VMware error: Opening VI source: vi://root@192.168.4.5:443/vm_name
==> vm_name: Error: Target already exists: vm_name
==> vm_name: Completed with errors
==> vm_name: Provisioning step had errors: Running the cleanup provisioner, if present…
==> vm_name: Destroying virtual machine…
Build ‘vm_name’ errored after 14 minutes 2 seconds: Error performing ovftool export: VMware error: Opening VI source: vi://root@192.168.4.5:443/vm_name
Error: Target already exists: vm_name.ovf
Completed with errors

I have replaced the VMs name since it’s a “production” test :slight_smile:

Thanks

Sounds like ovftool is failing because an image with that name already exists on your local machine. Try deleting the image from your local machine before running the build.