vmware builder failing due to "Error waiting for Run: EOF"

676 views
Skip to first unread message

Harsh Desai

unread,
Sep 19, 2013, 2:35:20 PM9/19/13
to packe...@googlegroups.com
My vmware build is failing of the error seen below. It fails when it is executing the file provisioner where I am trying to upload large directories to the target machine. 

What does the error "Error waiting for Run: EOF" mean?

$ packer build -debug mYsxpi.json 
Debug mode enabled. Builds will not be parallelized.
vmware output will be in this color.

==> vmware: Pausing after run of step 'stepPrepareTools'. Press any key to continue. 
==> vmware: Downloading or copying ISO
==> vmware: Pausing after run of step 'StepDownload'. Press any key to continue. ==> vmware: Pausing after run of step 'stepPrepareOutputDir'. Press any key to continue. ==> vmware: Creating floppy disk...
    vmware: Copying: Autounattend.xml
    vmware: Copying: install-cygwin-sshd.bat
    vmware: Copying: install_puppet.ps1
==> vmware: Pausing after run of step 'StepCreateFloppy'. Press any key to continue. ==> vmware: Creating virtual machine disk
==> vmware: Pausing after run of step 'stepCreateDisk'. Press any key to continue. 
==> vmware: Building and writing VMX file
==> vmware: Pausing after run of step 'stepCreateVMX'. Press any key to continue. 
==> vmware: Pausing after run of step 'stepHTTPServer'. Press any key to continue. 
==> vmware: Pausing after run of step 'stepConfigureVNC'. Press any key to continue. 
==> vmware: Starting virtual machine...
==> vmware: Waiting 10s for boot...
==> vmware: Pausing after run of step 'stepRun'. Press any key to continue. 
==> vmware: Connecting to VM via VNC
==> vmware: Typing the boot command over VNC...
==> vmware: Pausing after run of step 'stepTypeBootCommand'. Press any key to continue. 
==> vmware: Waiting for SSH to become available...
==> vmware: Connected to SSH!
==> vmware: Pausing after run of step 'StepConnectSSH'. Press any key to continue. 
==> vmware: Uploading the 'windows' VMware Tools
==> vmware: Pausing after run of step 'stepUploadTools'. Press any key to continue. 
==> vmware: Uploading /mnt/netstore/users/hdesai/automation/puppet/modules => /cygdrive/c/
==> vmware: Uploading /mnt/vsphere51_iso/Single Sign On => /cygdrive/c/
==> vmware: Uploading /mnt/vsphere51_iso/Inventory Service => /cygdrive/c/
==> vmware: Uploading /mnt/vsphere51_iso/vCenter-Server => /cygdrive/c/
Build 'vmware' errored: Error waiting for Run: EOF

==> Some builds didn't complete successfully and had errors:
--> vmware: Error waiting for Run: EOF

==> Builds finished but no artifacts were created.

My template is below:
{
  "builders": [
    {
      "disk_size": 40960, 
      "floppy_files": [
        "floppy/Autounattend.xml", 
        "floppy/install-cygwin-sshd.bat", 
        "floppy/install_puppet.ps1"
      ], 
      "guest_os_type": "windows7srv-64", 
      "iso_checksum": "8dcde01d0da526100869e2457aafb7ca", 
      "iso_checksum_type": "md5", 
      "output_directory": "/tmp/YmEyNGQ0OWZkOGNmNDU1N2E2Y2I1Y2I3", 
      "shutdown_command": "shutdown /s /t 10 /f /d p:4:1 /c \"Packer Shutdown\"", 
      "ssh_password": "password", 
      "ssh_username": "Administrator", 
      "ssh_wait_timeout": "10000s", 
      "tools_upload_flavor": "windows", 
      "tools_upload_path": "/cygdrive/c/Users/Administrator/{{.Flavor}}.iso", 
      "type": "vmware", 
      "vm_name": "vdi-vc-02", 
      "vmx_data": {
        "cpuid.coresPerSocket": "1", 
        "memsize": "2048", 
        "numvcpus": "2"
      }
    }
  ], 
  "provisioners": [
    {
      "destination": "/cygdrive/c/", 
      "source": "/mnt/netstore/users/hdesai/automation/puppet/modules", 
      "type": "file"
    }, 
    {
      "destination": "/cygdrive/c/", 
      "source": "/mnt/vsphere51_iso/Single Sign On", 
      "type": "file"
    }, 
    {
      "destination": "/cygdrive/c/", 
      "source": "/mnt/vsphere51_iso/Inventory Service", 
      "type": "file"
    }, 
    {
      "destination": "/cygdrive/c/", 
      "source": "/mnt/vsphere51_iso/vCenter-Server", 
      "type": "file"
    }, 
    {
      "destination": "/cygdrive/c/", 
      "source": "/mnt/vsphere51_iso/vSphere-Client", 
      "type": "file"
    }, 
    {
      "environment_vars": [
        "PUPPET_MANIFEST=/mnt/netstore/users/hdesai/automation/puppet/modules/fio_vcenter/manifests/init.pp", 
        "PUPPET_MODULE_PATH=/mnt/netstore/users/hdesai/automation/puppet/modules"
      ], 
      "scripts": [
        "script/install_vmware_tools.sh", 
        "script/puppet_apply.sh"
      ], 
      "type": "shell"
    }
  ]
}

Thanks
Harsh

Mitchell Hashimoto

unread,
Sep 19, 2013, 2:36:23 PM9/19/13
to packe...@googlegroups.com, Harsh Desai
Harsh,

This means that the builder probably crashed. Can you run with `PACKER_LOG=1` and get that output?

Best,
Mitchell
--
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.
For more options, visit https://groups.google.com/groups/opt_out.

Harsh Desai

unread,
Sep 19, 2013, 4:13:32 PM9/19/13
to packe...@googlegroups.com, Harsh Desai
Attached "packer_crash.txt" is the verbose packer log. Looking at it, I see the packer could not allocated memory.

2013/09/19 12:51:20 /home/devp/packer/packer-builder-vmware: runtime: memory allocated by OS (0xe6f8d000) not in usable range [0x18600000,0x98600000)
2013/09/19 12:51:20 /home/devp/packer/packer-builder-vmware: runtime: out of memory: cannot allocate 268435456-byte block (1988100096 in use)
2013/09/19 12:51:20 /home/devp/packer/packer-builder-vmware: fatal error: out of memory

Was the host machine on which packer was running out of memory or the target vmware virtual machine out of memory? Doing a 'free -m' on the host machine showed there was around 6GB free memory.

~Harsh
packer_crash.txt

Mitchell Hashimoto

unread,
Sep 19, 2013, 6:32:39 PM9/19/13
to packe...@googlegroups.com, Harsh Desai
Harsh,

That’s odd. Are you uploading a very large file? Packer has to copy the file into memory in order to get the data length, but it should be freeing memory after each upload.

Best,
Mitchell

Harsh Desai

unread,
Sep 19, 2013, 6:46:53 PM9/19/13
to packe...@googlegroups.com, Harsh Desai
Yes. I am uploading multiple large files one after the another. The build crashes when it tries to upload a 1GB file.

Have you tried uploading Gigabyte size files using the provisioner? I am running packer on an ubuntu box with workstation 9 installed.

~Harsh

Joel Handwell

unread,
Dec 24, 2014, 8:00:00 AM12/24/14
to packe...@googlegroups.com, attitud...@gmail.com
I also got following error while using amazon-windows-ebs builder

Build 'amazon-windows-ebs' errored: unexpected EOF

==> amazon-windows-ebs: Uploading ./bin/file.zip => C:/Windows/Temp/file.zip
==> Some builds didn't complete successfully and had errors:
--> amazon-windows-ebs: unexpected EOF

The zip file was 800M.

Did anyone find any work around?
Reply all
Reply to author
Forward
0 new messages