bento-master vmware build "Unable to connect to host" error

232 views
Skip to first unread message

Steven Langlois

unread,
Sep 21, 2016, 4:39:38 PM9/21/16
to Packer
Using the bento-master templates I can successfully create VirtualBox VMs but I'm getting an error with VMWare.

I installed:

VMware-Player
VMwareVIX
QEMU

I created a virtual machine with VMware-Player and installed VMware Tools but now I am stuck on this error. Any pointers are much appreciated.

The output I am seeing:

[newzr@newgw189 bento-master]$ packer build vmware-centos-7.2-x86_64.json 
vmware-iso output will be in this color.

==> vmware-iso: Downloading or copying ISO
^[c==> vmware-iso: Creating virtual machine disk
==> vmware-iso: Building and writing VMX file
==> vmware-iso: Starting HTTP server on port 8945
==> vmware-iso: Starting virtual machine...
==> vmware-iso: Error starting VM: VMware error: Unable to connect to host.
==> vmware-iso: Error: The specified version was not found
==> vmware-iso: Waiting 4.993297601s to give VMware time to clean up...
==> vmware-iso: Deleting output directory...
Build 'vmware-iso' errored: Error starting VM: VMware error: Unable to connect to host.
Error: The specified version was not found

==> Some builds didn't complete successfully and had errors:
--> vmware-iso: Error starting VM: VMware error: Unable to connect to host.
Error: The specified version was not found

==> Builds finished but no artifacts were created.

My vmware-centos.json which is just the bento-master with virtual-box, parallels, and vagrant removed:

[newzr@newgw189 bento-master]$ cat vmware-centos-7.2-x86_64.json 
{
  "builders": [
    {
      "boot_command": [
        "<tab> text ks=http://{{ .HTTPIP }}:{{ .HTTPPort }}/{{user `ks_path`}}<enter><wait>"
      ],
      "boot_wait": "10s",
      "disk_size": "{{user `disk_size`}}",
      "guest_os_type": "centos-64",
      "headless": "{{ user `headless` }}",
      "http_directory": "http",
      "iso_checksum": "{{user `iso_checksum`}}",
      "iso_checksum_type": "{{user `iso_checksum_type`}}",
      "iso_url": "{{user `mirror`}}/{{user `mirror_directory`}}/{{user `iso_name`}}",
      "output_directory": "packer-{{user `template`}}-vmware",
      "shutdown_command": "echo 'vagrant' | sudo -S /sbin/halt -h -p",
      "ssh_password": "vagrant",
      "ssh_port": 22,
      "ssh_username": "vagrant",
      "ssh_wait_timeout": "10000s",
      "tools_upload_flavor": "linux",
      "type": "vmware-iso",
      "vm_name": "{{ user `template` }}",
      "vmx_data": {
        "cpuid.coresPerSocket": "1",
        "memsize": "{{ user `memory` }}",
        "numvcpus": "{{ user `cpus` }}"
      }
    }
  ],
  "provisioners": [
    {
      "destination": "/tmp/bento-metadata.json",
      "source": "{{user `metadata`}}",
      "type": "file"
    },
    {
      "environment_vars": [
        "HOME_DIR=/home/vagrant",
        "http_proxy={{user `http_proxy`}}",
        "https_proxy={{user `https_proxy`}}",
        "no_proxy={{user `no_proxy`}}"
      ],
      "execute_command": "echo 'vagrant' | {{.Vars}} sudo -S -E sh -eux '{{.Path}}'",
      "scripts": [
        "scripts/common/metadata.sh",
        "scripts/common/sshd.sh",
        "scripts/centos/networking.sh",
        "scripts/centos/vmware.sh",
        "scripts/centos/cleanup.sh",
        "scripts/common/minimize.sh"
      ],
      "type": "shell"
    }
  ],
  "variables": {
    "box_basename": "centos-7.2",
    "build_timestamp": "{{isotime \"20060102150405\"}}",
    "cpus": "1",
    "disk_size": "16384",
    "git_revision": "__unknown_git_revision__",
    "headless": "",
    "http_proxy": "{{env `http_proxy`}}",
    "https_proxy": "{{env `https_proxy`}}",
    "iso_checksum": "907e5755f824c5848b9c8efbb484f3cd945e93faa024bad6ba875226f9683b16",
    "iso_checksum_type": "sha256",
    "iso_name": "CentOS-7-x86_64-DVD-1511.iso",
    "ks_path": "centos-7.2/ks.cfg",
    "memory": "512",
    "metadata": "floppy/dummy_metadata.json",
    "mirror_directory": "7.2.1511/isos/x86_64",
    "name": "centos-7.2",
    "no_proxy": "{{env `no_proxy`}}",
    "template": "centos-7.2-x86_64",
    "version": "2.1.TIMESTAMP"
  }
}

Rickard von Essen

unread,
Sep 22, 2016, 12:49:30 AM9/22/16
to packe...@googlegroups.com

This is because you have a version of VMware Player which is not supported or not correctly setup to use with Packer.

Rerun with: PACKER_LOG=1 packer build template.json
And attach the full log.


--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/packer-tool/dad09c60-3d67-494a-b84c-fc220a4c99f7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Steven Langlois

unread,
Sep 22, 2016, 10:01:25 AM9/22/16
to Packer
I installed VMware-Player-12.1.1-3770994.x86_64.bundle and VMware-VIX-1.11.2-591240.x86_64.bundle which are the current downloads of each from VMware. Is there a way to know what versions of VMware, VirtualBox, etc work with Packer?

Thank you for the help.

Attached is the output of using PACKER_LOG=1.
packer_vmware.txt

Rickard von Essen

unread,
Sep 22, 2016, 10:36:53 AM9/22/16
to packe...@googlegroups.com

--
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+unsubscribe@googlegroups.com.

Steven Langlois

unread,
Sep 23, 2016, 2:32:18 PM9/23/16
to Packer
Yes, thank you. I modified the file /usr/lib/vmware-vix/vixwrapper-config.txt by adding player 12.1.1 to Workstation 8.0.2 and it is now working.

# Workstation 8.0.2

ws       14  vmdb  8.0.2 Workstation-8.0.0-and-vSphere-5.0.0

player    14 vmdb  12.1.1 Workstation-8.0.0-and-vSphere-5.0.0

#player   14  vmdb  4.0.2 Workstation-8.0.0-and-vSphere-5.0.0

ws-shared 14  none  8.0.2 Workstation-8.0.0-and-vSphere-5.0.0


On Thursday, September 22, 2016 at 10:36:53 AM UTC-4, Rickard von Essen wrote:
On 22 September 2016 at 16:01, Steven Langlois <acad...@gmail.com> wrote:
I installed VMware-Player-12.1.1-3770994.x86_64.bundle and VMware-VIX-1.11.2-591240.x86_64.bundle which are the current downloads of each from VMware. Is there a way to know what versions of VMware, VirtualBox, etc work with Packer?

Thank you for the help.

Attached is the output of using PACKER_LOG=1.

On Thursday, September 22, 2016 at 12:49:30 AM UTC-4, Rickard von Essen wrote:

This is because you have a version of VMware Player which is not supported or not correctly setup to use with Packer.

Rerun with: PACKER_LOG=1 packer build template.json
And attach the full log.

--
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...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages