In this tutorial I will speak about the Vagrant halt command. You will learn how to shut down the running machine Vagrant is managing both in a graceful and in a forced way. Also, you will learn how to manage the virtual machine directly using Oracle VM VirtualBox Manager.
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 |
# Vagrant halt command # Open Oracle VM VirtualBox Manager cd ~/vagrant/ubuntu-trusty32/ vagrant up --provider virtualbox # Shut down the running machine Vagrant is managing vagrant halt # Alternative solution vagrant up --provider virtualbox vagrant ssh sudo poweroff vagrant up --provider virtualbox # -f # Don't attempt to gracefully shut down the machine # This effectively pulls the power on the guest machine vagrant halt -f # You can manage the VM from Oracle VM VirtualBox Manager # Useful links https://docs.vagrantup.com/v2/cli/halt.html |
Useful links:
https://docs.vagrantup.com/v2/cli/halt.html