Questions tagged [vagrantfile]

Vagrantfiles are configuration files for vagrant. The Vagrantfile describes the type of virtual machine, and how to configure and provision the vm.

The primary function of the Vagrantfile is to describe the type of machine required for a project, and how to configure and provision these machines. Vagrantfile are called Vagrantfiles because the actual literal filename for the file is Vagrantfile (casing doesn't matter).

Vagrant is meant to run with one Vagrantfile per project, and the Vagrantfile is supposed to be committed to version control. This allows other developers involved in the project to check out the code, run vagrant up, and be on their way. Vagrantfiles are portable across every platform Vagrant supports.

The syntax of Vagrantfiles is , but knowledge of the programming language is not necessary to make modifications to the Vagrantfile, since it is mostly simple variable assignment. In fact, isn't even the most popular community Vagrant is used within, which should help show you that despite not having Ruby knowledge, people are very successful with Vagrant.

1000 questions
32
votes
6 answers

`ssh` executable not found in any directories in the %PATH%

ERROR: c:\Users\dhawal.vora>vagrant ssh `ssh` executable not found in any directories in the %PATH% variable. Is an SSH client installed? Try installing Cygwin, MinGW or Git, all of which contain an SSH client. Or use your favorite SSH client with…
voraD
  • 515
  • 2
  • 5
  • 7
27
votes
6 answers

Vagrant's Ubuntu 16.04 vagrantfile default password

I'm attempting to deploy and run an Ubuntu 16.04 VM via Vagrant 1.9.1. The Vagrantfile I'm using is from Atlas: Ubuntu Xenial 16.04 Vagrantfile I'm using Debian Stretch as the host OS. Vagrant was installed via a .deb available from Vagrant's…
rmenes379
  • 289
  • 1
  • 3
  • 7
23
votes
4 answers

Multi VM in one Vagrantfile. Could I set different memory size for each of them?

config.vm.define :web do |web_config| web_config.vm.box = "saucy" web_config.vm.host_name = "web" web_config.vm.network "private_network", ip:"192.168.100.10" end config.vm.define :db do |db_config| db_config.vm.box = "saucy" …
user984088
  • 315
  • 1
  • 3
  • 9
22
votes
1 answer

Allow two or more vagrant VMs to communicate on their own network

I want to create multiple servers that can communicate directly with each other without using public IPs. They'll still need internet access but nothing from outside the network will need to connect to them. Creating one box usually works, but when…
Clutch
  • 7,404
  • 11
  • 45
  • 56
21
votes
6 answers

Vagrant: destroy not working

How should I use the command vagrant destroy? In my VagrantFile I used vm.config.name = 'websvr' and when I open Virtualbox I can see websvr on the list of Vm's. But whenever I use vagrant destroy websvr it returns: The machine with the name…
n0minal
  • 3,195
  • 9
  • 46
  • 71
20
votes
3 answers

Vagrant - set the location of the virtual hard drive for VirtualBox

I have executed following commands (on Windows, using Git Bash) in the directory D:\vagrant\precise32\02-lamp\ $ vagrant box add precise32 http://files.vagrantup.com/precise32.box $ vagrant init precise32 $ vagrant up Note. I haven't changed…
mwloda
  • 491
  • 1
  • 6
  • 13
20
votes
7 answers

Box 'laravel/homestead' could not be found

I have downloaded the laravel/homestead box manually from here. I successfully add the box: vagrant box add file:///path/to/the/laravel/homestead.box --name 'laravel/homestead' but when I run vagrant up it says: Box 'laravel/homestead' could not be…
MTVS
  • 2,046
  • 5
  • 26
  • 37
20
votes
3 answers

Windows CRLF to Unix LF Issues in Vagrant

I'm working on provisioning a few VMs using Vagrant. Here's the situation: Host: Windows 7 (64-bit) Guest: Ubuntu 14.04 (64-bit) I am having an issue getting the CRLF line endings to convert to LFs. This is causing the bash scripts in the shared…
Jonathan
  • 671
  • 1
  • 8
  • 21
20
votes
1 answer

Changing Vagrantfile causes "vagrant ssh" to prompt for a password?

I've been playing around with setting up an environment using Vagrant, and I'm having an issue with the vagrant ssh command. When I change the path of the mounted share folder in the Vagrantfile, and do a vagrant reload, I'm no longer able to…
Tommy
  • 203
  • 1
  • 2
  • 5
19
votes
5 answers

A Vagrant environment or target machine is required

I am trying to set up homestead. I have tried to add new custom domain but I forgot that I have to run the command vagrant provision and I got an error, so I have decided to uninstall Vagrant VirtualBox and start from scratch but I have realy messed…
19
votes
6 answers

Print message after booting vagrant machine with "vagrant up"

I need to display a message on the completion of the vagrant up command. I've tried defining a function: def hello puts 'hello' end And then calling it and the end of the file: hello But it always prints at the beginning of the output rather…
Roman Iuvshin
  • 1,872
  • 10
  • 24
  • 40
18
votes
1 answer

Vagrant - Not Supported the capability 'change_host_name'

The problem is about the capability 'change_host_name' isn't supported by the guest when I try to execute the following command line: vagrant up It gives me an error as the following: Vagrant attempted to execute the capability…
dsds
  • 183
  • 1
  • 7
17
votes
2 answers

Vagrant synced folder permissions

I have set up a synced folder in Vagrant, from my Windows host to the guest. Initially the permissions on the files were too open so I added the following mount options: config.vm.synced_folder "../my-folder", "/home/vagrant/my-folder", …
Andrew
  • 401
  • 1
  • 3
  • 10
17
votes
6 answers

NoSuchModuleError: Can't load plugin: sqlalchemy.dialects:redshift.psycopg2

I am trying to connect to redshift from my python code. my pip installed: psycopg2==2.6.1 redshift-sqlalchemy==0.4.1 SQLAlchemy==1.0.9 and my virtual machine has: libpq-dev python-psycopg2 But I am still getting engine =…
16
votes
1 answer

Rsync on windows - dup() in/out/err failed

I am using Vagrant to manage virtual machines for developing purpose. My OS is Windows 10 and I am using Vagrant 1.9.1. Since default driver for folder syncing is slow i wanted to implement Rsync. To to that I used Cygwin and installed Rsyn and…
user2496520
  • 881
  • 4
  • 13
  • 36
1
2
3
66 67