VMware Cloud Community
GordyNorth
Contributor
Contributor
Jump to solution

ovftool throws error "Error: Failed to open file: .\" when try to export to ovf

Hello,

I created a virtual machine in virtualbox which I then exported to OVA format using the export.

In VMWare player I then opened the OVA file. The VM opened, I was able to start the virtual machine and test it. All is working correctly.

I now wanted to export the VMWare virtual machine to a OVF format using the ovftool.

I run the ovftool providing the source and target, the ovftool is throwing a "Failed to open file" error no matter which source I provide. It is very frustrating since even in the verbose log there is no indication about which file the program is failing to find.

The verbose log is not very long so I will post it below.

What am I missing??

======= Verbose log

2018-12-27T23:27:15.862-05:00 verbose OVFTool[15156] [Originator@6876 sub=Default] [SSL_DB] Using C:\Users\Gordynorth\AppData\Roaming\VMware\ovftool_SSLDB as SSL DB

2018-12-27T23:27:15.887-05:00 verbose OVFTool[15156] [Originator@6876 sub=Default] Subscribing to signal: 2 (SIGINT)

2018-12-27T23:27:15.887-05:00 verbose OVFTool[15156] [Originator@6876 sub=Default] Subscribing to signal: 4 (SIGILL)

2018-12-27T23:27:15.887-05:00 verbose OVFTool[15156] [Originator@6876 sub=Default] Subscribing to signal: 22 (SIGABRT)

2018-12-27T23:27:15.887-05:00 verbose OVFTool[15156] [Originator@6876 sub=Default] Subscribing to signal: 8 (SIGFPE)

2018-12-27T23:27:15.887-05:00 verbose OVFTool[15156] [Originator@6876 sub=Default] Subscribing to signal: 15 (SIGTERM)

2018-12-27T23:27:15.887-05:00 verbose OVFTool[15156] [Originator@6876 sub=Default] Initializing progress

2018-12-27T23:27:15.887-05:00 verbose OVFTool[15156] [Originator@6876 sub=Default] OvfTool Version: VMware ovftool 4.3.0 (build-10104578)

2018-12-27T23:27:15.888-05:00 verbose OVFTool[15156] [Originator@6876 sub=Default] Using home directory: C:\Users\Gordynorth\AppData\Roaming\VMware\ovftool.cfg

2018-12-27T23:27:15.894-05:00 verbose OVFTool[15156] [Originator@6876 sub=Default] Curl Version: 7.59.0

2018-12-27T23:27:15.894-05:00 verbose OVFTool[15156] [Originator@6876 sub=Default] Done initializing libs

2018-12-27T23:27:15.894-05:00 verbose OVFTool[15156] [Originator@6876 sub=Default] Determining source

2018-12-27T23:27:15.895-05:00 verbose OVFTool[15156] [Originator@6876 sub=Default] Determining target

2018-12-27T23:27:15.895-05:00 verbose OVFTool[15156] [Originator@6876 sub=Default] Getting source

2018-12-27T23:27:15.896-05:00 verbose OVFTool[15156] [Originator@6876 sub=Default] Opening source

2018-12-27T23:27:15.896-05:00 verbose OVFTool[15156] [Originator@6876 sub=Default] [Context::Context] started. No parameters.

2018-12-27T23:27:15.896-05:00 verbose OVFTool[15156] [Originator@6876 sub=Default] [VmxConsumerContext::VmxConsumerContext] started.

2018-12-27T23:27:15.897-05:00 verbose OVFTool[15156] [Originator@6876 sub=Default] .\ is not a file

2018-12-27T23:27:15.903-05:00 verbose OVFTool[15156] [Originator@6876 sub=Default] Backtrace:

--> [backtrace begin] product: VMware Workstation, version: e.x.p, build: build-10104578, tag: OVFTool, cpu: x86_64, os: windows, buildType: release

--> backtrace[00] vmacore.dll[0x001F6D2A]

--> backtrace[01] vmacore.dll[0x00064FD0]

--> backtrace[02] vmacore.dll[0x0006776E]

--> backtrace[03] vmacore.dll[0x0002533C]

--> backtrace[04] ovftool.exe[0x00013FB6]

--> backtrace[05] ovftool.exe[0x0003AF07]

--> backtrace[06] ovftool.exe[0x0023B3CF]

--> backtrace[07] ovftool.exe[0x0023F77B]

--> backtrace[08] ovftool.exe[0x0023EA12]

--> backtrace[09] ovftool.exe[0x00247641]

--> backtrace[10] ovftool.exe[0x000D16E7]

--> backtrace[11] ovftool.exe[0x00159CBF]

--> backtrace[12] ovftool.exe[0x000DAC7C]

--> backtrace[13] ovftool.exe[0x000DB954]

--> backtrace[14] ovftool.exe[0x003846C5]

--> backtrace[15] KERNEL32.DLL[0x00017E94]

--> backtrace[16] ntdll.dll[0x0006A251]

--> [backtrace end]

1 Solution

Accepted Solutions
a_p_
Leadership
Leadership
Jump to solution

That's strange, and to be honest, I don't really understand what's going on.

When looking at the vmware.log file, it looks like the .vmx file is only partly read (unitil tools.syncTime = "FALSE").

After some tests I changed

ide1:0.deviceType = "cdrom-image"

to

ide1:0.deviceType = "atapi-cdrom"

(as it was interpreted to this in the vmware.log file), and OFVTool seems to work now.

André

View solution in original post

7 Replies
a_p_
Leadership
Leadership
Jump to solution

Welcome to the Community,

please post the command(s) that you've tried so far.

André

0 Kudos
GordyNorth
Contributor
Contributor
Jump to solution

I tried to run the ovftool without providing an input path, I changed the path of the command line to the path of the vmx file:

D:\My Documents\Virtual Machines\MetadataManager>"C:\Program Files\VMware\VMware OVF Tool\ovftool"  --X:logFile=d:\gordon\downloads\temp\ovftool.log --X:logLevel=verbose MetadataManager.vmx D:\gordon\Downloads\temp\MetadataManager.ovf

Opening VMX source: MetadataManager.vmx

Error: Failed to open file: .\

Completed with errors

I first tried to run with the source/target paths:

C:\Program Files\VMware\VMware OVF Tool>ovftool --X:logFile=d:\gordon\downloads\temp\ovftool.log --X:logLevel=verbose "D:\My Documents\Virtual Machines\MetadataManager\MetadataManager.vmx" D:\gordon\Downloads\temp\MetadataManager.ovf

Opening VMX source: D:\My Documents\Virtual Machines\MetadataManager\MetadataManager.vmx

Error: Failed to open file: D:\My Documents\Virtual Machines\MetadataManager\

Completed with errors

Since my source file had spaces I enclosed the full path name in quotes.

0 Kudos
a_p_
Leadership
Leadership
Jump to solution

I just did some tests with OVFTool 4.3.0, and everything worked as expected, even with long file names (with spaces).

One difference is that I have the April build (7948156) installed, rather than the current U1 build.

  • Which host OS, and which VMware Wokstation version do you use?
  • Can you attach the VM's configuration (.vmx) file to a reply post?

André

0 Kudos
GordyNorth
Contributor
Contributor
Jump to solution

The host OS is Windows 10 v1809 the hosted VM is Ubuntu 18.4.

I am using VMware® Workstation 15 Player 15.0.2 build-10952284

I started the VM and then shut it down.

The VMX file is attached. There is an extended VMX file which I also attached.

I also attached the VMWare log file found in the same location as the vmx file.

0 Kudos
a_p_
Leadership
Leadership
Jump to solution

That's strange, and to be honest, I don't really understand what's going on.

When looking at the vmware.log file, it looks like the .vmx file is only partly read (unitil tools.syncTime = "FALSE").

After some tests I changed

ide1:0.deviceType = "cdrom-image"

to

ide1:0.deviceType = "atapi-cdrom"

(as it was interpreted to this in the vmware.log file), and OFVTool seems to work now.

André

GordyNorth
Contributor
Contributor
Jump to solution

Wow, who would have known that this would cause such an error.

So it looks like the cdrom-image was making the ovftool to search for an ISO cd but could not find one.

Thanks, all is working now, I was able to produce my OVF file.

palandia
Contributor
Contributor
Jump to solution

Thank you very much, I solved this issue by DELETING my CDROM device and I could export to OVA... later on I can ADD DEVICE again... 😉

0 Kudos