Within the VagrantFile, there is a basic configuration already setup and a lot of very useful comments that explain the different possible configurations. Open this file up in your favorite text editor. ![]() In the MyFirstMachine directory there is now a file called VagrantFile. Vagrant init “opentable/win-8.1-enterprise-amd64-nocm”Īdditional boxes can be from the cloud at Configuring the VagrantFile The command below will initalize the MyFirstMachine directory. This command will initialize the directory to hold Vagrant information and creates the VagrantFile.įor this tutorial, we are going to use the box “opentable/win-8.1-enterprise-amd64-nocm”. To initalize the Vagrant box, you need to run the vagrant init command. Open up a command prompt and navigate to the MyFirstMachine directory that you just created. Within c:\VagrantBoxes, create a directory called MyFirstMachine. I use c:\VagrantBoxes to hold all of the my Vagrant machines configurations. The first step is to create a directory to hold the VagrantFile. Base OS: just the OS is installed and as part of the creation of the vagrant machine, you install all of the needed software.įor this tutorial, we are going to use the Base OS box and build out the box with all of the software we need.You just create the vagrant machine and are ready to start developing. Pre-Build: meaning that everything that you need is installed on the box.Vagrant starts with a base box which nothing more than the a portable skelton for building virtual machine. Vagrant create a file called VagrantFile for each virtual machine, The VagrantFile contains the information about the box the virtual machine is based off of, how to setup the network, the virtualization provider (virtualbox, vmare, hyper-v, azure, etc), and any provisioning scripts to run (shell, puppet, chef, etc). We are now ready to create our first virtual machine using Vagrant. To install Vagrant, from the administrative command prompt, run the following Chocolatey command. The command above will also instal Virtualbox as it is listed as a dependency for the virtualbox.extensionpack package. Open an administrative command prompt and run the following Chocolatey command. If you already have Virtualbox installed, you can skip this step. If you are using Hyper-V already, you can not use Virtualbox at the same as they conflict with each other. You could also use Hyper-V (free) or VMWare (paid). Virtualboxįor this tutorial, I am using Virtualbox as the virtual machine provider. Next we are going to install Virtualbox using Chocolatey. You can find the package names on the Chocolatey Gallery at. To install a package, you would run the command: choco install Now that we have Chocolatey installed, we can start installing software or as Chocolatey calls them, packages. This is needed so that all of the environment variables get refresh that are part of the Chocolatey installer. Go ahead and close the command prompt that you used to install Chocolatey. NoProfile -ExecutionPolicy Bypass -Command "iex ((new-object net.webclient).DownloadString(''))"
0 Comments
Leave a Reply. |