0

I am trying to export a VM using OVFtool running on a windows server

ovftool.exe --allowExtraConfig  --noImageFiles --noSSLVerify "vi://xx.xx.xx.xx/myVM"    "c:\myPath"
Enter login information for source vi://xx.xx.xx.xx/
Username: myid
Password: ************
Opening VI source: vi://myid@xx.xx.xx.xx:443/myVM
Opening OVF target: "C:\mypath"
Error: Failed to create directory: "c:\myPath"
Warning:
- ExtraConfig option 'nvram' is not allowed, will skip it.
- ExtraConfig options exists in source. 

I interrogated vi://myid@xx.xx.xx.xx

ovftool.exe  --noSSLVerify "vi://xx.xx.xx.xx/"

and determined that source path "vi://myid@xx.xx.xx.xx:443/myVM" is valid

I have permissions to create target path

I tried all conceivable OVFtool options --noSSLVerify --allowAllExtraConfig --noImageFiles without much avail

I also ensured there arent amy CD drives on my VMS pointing to images.

How do I debug this ?

Any inputs welcome

Thanks

Yogesh

Yogesh Devi
  • 161
  • 4

2 Answers2

1

you can use the logging options of ovftool for debugging, something like

ovftool.exe --X:logFile=ovftool-log.txt --X:logLevel=verbose ...

Use --help for more logging options.

For your particular case have you already created the output directory or not? Try to pre-create it. Also try to run ovftool.exe "as Administrator" to ensure that the process really has the expected permissions.

VFrontDe
  • 1,478
  • 8
  • 11
  • Thanks a lot @VFrontDe . Just Pre creating the directory does not help. I figured that the ovftool version that I am working with is unable to parse path spec on windows .. so I had to pre create the directory - and change directory to that path - and thereafter download witout specifying path . See the answer below - – Yogesh Devi Jan 04 '22 at 11:55
0

So I figured that ovftool seems to have challanges parsing the path names ( at least on windows ... and I am guessing owing to a bug . It could be problem dealing with drive names with : and/or reverse slashes ... )

I have a working solution with a simple tweak as follows that allows me to get my job done .

Basically pre create target directly manually and navigate to that path and then when running ovftool - spec just specify the VM name minus the path in the destination spec

cd  "c:\myPath"
ovftool.exe --allowExtraConfig  --noImageFiles --noSSLVerify "vi://xx.xx.xx.xx/myVM"  myVM
 

Cheers

Yogesh Devi
  • 161
  • 4