title: Avoid reprovisioning a Vagrant VM if it is already provisioned
body: <p>I am trying to get a shell provisioner to avoid reprovisioning a VM instance if it has already done so previously.</p>
  
  <p>Consider the following Vagrantfile:</p>
  
  <pre><code>Vagrant::Config.run do |config|
    config.vm.define :minimal do |config|
      # Base image
      config.vm.box = "lucid32"
      config.vm.box_url = "http://files.vagrantup.com/lucid32.box"
  
      config.vm.provision :shell, :inline =&gt; "mkdir /tmp/foobar"
    end
  end
  </code></pre>
  
  <p>If you run <code>vagrant up minimal</code>, it will create the box and provision it initially. If you then run <code>vagrant provision minimal</code> it will attempt to reprovision the box but will fail (since the /tmp/foobar directory already exists).</p>
  
  <p>Is there a way to make Vagrant remember whether it has provisioned a machine in the past and to avoid reprovisioning it later?</p>
  
  <p><em>More context: If I run <code>vagrant up minimal</code>, restart my host machine, and then run <code>vagrant up minimal</code> again, it will try to reprovision the box and fail. This happens reasonably often since VirtualBox frequently causes kernel panics on my host machine.</em></p>