Teardown an environment
Now that you've explored your development environment, it's time to stop, shut down, and finally destroy the environment. When using Vagrant you will choose from these options depending on how long you are stopping your work for, and whether or not you want to be able to come back to it.
Suspend the machine
Suspending the virtual machine will stop it and save its current running state. Suspend the machine now.
When you begin working again bring the machine back up and its state resumes from where you left off. Start the machine again.
Suspending your machine is intended for stopping and starting work quickly. The downside is that the virtual machine will still use disk space while suspended, and requires additional disk space to store the state of the virtual machine RAM.
Halt the machine
Halting the virtual machine will gracefully shut down the guest operating system and power down the guest machine. Halt your machine now.
Halting your machine will cleanly shut it down, preserving the contents of disk and allowing you to cleanly start it again. Restart your machine.
A halted guest machine will take more time to start from a cold boot and will still consume disk space.
Destroy the machine
Destroying the virtual machine will remove
all traces of the guest machine from your system. It'll stop the guest machine,
power it down, and reclaim its disk space and RAM. Destroy the machine now, and confirm with a yes
when prompted.
Again, when you are ready to
work again, just issue a vagrant up
.
It takes even longer to bring a machine up once you destroy it, and the machine's state will not be saved.
You have successfully suspended, halted, and destroyed your virtual environment with Vagrant.