VMware Cloud Community
jshang
Contributor
Contributor

ovftool always get unexpected option error

Hi, Expert,

I am using ovftool on my windows 10 machine , the version is 4.3.0:

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

VMware ovftool 4.3.0 (build-7948156)

But everytime I am trying to deploy an ova I would get error unexpected option error:

PS C:\Program Files\VMware\VMware OVF Tool> .\ovftool.exe   -ds=datastore2(2) -n=router-vm "C:\Prog

ram Files\VMware\VMware OVF Tool\myrouter.ova" "vi://root:testpw@100.1.1.1"

Error: Unexpected option: C:\Program Files\VMware\VMware OVF Tool\csr1000v-ucmk9.16.12.1d.ova

Completed with errors

Any solution for this?

2 Replies
Alex_Romeo
Leadership
Leadership

Hi,

There could be some errors in generating the "OVA" package, try sevenzip to unpack it and then with ofvtools recreate the "OVA" package:

ovftool.exe \source_path\filename.ovf \target_path\filename.ova

When you're done, try your command again

.\ovftool.exe   -ds=datastore2(2) -n=router-vm "C:\Program Files\VMware\VMware OVF Tool\myrouter.ova" "vi://root:testpw@100.1.1.1"

ARomeo

Blog: https://www.aleadmin.it/
jshang
Contributor
Contributor

Sorry, I found the root cause. I need to put a quote on the datastore name because it has a character '('.

0 Kudos