I currently trying to setup another envirnoment on Centos 7. My idea is to create a Esxi template by using redhat or centos 7 VM in vcenter and reproduce templates.
4- I am having the following error , please also find my json file at the bottom.
packer build esxi-template.json
vmware-iso output will be in this color.
Build 'vmware-iso' errored: Couldn't find VMware tools for 'linux'! VMware often downloads these
tools on-demand. However, to do this, you need to create a fake VM
of the proper type then click the 'install tools' option in the
VMware GUI.
==> Some builds didn't complete successfully and had errors:
--> vmware-iso: Couldn't find VMware tools for 'linux'! VMware often downloads these
tools on-demand. However, to do this, you need to create a fake VM
of the proper type then click the 'install tools' option in the
VMware GUI.
==> Builds finished but no artifacts were created.
################################## JSON FILE cat esxi-template.json ##################
{
"provisioners": [
{
"type": "shell",
"execute_command": "echo 'vagrant' | {{.Vars}} sudo -S -E bash '{{.Path}}'",
"script": "scripts/ansible.sh"
}
],
"builders": [
{
"type": "vmware-iso",
"boot_command": [
"<tab> text ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/ks.cfg<enter><wait>"
],
"boot_wait": "10s",
"disk_size": 81920,
"guest_os_type": "centos-64",
"headless": true,
"http_directory": "http",
"iso_urls": [
"CentOS-7-x86_64-Minimal-1708.iso",
"CentOS-7-x86_64-Minimal-1708.iso"
],
"iso_checksum_type": "sha256",
"iso_checksum": "bba314624956961a2ea31dd460cd860a77911c1e0a56e4820a12b9c5dad363f5",
"ssh_username": "vagrant",
"ssh_password": "vagrant",
"ssh_port": 22,
"ssh_wait_timeout": "10000s",
"shutdown_command": "echo 'vagrant'|sudo -S /sbin/halt -h -p",
"remote_host": "192.168.2.50",
"remote_datastore": "datastore1",
"remote_username": "root",
"remote_password": "somepass",
"ssh_username": "root",
"ssh_password": "vagrant",
"ssh_wait_timeout": "60m",
"tools_upload_flavor": "linux",
"http_directory": ".",
"boot_wait": "5s",
"vmx_data": {
"memsize": "2048",
"numvcpus": "2",
"ethernet0.present": "TRUE",
"ethernet0.startConnected": "TRUE",
"ethernet0.virtualDev": "e1000",
"ethernet0.addressType": "generated",
"ethernet0.generatedAddressOffset": "0",
"ethernet0.wakeOnPcktRcv": "FALSE"
},
"tools_upload_flavor": "linux",
"vm_name": "vmware-template",
"vmx_data": {
"cpuid.coresPerSocket": "2",
"memsize": "2048",
"numvcpus": "2"
}
}
],
"post-processors": [
{
"type": "vsphere",
"host": "192.168.2.50",
"insecure": true,
"username": "root",
"password": "somepass",
"datacenter": "some",
"vm_name": "packer-build-centos7",
"vm_folder": "vagrant",
"datastore": "datastore1",
"cluster": "some"
}
]
}