title: Run Vagrant on Windows: error when install provision
body: <p>This is my first attempt of using Vagrant on a Windows machine.</p>
  
  <p>I'm just following Vagrant Getting Started guide.</p>
  
  <p>Here is my Vagrantfile:</p>
  
  <pre><code>Vagrant.configure(2) do |config|
      config.vm.box = "hashicorp/precise32"
      config.vm.provision :shell, path: "bootstrap.sh"
      config.ssh.insert_key = false
  end
  </code></pre>
  
  <p>And here is my boostrap.sh (I already try with .ps1)</p>
  
  <pre><code>#!/usr/bin/env bash
  
  apt-get update
  apt-get install -y apache2
  if ! [ -L /var/www ]; then
    rm -rf /var/www
    ln -fs /vagrant /var/www
  fi
  </code></pre>
  
  <p>When I run (I'm using cmder instead default prompt) <code>vagrant up</code> or <code>vagrant reload --provision</code>, the system can't install apache. Here is the complete errors:</p>
  
  <pre><code>? vagrant up
  Bringing machine 'default' up with 'virtualbox' provider...
  ==&gt; default: Checking if box 'hashicorp/precise32' is up to date...
  ==&gt; default: Fixed port collision for 22 =&gt; 2222. Now on port 2200.
  ==&gt; default: Clearing any previously set network interfaces...
  ==&gt; default: Preparing network interfaces based on configuration...
      default: Adapter 1: nat
  ==&gt; default: Forwarding ports...
      default: 22 =&gt; 2200 (adapter 1)
  ==&gt; default: Booting VM...
  ==&gt; default: Waiting for machine to boot. This may take a few minutes...
      default: SSH address: 127.0.0.1:2200
      default: SSH username: vagrant
      default: SSH auth method: private key
  ==&gt; default: Machine booted and ready!
  ==&gt; default: Checking for guest additions in VM...
      default: The guest additions on this VM do not match the installed version of
      default: VirtualBox! In most cases this is fine, but in rare cases it can
      default: prevent things such as shared folders from working properly. If you see
      default: shared folder errors, please make sure the guest additions within the
      default: virtual machine match the version of VirtualBox you have installed on
      default: your host and reload your VM.
      default:
      default: Guest Additions Version: 4.2.0
      default: VirtualBox Version: 5.0
  ==&gt; default: Mounting shared folders...
      default: /vagrant =&gt; M:/sites/site1
  ==&gt; default: Running provisioner: shell...
      default: Running: C:/Users/Marcelo/AppData/Local/Temp/vagrant-shell20151010-5260-lpnmoq.sh
  ==&gt; default: stdin: is not a tty
  ==&gt; default: Err http://us.archive.ubuntu.com precise InRelease
  ==&gt; default:
  ==&gt; default: Err http://security.ubuntu.com precise-security InRelease
  ==&gt; default:
  ==&gt; default: Err http://us.archive.ubuntu.com precise-updates InRelease
  ==&gt; default:
  ==&gt; default: Err http://security.ubuntu.com precise-security Release.gpg
  ==&gt; default:   Temporary failure resolving 'security.ubuntu.com'
  ==&gt; default: Err http://us.archive.ubuntu.com precise-backports InRelease
  ==&gt; default:
  ==&gt; default: Err http://us.archive.ubuntu.com precise Release.gpg
  ==&gt; default:   Temporary failure resolving 'us.archive.ubuntu.com'
  ==&gt; default: Err http://us.archive.ubuntu.com precise-updates Release.gpg
  ==&gt; default:   Temporary failure resolving 'us.archive.ubuntu.com'
  ==&gt; default: Err http://us.archive.ubuntu.com precise-backports Release.gpg
  ==&gt; default:   Temporary failure resolving 'us.archive.ubuntu.com'
  ==&gt; default: Reading package lists...
  ==&gt; default: W
  ==&gt; default: :
  ==&gt; default: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise/InRelease
  ==&gt; default: W
  ==&gt; default: :
  ==&gt; default: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise-updates/InRelease
  ==&gt; default: W
  ==&gt; default: :
  ==&gt; default: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise-backports/InRelease
  ==&gt; default: W
  ==&gt; default: :
  ==&gt; default: Failed to fetch http://security.ubuntu.com/ubuntu/dists/precise-security/InRelease
  ==&gt; default: W
  ==&gt; default: :
  ==&gt; default: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise/Release.gpg  Temporary failure resolving 'us.archive.ubuntu.com'
  ==&gt; default: W
  ==&gt; default: :
  ==&gt; default: Failed to fetch http://security.ubuntu.com/ubuntu/dists/precise-security/Release.gpg  Temporary failure resolving 'security.ubuntu.com'
  ==&gt; default: W
  ==&gt; default: :
  ==&gt; default: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise-updates/Release.gpg  Temporary failure resolving 'us.archive.ubuntu.com'
  ==&gt; default: W
  ==&gt; default: :
  ==&gt; default: Failed to fetch http://us.archive.ubuntu.com/ubuntu/dists/precise-backports/Release.gpg  Temporary failure resolving 'us.archive.ubuntu.com'
  ==&gt; default: W
  ==&gt; default: :
  ==&gt; default: Some index files failed to download. They have been ignored, or old ones used instead.
  ==&gt; default: Reading package lists...
  ==&gt; default: Building dependency tree...
  ==&gt; default: Reading state information...
  ==&gt; default: The following extra packages will be installed:
  ==&gt; default:   apache2-mpm-worker apache2-utils apache2.2-bin apache2.2-common libapr1
  ==&gt; default:   libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap ssl-cert
  ==&gt; default: Suggested packages:
  ==&gt; default:   www-browser apache2-doc apache2-suexec apache2-suexec-custom
  ==&gt; default:   openssl-blacklist
  ==&gt; default: The following NEW packages will be installed:
  ==&gt; default:   apache2 apache2-mpm-worker apache2-utils apache2.2-bin apache2.2-common
  ==&gt; default:   libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap ssl-cert
  ==&gt; default: 0 upgraded, 10 newly installed, 0 to remove and 66 not upgraded.
  ==&gt; default: Need to get 1,829 kB of archives.
  ==&gt; default: After this operation, 5,311 kB of additional disk space will be used.
  ==&gt; default: Err http://us.archive.ubuntu.com/ubuntu/ precise/main libapr1 i386 1.4.6-1
  ==&gt; default:   Temporary failure resolving 'us.archive.ubuntu.com'
  ==&gt; default: Err http://us.archive.ubuntu.com/ubuntu/ precise/main libaprutil1 i386 1.3.12+dfsg-3
  ==&gt; default:   Temporary failure resolving 'us.archive.ubuntu.com'
  ==&gt; default: Err http://us.archive.ubuntu.com/ubuntu/ precise/main libaprutil1-dbd-sqlite3 i386 1.3.12+dfsg-3
  ==&gt; default:   Temporary failure resolving 'us.archive.ubuntu.com'
  ==&gt; default: Err http://us.archive.ubuntu.com/ubuntu/ precise/main libaprutil1-ldap i386 1.3.12+dfsg-3
  ==&gt; default:   Temporary failure resolving 'us.archive.ubuntu.com'
  ==&gt; default: Err http://us.archive.ubuntu.com/ubuntu/ precise/main apache2.2-bin i386 2.2.22-1ubuntu1
  ==&gt; default:   Temporary failure resolving 'us.archive.ubuntu.com'
  ==&gt; default: Err http://us.archive.ubuntu.com/ubuntu/ precise/main apache2-utils i386 2.2.22-1ubuntu1
  ==&gt; default:   Temporary failure resolving 'us.archive.ubuntu.com'
  ==&gt; default: Err http://us.archive.ubuntu.com/ubuntu/ precise/main apache2.2-common i386 2.2.22-1ubuntu1
  ==&gt; default:   Temporary failure resolving 'us.archive.ubuntu.com'
  ==&gt; default: Err http://us.archive.ubuntu.com/ubuntu/ precise/main apache2-mpm-worker i386 2.2.22-1ubuntu1
  ==&gt; default:   Temporary failure resolving 'us.archive.ubuntu.com'
  ==&gt; default: Err http://us.archive.ubuntu.com/ubuntu/ precise/main apache2 i386 2.2.22-1ubuntu1
  ==&gt; default:   Temporary failure resolving 'us.archive.ubuntu.com'
  ==&gt; default: Err http://us.archive.ubuntu.com/ubuntu/ precise-updates/main ssl-cert all 1.0.28ubuntu0.1
  ==&gt; default:   Temporary failure resolving 'us.archive.ubuntu.com'
  ==&gt; default: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/a/apr/libapr1_1.4.6-1_i386.deb  Temporary failure resolving 'us.archive.ubuntu.com'
  ==&gt; default: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/a/apr-util/libaprutil1_1.3.12+dfsg-3_i386.deb  Temporary failure resolving 'us.archive.ubuntu.com'
  ==&gt; default: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/a/apr-util/libaprutil1-dbd-sqlite3_1.3.12+dfsg-3_i386.deb  Temporary failure resolving 'us.archive.ubuntu.com'
  ==&gt; default: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/a/apr-util/libaprutil1-ldap_1.3.12+dfsg-3_i386.deb  Temporary failure resolving 'us.archive.ubuntu.com'
  ==&gt; default: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/a/apache2/apache2.2-bin_2.2.22-1ubuntu1_i386.deb  Temporary failure resolving 'us.archive.ubuntu.com'
  ==&gt; default: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/a/apache2/apache2-utils_2.2.22-1ubuntu1_i386.deb  Temporary failure resolving 'us.archive.ubuntu.com'
  ==&gt; default: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/a/apache2/apache2.2-common_2.2.22-1ubuntu1_i386.deb  Temporary failure resolving 'us.archive.ubuntu.com'
  ==&gt; default: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/a/apache2/apache2-mpm-worker_2.2.22-1ubuntu1_i386.deb  Temporary failure resolving 'us.archive.ubuntu.com'
  ==&gt; default: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/a/apache2/apache2_2.2.22-1ubuntu1_i386.deb  Temporary failure resolving 'us.archive.ubuntu.com'
  ==&gt; default: Failed to fetch http://us.archive.ubuntu.com/ubuntu/pool/main/s/ssl-cert/ssl-cert_1.0.28ubuntu0.1_all.deb  Temporary failure resolving 'us.archive.ubuntu.com'
  ==&gt; default: E
  ==&gt; default: :
  ==&gt; default: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
  </code></pre>
  
  <p><strong>UPDATE</strong></p>
  
  <p>Found a possible solution: change my networking DNS to Google Public DNS</p>