Search code examples
bashshellvagrantvagrantfilevagrant-plugin

How to keep Vagrant box running in background?


Instead of running a vagrant box in the background (via vagrant ssh in a terminal shell), is there a way to run it using a daemon? This could be used for having people connect to your box (via vagrant connect).

Right now I'm just having a terminal window stay on vagrant share --ssh.

I can't do

vagrant share --ssh &

because it requires my password and I couldn't put in my password.


Solution

  • In essence, whenever you start a Vagrant box with vagrant up, it will already be running in the background (in VirtualBox or VMWare, for example). You don't need to worry about keeping an ssh session connected to it.