Vagrant: Vagrant box ubuntu/bionic64 20200210.0.0 failed to unpackage properly

Created on 12 Feb 2020  ·  9Comments  ·  Source: hashicorp/vagrant

Tip: Before submitting your issue, don't hesitate to remove the above introductory text, possible empty sections (e.g. References), and this tip.

Vagrant version

Vagrant 2.2.7

Host operating system

Windows 10 / Cygwin (I run Vagrant in Cygwin).

Guest operating system

Ubuntu 18.04 LTS

Vagrantfile

# -*- mode: ruby -*-
# vi: set ft=ruby :
#
# Requirements:
#
#   * Assigned host names
#   * Assigned static IP addresses that are pingable
#

Vagrant.configure("2") do |config|

  # Ansible Control Node
  config.vm.define "control", primary:true do |config|
    config.vm.box = "ubuntu/bionic64"
    config.vm.hostname = "control.local"
    config.vm.provider :virtualbox do |vb|
      vb.name = "control"
      vb.memory = "2048"
    end
    config.vm.network "public_network", use_dhcp_assigned_default_route: true, ip: "192.168.86.81"
    config.vm.provision :shell, path: "bootstrap.sh"
  end

  # Ansible Managed Node: lb01
  config.vm.define "lb01" do |config|
    config.vm.box = "ubuntu/bionic64"
    config.vm.network "forwarded_port", guest: 80, host: 8080
    config.vm.network "forwarded_port", guest: 443, host: 8443
    config.vm.hostname = "lb01.local"
    config.vm.provider :virtualbox do |vb|
      vb.name = "lb01"
      vb.memory = "1536"
    end
    config.vm.network "public_network", use_dhcp_assigned_default_route: true, ip: "192.168.86.82"
    config.vm.provision :shell, path: "bootstrap.sh"
  end

  # Ansible Managed Node: app01
  config.vm.define "app01" do |config|
    config.vm.box = "ubuntu/bionic64"
    config.vm.network "forwarded_port", guest: 80, host: 8180
    config.vm.network "forwarded_port", guest: 443, host: 8543
    config.vm.hostname = "app01.local"
    config.vm.provider :virtualbox do |vb|
      vb.name = "app01"
      vb.memory = "1536"
    end
    config.vm.network "public_network", use_dhcp_assigned_default_route: true, ip: "192.168.86.83"
    config.vm.provision :shell, path: "bootstrap.sh"
  end

  # Ansible Managed Node: app02
  config.vm.define "app02" do |config|
    config.vm.box = "ubuntu/bionic64"
    config.vm.network "forwarded_port", guest: 80, host: 8280
    config.vm.network "forwarded_port", guest: 443, host: 8643
    config.vm.hostname = "app02.local"
    config.vm.provider :virtualbox do |vb|
      vb.name = "app02"
      vb.memory = "1536"
    end
    config.vm.network "public_network", use_dhcp_assigned_default_route: true, ip: "192.168.86.84"
    config.vm.provision :shell, path: "bootstrap.sh"
  end

  # Ansible Managed Node: db01
  config.vm.define "db01" do |config|
    config.vm.box = "ubuntu/bionic64"
    config.vm.network "forwarded_port", guest: 80, host: 8380
    config.vm.network "forwarded_port", guest: 443, host: 8743
    config.vm.hostname = "db01.local"
    config.vm.provider :virtualbox do |vb|
      vb.name = "db01"
      vb.memory = "2048"
    end
    config.vm.network "public_network", use_dhcp_assigned_default_route: true, ip: "192.168.86.85"
    config.vm.provision :shell, path: "bootstrap.sh"
  end

  # source: https://devops.stackexchange.com/questions/1237/how-do-i-configure-ssh-keys-in-a-vagrant-multi-machine-setup
  config.vm.provision "file", source: "id_rsa", destination: "/home/vagrant/.ssh/id_rsa"
  public_key = File.read("id_rsa.pub")
  config.vm.provision :shell, :inline =>"
    echo 'Copying ansible-vm public SSH Keys to the VM'
    mkdir -p /home/vagrant/.ssh
    chmod 700 /home/vagrant/.ssh
    echo '#{public_key}' >> /home/vagrant/.ssh/authorized_keys
    chmod -R 600 /home/vagrant/.ssh/authorized_keys
    chmod -R 600 /home/vagrant/.ssh/id_rsa
    echo 'Host *' >> /home/vagrant/.ssh/config
    echo 'StrictHostKeyChecking no' >> /home/vagrant/.ssh/config
    echo 'UserKnownHostsFile /dev/null' >> /home/vagrant/.ssh/config
    chmod -R 600 /home/vagrant/.ssh/config
    ", privileged: false

end
### Debug output Provide a link to a GitHub Gist containing the complete debug output: https://www.vagrantup.com/docs/other/debugging.html. The debug output should be very long. Do NOT paste the debug output in the issue, just paste the link to the Gist. ### Expected behavior It should download and unpackage the new box file. ### Actual behavior What actually happened?
==> db01: Checking for updates to 'ubuntu/bionic64'
    db01: Latest installed version: 20191125.0.0
    db01: Version constraints:
    db01: Provider: virtualbox
==> db01: Updating 'ubuntu/bionic64' with provider 'virtualbox' from version
==> db01: '20191125.0.0' to '20200210.0.0'...
==> db01: Loading metadata for box 'https://vagrantcloud.com/ubuntu/bionic64'
==> db01: Adding box 'ubuntu/bionic64' (v20200210.0.0) for provider: virtualbox
    db01: Downloading: https://vagrantcloud.com/ubuntu/boxes/bionic64/versions/20200210.0.0/providers/virtualbox.box
    db01: Download redirected to host: cloud-images.ubuntu.com
    db01:
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):

x box.ovf
x Vagrantfile
x metadata.json
x ubuntu-bionic-18.04-cloudimg.mf
x ubuntu-bionic-18.04-cloudimg.vmdk: Truncated tar archive
bsdtar.EXE: Error exit delayed from previous errors.

Steps to reproduce

Just run "vagrant box update". Very consistent.

References

Are there any other GitHub issues (open or closed) that should be linked here?
For example:

  • No

Most helpful comment

We can use 20200206.0.0 image version by following command:

vagrant box add --name ubuntu/bionic64 https://cloud-images.ubuntu.com/bionic/20200206/bionic-server-cloudimg-amd64-vagrant.box

and it seems fine.

All 9 comments

Same here as well.

Vagrant version 2.2.7
Host operating system Linux Mint 19.3

Reproduced in my environment, too.

Vagrant version: 2.2.7
Host OS: macOS Mojave (10.14.6)

I tried downloading box file directly and checked it by tar tf

$ curl -O https://cloud-images.ubuntu.com/bionic/current/bionic-server-cloudimg-amd64-vagrant.box
$ tar tf bionic-server-cloudimg-amd64-vagrant.box
box.ovf
Vagrantfile
metadata.json
ubuntu-bionic-18.04-cloudimg.mf
ubuntu-bionic-18.04-cloudimg.vmdk
tar: Truncated input file (needed 321867264 bytes, only 321858560 available)
tar: Error exit delayed from previous errors.

Seems that box file itself is something wrong.

I'm also experiencing this problem.

Vagrant version 2.2.7
Host: Windows 10

==> default: Loading metadata for box 'https://vagrantcloud.com/ubuntu/bionic64'
==> default: Adding box 'ubuntu/bionic64' (v20200210.0.0) for provider: virtualbox
    default: Downloading: https://vagrantcloud.com/ubuntu/boxes/bionic64/versions/20200210.0.0/providers/virtualbox.box
    default: Download redirected to host: cloud-images.ubuntu.com
    default:
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):

x box.ovf
x Vagrantfile
x metadata.json
x ubuntu-bionic-18.04-cloudimg.mf
x ubuntu-bionic-18.04-cloudimg.vmdk: Truncated tar archive
bsdtar.EXE: Error exit delayed from previous errors.

Can we use the previous version(s) of this box somehow? 20200131.0.0 seemed to work perfectly. This way we can continue on until fixed.

We can use 20200206.0.0 image version by following command:

vagrant box add --name ubuntu/bionic64 https://cloud-images.ubuntu.com/bionic/20200206/bionic-server-cloudimg-amd64-vagrant.box

and it seems fine.

We can use 20200206.0.0 image version by following command:

vagrant box add --name ubuntu/bionic64 https://cloud-images.ubuntu.com/bionic/20200206/bionic-server-cloudimg-amd64-vagrant.box

and it seems fine.

Not working for us, Maybe they have a problem with the redirected download part?

Edit:
If you do a vagrant box list you will see version is 0. So I set the box version to 0 and it worked:
puppetserver.vm.box_version = "0"

We can use 20200206.0.0 image version by following command:

vagrant box add --name ubuntu/bionic64 https://cloud-images.ubuntu.com/bionic/20200206/bionic-server-cloudimg-amd64-vagrant.box

and it seems fine.

It does seem to work for me.

Hi all,

Thanks for reporting this issue. I was also able to confirm that this is an issue with the box itself and not an issue with Vagrant. As @t-sugino kindly pointed out, you can use a different version of the bionic64 box by passing a specific version to vagrant box add.

You can also pin the box version in your Vagrantfile using the box_version option:

Vagrant.configure("2") do |config|
  config.vm.box = "ubuntu/bionic64"
  config.vm.box_version = "20200206.0.0"
end

For future reference, bugs with the Ubuntu Vagrant boxes can be filed in the cloud-images project on Launchpad.net.

Cheers! 😄

@jbonhag, thanks for pointing me to the proper place to have reported this problem.

I'm going to lock this issue because it has been closed for _30 days_ ⏳. This helps our maintainers find and focus on the active issues.

If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

StefanScherer picture StefanScherer  ·  3Comments

jsirex picture jsirex  ·  3Comments

Cbeck527 picture Cbeck527  ·  3Comments

bbaassssiiee picture bbaassssiiee  ·  3Comments

rhencke picture rhencke  ·  3Comments