Infrastructure: Box 'centos/7' could not be found during Vagrant up on Mac

Hi there I am trying to run:

vagrant up

but I received:


==> infrastructure: Box ‘centos/7’ could not be found. Attempting to find and install…
infrastructure: Box Provider: virtualbox
infrastructure: Box Version: >= 0
==> infrastructure: Box file was not detected as metadata. Adding it directly…
==> infrastructure: Adding box ‘centos/7’ (v0) for provider: virtualbox
infrastructure: Downloading: https://vagrantcloud.com/centos/7
The box failed to unpackage properly. Please verify that the box
file you’re trying to add is not corrupted and that enough disk space
is available and then try again.
The output from attempting to unpackage (if any):

bsdtar: Error opening archive: Unrecognized archive format

Any help???

Thanks a lot

Roberto

@ cottordici

Did you check for space on your system? Notice that the error message says:

If you have ample space, then run vagrant destroy infrastructure
and try again. HTH. Good luck.

Yes yes it was the first thing I checked, but plenty of space… vagrant destroy infrastructure just says that … infrastructure: VM not created. Moving on… very strange … I think ldap is required only in the first homework … I will keep investigating… thanks anyway

@ cottordici

In that case, you might try creating a new Vagrant directory and put the basic Vagrantfile shown here in that directory and try to load just Centos 7. That may give you some additional information.

Hi DHz same result: … running vagrant up --debug I got

DEBUG subprocess: Waiting for process to exit. Remaining to timeout: 31999
DEBUG subprocess: Exit status: 0
INFO interface: output: Box file was not detected as metadata. Adding it directly…
INFO interface: output: ==> default: Box file was not detected as metadata. Adding it directly…
==> default: Box file was not detected as metadata. Adding it directly…
INFO interface: output: Adding box ‘centos/7’ (v0) for provider: virtualbox
INFO interface: output: ==> default: Adding box ‘centos/7’ (v0) for provider: virtualbox
==> default: Adding box ‘centos/7’ (v0) for provider: virtualbox
INFO box_collection: Box not found: centos/7 (virtualbox)
INFO box_add: Downloading box: https://vagrantcloud.com/centos/7 => /Users/robertomalagigi/.vagrant.d/tmp/box268f3b7ad82a60ceb55f991152a6e2021bc589b7
INFO interface: detail: Downloading: https://vagrantcloud.com/centos/7
INFO interface: detail: default: Downloading: https://vagrantcloud.com/centos/7
default: Downloading: https://vagrantcloud.com/centos/7
INFO downloader: Downloader starting download:
INFO downloader: – Source: https://vagrantcloud.com/centos/7
INFO downloader: – Destination: /Users/robertomalagigi/.vagrant.d/tmp/box268f3b7ad82a60ceb55f991152a6e2021bc589b7
INFO subprocess: Starting process: ["/usr/bin/curl", “-q”, “–fail”, “–location”, “–max-redirs”, “10”, “–verbose”, “–user-agent”, "Vagrant/2.2.3 (+https://www.vagrantup.com; ruby2.4.4) ", “–continue-at”, “-”, “–output”, “/Users/robertomalagigi/.vagrant.d/tmp/box268f3b7ad82a60ceb55f991152a6e2021bc589b7”, “https://vagrantcloud.com/centos/7”]
DEBUG subprocess: Command not in installer, not touching env vars.
INFO subprocess: Command not in installer, restoring original environment…
DEBUG subprocess: Selecting on IO
DEBUG subprocess: stderr: % Total % Received % Xferd Average Speed Time Time
DEBUG subprocess: stderr: Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:–:-- --:–:-- --:–:-- 0
DEBUG subprocess: stderr: * Trying 52.3.53.115…

  • TCP_NODELAY set
    DEBUG subprocess: stderr: * Connected to vagrantcloud.com (52.3.53.115) port 443 (#0)
    DEBUG subprocess: stderr: * ALPN, offering h2
  • ALPN, offering http/1.1
  • Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
    DEBUG subprocess: stderr: * successfully set certificate verify locations:
  • CAfile: /opt/vagrant/embedded/cacert.pem
    CApath: none
  • TLSv1.2 (OUT), TLS handshake, Client hello (1):
    } [512 bytes data]
    DEBUG subprocess: stderr: * TLSv1.2 (IN), TLS handshake, Server hello (2):
    { [102 bytes data]
  • TLSv1.2 (IN), TLS handshake, Certificate (11):
    { [2602 bytes data]
    DEBUG subprocess: stderr: * TLSv1.2 (IN), TLS handshake, Server key exchange (12):
    { [413 bytes data]
    DEBUG subprocess: stderr: * TLSv1.2 (IN), TLS handshake, Server finished (14):
    { [4 bytes data]
    DEBUG subprocess: stderr: * TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
    } [150 bytes data]
  • TLSv1.2 (OUT), TLS change cipher, Client hello (1):
    } [1 bytes data]
    DEBUG subprocess: stderr: * TLSv1.2 (OUT), TLS handshake, Finished (20):
    } [16 bytes data]
    DEBUG subprocess: stderr: * TLSv1.2 (IN), TLS change cipher, Client hello (1):
    { [1 bytes data]
  • TLSv1.2 (IN), TLS handshake, Finished (20):
    { [16 bytes data]
  • SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256
  • ALPN, server accepted to use http/1.1
  • Server certificate:
  • subject: CN=app.vagrantup.com
  • start date: Dec 20 23:01:42 2018 GMT
  • expire date: Mar 20 23:01:42 2019 GMT
  • subjectAltName: host “vagrantcloud.com” matched cert’s “vagrantcloud.com
  • issuer: C=US; O=Let’s Encrypt; CN=Let’s Encrypt Authority X3
  • SSL certificate verify ok.
    DEBUG subprocess: stderr: > GET /centos/7 HTTP/1.1

Host: vagrantcloud.com
User-Agent: Vagrant/2.2.3 (+https://www.vagrantup.com; ruby2.4.4)
Accept: /

INFO interface: detail: Progress: 0% (Rate: 0*/s, Estimated time remaining: --:–:--)
INFO interface: detail: default: Progress: 0% (Rate: 0*/s, Estimated time remaining: --:–:--)
default: Progress: 0% (Rate: 0*/s, Estimated time remaining: --:–:--)DEBUG subprocess: stderr: < HTTP/1.1 301 Moved Permanently
< Server: Cowboy
< Date: Mon, 14 Jan 2019 14:56:27 GMT
< Connection: keep-alive
< Location: https://vagrantcloud.com/centos/boxes/7
< Content-Type: text/html
< Cache-Control: no-cache
< X-Request-Id: 95544755-482d-4f32-8109-13918f43a191
< X-Runtime: 0.003914
< Content-Length: 105
< Via: 1.1 vegur
<

Host: vagrantcloud.com
User-Agent: Vagrant/2.2.3 (+https://www.vagrantup.com; ruby2.4.4)
Accept: /

DEBUG subprocess: stderr: < HTTP/1.1 200 OK
< Server: Cowboy
< Date: Mon, 14 Jan 2019 14:56:27 GMT
< Connection: keep-alive
< X-Frame-Options: SAMEORIGIN
< X-Xss-Protection: 1; mode=block
< X-Content-Type-Options: nosniff
< Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
< Content-Type: application/json; charset=utf-8
< Etag: W/“436bc648659d10f1c3f64d28fefad6fc”
< Cache-Control: max-age=0, private, must-revalidate
< X-Request-Id: ab861841-3ea7-458c-ad78-f028b0d7811c
< X-Runtime: 0.068722
< Transfer-Encoding: chunked
< Via: 1.1 vegur
<
DEBUG subprocess: stderr: { [6790 bytes data]
100 44673 0 44673 0 0 58679 0 --:–:-- --:–:-- --:–:-- 58679

  • Connection #0 to host vagrantcloud.com left intact
    DEBUG subprocess: Waiting for process to exit. Remaining to timeout: 32000
    DEBUG subprocess: Exit status: 0

DEBUG box_collection: Adding box: centos/7 (virtualbox) from /Users/robertomalagigi/.vagrant.d/tmp/box268f3b7ad82a60ceb55f991152a6e2021bc589b7
INFO box_collection: Box not found: centos/7 (virtualbox)
DEBUG box_collection: Unpacking box into temporary directory: /Users/robertomalagigi/.vagrant.d/tmp/vagrant-box-add-temp-20190114-1957-o8ktvz
INFO subprocess: Starting process: ["/opt/vagrant/embedded/bin/bsdtar", “-v”, “-x”, “-m”, “-s”, “|\\|/|”, “-C”, “/Users/robertomalagigi/.vagrant.d/tmp/vagrant-box-add-temp-20190114-1957-o8ktvz”, “-f”, “/Users/robertomalagigi/.vagrant.d/tmp/box268f3b7ad82a60ceb55f991152a6e2021bc589b7”]
INFO subprocess: Command in the installer. Specifying DYLD_LIBRARY_PATH…
DEBUG subprocess: Selecting on IO
DEBUG subprocess: stderr: bsdtar: Error opening archive: Unrecognized archive format
DEBUG subprocess: Waiting for process to exit. Remaining to timeout: 32000
DEBUG subprocess: Exit status: 1
DEBUG box_add: Deleting temporary box: /Users/robertomalagigi/.vagrant.d/tmp/box268f3b7ad82a60ceb55f991152a6e2021bc589b7
ERROR warden: Error occurred: The box failed to unpackage properly. Please verify that the box
file you’re trying to add is not corrupted and that enough disk space
is available and then try again.
The output from attempting to unpackage (if any):

bsdtar: Error opening archive: Unrecognized archive format

INFO warden: Beginning recovery process…
INFO warden: Recovery complete.
ERROR warden: Error occurred: The box failed to unpackage properly. Please verify that the box
file you’re trying to add is not corrupted and that enough disk space
is available and then try again.
The output from attempting to unpackage (if any):

bsdtar: Error opening archive: Unrecognized archive format

INFO warden: Beginning recovery process…
INFO warden: Recovery complete.
ERROR warden: Error occurred: The box failed to unpackage properly. Please verify that the box
file you’re trying to add is not corrupted and that enough disk space
is available and then try again.
The output from attempting to unpackage (if any):

bsdtar: Error opening archive: Unrecognized archive format

INFO warden: Beginning recovery process…
INFO warden: Recovery complete.
ERROR warden: Error occurred: The box failed to unpackage properly. Please verify that the box
file you’re trying to add is not corrupted and that enough disk space
is available and then try again.
The output from attempting to unpackage (if any):

bsdtar: Error opening archive: Unrecognized archive format

INFO warden: Beginning recovery process…
INFO warden: Calling recover: #Vagrant::Action::Builtin::Call:0x00000001021abd98
INFO warden: Beginning recovery process…
INFO warden: Recovery complete.
INFO warden: Recovery complete.
INFO warden: Beginning recovery process…
INFO warden: Recovery complete.
INFO environment: Released process lock: machine-action-22f1d4090be412f66e9585ee90c7ac87
INFO environment: Running hook: environment_unload
INFO runner: Preparing hooks for middleware sequence…
INFO runner: 2 hooks defined.
INFO runner: Running action: environment_unload #Vagrant::Action::Builder:0x00000001018e9660
ERROR vagrant: Vagrant experienced an error! Details:
ERROR vagrant: #<Vagrant::Errors::BoxUnpackageFailure: The box failed to unpackage properly. Please verify that the box
file you’re trying to add is not corrupted and that enough disk space
is available and then try again.
The output from attempting to unpackage (if any):

bsdtar: Error opening archive: Unrecognized archive format

ERROR vagrant: The box failed to unpackage properly. Please verify that the box
file you’re trying to add is not corrupted and that enough disk space
is available and then try again.
The output from attempting to unpackage (if any):

bsdtar: Error opening archive: Unrecognized archive format

ERROR vagrant: /opt/vagrant/embedded/gems/2.2.3/gems/vagrant-2.2.3/lib/vagrant/box_collection.rb:121:in block (2 levels) in add' /opt/vagrant/embedded/gems/2.2.3/gems/vagrant-2.2.3/lib/vagrant/box_collection.rb:461:inwith_temp_dir’
/opt/vagrant/embedded/gems/2.2.3/gems/vagrant-2.2.3/lib/vagrant/box_collection.rb:115:in block in add' /opt/vagrant/embedded/gems/2.2.3/gems/vagrant-2.2.3/lib/vagrant/box_collection.rb:448:inblock in with_collection_lock’
/opt/vagrant/embedded/lib/ruby/2.4.0/monitor.rb:214:in mon_synchronize' /opt/vagrant/embedded/gems/2.2.3/gems/vagrant-2.2.3/lib/vagrant/box_collection.rb:447:inwith_collection_lock’
/opt/vagrant/embedded/gems/2.2.3/gems/vagrant-2.2.3/lib/vagrant/box_collection.rb:104:in add' /opt/vagrant/embedded/gems/2.2.3/gems/vagrant-2.2.3/lib/vagrant/action/builtin/box_add.rb:357:inbox_add’
/opt/vagrant/embedded/gems/2.2.3/gems/vagrant-2.2.3/lib/vagrant/action/builtin/box_add.rb:146:in add_direct' /opt/vagrant/embedded/gems/2.2.3/gems/vagrant-2.2.3/lib/vagrant/action/builtin/box_add.rb:120:incall’
/opt/vagrant/embedded/gems/2.2.3/gems/vagrant-2.2.3/lib/vagrant/action/warden.rb:34:in call' /opt/vagrant/embedded/gems/2.2.3/gems/vagrant-2.2.3/lib/vagrant/action/builder.rb:116:incall’
/opt/vagrant/embedded/gems/2.2.3/gems/vagrant-2.2.3/lib/vagrant/action/runner.rb:66:in block in run' /opt/vagrant/embedded/gems/2.2.3/gems/vagrant-2.2.3/lib/vagrant/util/busy.rb:19:inbusy’
/opt/vagrant/embedded/gems/2.2.3/gems/vagrant-2.2.3/lib/vagrant/action/runner.rb:66:in run' /opt/vagrant/embedded/gems/2.2.3/gems/vagrant-2.2.3/lib/vagrant/action/builtin/handle_box.rb:82:inhandle_box’
/opt/vagrant/embedded/gems/2.2.3/gems/vagrant-2.2.3/lib/vagrant/action/builtin/handle_box.rb:42:in block in call' /opt/vagrant/embedded/gems/2.2.3/gems/vagrant-2.2.3/lib/vagrant/action/builtin/handle_box.rb:36:insynchronize’
/opt/vagrant/embedded/gems/2.2.3/gems/vagrant-2.2.3/lib/vagrant/action/builtin/handle_box.rb:36:in call' /opt/vagrant/embedded/gems/2.2.3/gems/vagrant-2.2.3/lib/vagrant/action/warden.rb:34:incall’
/opt/vagrant/embedded/gems/2.2.3/gems/vagrant-2.2.3/lib/vagrant/action/warden.rb:95:in block in finalize_action' /opt/vagrant/embedded/gems/2.2.3/gems/vagrant-2.2.3/lib/vagrant/action/warden.rb:34:incall’
/opt/vagrant/embedded/gems/2.2.3/gems/vagrant-2.2.3/lib/vagrant/action/builder.rb:116:in call' /opt/vagrant/embedded/gems/2.2.3/gems/vagrant-2.2.3/lib/vagrant/action/runner.rb:66:inblock in run’
/opt/vagrant/embedded/gems/2.2.3/gems/vagrant-2.2.3/lib/vagrant/util/busy.rb:19:in busy' /opt/vagrant/embedded/gems/2.2.3/gems/vagrant-2.2.3/lib/vagrant/action/runner.rb:66:inrun’
/opt/vagrant/embedded/gems/2.2.3/gems/vagrant-2.2.3/lib/vagrant/action/builtin/call.rb:53:in call' /opt/vagrant/embedded/gems/2.2.3/gems/vagrant-2.2.3/lib/vagrant/action/warden.rb:34:incall’
/opt/vagrant/embedded/gems/2.2.3/gems/vagrant-2.2.3/plugins/providers/virtualbox/action/check_virtualbox.rb:26:in call' /opt/vagrant/embedded/gems/2.2.3/gems/vagrant-2.2.3/lib/vagrant/action/warden.rb:34:incall’
/opt/vagrant/embedded/gems/2.2.3/gems/vagrant-2.2.3/lib/vagrant/action/builder.rb:116:in call' /opt/vagrant/embedded/gems/2.2.3/gems/vagrant-2.2.3/lib/vagrant/action/runner.rb:66:inblock in run’
/opt/vagrant/embedded/gems/2.2.3/gems/vagrant-2.2.3/lib/vagrant/util/busy.rb:19:in busy' /opt/vagrant/embedded/gems/2.2.3/gems/vagrant-2.2.3/lib/vagrant/action/runner.rb:66:inrun’
/opt/vagrant/embedded/gems/2.2.3/gems/vagrant-2.2.3/lib/vagrant/machine.rb:239:in action_raw' /opt/vagrant/embedded/gems/2.2.3/gems/vagrant-2.2.3/lib/vagrant/machine.rb:208:inblock in action’
/opt/vagrant/embedded/gems/2.2.3/gems/vagrant-2.2.3/lib/vagrant/environment.rb:614:in lock' /opt/vagrant/embedded/gems/2.2.3/gems/vagrant-2.2.3/lib/vagrant/machine.rb:194:incall’
/opt/vagrant/embedded/gems/2.2.3/gems/vagrant-2.2.3/lib/vagrant/machine.rb:194:in action' /opt/vagrant/embedded/gems/2.2.3/gems/vagrant-2.2.3/lib/vagrant/batch_action.rb:82:inblock (2 levels) in run’
INFO interface: error: The box failed to unpackage properly. Please verify that the box
file you’re trying to add is not corrupted and that enough disk space
is available and then try again.
The output from attempting to unpackage (if any):

bsdtar: Error opening archive: Unrecognized archive format

The box failed to unpackage properly. Please verify that the box
file you’re trying to add is not corrupted and that enough disk space
is available and then try again.
The output from attempting to unpackage (if any):

bsdtar: Error opening archive: Unrecognized archive format

INFO interface: Machine: error-exit [“Vagrant::Errors::BoxUnpackageFailure”, “The box failed to unpackage properly. Please verify that the box\nfile you’re trying to add is not corrupted and that enough disk space\nis available and then try again.\nThe output from attempting to unpackage (if any):\n\nbsdtar: Error opening archive: Unrecognized archive format\n”]

the problem is in vagrant … I does it even with a simple:

vagrant init hashicorp/precise64 vagrant up

as specified in

I just download centos7 virtual box manually and add it manually … I can ssh to infrastructure now.

@ cottordici

Excellent! Good work and good luck. :grin: