myEsxiUrl=127.0.0.1
myEsxiUser=root
myEsxiPass=Tarantu95
myFtpUrl=192.168.195.6
myFtpUser=vmware
myFtpPass=secret
#ovflocation=/vmfs/volumes/RAID10/vmware-ovftool/ovftool && cd $ovflocation && alias ovftool=$ovflocation && cat /etc/profile.local && wget "ftp://$myFtpUser:$myFtpPass@$myFtpUrl/etc/VSO/VMware-ovftool-4.2.0-5965791-lin.x86_64.tar"
mySourceVM=Windows_Svr_Std_and_DataCtr_2012_R2_64Bit_English_-4_MLF_X19-82891 && ovftool --noSSLVerify "vi://$myEsxiUser:$myEsxiPass@$myEsxiUrl/$mySourceVM" "/vmfs/volumes/etc/VSO/$mySourceVM.ova" && chmod 777 /vmfs/volumes/etc/VSO/$mySourceVM.ova && ovftool /vmfs/volumes/etc/VSO/$mySourceVM.ova
mySourceVM=Win_Server_STD_CORE_2016_64Bit_English_-4_DC_STD_MLF_X21-70526 && ovftool --noSSLVerify "vi://$myEsxiUser:$myEsxiPass@$myEsxiUrl/$mySourceVM" "/vmfs/volumes/etc/VSO/$mySourceVM.ova" && chmod 777 /vmfs/volumes/etc/VSO/$mySourceVM.ova && ovftool /vmfs/volumes/etc/VSO/$mySourceVM.ova
mySourceVM=Win_Server_STD_CORE_2019_64Bit_English_DC_STD_MLF_X21-96581 && ovftool --noSSLVerify "vi://$myEsxiUser:$myEsxiPass@$myEsxiUrl/$mySourceVM" "/vmfs/volumes/etc/VSO/$mySourceVM.ova" && chmod 777 /vmfs/volumes/etc/VSO/$mySourceVM.ova && ovftool /vmfs/volumes/etc/VSO/$mySourceVM.ova
mySourceVM=Windows_Svr_Std_and_DataCtr_2012_R2_64Bit_German_-4_MLF_X19-82895 && ovftool --noSSLVerify "vi://$myEsxiUser:$myEsxiPass@$myEsxiUrl/$mySourceVM" "/vmfs/volumes/etc/VSO/$mySourceVM.ova" && chmod 777 /vmfs/volumes/etc/VSO/$mySourceVM.ova && ovftool /vmfs/volumes/etc/VSO/$mySourceVM.ova
mySourceVM=Win_Server_STD_CORE_2016_64Bit_German_-4_DC_STD_MLF_X21-70528 && ovftool --noSSLVerify "vi://$myEsxiUser:$myEsxiPass@$myEsxiUrl/$mySourceVM" "/vmfs/volumes/etc/VSO/$mySourceVM.ova" && chmod 777 /vmfs/volumes/etc/VSO/$mySourceVM.ova && ovftool /vmfs/volumes/etc/VSO/$mySourceVM.ova
mySourceVM=Win_Server_STD_CORE_2019_64Bit_German_DC_STD_MLF_X21-96583 && ovftool --noSSLVerify "vi://$myEsxiUser:$myEsxiPass@$myEsxiUrl/$mySourceVM" "/vmfs/volumes/etc/VSO/$mySourceVM.ova" && chmod 777 /vmfs/volumes/etc/VSO/$mySourceVM.ova && ovftool /vmfs/volumes/etc/VSO/$mySourceVM.ova
ovftool -n=myVM -dm=thin -ds=NVME2 "ftp://$myFtpUser:$myFtpPass@$myFtpUrl/etc/VSO/$mySourceVM.ova" "vi://$myEsxiUser:$myEsxiPass@$myEsxiUrl"
# some more notes and commands
vim-cmd vmsvc/getallvms
vim-cmd vmsvc/power.on 3
# download ovftool tar to local storage, extract ovftool content to /vmfs/volumes/datastore1, deploy OVF from remote HTTP source, power on VM
wget http://air.primp-industries.com/vmware-ovftool.tar.gz -O /vmfs/volumes/datastore1/vmware-ovftool.tar.gz
tar -xzvf /vmfs/volumes/datastore1/vmware-ovftool.tar.gz -C /vmfs/volumes/datastore1/
/vmfs/volumes/datastore1/vmware-ovftool/ovftool -dm=thin -ds=datastore1 "--net:access333=VM Network" "http://air.primp-industries.com/SLES-VM/SLES-VM.ovf" "vi://$myEsxiUser:vmware123@172.30.0.192"
vim-cmd vmsvc/power.on $(vim-cmd vmsvc/getallvms | grep "SLES-VM" | awk '{print $1}')
# https://docs.ansible.com/ansible/latest/user_guide/windows_setup.html
# https://support.rackspace.com/how-to/enable-file-downloads-in-internet-explorer/
# https://www.virtuallyghetto.com/2015/02/quick-tip-poor-mans-history-command-in-esxi.html
# https://www.virtuallyghetto.com/2012/05/how-to-deploy-ovfova-in-esxi-shell.html
# https://niktips.wordpress.com/tag/ovf-tool/
# https://www.virtuallyghetto.com/2012/05/how-to-deploy-ovfova-in-esxi-shell.html
# https://www.vmware.com/support/developer/ovf/
# https://www.vmware.com/support/developer/ovf/ovftool-430-userguide.pdf
# http://www.virtuallyghetto.com/?s=OVF+Tool
# https://kb.vmware.com/s/article/1038709?lang=en_US
# https://www.virtual-odyssey.com/2017/11/26/install-vmware-ovftool-ubuntu/
# https://cstan.io/?p=8972&lang=en
