{"action":"created","issue":{"url":"https://api.github.com/repos/mitchellh/vagrant/issues/6042","labels_url":"https://api.github.com/repos/mitchellh/vagrant/issues/6042/labels{/name}","comments_url":"https://api.github.com/repos/mitchellh/vagrant/issues/6042/comments","events_url":"https://api.github.com/repos/mitchellh/vagrant/issues/6042/events","html_url":"https://github.com/mitchellh/vagrant/issues/6042","id":97520798,"number":6042,"title":"vagrant box update fails in multimachine environments","user":{"login":"kcormier","id":1553277,"avatar_url":"https://avatars.githubusercontent.com/u/1553277?v=3","gravatar_id":"","url":"https://api.github.com/users/kcormier","html_url":"https://github.com/kcormier","followers_url":"https://api.github.com/users/kcormier/followers","following_url":"https://api.github.com/users/kcormier/following{/other_user}","gists_url":"https://api.github.com/users/kcormier/gists{/gist_id}","starred_url":"https://api.github.com/users/kcormier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kcormier/subscriptions","organizations_url":"https://api.github.com/users/kcormier/orgs","repos_url":"https://api.github.com/users/kcormier/repos","events_url":"https://api.github.com/users/kcormier/events{/privacy}","received_events_url":"https://api.github.com/users/kcormier/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-07-27T18:07:00Z","updated_at":"2015-07-29T09:44:53Z","closed_at":null,"body":"When updating a box in a multi vm environment, vagrant box update errors out, even though the update actually succeeds.  It appears that the box update runs successfully for the first machine in the environment, but then attempts to run the exact same update for the second box which fails because the updated box already exists.\r\n\r\nSample Vagrantfile\r\n```\r\nVagrant.configure(2) do |config|\r\n  config.vm.box = \"hashicorp/precise64\"\r\n  config.vm.define \"vagrant1\"\r\n  config.vm.define \"vagrant2\"\r\nend\r\n```\r\n\r\nSample output\r\n```\r\nKevin:vagrant_box_update_test kcormier$ vagrant box update\r\n==> vagrant1: Checking for updates to 'hashicorp/precise64'\r\n    vagrant1: Latest installed version: 1.0.0\r\n    vagrant1: Version constraints: \r\n    vagrant1: Provider: virtualbox\r\n==> vagrant1: Updating 'hashicorp/precise64' with provider 'virtualbox' from version\r\n==> vagrant1: '1.0.0' to '1.1.0'...\r\n==> vagrant1: Loading metadata for box 'https://atlas.hashicorp.com/hashicorp/precise64?access_token=******************'\r\n==> vagrant1: Adding box 'hashicorp/precise64' (v1.1.0) for provider: virtualbox\r\n    vagrant1: Downloading: https://vagrantcloud.com/hashicorp/boxes/precise64/versions/1.1.0/providers/virtualbox.box\r\n==> vagrant1: Successfully added box 'hashicorp/precise64' (v1.1.0) for 'virtualbox'!\r\n==> vagrant2: Checking for updates to 'hashicorp/precise64'\r\n    vagrant2: Latest installed version: 1.0.0\r\n    vagrant2: Version constraints: \r\n    vagrant2: Provider: virtualbox\r\n==> vagrant2: Updating 'hashicorp/precise64' with provider 'virtualbox' from version\r\n==> vagrant2: '1.0.0' to '1.1.0'...\r\n==> vagrant2: Loading metadata for box 'https://atlas.hashicorp.com/hashicorp/precise64?access_token=*********************'\r\n==> vagrant2: Adding box 'hashicorp/precise64' (v1.1.0) for provider: virtualbox\r\nThe box you're attempting to add already exists. Remove it before\r\nadding it again or add it with the `--force` flag.\r\n\r\nName: hashicorp/precise64\r\nProvider: virtualbox\r\nVersion: 1.1.0\r\n```\r\n\r\nTested & reproduced with vagrant 1.7.4 on OSX 10.10.4"},"comment":{"url":"https://api.github.com/repos/mitchellh/vagrant/issues/comments/125898191","html_url":"https://github.com/mitchellh/vagrant/issues/6042#issuecomment-125898191","issue_url":"https://api.github.com/repos/mitchellh/vagrant/issues/6042","id":125898191,"user":{"login":"mcameron","id":35389,"avatar_url":"https://avatars.githubusercontent.com/u/35389?v=3","gravatar_id":"","url":"https://api.github.com/users/mcameron","html_url":"https://github.com/mcameron","followers_url":"https://api.github.com/users/mcameron/followers","following_url":"https://api.github.com/users/mcameron/following{/other_user}","gists_url":"https://api.github.com/users/mcameron/gists{/gist_id}","starred_url":"https://api.github.com/users/mcameron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mcameron/subscriptions","organizations_url":"https://api.github.com/users/mcameron/orgs","repos_url":"https://api.github.com/users/mcameron/repos","events_url":"https://api.github.com/users/mcameron/events{/privacy}","received_events_url":"https://api.github.com/users/mcameron/received_events","type":"User","site_admin":false},"created_at":"2015-07-29T09:44:53Z","updated_at":"2015-07-29T09:44:53Z","body":"Example changes:\r\n```\r\nVagrant.configure(2) do |config|\r\n    config.vm.define \"vagrant1\" do |config|\r\n        config.vm.box_url = 'http://files.vagrantup.com/precise32.box'\r\n        config.vm.box = \"vagrant1\"\r\n    end\r\n    config.vm.define \"vagrant2\" do |config|\r\n    config.vm.box_url = 'http://files.vagrantup.com/precise32.box'\r\n        config.vm.box = \"vagrant2\"\r\n    end\r\nend\r\n```\r\nExample output:\r\n```\r\nvagrant up\r\nBringing machine 'vagrant1' up with 'virtualbox' provider...\r\nBringing machine 'vagrant2' up with 'virtualbox' provider...\r\n==> vagrant1: Box 'vagrant1' could not be found. Attempting to find and install...\r\n    vagrant1: Box Provider: virtualbox\r\n    vagrant1: Box Version: >= 0\r\n==> vagrant1: Box file was not detected as metadata. Adding it directly...\r\n==> vagrant1: Adding box 'vagrant1' (v0) for provider: virtualbox\r\n    vagrant1: Downloading: http://files.vagrantup.com/precise32.box\r\n==> vagrant1: Successfully added box 'vagrant1' (v0) for 'virtualbox'!\r\n==> vagrant1: Importing base box 'vagrant1'...\r\n==> vagrant1: Matching MAC address for NAT networking...\r\n==> vagrant1: Setting the name of the VM: multi-machine_vagrant1_1438162871598_421\r\n==> vagrant1: Fixed port collision for 22 => 2222. Now on port 2202.\r\n==> vagrant1: Clearing any previously set network interfaces...\r\n==> vagrant1: Preparing network interfaces based on configuration...\r\n    vagrant1: Adapter 1: nat\r\n==> vagrant1: Forwarding ports...\r\n    vagrant1: 22 => 2202 (adapter 1)\r\n==> vagrant1: Running 'pre-boot' VM customizations...\r\n==> vagrant1: Booting VM...\r\n==> vagrant1: Waiting for machine to boot. This may take a few minutes...\r\n    vagrant1: SSH address: 127.0.0.1:2202\r\n    vagrant1: SSH username: vagrant\r\n    vagrant1: SSH auth method: private key\r\n    vagrant1: Warning: Connection timeout. Retrying...\r\n    vagrant1:\r\n    vagrant1: Vagrant insecure key detected. Vagrant will automatically replace\r\n    vagrant1: this with a newly generated keypair for better security.\r\n    vagrant1:\r\n    vagrant1: Inserting generated public key within guest...\r\n    vagrant1: Removing insecure key from the guest if it's present...\r\n    vagrant1: Key inserted! Disconnecting and reconnecting using new SSH key...\r\n==> vagrant1: Machine booted and ready!\r\n==> vagrant1: Checking for guest additions in VM...\r\n    vagrant1: The guest additions on this VM do not match the installed version of\r\n    vagrant1: VirtualBox! In most cases this is fine, but in rare cases it can\r\n    vagrant1: prevent things such as shared folders from working properly. If you see\r\n    vagrant1: shared folder errors, please make sure the guest additions within the\r\n    vagrant1: virtual machine match the version of VirtualBox you have installed on\r\n    vagrant1: your host and reload your VM.\r\n    vagrant1:\r\n    vagrant1: Guest Additions Version: 4.2.0\r\n    vagrant1: VirtualBox Version: 5.0\r\n==> vagrant1: Mounting shared folders...\r\n    vagrant1: /vagrant => /Users/mca18/Documents/m/multi-machine\r\n==> vagrant2: Box 'vagrant2' could not be found. Attempting to find and install...\r\n    vagrant2: Box Provider: virtualbox\r\n    vagrant2: Box Version: >= 0\r\n==> vagrant2: Box file was not detected as metadata. Adding it directly...\r\n==> vagrant2: Adding box 'vagrant2' (v0) for provider: virtualbox\r\n    vagrant2: Downloading: http://files.vagrantup.com/precise32.box\r\n==> vagrant2: Successfully added box 'vagrant2' (v0) for 'virtualbox'!\r\n==> vagrant2: Importing base box 'vagrant2'...\r\n==> vagrant2: Matching MAC address for NAT networking...\r\n==> vagrant2: Setting the name of the VM: multi-machine_vagrant2_1438162964450_58279\r\n==> vagrant2: Fixed port collision for 22 => 2222. Now on port 2203.\r\n==> vagrant2: Clearing any previously set network interfaces...\r\n==> vagrant2: Preparing network interfaces based on configuration...\r\n    vagrant2: Adapter 1: nat\r\n==> vagrant2: Forwarding ports...\r\n    vagrant2: 22 => 2203 (adapter 1)\r\n==> vagrant2: Running 'pre-boot' VM customizations...\r\n==> vagrant2: Booting VM...\r\n==> vagrant2: Waiting for machine to boot. This may take a few minutes...\r\n    vagrant2: SSH address: 127.0.0.1:2203\r\n    vagrant2: SSH username: vagrant\r\n    vagrant2: SSH auth method: private key\r\n    vagrant2: Warning: Connection timeout. Retrying...\r\n    vagrant2:\r\n    vagrant2: Vagrant insecure key detected. Vagrant will automatically replace\r\n    vagrant2: this with a newly generated keypair for better security.\r\n    vagrant2:\r\n    vagrant2: Inserting generated public key within guest...\r\n    vagrant2: Removing insecure key from the guest if it's present...\r\n    vagrant2: Key inserted! Disconnecting and reconnecting using new SSH key...\r\n==> vagrant2: Machine booted and ready!\r\n==> vagrant2: Checking for guest additions in VM...\r\n    vagrant2: The guest additions on this VM do not match the installed version of\r\n    vagrant2: VirtualBox! In most cases this is fine, but in rare cases it can\r\n    vagrant2: prevent things such as shared folders from working properly. If you see\r\n    vagrant2: shared folder errors, please make sure the guest additions within the\r\n    vagrant2: virtual machine match the version of VirtualBox you have installed on\r\n    vagrant2: your host and reload your VM.\r\n    vagrant2:\r\n    vagrant2: Guest Additions Version: 4.2.0\r\n    vagrant2: VirtualBox Version: 5.0\r\n==> vagrant2: Mounting shared folders...\r\n    vagrant2: /vagrant => /Users/mca18/Documents/m/multi-machine\r\n```"}}