In this tutorial you will learn how to use Vagrant suspend and resume commands.
Code used during this tutorial:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# Vagrant suspend and resume commands # Open Oracle VM VirtualBox Manager cd ~/vagrant/ # Suspends the guest machine Vagrant is managing, # rather than fully shutting it down or destroying it vagrant suspend cd ~/vagrant/ubuntu-trusty32/ vagrant status vagrant up --provider virtualbox vagrant status vagrant ssh touch ~/test.txt ls -al ~/ vagrant suspend vagrant status # Resumes a Vagrant managed machine that was previously suspended, # perhaps with the suspend command. vagrant resume vagrant status vagrant ssh ls -al ~/ # You may experience some problems when using "vagrant suspend" when Vagrant is run on a VM # Useful links https://docs.vagrantup.com/v2/cli/suspend.html https://docs.vagrantup.com/v2/cli/resume.html https://github.com/mitchellh/vagrant/issues/1809 |
Useful links:
https://docs.vagrantup.com/v2/cli/suspend.html
https://docs.vagrantup.com/v2/cli/resume.html
https://github.com/mitchellh/vagrant/issues/1809