VM - Part Five: Cleanup and Troubleshooting

VM - Part Five: Cleanup and Troubleshooting

FFW Blog - illustration
default avatar
Thought byTess Flynn
January 09, 2015

Cleaning up is one of the advantages of working with VMs over a bare metal install. Since everything is in the disk image files, we only need to delete the VM. Vagrant provides two commands for this purpose:

Stopping and Deleting the VM

Change to the directory containing the Vagrantfile, and then stop the VM:

vagrant halt

To delete the VM permanently:

vagrant destroy

That’s it!

Cleaning up the Hosts File

You may choose to remove any custom hostnames you created in your hosts file on your host OS. If you’re using VDD across multiple projects, however, there’s no need to delete the drupal7.dev and drupal8.dev host file entries. Even if you decide to clone VDD again in a different directory, it will still use the same IP address and hostnames.


Troubleshooting a vagrant VM can be difficult. The most common problems are bad provisions due to interruption, corrupted download, or misconfiguration.

  1. Ensure your connection is fast and stable.
  2. Reload the VM using vagrant reload.
  3. If the VM still does not provision correctly, vagrant destroy it and try again.
  4. If you used vagrant box to import the VM (as instructed on http://vagrantbox.es), you need to delete the base VM from your system using vagrant box remove.
  5. Don’t be afraid to start over. Sometimes it’s faster to build a new VM than troubleshooting what went wrong.


This was a short post, but we’ve covered so much throughout this series! I hope that you’ll find using Vagrant and VMs can be a huge boost to your development workflow, especially when switching clients

Best Practices
Learning Series
Technology Tools

Fill out the form to learn how FFW can support your needs.

Read next:

Computer screen: Do more

How Drupal Can Manage Content for Your Customer’s Entire Digital Experience

Image of plane flying above cloud with pink sky

Open source software can provide many benefits to Chief Information Officers or other technical roles. Here's why.

Man standing on edge of cliff with clouds

Usher customers through the sales funnel with messages that are consistent, tailored, and effective.

Image of sailboat with land behind it and cloudy sky

Acquia Drupal Cloud is a content platform built to help users rapidly create content at scale.