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

In Vagrant, how do I open a port on my virtual machine so that the host machine can connect (testing with telnet)?

I’m using Vagrant 2.2.18 on Mac and creating a local Ubuntu 14.04 virtual machine. I want to expose port 1234 in my VM, so I have configured this config.vm.define "dev" do |dev| dev.vm.hostname = 'dev' dev.vm.network 'forwarded_port',…
Dave
  • 15,639
  • 133
  • 442
  • 830
-1
votes
1 answer

How to install Ruby Gems for Vagrant, i.e. for usage in a Vagrantfile and executed on the host, on linux and windows?

I am using Vagrant for provisioning virtual machines. The Vagrantfile executes some custom Ruby code on the host. (This Ruby code is executed directly in the Vagrantfile, but could also be executed as part of a proper Vagrant plugin. It is the same…
Flo
  • 121
  • 5
-1
votes
1 answer

is a loop in packer config.json file possible?

is it possible so do loops in packer ? I have a Vagrantfile with a loop and want to convert it to packer. I already searched on google and stack overflow but didn't find the right solution. I have problems converting this into a json format:…
-1
votes
1 answer

Vagrant push to ftp not working

So i am trying to push my files via Vagrant push to an ftp server. But I am getting an Error where I don't really know what to do. When I do an vagrant push I'am getting this…
nani
  • 183
  • 2
  • 15
-1
votes
1 answer

Vagrant cant reach server in browser on macOS High Sierra

I've been able to setup a number of local servers using different boxes; laravel/homestead & ubuntu/xenial64. These seem to spin up fine and when I run vagrant shh I can connect to the server without any issue. It even seems to be syncing the folder…
Sheixt
  • 2,546
  • 12
  • 36
  • 65
-1
votes
1 answer

Error with vagrant up for aws

Triying to run vagrant up --provider=aws I get the following error. /opt/vagrant/embedded/gems/2.1.0/gems/vagrant-2.1.0/lib/vagrant/machine.rb:164:in `action': undefined method `fire_triggers' for nil:NilClass (NoMethodError) from…
Martin R.
  • 63
  • 6
-1
votes
1 answer

How to include a file in vagrant vbox

Lets say I'm running an instance of a box. How to include a file that physically resides in the same directory as box and vagrantfile? I suppose I need to state that in the vagrantfile. How should that include look? My vagrantfile (excluding the…
kol23
  • 1,498
  • 3
  • 16
  • 35
-1
votes
2 answers

Having issue with Vagrant I cant install any Vagrantbox

I saw scotch.io vagrant box and i was please with it. so i went ahead to download virtualbox and vagrant. also downloaded the scotch.io vagrantfile. but i when i enter the vagrant up in that dir using cmd an pc user. it gives this…
dagogodboss
  • 483
  • 1
  • 4
  • 19
-1
votes
1 answer

How to mount shared volume across EC2 instances via Vagrant?

I'm using vagrant-aws Vagrant plugin to run multiple disposable EC2 instances which are running tests, however my problem is that the provisioning script takes too long time (e.g. apt-get and downloading same files). I'm terminating my instances…
kenorb
  • 155,785
  • 88
  • 678
  • 743
-1
votes
1 answer

Vagrant networking error with 2 networks cards (1 inactive)

I've got 2 network cards on my Linux host machine. eth0 is flaky, so I don't use it (ifconfig eth0 down). eth1 is set up for DHCP. In my Vagrantfile, I have config.vm.network :private_network, type: 'dhcp' This works. Sort of. The windows…
LOS
  • 523
  • 4
  • 6
-1
votes
1 answer

Vagrant up - execute sh file fails

I have a simple vagrant file which calls sh file in the provision phase: Inside script.sh I have wget command that fails with error 403 (Forbidden). Same error I get when running the script manually from the VM. But If I create new sh file with the…
Amir
  • 129
  • 8
-1
votes
2 answers

Vagrant box with pre installed libraries

How to add a vagrant box with pre-installed libraries using 'config-vm.box' in Vagrantfile? for e.g. I want to configure my vm with CentOS 6 + Tomcat 8 + java 8 to be installed, and don't want to do it manually.
kate
  • 1,769
  • 1
  • 11
  • 10
-1
votes
1 answer

Vagrant opening machine with command prompt how can we access in graphical mode

When I execute command Vagrant up its opening hashicorp/precise32 box in command prompt mode even I had mentioned gui = true. Can we able to access this box/machine in graphical mode/terminal and if yes then what do need to configure. Vagrantfile…
raj
  • 137
  • 1
  • 1
  • 10
-1
votes
1 answer

Setting up owncloud + vagrant

i am trying to setup owncloud on a vagrant machine and i am running into this issue after login in for the first time Data directory (/var/www/core/data) is readable by other users. Please change the permissions to 0770 so that the directory cannot…
psychok7
  • 5,373
  • 9
  • 63
  • 101
-1
votes
1 answer

I have configured a vagrant file, and I need a dev.domain.com pointing to 55.55.55.5/public

I have configured a vagrant file, and I need a dev.domain.com pointing to 55.55.55.5/public My website works with the /public folder, but in the dev.domain.com I need to enter to public/ to see the page, so all styles, javascripts and files that…
Juan Manuel Masud
  • 684
  • 1
  • 7
  • 15
1 2 3
66
67