Score:0

VMWAre OVFtool export fails with error "Failed to create directory"

cn flag

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://[email protected]: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://[email protected]

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

and determined that source path "vi://[email protected]: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

Score:1
tr flag

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.

Yogesh Devi avatar
cn flag
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 -
Score:0
cn flag

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

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.