I am building a Docker Container that runs the 4.2.0 Linux 64 bit Ovftool in an OpenSuse 42.3/SLES12 SP3 environment and when I run my command inside the container I get the following error and segfault:
2018-12-10T23:44:16.520Z verbose OVFTool[7F63529AE7C0] [Originator@6876 sub=Default] Using VIM API version: 6.0
2018-12-10T23:44:16.522Z verbose OVFTool[7F63529AE7C0] [Originator@6876 sub=Default] Determine if server is a standalone host or vpxd
2018-12-10T23:44:16.522Z verbose OVFTool[7F63529AE7C0] [Originator@6876 sub=Default] VI API type: VirtualCenter
2018-12-10T23:44:16.522Z verbose OVFTool[7F63529AE7C0] [Originator@6876 sub=Default] Login to server based on username and password
2018-12-10T23:44:16.522Z verbose OVFTool[7F63529AE7C0] [Originator@6876 sub=Default] Setting VI connection message locale (via login) to:
2018-12-10T23:44:16.523Z verbose OVFTool[7F63529AE7C0] [Originator@6876 sub=Default] [SigHandler] Signal caught: 6
Terminate process signal received - aborting operation2018-12-10T23:44:16.523Z panic OVFTool[7F63529AE7C0] [Originator@6876 sub=Default]
-->
--> Panic: PANIC bora/lib/unicode/unicodeCommon.c:329
-->
--> Backtrace:
--> [backtrace begin] product: VMware Workstation, version: e.x.p, build: build-5965791, tag: OVFTool, cpu: x86_64, os: linux, buildType: release
--> backtrace[00] libvmacore.so[0x0036C8E4]: Vmacore::System::Stacktrace::CaptureFullWork(unsigned int)
--> backtrace[01] libvmacore.so[0x001C7E64]: Vmacore::System::SystemFactoryImpl::CreateBacktrace(Vmacore::Ref<Vmacore::System::Backtrace>&)
--> backtrace[02] libvmacore.so[0x00369954]
--> backtrace[03] libvmacore.so[0x00369A5D]: Vmacore::PanicExit(char const*)
--> backtrace[04] libvmacore.so[0x001952F4]
--> backtrace[05] libvmacore.so[0x00195398]
--> backtrace[06] ovftool.bin[0x00442905]
--> backtrace[07] ovftool.bin[0x00229F40]
--> backtrace[08] ovftool.bin[0x0022A0F1]
--> backtrace[09] ovftool.bin[0x0025DD17]
--> backtrace[10] ovftool.bin[0x0025F93D]
--> backtrace[11] ovftool.bin[0x001CF44F]
--> backtrace[12] ovftool.bin[0x001577E7]
--> backtrace[13] libc.so.6[0x00020725]
--> backtrace[14] ovftool.bin[0x00160BA9]
--> [backtrace end]
Aborted (core dumped)
However when I run the exact same command I am able to deploy the OVA Template just fine to my vCenter. I am running the command with the following parameters (I have deleted the password related args etc).
ovftool --X:logToConsole=True --X:logLevel="verbose" --targetSSLThumbprint=XXX --diskMode=thin -ds=03_data --name=myTemplate --network="VM Network" --overwrite myTemplate.ova vi://MY_USER_NAME:MY_PASSWORD@myVcenter.com/ImageBuilding/host/TestCluster/cs333333
My theory on why it's not working is that certain Environment Variables or Libraries are missing inside my container however I have not been able to identify which ones are erroring out exactly.
Was able to figure out what the issue was. Turns out the Container Image I am using was missing the following Library:
glibc-locale
After installing this OVFTool was able to execute properly.
If I use $LANG=POSIX. I get the following Error message:
2018-12-11T02:09:57.802Z verbose OVFTool[7F8A28DB17C0] [Originator@6876 sub=Default] [SSL_DB] Using /root/.ovftool.ssldb as SSL DB
Could not load a transcoding service
2018-12-11T02:09:57.807Z error OVFTool[7F8A28DB17C0] [Originator@6876 sub=Default] Alert:WARNING: This application is not using QuickExit(). The exit code will be set to 0.@ bora/vim/lib/vmacore/main/service.cpp:181
--> Backtrace:
--> [backtrace begin] product: VMware Workstation, version: e.x.p, build: build-5965791, tag: OVFTool, cpu: x86_64, os: linux, buildType: release
--> backtrace[00] libvmacore.so[0x0036C8E4]: Vmacore::System::Stacktrace::CaptureFullWork(unsigned int)
--> backtrace[01] libvmacore.so[0x001C7E64]: Vmacore::System::SystemFactoryImpl::CreateBacktrace(Vmacore::Ref<Vmacore::System::Backtrace>&)
--> backtrace[02] libvmacore.so[0x0016C966]: Vmacore::Service::Alert(char const*, char const*, int)
--> backtrace[03] libvmacore.so[0x00199908]
--> backtrace[04] libc.so.6[0x00037869]
--> backtrace[05] libc.so.6[0x000378B5]
--> backtrace[06] libxerces-c-3.1.so[0x001A8E8C]: xercesc_3_1::PanicHandler::~PanicHandler()
--> backtrace[07] libxerces-c-3.1.so[0x001AB1E8]: xercesc_3_1::XMLPlatformUtils::panic(xercesc_3_1::PanicHandler::PanicReasons)
--> backtrace[08] libxerces-c-3.1.so[0x00357601]: xercesc_3_1::IconvGNUTransService::IconvGNUTransService(xercesc_3_1::MemoryManager*)
--> backtrace[09] libxerces-c-3.1.so[0x001AB327]: xercesc_3_1::XMLPlatformUtils::makeTransService()
--> backtrace[10] libxerces-c-3.1.so[0x001AADA3]: xercesc_3_1::XMLPlatformUtils::Initialize(char const*, char const*, xercesc_3_1::PanicHandler*, xercesc_3_1::MemoryManager*)
--> backtrace[11] ovftool.bin[0x001D555B]
--> backtrace[12] ovftool.bin[0x001CE99A]
--> backtrace[13] ovftool.bin[0x001577E7]
--> backtrace[14] libc.so.6[0x00020725]
--> backtrace[15] ovftool.bin[0x00160BA9]
--> [backtrace end]
Looking through the vmware-ovftool-log I found the following error:
Unicode_AllocWithLength: Couldn't convert invalid buffer [1\x00B\x00u\x00s\x002\x00P\x00e\x00p\x00$\x00] from UTF-16LE to Unicode.
Was able to figure out what the issue was. Turns out the Container Image I am using was missing the following Library:
glibc-locale
After installing this OVFTool was able to execute properly.