Hi Rickard,

I am able to hit the issue on my local machine as well. I tried will 
headless mode disabled and it worked fine. The issue is hit only when i 
enable headless mode. I tried the on error method but no log file was 
generated.
:
With packer log enabled, I got these logs

==> vmware-iso: Starting virtual machine...
2017/09/03 14:29:03 ui:     vmware-iso: The VM will be run headless, 
without a GUI. If you want to
    vmware-iso: view the screen of the VM, connect via VNC with the 
password "a12jwA5e" to
    vmware-iso: vnc://127.0.0.1:5942
2017/09/03 14:29:03 packer: 2017/09/03 14:29:03 Executing: /usr/bin/vmrun 
[-T player start test/ubuntu1404-base.vmx nogui]
    vmware-iso: The VM will be run headless, without a GUI. If you want to
    vmware-iso: view the screen of the VM, connect via VNC with the 
password "a12jwA5e" to
    vmware-iso: vnc://127.0.0.1:5942
2017/09/03 14:30:04 packer: 2017/09/03 14:30:04 stdout: Error: Unknown error
2017/09/03 14:30:04 packer: 2017/09/03 14:30:04 stderr:
2017/09/03 14:30:04 ui error: ==> vmware-iso: Error starting VM: VMware 
error: Error: Unknown error
==> vmware-iso: 
==> vmware-iso: Packer detected a VMware 'Unknown Error'. Unfortunately 
VMware
==> vmware-iso: often has extremely vague error messages such as this and 
Packer
==> vmware-iso: itself can't do much about that. Please check the 
vmware.log files
==> vmware-iso: created by VMware when a VM is started (in the directory of 
the
==> vmware-iso: vmx file), which often contains more detailed error 
information.
==> vmware-iso: Error starting VM: VMware error: Error: Unknown error
2017/09/03 14:30:04 ui: ==> vmware-iso: Step "StepRun" failed
==> vmware-iso: 
2017/09/03 14:30:04 ui: ask: ==> vmware-iso: [c] Clean up and exit, [a] 
abort without cleanup, or [r] retry step (build may fail even if retry 
succeeds)?
==> vmware-iso: Packer detected a VMware 'Unknown Error'. Unfortunately 
VMware
==> vmware-iso: often has extremely vague error messages such as this and 
Packer
==> vmware-iso: itself can't do much about that. Please check the 
vmware.log files
==> vmware-iso: created by VMware when a VM is started (in the directory of 
the
==> vmware-iso: vmx file), which often contains more detailed error 
information.
==> vmware-iso: Step "StepRun" failed

I tried the vmrun step and it gave me the following error:

 $ /usr/bin/vmrun [-T player start test/ubuntu1404-base.vmx nogui]
Unable to connect to host.
Error: Service type VIX_SERVICEPROVIDER_VMWARE_WORKSTATION was specified, 
but not installed

Looks like its trying to look for workstation instead of player. Not sure 
how to make it right yet. exploring the same. Any clues would be helpful

On Saturday, September 2, 2017 at 1:54:43 PM UTC+5:30, [email protected] 
wrote:
>
> Hi,
>
> I am using packer to generate VMWARE images on a digital ocean instance. I 
> have installed vmware player for linux as well as vmware vix sdk. But i am 
> unable to get it working.
>
> Here is my template:
> {
>   "builders": [
>     {
>       "type": "vmware-iso",
>       "boot_command": [
>         "<esc><esc><enter><wait>",
>         "/install/vmlinuz<wait>",
>         "preseed/url=http://{{.HTTPIP}}:{{.HTTPPort}}/preseed.cfg ",
>         "debian-installer=en_US auto locale=en_US kbd-chooser/method=us ",
>         "hostname=RtBrick-Evaluation",
>         "fb=false debconf/frontend=noninteractive ",
>         "keyboard-configuration/modelcode=SKIP 
> keyboard-configuration/layout=USA ",
>         "keyboard-configuration/variant=USA console-setup/ask_detect=false 
> ",
>         "initrd=/install/initrd.gz -- <enter>"
>       ],
>       "boot_wait": "10s",
>       "disk_size": 10240,
>       "tools_upload_flavor": "linux",
>       "vmdk_name": "disk",
>       "guest_os_type": "ubuntu-64",
>       "http_directory": "http",
>       "iso_checksum": "dd54dc8cfc2a655053d19813c2f9aa9f",
>       "iso_checksum_type": "md5",
>       "iso_url": "
> http://releases.ubuntu.com/14.04/ubuntu-14.04.5-server-amd64.iso";,
>       "ssh_username": "ubuntu",
>       "ssh_password": "ubuntu",
>       "ssh_port": 22,
>       "headless": true,
>       "ssh_wait_timeout": "10000s",
>       "shutdown_command": "echo 'ubuntu'| sudo shutdown -P now",
>       "output_directory": "test",
>       "vm_name": "rtbrick-vbox-6topo-{{user `version`}}",
>       "vmx_data": {
>         "MemTrimRate": "0",
>         "sched.mem.pshare.enable": "FALSE",
>         "mainMem.useNamedFile": "FALSE",
>         "prefvmx.minVmMemPct": "100"
>       }
>     }
>   ]
> }
>
> I am getting the following error:
>
> # packer build template.json 
> vmware-iso output will be in this color.
>
> Build 'vmware-iso' 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: "vmrun": executable file not found in $PATH
> * exec: "vmrun": executable file not found in $PATH
>
>
> ==> Some builds didn't complete successfully and had errors:
> --> vmware-iso: 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: "vmrun": executable file not found in $PATH
> * exec: "vmrun": executable file not found in $PATH
>
>
> ==> Builds finished but no artifacts were created.
>
>
> I had gone through a couple of issues in packer git repo where they 
> mentioned that I have to install VIX SDK which i did. I am still unable to 
> get it working. Any ideas?
>

-- 
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/e1be0067-99fc-43db-bce2-955ecd9fb2e6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to