Hello all,
I am trying to build a packer image on vsphere and I`m getting this error
Did not find any suggestions on google and I do not know what is the ‘VERSION’ variable that it expected.
==> vmware-iso: Unexpected format for VERSION entry : []
Packer v1.6.3
on MacOS
vmware-fusion: 12.0.0-16880131
➜ packer build -debug -var-file=$HOME/.credentials.json -var-file=centos74.json centos.json
Debug mode enabled. Builds will not be parallelized.
vmware-iso: output will be in this color.
==> vmware-iso: Pausing after run of step 'StepPrepareTools'. Press enter to continue.
==> vmware-iso: Retrieving ISO
==> vmware-iso: Trying http://mirror.globo.com/centos/7/isos/x86_64/CentOS-7-x86_64-Minimal-2003.iso
==> vmware-iso: Trying http://mirror.globo.com/centos/7/isos/x86_64/CentOS-7-x86_64-Minimal-2003.iso?checksum=sha256%3A659691c28a0e672558b003d223f83938f254b39875ee7559d1a4a14c79173193
==> vmware-iso: http://mirror.globo.com/centos/7/isos/x86_64/CentOS-7-x86_64-Minimal-2003.iso?checksum=sha256%3A659691c28a0e672558b003d223f83938f254b39875ee7559d1a4a14c79173193 => /Users/fabio.souza/projetos/luizalabs/ipet/base-images/k8s/vsphere/packer_cache/99b8a095dc514f8cf9d593976d8c2af947f63873.iso
==> vmware-iso: Pausing after run of step 'StepDownload'. Press enter to continue. ==> vmware-iso: Configuring output and export directories...
==> vmware-iso: Pausing after run of step 'StepOutputDir'. Press enter to continue.
==> vmware-iso: Pausing after run of step 'StepCreateFloppy'. Press enter to continue.
==> vmware-iso: Pausing after run of step 'StepCreateCD'. Press enter to continue.
==> vmware-iso: Pausing after run of step 'StepRemoteUpload'. Press enter to continue.
==> vmware-iso: Pausing after run of step 'StepRemoteUpload'. Press enter to continue.
==> vmware-iso: Pausing after run of step 'StepRemoteUpload'. Press enter to continue.
==> vmware-iso: Creating required virtual machine disks
==> vmware-iso: Pausing after run of step 'StepCreateDisks'. Press enter to continue.
==> vmware-iso: Building and writing VMX file
==> vmware-iso: Unexpected format for VERSION entry : []
==> vmware-iso: Pausing before cleanup of step 'StepCreateDisks'. Press enter to continue.
==> vmware-iso: Pausing before cleanup of step 'StepRemoteUpload'. Press enter to continue.
==> vmware-iso: Pausing before cleanup of step 'StepRemoteUpload'. Press enter to continue.
==> vmware-iso: Pausing before cleanup of step 'StepRemoteUpload'. Press enter to continue.
==> vmware-iso: Pausing before cleanup of step 'StepCreateCD'. Press enter to continue.
==> vmware-iso: Pausing before cleanup of step 'StepCreateFloppy'. Press enter to continue.
==> vmware-iso: Pausing before cleanup of step 'StepOutputDir'. Press enter to continue.
==> vmware-iso: Deleting output directory...
==> vmware-iso: Pausing before cleanup of step 'StepDownload'. Press enter to continue.
==> vmware-iso: Pausing before cleanup of step 'StepPrepareTools'. Press enter to continue.
Build 'vmware-iso' errored after 14 seconds 73 milliseconds: Unexpected format for VERSION entry : []
==> Wait completed after 14 seconds 73 milliseconds
==> Some builds didn't complete successfully and had errors:
--> vmware-iso: Unexpected format for VERSION entry : []
==> Builds finished but no artifacts were created.
➜
```
here is my configs:
```
{
"_comment": "CentOS Template. MOST BE USED with var-file template",
"variables": {
"home": "{{env `HOME`}}"
},
"builders": [
{
"type": "vmware-iso",
"guest_os_type": "{{ user `vmware_guest_os_type` }}",
"tools_upload_flavor": "linux",
"version": "{{ user `vmware_tools_version` }}",
"disk_size": "{{ user `disk_size` }}",
"iso_url": "{{ user `iso_url` }}",
"iso_checksum": "{{ user `iso_checksum` }}",
"shutdown_command": "{{ user `shutdown_command` }}",
"ssh_username": "{{ user `ssh_username` }}",
"ssh_password": "{{ user `ssh_password` }}",
"ssh_wait_timeout": "{{ user `ssh_wait_timeout` }}",
"headless": "{{ user `headless` }}",
"vm_name": "{{ user `vm_name` }}",
"vmx_data": {
"mem.hotadd": "TRUE",
"virtualhw.version" : "10",
"vcpu.hotadd": "TRUE",
"scsi0.virtualdev": "pvscsi",
"ethernet0.present": "TRUE",
"ethernet0.startConnected": "TRUE",
"ethernet0.addressType": "generated",
"ethernet0.generatedAddressOffset": "0",
"ethernet0.wakeOnPcktRcv": "FALSE"
},
"vmx_data_post": {
"memsize": "{{ user `vmx_data_post_memsize` }}",
"numvcpus": "{{ user `vmx_data_post_numvcpus` }}"
},
"http_directory": "{{ user `http_directory` }}",
"boot_command": [
"<tab> text ks=http://{{ .HTTPIP }}:{{ .HTTPPort}}/{{ user `kickstart_cfg` }}<enter>"
],
"output_directory": "{{ user `artifact_root` }}/{{ user `vm_name` }}/vmware"
}
],
"provisioners": [
{
"type": "shell",
"execute_command": "{{.Vars}} bash '{{.Path}}'",
"scripts": [
"{{ user `script_directory` }}/prereqs.sh"
]
},
{
"type": "ansible",
"playbook_file": "ansible/common.yml",
"extra_arguments": [
"--vault-password-file={{ user `home` }}/.packer_pass", "-vvvv"
]
},
{
"type": "shell",
"execute_command": "{{.Vars}} bash '{{.Path}}'",
"scripts": [
"{{ user `script_directory` }}/vmware.sh",
"{{ user `script_directory` }}/update.sh",
"{{ user `script_directory` }}/cleanup.sh"
]
}
],
"post-processors": [
{
"type": "vsphere",
"keep_input_artifact": true,
"username": "{{ user `vsphere_username` }}",
"password": "{{ user `vsphere_password` }}",
"vm_name": "packer-build-{{ user `vm_name`}}-{{user `packer_template_version`}}",
"host": "{{ user `vsphere_host` }}",
"datacenter": "{{ user `vsphere_datacenter` }}",
"cluster": "{{ user `vsphere_cluster` }}",
"datastore": "{{ user `vsphere_datastore` }}",
"disk_mode": "thin",
"vm_folder": "/Templates/k8s",
"vm_network": "{{ user `vsphere_network` }}",
"insecure": "true"
}
]
}
```