Hello Friends , 

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. 


1- Centos 7 VM. 
2- Packer ( 
packer  -v
1.2.1
3-  VMware packages installed , 

VMware-VIX-1.15.0-2985596.x86_64.bundle
VMware-ovftool-4.1.0-2459827-lin.x86_64.bundle
VMware-vSphere-CLI-5.0.0-615831.x86_64.tar.gz
VMware-Player-7.1.2-2780323.x86_64.bundle

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"

    }
    ]
}

-- 
This mailing list is governed under the HashiCorp Community Guidelines - 
https://www.hashicorp.com/community-guidelines.html. Behavior in violation of 
those guidelines may result in your removal from this mailing list.

GitHub Issues: https://github.com/mitchellh/packer/issues
IRC: #packer-tool on Freenode
--- 
You received this message because you are subscribed to the Google Groups 
"Packer" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to packer-tool+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/6460479d-d45a-4ac7-8a78-1efbcf23643c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to