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

Post-processor failed: open /packer_virtualbox-iso_virtualbox.box: permission denied #85

Open
vladshved opened this issue May 30, 2017 · 1 comment

Comments

@vladshved
Copy link

$ packer build \
→   -var iso_url=../out/OSX_InstallESD_10.12.3_16D32.dmg \
→   -var update_system=0 \
→   -var autologin=true \
→   template.json


parallels-iso output will be in this color.
virtualbox-iso output will be in this color.
vmware-iso output will be in this color.

Warnings for build 'parallels-iso':

* A checksum type of 'none' was specified. Since ISO files are so big,
a checksum is highly recommended.

Warnings for build 'virtualbox-iso':

* A checksum type of 'none' was specified. Since ISO files are so big,
a checksum is highly recommended.

Warnings for build 'vmware-iso':

* A checksum type of 'none' was specified. Since ISO files are so big,
a checksum is highly recommended.

Build 'parallels-iso' errored: Failed creating Parallels driver: exec: "prlctl": executable file not found in $PATH
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:
* Fusion application not found at path: /Applications/VMware Fusion.app
* Fusion application not found at path: /Applications/VMware Fusion.app

==> virtualbox-iso: Downloading or copying ISO
    virtualbox-iso: Downloading or copying: file:///Volumes/SSD%20750G/Users/vlad/Documents/vagrant/osx-vm-templates/out/OSX_InstallESD_10.12.3_16D32.dmg
==> virtualbox-iso: Creating virtual machine...
==> virtualbox-iso: Creating hard drive...
==> virtualbox-iso: Creating forwarded port mapping for communicator (SSH, WinRM, etc) (host port 2957)
==> virtualbox-iso: Executing custom VBoxManage commands...
    virtualbox-iso: Executing: modifyvm packer-virtualbox-iso-1496153385 --audiocontroller hda
    virtualbox-iso: Executing: modifyvm packer-virtualbox-iso-1496153385 --boot1 dvd
    virtualbox-iso: Executing: modifyvm packer-virtualbox-iso-1496153385 --boot2 disk
    virtualbox-iso: Executing: modifyvm packer-virtualbox-iso-1496153385 --chipset ich9
    virtualbox-iso: Executing: modifyvm packer-virtualbox-iso-1496153385 --firmware efi
    virtualbox-iso: Executing: modifyvm packer-virtualbox-iso-1496153385 --hpet on
    virtualbox-iso: Executing: modifyvm packer-virtualbox-iso-1496153385 --keyboard usb
    virtualbox-iso: Executing: modifyvm packer-virtualbox-iso-1496153385 --memory 2048
    virtualbox-iso: Executing: modifyvm packer-virtualbox-iso-1496153385 --mouse usbtablet
    virtualbox-iso: Executing: modifyvm packer-virtualbox-iso-1496153385 --vram 128
    virtualbox-iso: Executing: storagectl packer-virtualbox-iso-1496153385 --name IDE Controller --remove
==> virtualbox-iso: Starting the virtual machine...
==> virtualbox-iso: Waiting 2s for boot...
==> virtualbox-iso: Typing the boot command...
==> virtualbox-iso: Waiting for SSH to become available...
==> virtualbox-iso: Connected to SSH!
==> virtualbox-iso: Uploading VirtualBox version info (5.1.22)
==> virtualbox-iso: Executing local command: sleep 0
==> virtualbox-iso: Uploading ../scripts/support/set_kcpassword.py => /private/tmp/set_kcpassword.py
==> virtualbox-iso: Provisioning with shell script: ../scripts/vagrant.sh
    virtualbox-iso: Installing vagrant keys for vagrant user
    virtualbox-iso: % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
    virtualbox-iso: Dload  Upload   Total   Spent    Left  Speed
    virtualbox-iso: 100   409  100   409    0     0    848      0 --:--:-- --:--:-- --:--:--   850
==> virtualbox-iso: Provisioning with shell script: ../scripts/vmware.sh
==> virtualbox-iso: Provisioning with shell script: ../scripts/parallels.sh
==> virtualbox-iso: Provisioning with shell script: ../scripts/xcode-cli-tools.sh
    virtualbox-iso: Software Update Tool
    virtualbox-iso: Copyright 2002-2015 Apple Inc.
    virtualbox-iso:
    virtualbox-iso:
    virtualbox-iso: Downloading Command Line Tools (macOS Sierra version 10.12) for Xcode
    virtualbox-iso: Downloaded Command Line Tools (macOS Sierra version 10.12) for Xcode
    virtualbox-iso: Installing Command Line Tools (macOS Sierra version 10.12) for Xcode
    virtualbox-iso: Done with Command Line Tools (macOS Sierra version 10.12) for Xcode
    virtualbox-iso: Done.
==> virtualbox-iso: Provisioning with shell script: ../scripts/chef-omnibus.sh
==> virtualbox-iso: Provisioning with shell script: ../scripts/puppet.sh
==> virtualbox-iso: Provisioning with shell script: ../scripts/add-network-interface-detection.sh
==> virtualbox-iso: Provisioning with shell script: ../scripts/autologin.sh
    virtualbox-iso: Enabling automatic GUI login for the 'vagrant' user..
==> virtualbox-iso: Provisioning with shell script: ../scripts/system-update.sh
==> virtualbox-iso: Provisioning with shell script: ../scripts/shrink.sh
==> virtualbox-iso: Gracefully halting virtual machine...
    virtualbox-iso: shutdown: / is busy updating; waiting for lock
    virtualbox-iso: Shutdown NOW!
    virtualbox-iso:
    virtualbox-iso: System shutdown time has arrived
==> virtualbox-iso: Preparing to export machine...
    virtualbox-iso: Deleting forwarded port mapping for the communicator (SSH, WinRM, etc) (host port 2957)
==> virtualbox-iso: Exporting virtual machine...
    virtualbox-iso: Executing: export packer-virtualbox-iso-1496153385 --output output-virtualbox-iso/packer-virtualbox-iso-1496153385.ovf
==> virtualbox-iso: Unregistering and deleting virtual machine...
==> virtualbox-iso: Running post-processor: vagrant
==> virtualbox-iso (vagrant): Creating Vagrant box for 'virtualbox' provider
    virtualbox-iso (vagrant): Copying from artifact: output-virtualbox-iso/packer-virtualbox-iso-1496153385-disk001.vmdk
    virtualbox-iso (vagrant): Copying from artifact: output-virtualbox-iso/packer-virtualbox-iso-1496153385.ovf
    virtualbox-iso (vagrant): Renaming the OVF to box.ovf...
Build 'virtualbox-iso' errored: 1 error(s) occurred:

* Post-processor failed: open /packer_virtualbox-iso_virtualbox.box: permission denied

==> Some builds didn't complete successfully and had errors:
--> parallels-iso: Failed creating Parallels driver: exec: "prlctl": executable file not found in $PATH
--> 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:
* Fusion application not found at path: /Applications/VMware Fusion.app
* Fusion application not found at path: /Applications/VMware Fusion.app

--> virtualbox-iso: 1 error(s) occurred:

* Post-processor failed: open /packer_virtualbox-iso_virtualbox.box: permission denied

==> Builds finished but no artifacts were created.
@habsgoalie
Copy link

The packer template formulates an artifact output path (line 93 on template.json)-

"output": "{{user vagrant_box_directory}}/packer_{{.BuildName}}_{{.Provider}}.box"

that if not specified defaults to using an environment variable that probably isn't there. Happened to me as well. Seems like you can specify the vagrant_box_directory variable when you run packer or add it as an environment variable - PACKER_VAGRANT_BOX_DIR to work around this.

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

2 participants