

Shut down: shutting down an instance stops the running virtual machine. Run vagrant reload in Terminal or select Tools | Vagrant | Reload from the main menu. Reload: reloading an instance is required when you've made changes to the Vagrantfile and need Vagrant to reload the current virtual environment and its configuration. Run vagrant resume in Terminal or select Tools | Vagrant | Resume from the main menu. Resume: resuming an instance brings up a previously suspended virtual machine. Run vagrant suspend in Terminal or select Tools | Vagrant | Suspend from the main menu. Suspend: suspending an instance pauses all the processes and saves the current state of a virtual machine.
#VAGRANT BOX FULL#
To find a full list of available Vagrant commands, refer to Command-Line-Interface.

In this article, we show only the most important commands to work with the virtual machine. They can be run either from Terminal ( Alt+F12) or from the main menu. To control an instance, use Vagrant commands. Open the embedded Terminal ( Alt+F12) and run the following command: vagrant ssh When the virtual machine is launched, it runs on a backend. Open the embedded Terminal ( Alt+F12) and run the following command: vagrant up.įrom the main menu, choose Tools | Vagrant | Up. Once the Vagrantfile initialization is completed and virtual box is specified, you are ready to deploy and run the virtual machine. To change the default root folder for the virtual boxes, open the Settings dialog ( Ctrl+Alt+S), select Tools | Vagrant and change the Instance folder location. In the Boxes window click the button and specify the following:Īll the downloaded boxes are stored in the location of the Vagrantfile. In the Settings dialog ( Ctrl+Alt+S), select Tools | Vagrant. Open the Vagrantfile and change config.vm.box = "base" line to the following: config.vm.box = "ubuntu/trusty64". To find a list of available virtual boxes, refer to Discovering Vagrant Boxes. You can specify any other virtual box based on your needs.

It contains a basic Ubuntu virtual machine. Specify the virtual boxĪs an example, we will specify the ubuntu/trusty64 box. The config.vm.box = "." line specifies the virtual box that will be used in a project. You will see that Vagrantfile already has a predefined configuration. In the Project tool window Alt+1, switch to the Project files view and double-click the Vagrantfile to open it in the embedded editor. This will initialize the Vagrantfile and put it into your project root folder by default.įrom the main menu, choose Tools | Vagrant | Init in Project Root and select the target root folder from the opened window. Open the embedded Terminal ( Alt+F12) and run the following command: vagrant init To start working with Vagrant, you need to initialize the Vagrantfile. Make sure virtualization is enabled on your computer.
#VAGRANT BOX INSTALL#
Install Vagrant and Oracle's VirtualBox applications. Install and enable Vagrant plugin as described in Installing plugins from JetBrains repository.
#VAGRANT BOX HOW TO#
In this article, we will explain how to initialize the Vagrantfile, specify the virtual box, run and interact with the virtual machine from PhpStorm. Vagrant works with different providers of virtual boxes, such as Oracle's VirtualBox, VMWare or AWS. Virtual box: a virtual sandbox that contains a preconfigured virtual machine. Vagrantfile: the main configuration file that defines the Vagrant environment, stores all the configuration for the virtual boxes and tells Vagrant how to work with virtual machines. In the context of working with Vagrant, you will meet the following definitions: PhpStorm provides a full integration with Vagrant allowing you to configure the Vagrant virtual environment, control the behavior of virtual machines, and execute Vagrant commands from within your project. Vagrant is a command-line utility used to manage the lifecycle of virtual machines. Vagrant: Working with Reproducible Development Environments
