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
6
votes
2 answers

Cannot see any files or folders inside my vagrant root folder in my VM

I hope the title explains my problem but let me give you a little more detail. I'm setting up my first VM from scratch so I'm pretty new to this all I've set up my Ubuntu vagrant VM on my Windows host machine and that seems fine, I can ssh on to…
Neil Kelsey
  • 811
  • 4
  • 13
  • 31
6
votes
1 answer

Specify --no-parallel flag inside Vagrantfile

According to the documentation http://docs.vagrantup.com/v2/cli/up.html vagrant up has optional parameter --no-parallel Is it possible to specify this flag inside of Vagrantfile or at least warn user if it's not specified?
TermiT
  • 717
  • 1
  • 8
  • 15
6
votes
2 answers

How to package synced folder in vagrant box

What I want and achieved so far: I want to create a custom vagrant box including a configuration and an application to reuse it in different client or serve environments. Specifically I managed to create vagrant box, based on Ubuntu (precise/64),…
Rias
  • 1,956
  • 22
  • 33
6
votes
2 answers

ERROR: Cookbook loaded at path(s) has invalid metadata

When I'm running: :$ vagrant provision or :$ vagrant up I have an error: nisevi@localhost processor (master):$ vagrant provision Using ssh deploy key of: /home/nisevi/.ssh/id_rsa ==> default: Chef 12.0.3 Omnibus package is already installed. ==>…
nisevi
  • 627
  • 1
  • 10
  • 27
6
votes
2 answers

Vagrant Package Include Files are missing

I can't figure out how to get included files from a packaged vagrant box. The package is created with: $ vagrant package --include mydirectory/ --output mypackage.box Then the box is added $ vagrant box add mypackage.box --name…
trotha01
  • 103
  • 1
  • 6
6
votes
2 answers

Vagrant Share Expiration time

During the teamwork development process that shares the same instance of Vagrant I always had trouble relaunching Vagrant Share due to it's session expiration. Documentation says that it's currently 1 hour (even though sometimes it worked only for…
Sergey Tsibel
  • 1,595
  • 1
  • 18
  • 31
6
votes
5 answers

vagrant up error : default: Error: Connection timeout. Retrying

I am new to vagrant tool. I am using Ubuntu 13.04 my project directory is "/var/www/project". I have set up Vagrantfile through following command. vagrant init test_box…
gkd
  • 853
  • 1
  • 14
  • 31
5
votes
1 answer

vagrant /etc/hosts: machine IP vs localhost

I have a vagrant machine setup with this IP address: Vagrant.configure("2") do |config| config.vm.network :private_network, ip: 192.168.33.11 config.vm.network "forwarded_port", guest: 80, host: 8080 config.vm.hostname =…
numediaweb
  • 16,362
  • 12
  • 74
  • 110
5
votes
1 answer

Change Hostname Vagrant

I've setup two vagrant VMs of ubuntu - one for slave and one for master.I frequently get confused after logging into the vagrant VM using vagrant ssh which machine I'm in. What do I call this green string in the screenshot and how do I change this…
Sukumar
  • 173
  • 2
  • 3
  • 10
5
votes
1 answer

Increase memory of a particular vagrant box

I have this Vagrantfile. Here I defined the memory to be 2048 for all VMs. But I want my puppet master to have 4096 and agents to have 2048. How to do that? Vagrant.configure("2") do |config| config.vm.synced_folder ".", "/vagrant", type:…
awwwd
  • 121
  • 2
  • 9
5
votes
1 answer

Vagrant - The following settings shouldn't exist: memory, name

I have moved this question over from Serverfault I thought it was more of a question belonging there :-) I have Vagrant version 1.9.1 on macOS and I have VirtualBox 5.1.12 I am trying to have a go at creating a multi machine Vagrant file and I am…
jwknz
  • 6,598
  • 16
  • 72
  • 115
5
votes
1 answer

enable drag'n'drop in vagrant privisioning

I want to enable drag'n'drop using the Vagrant provisioning file ("Vagrantfile"). Therefore I use the following lines: vbox.customize ["modifyvm", :id, "--clipboard", "bidirectional"] vbox.customize ["modifyvm", :id, "--draganddrop",…
Maximilian
  • 1,325
  • 2
  • 14
  • 35
5
votes
2 answers

Vagrant Up VT-X not available

I am in the process of installing and getting Laravel to work by following their installation documentation. However, when I try to vagrant up, i receive the error There was an error while executing VBoxManage, a CLI used by Vagrant for…
crossfuse999
  • 135
  • 1
  • 13
5
votes
1 answer

How to template Vagrantfile using Ruby?

I have several Vagrantfile, each one for a different provider, since Vagrant has a limitation that doesn't allow to make two or more provisions at the same time using the same Vagrantfile. So, I split into two or more Vagrantfiles, but my "body", my…
Valter Silva
  • 16,446
  • 52
  • 137
  • 218
5
votes
1 answer

Vagrant not installing pip during provision

Here is my bootstrap.sh: #!/usr/bin/env bash apt-get update apt-get install -y apache2 apt-get install python-pip if ! [ -L /var/www ]; then rm -rf /var/www ln -fs /vagrant /var/www fi Here is my Vagrantfile: Vagrant.configure("2") do…
testing
  • 2,303
  • 4
  • 20
  • 32