We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
This issue was originally opened by @andkononykhin as hashicorp/packer#8245. It was migrated here as a result of the Packer plugin split. The original body of the issue is below.
A patch hashicorp/packer#7957 introduced new multi-machine vagrantfile template for vagrant builder:
source_path
box_name
vm.box
vm.box_url
It leads to:
vagrant up
vagrant up output
1.4.4
{ "builders": [ { "type" : "vagrant", "provider" : "virtualbox", "source_path" : "{{template_dir}}/../../bla/bla/bla/long-path/package.box", "add_force" : true, "box_name" : "centos7-base", "output_dir" : "{{template_dir}}/../../.boxes/centos7-with-new-dir", "communicator" : "ssh", ... } ], "provisioners": [ { "type": "shell", "inline": [ "mkdir -p /tmp/new" ] } ] }
Vagrant.configure("2") do |config| config.vm.define "source", autostart: false do |source| source.vm.box = "... <skipped> .../../../bla/bla/bla/long-path/package.box" end config.vm.define "output" do |output| output.vm.box = "centos7-base" output.vm.box_url = "file://package.box" end config.vm.synced_folder ".", "/vagrant", disabled: true end
centos7
2019/10/18 14:46:51 packer: 2019/10/18 14:46:51 Calling Vagrant CLI: []string{"up", "source", "--provider=virtualbox"} 2019/10/18 14:46:55 packer: 2019/10/18 14:46:55 [vagrant driver] stdout: Bringing machine 'source' up with 'virtualbox' provider... 2019/10/18 14:46:55 packer: ==> source: Box '... <skipped> .../../../bla/bla/bla/long-path/package.box' could not be found. Attempting to find and install... 2019/10/18 14:46:55 packer: source: Box Provider: virtualbox 2019/10/18 14:46:55 packer: source: Box Version: >= 0 2019/10/18 14:46:55 packer: ==> source: Box file was not detected as metadata. Adding it directly... 2019/10/18 14:46:55 packer: ==> source: Adding box '... <skipped> .../../../bla/bla/bla/long-path/package.box' (v0) for provider: virtualbox 2019/10/18 14:46:55 packer: source: Unpacking necessary files from: file://... <skipped> .../../../bla/bla/bla/long-path/package.box 2019/10/18 14:46:55 packer: 2019/10/18 14:46:55 [vagrant driver] stderr: /tmp/.mount_vagran5Uh4mU/usr/lib/ruby/2.4.0/fileutils.rb:230:in `mkdir': File name too long @ dir_s_mkdir - ... <skipped> ...-VAGRANTSLASH-..-VAGRANTSLASH-..-VAGRANTSLASH-bla-VAGRANTSLASH-bla-VAGRANTSLASH-bla-VAGRANTSLASH-long-path-VAGRANTSLASH-package.box (Errno::ENAMETOOLONG) 2019/10/18 14:46:55 packer: from /tmp/.mount_vagran5Uh4mU/usr/lib/ruby/2.4.0/fileutils.rb:230:in `fu_mkdir' 2019/10/18 14:46:55 packer: from /tmp/.mount_vagran5Uh4mU/usr/lib/ruby/2.4.0/fileutils.rb:208:in `block (2 levels) in mkdir_p' 2019/10/18 14:46:55 packer: from /tmp/.mount_vagran5Uh4mU/usr/lib/ruby/2.4.0/fileutils.rb:206:in `reverse_each' 2019/10/18 14:46:55 packer: from /tmp/.mount_vagran5Uh4mU/usr/lib/ruby/2.4.0/fileutils.rb:206:in `block in mkdir_p' 2019/10/18 14:46:55 packer: from /tmp/.mount_vagran5Uh4mU/usr/lib/ruby/2.4.0/fileutils.rb:191:in `each' 2019/10/18 14:46:55 packer: from /tmp/.mount_vagran5Uh4mU/usr/lib/ruby/2.4.0/fileutils.rb:191:in `mkdir_p' 2019/10/18 14:46:55 packer: from /tmp/.mount_vagran5Uh4mU/usr/lib/ruby/2.4.0/pathname.rb:576:in `mkpath' 2019/10/18 14:46:55 packer: from /tmp/.mount_vagran5Uh4mU/usr/gembundle/gems/vagrant-2.2.5/lib/vagrant/box_collection.rb:161:in `block (3 levels) in add' 2019/10/18 14:46:55 packer: from /tmp/.mount_vagran5Uh4mU/usr/gembundle/gems/vagrant-2.2.5/lib/vagrant/box_collection.rb:470:in `with_temp_dir' 2019/10/18 14:46:55 packer: from /tmp/.mount_vagran5Uh4mU/usr/gembundle/gems/vagrant-2.2.5/lib/vagrant/box_collection.rb:134:in `block (2 levels) in add' 2019/10/18 14:46:55 packer: from /tmp/.mount_vagran5Uh4mU/usr/gembundle/gems/vagrant-2.2.5/lib/vagrant/box_collection.rb:470:in `with_temp_dir' 2019/10/18 14:46:55 packer: from /tmp/.mount_vagran5Uh4mU/usr/gembundle/gems/vagrant-2.2.5/lib/vagrant/box_collection.rb:115:in `block in add' 2019/10/18 14:46:55 packer: from /tmp/.mount_vagran5Uh4mU/usr/gembundle/gems/vagrant-2.2.5/lib/vagrant/box_collection.rb:457:in `block in with_collection_lock' 2019/10/18 14:46:55 packer: from /tmp/.mount_vagran5Uh4mU/usr/lib/ruby/2.4.0/monitor.rb:214:in `mon_synchronize' 2019/10/18 14:46:55 packer: from /tmp/.mount_vagran5Uh4mU/usr/gembundle/gems/vagrant-2.2.5/lib/vagrant/box_collection.rb:456:in `with_collection_lock' 2019/10/18 14:46:55 packer: from /tmp/.mount_vagran5Uh4mU/usr/gembundle/gems/vagrant-2.2.5/lib/vagrant/box_collection.rb:104:in `add' ==> vagrant: destroying Vagrant box...
The text was updated successfully, but these errors were encountered:
No branches or pull requests
This issue was originally opened by @andkononykhin as hashicorp/packer#8245. It was migrated here as a result of the Packer plugin split. The original body of the issue is below.
Overview of the Issue
A patch hashicorp/packer#7957 introduced new multi-machine vagrantfile template for vagrant builder:
source_path
but not bybox_name
vm.box
but also sets output package.box file asvm.box_url
which seems confusingIt leads to:
vagrant up
itself during packer build tries to add box for source machine and it might fail the build if the source path is too longbox_name
value and one by vagrant withsource_path
value as a namevagrant up output
will bring up machine based on a source box instead of output onePacker version
1.4.4
Simplified Packer Buildfile
Generated Vagrantfile
Operating system and Environment details
centos7
Log Fragments and crash.log files
The text was updated successfully, but these errors were encountered: