So long story short I'm building a self deployment install using a Kickstart script that after the install uses wget to copyy the OVA files to the local data store and then deploys the OVAs, i have the script figured out however i can't seem to get ovftool installed on ESXi 5.5, everytime i try to run it i get the following error
env: can't execute 'bash': No such file or directory
this happens even after making the file executable, here's the whole command
~ # cd /tmp
/tmp # mkdir ovf
/tmp # cd ovf/
/tmp/ovf # wget http://10.10.10.4/OVA/VMware-ovftool-3.5.0-1274719-lin.x86_64.bundle
Connecting to 10.10.10.4 (10.10.10.4:80)
VMware-ovftool-3.5.0 100% |*******************************| 40125k 0:00:00 ETA
/tmp/ovf # chmod +x VMware-ovftool-3.5.0-1274719-lin.x86_64.bundle
/tmp/ovf # ./VMware-ovftool-3.5.0-1274719-lin.x86_64.bundle
env: can't execute 'bash': No such file or directory
/tmp/ovf # sh ./VMware-ovftool-3.5.0-1274719-lin.x86_64.bundle
env: can't execute 'bash': No such file or directory
/tmp/ovf # /bin/sh ./VMware-ovftool-3.5.0-1274719-lin.x86_64.bundle
env: can't execute 'bash': No such file or directory
The only solution I've found for running ovftool on ESXi 5.x is adding it to the ESXi boot image at (ESXi) installation using this article from Micheal Lustfield. It may not be relevant for your environment if you cannot reinstall ESXi but it works well for me for our Solutions Lab. The entire article provides more background.
Using this I can then deploy an OVA as part of the Kickstart firstboot section (example below, ovftool 4.0 only).
Travis
Notice in the above, I expect /ovf to exist. We're about to make it so! First we need to aquire ovftools. The VMware website has an ovftool download.
Download the 64bit version and install it.
Now we need to make /ovf and the directories inside of it.
mkdir /tmp/ovf mkdir /tmp/ovf/tools mkdir /tmp/ovf/files
Take the installed ovftools and stick them in the tools directory.
rsync -au /usr/lib/vmware-ovftool/* /tmp/ovf/tools/ sed -i 's/bash/sh/' /tmp/ovf/tools/ovftool
We leave an empty files directory. This is where the post install part of the kickstart file will dump the OVA files.
Now we need to turn the ovf directory into ovf-00.t00.
cd /tmp tar cf ovf.tar ovf gzip -9 ovf.tar mv ovf.tar.gz /mnt/usb/ovf-00.t00
Completely Automated ESXi Deployment - Michael Lustfield
Kickstart firstboot example:
#Import VCSA VM from local datastore, complete base network configuration
/vmfs/volumes/datastore1/ovf/tools/ovftool --acceptAllEulas --skipManifestCheck --noSSLVerify --diskMode=thin --name=den-VC01 --X:injectOvfEnv --powerOn --prop:vami.hostname=den-VC01.orange.corp --prop:vami.DNS.VMware_vCenter_Server_Appliance=172.17.2.1 --prop:vami.ip0.VMware_vCenter_Server_Appliance=172.17.2.11 --prop:vami.netmask0.VMware_vCenter_Server_Appliance=255.255.255.0 /vmfs/volumes/datastore1/ovf/files/VCSA-5.5.ova "vi://root:password@172.17.17.17"
Looks like the ovf tool directory (after its installed on linux) can simply be copied and bash changed to sh in the ovftool shell script
How to Deploy an OVF/OVA in the ESXi Shell | virtuallyGhetto