So after the previous post I am trying to make my json file dynamic by 
making anything I can into a variable.  However now I am getting the 
following error:

 output will be in this color.

Warnings for build '':

* Headless mode uses VNC to retrieve output. Since VNC has been disabled,
you won't be able to see any output.

Build '' errored: Failed creating VMware driver: Unable to initialize any 
driver for this platform. The errors
from each driver are shown below. Please fix at least one driver
to continue:
* exec: "vmware": executable file not found in $PATH
* exec: "vmware": executable file not found in $PATH
* exec: "vmplayer": executable file not found in $PATH
* exec: "vmplayer": executable file not found in $PATH


==> Some builds didn't complete successfully and had errors:
--> : Failed creating VMware driver: Unable to initialize any driver for 
this platform. The errors
from each driver are shown below. Please fix at least one driver
to continue:
* exec: "vmware": executable file not found in $PATH
* exec: "vmware": executable file not found in $PATH
* exec: "vmplayer": executable file not found in $PATH
* exec: "vmplayer": executable file not found in $PATH


==> Builds finished but no artifacts were created.

Here is what the config looks like now:
{ 
  "builders": [
    { 
      "name": "{{user `name`}}",
      "tools_upload_flavor": "{{user `tools_upload_flavor`}}",
      "headless": "true",
      "ovftool_options": [ "--allowExtraConfig", "--noSSLVerify=true", 
"true" ],
      "cpus": "1",
      "disk_size": "61440",
      "disk_type_id": "{{user `disk_type_id`}}",
      "guest_os_type": "{{user `guest_os_type`}}",
      "iso_checksum": 
"38d5d51d9d100fd73df031ffd6bd8b1297ce24660dc8c13a3b8b4534a4bd291c",
      "iso_checksum_type": "sha256",
      "iso_url": "http://10.150.1.9/isos/CentOS-7-x86_64-Minimal-1810.iso";,
      "keep_registered": true,
      "memory": "2048",
      "network_adapter_type": "{{user `network_adapter_type`}}",
      "disable_vnc": "true",
      "remote_datastore": "{{user `remote_datastore`}}",
      "remote_host": "{{user `remote_host`}}",
      "remote_username": "{{user `remote_username`}}",
      "remote_password": "{{user `remote_password`}}",
      "remote_type": "{{user `remote_type`}}",
      "skip_compaction": true,
      "usb": "true",
      "ssh_password": "{{user `ssh_password`}}",
      "ssh_username": "root",
      "ssh_wait_timeout": "60m",
      "boot_wait": "7s",
      "type": "vmware-iso",
      "vm_name": "{{user `vm_name`}}",
      "shutdown_command": "echo 'shutdown -P now'"
    }
  ]
}


I tried running the packer json file with the following syntax:
[andrew.meyer@automation01 vmware]$ packer build -var-file=variables.json 
centos-esxi.json 
Usage: packer build [options] TEMPLATE

  Will execute multiple builds in parallel as defined in the template.
  The various artifacts created by the template will be outputted.

Options:

  -color=false                  Disable color output. (Default: color)
  -debug                        Debug mode enabled for builds.
  -except=foo,bar,baz           Build all builds other than these.
  -only=foo,bar,baz             Build only the specified builds.
  -force                        Force a build to continue if artifacts 
exist, deletes existing artifacts.
  -machine-readable             Produce machine-readable output.
  -on-error=[cleanup|abort|ask] If the build fails do: clean up (default), 
abort, or ask.
  -parallel=false               Disable parallelization. (Default: parallel)
  -timestamp-ui                 Enable prefixing of each ui output with an 
RFC3339 timestamp.
  -var 'key=value'              Variable for templates, can be used 
multiple times.
  -var-file=path                JSON file containing user variables.
invalid value "variables.json" for flag -var-file: Error reading variables 
in 'variables.json': invalid character '"' after object key:value pair
[andrew.meyer@automation01 vmware]$ 


The logs show that it has discovered the vmware plugin.  I suspect I 
changed more than I should have or I have a typo....

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/packer-tool/3ddef954-230d-4e36-a3db-36238350a056%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to