Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minimize.sh script fails OSX builds #14

Closed
chocolatewheelchair opened this issue Apr 18, 2016 · 2 comments
Closed

Minimize.sh script fails OSX builds #14

chocolatewheelchair opened this issue Apr 18, 2016 · 2 comments

Comments

@chocolatewheelchair
Copy link

chocolatewheelchair commented Apr 18, 2016

Host machine: OSX 10.10
Using the boxcutter templates, unadulterated.

Am consistently running into the following error for every OSX packer build:

==> vmware-iso: Provisioning with shell script: script/minimize.sh
    vmware-iso: ==> Turn off hibernation
    vmware-iso: ==> Get rid of the sleepimage
    vmware-iso: ==> Stop the page process and dropping swap files
    vmware-iso: Zeroing out free space
    vmware-iso: Started erase on disk1s2 Macintosh HD
    vmware-iso: Creating a temporary file
    vmware-iso: Securely erasing a file
    vmware-iso: Creating a secondary temporary file
    vmware-iso: Mounting disk
    vmware-iso: Finished erase on disk1s2 Macintosh HD
    vmware-iso: Please disregard any warnings about disk space for the duration of shrink process.
Progress: 99 [==========>]17 [==>        ]
==> vmware-iso: Stopping virtual machine...
==> vmware-iso: Deleting output directory...
Build 'vmware-iso' errored: Retryable error: Error removing temporary script at /tmp/script_7943.sh: dial tcp 172.16.250.137:22: connect: host is down

==> Some builds didn't complete successfully and had errors:
--> vmware-iso: Retryable error: Error removing temporary script at /tmp/script_7943.sh: dial tcp 172.16.250.137:22: connect: host is down

Builds succeed if i comment out the minimize.sh script so the issue definitely seems to come from there, but I have no idea what´s up. Pointers anyone?

Edit: when running packer in headless_mode: "false", it seems packer tries to remove the temp script after having shutdown the machine, hence why it cannot remove the script or communicate with the vm at all

@berney
Copy link

berney commented Oct 17, 2016

Try running with PACKER_LOG=1 packer -debug <args> to see exactly where it is going wrong.

@annawake
Copy link
Contributor

I increased the timeout on shrink to compensate for older/slower machines. It appears to be related to the speed that your computer perform the shrink operation, and whether that is faster than the default packer retry timeout:

44d66e9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants