boxcutter / macos

Virtual machine templates for macOS written in legacy JSON
MIT License
316 stars 65 forks source link

Error removing temporary script (During cleanup of StepDownloadGuestAdditions) #28

Open spoorcc opened 7 years ago

spoorcc commented 7 years ago

Issue

When building 10.8 box using the command: bin/box build macos108 ~/Downloads/Install\ OS\ X\ Mountain\ Lion.app/ 10.8 virtualbox

I consistently get: Build 'virtualbox-iso' errored: Error removing temporary script at /tmp/script_9249.sh!

Building 10.7 or 10.9 with appropriate installers does not give issues.

Relevant parts of the Packer log - (available as Github Gist)

2017/09/27 15:04:53 [INFO] (telemetry) Starting builder virtualbox-iso
2017/09/27 15:04:53 packer: 2017/09/27 15:04:53 VBoxManage path: /usr/local/bin/VBoxManage
2017/09/27 15:04:53 packer: 2017/09/27 15:04:53 Not downloading guest additions since it is disabled.
2017/09/27 15:04:53 ui: ask: ==> virtualbox-iso: Pausing after run of step 'StepDownloadGuestAdditions'. Press enter to continue.
...
2017/09/27 16:05:39 ui: ask: ==> virtualbox-iso: Pausing before cleanup of step 'StepDownloadGuestAdditions'. Press enter to continue.
2017/09/27 16:05:45 [INFO] (telemetry) ending virtualbox-iso
2017/09/27 16:05:45 [INFO] (telemetry) found error: Error removing temporary script at /tmp/script_9249.sh!
2017/09/27 16:05:45 ui error: Build 'virtualbox-iso' errored: Error removing temporary script at /tmp/script_9249.sh!
2017/09/27 16:05:45 Waiting on builds to complete...
2017/09/27 16:05:45 Builds completed. Waiting on interrupt barrier...
2017/09/27 16:05:45 machine readable: error-count []string{"1"}
2017/09/27 16:05:45 ui error: 
==> Some builds didn't complete successfully and had errors:
2017/09/27 16:05:45 machine readable: virtualbox-iso,error []string{"Error removing temporary script at /tmp/script_9249.sh!"}
2017/09/27 16:05:45 ui error: --> virtualbox-iso: Error removing temporary script at /tmp/script_9249.sh!

My environment

darkn3rd commented 6 years ago

I am not sure if this is related, but only a certain version of Sierra works. At some point, Apple updated the installer image to block unsigned early stage scripts needed to make all this magic work. If you were lucky enough to download an earlier version of Sierra installer from App Store, you should use that.