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
4
votes
1 answer

Vagrant can not access the box over HTTP Basic Auth

Vagrant up can access and download my Vagrant box (that I packed and placed on my hosting) by http://devops.example.com/vagrant.box. But I do not want my box to be public, and want to protect is by using HTTP Basic Auth. When I turn on Basic Auth…
4
votes
3 answers

Vagrant - how to detect windows host RAM and CPU

I'd like my vagrantfile to automatically set CPU and RAM based on the host specs. I found this snippet: config.vm.provider "virtualbox" do |v| host = RbConfig::CONFIG['host_os'] # Give VM 1/4 system memory & access to all cpu cores on…
Mentor
  • 965
  • 9
  • 21
4
votes
1 answer

Add fail safe box URL in Vagrant file

I have added local box link in Vagrant file as follows config.vm.box = "ubuntu1404" config.vm.box_url = "http://localserver/ubuntu_trusty64.box" My local server may not be accessible all time. I need to add another box URL for the same box which…
4
votes
2 answers

how to create a vagrant box from vmware image with packer

I have a VMWARE image running CentOS.I want to create a vagrant box from it with packer. I am new to Vagrant and can anyone suggest the steps?
vaj oja
  • 1,151
  • 2
  • 16
  • 47
4
votes
1 answer

Problems with starting Virtualbox

I try to start the Virtualbox, this are my steps vagrant box add jhcook/osx-yosemite-10.10 mkdir test cd test vagrant init jhcook/osx-yosemite-10.10 modify the vagrant file like this: config.vm.provider "virtualbox" do |vb| # Don't boot with…
Loretta
  • 154
  • 15
4
votes
2 answers

vagrant ssh doesn't work as expected, it doesn't honor my custom settings

First of all, i set up a separate ssh key for my vagrant box. And i have this setup on my ~/.ssh/config Host vag_ubuntu14 HostName 127.0.0.1 Port 2222 User vagrant IdentityFile ~/.ssh/vag_ubuntu14/id_rsa And i copied the public key to the…
theUnknown777
  • 541
  • 1
  • 7
  • 16
4
votes
2 answers

Multiple folders for homestead not syncing

My first homestead project worked without a hitch here's the core part of the homstead.yaml folders: - map: C:\dev\bitbucket to: /home/vagrant/bb sites: - map: project.dev to: /home/vagrant/bb/example/project/public now I…
Moak
  • 12,596
  • 27
  • 111
  • 166
4
votes
1 answer

Vagrant synced_folder id option

The syntax for enabling an NFS folder share in Vagrant is commonly posted as: config.vm.synced_folder "", "", id: "???", type: "nfs", mount_options: ["nolock", "vers=3", "udp"] Note the id argument. I've read the Vagrant docs at…
knite
  • 6,033
  • 6
  • 38
  • 54
4
votes
3 answers

How can I access Postgresql hosted in Vagrant as a guest in Windows?

I am trying to connect to Postgresql using the PGAdmin III client in Windows 8.1. Postgresql is installed in a local copy of Vagrant (Ubuntu 14.04) on my Windows machine. It's up and running on Vagrant: LISTENING tcp 0 0 127.0.0.1:5432 …
Fastidious
  • 1,249
  • 4
  • 25
  • 43
4
votes
1 answer

"VBOX_E_FILE_ERROR" while running "vagrant up" command

I am getting the below error when i try to run "vagrant up" command. Bringing machine 'default' up with 'virtualbox' provider... ==> default: Importing base box 'precise32'... Progress: 30%There was an error while executing VBoxManage, a CLI used by…
Potter
  • 41
  • 1
  • 3
4
votes
2 answers

vagrant / homestead up - connection timeout ONLY on home network

The problem Whenever I run vagrant up (or homestead up for Laravel Homestead 2.0) I get a connection timeout error as follows; (...usual 'vagrant up' stuff...) ==> default: Waiting for machine to boot. This may take a few minutes... default: SSH…
Laurence Cooper
  • 1,215
  • 1
  • 12
  • 21
4
votes
1 answer

Move SOME Vagrant boxes to external drive

I have a number of projects that use Vagrant and associated VMs. Some are in current development, others are either in maintenance or archived, and I do not need the latter on my laptop. 256GBs fill up fast. What I'd like to do is move the…
Jason
  • 11,263
  • 21
  • 87
  • 181
4
votes
3 answers

Remotely create a vhost on a docker container running rabbitmq

I have a Vagrantfile that does 2 important things; firstly pulls and runs dockerfile/rabbitmq, then builds from a custom Dockerfile that runs an application which assumes a vhost on the rabbitmq server, let's say "/foo". The problem is the vhost is…
noisyboiler
  • 221
  • 1
  • 3
  • 10
4
votes
1 answer

Enabling GUI on Vagrant VirtualBox - undefined local variable

I'm new to vagrant/homestead, and I'm trying to debug the box that was created using vagrant up as the connection is on a timeout loop. I'm trying to enable the GUI. I've tried adding the config from the vagrant site and every variation of it to…
nwi_justin
  • 83
  • 1
  • 7
4
votes
4 answers

Can't view Laravel project in browser with Vagrant

I am trying to get a Vagrant/Laravel setup going, but there is only one problem: when I run php artisan serve on my Vagrant VM, and try to view the project on my host machine browser, the browser says it can't connect/page isn't found. Here is my…
mkel23
  • 115
  • 1
  • 7