vagrantfile

vagrant won't start virtual machine - (Errno::EADDRNOTAVAIL)

放肆的年华 提交于 2019-12-20 18:52:26
问题 I really hit a wall with this problem. I am on windows machine (with admin privileges) and I want to start setup my working environment with vagrant. Problem is that I am getting error (down bellow) and I can't find any solution... I am using latest virtual box and vagrant version. Error code: C:/HashiCorp/Vagrant/embedded/gems/gems/vagrant-1.9.3/lib/vagrant/util/is_port_open.rb:21:in `initialize': The requested address is not valid in its context. - connect(2) for "0.0.0.0" port 7755 (Errno:

Forward Ports from boot2docker using the Vagrant Docker provider

走远了吗. 提交于 2019-12-18 13:19:22
问题 I'm trying to utilize Vagrant 1.6's Docker provider and I seem to have run into a snag. I can successfully bring up the Docker container and guest OS, but then I can't access the service I've brought up within the container from the host OS. Here's my Vagrantfile: VAGRANTFILE_API_VERSION = "2" Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| config.vm.network :forwarded_port, guest: 8000, host: 8000 config.vm.define "icecast" do |v| v.vm.provider "docker" do |d| d.image = "moul/icecast"

Can't ssh to vagrant VMs using the insecure private key (vagrant 1.7.2)

旧巷老猫 提交于 2019-12-17 17:29:50
问题 I have a cluster of 3 VMs. Here is the Vagrantfile: # -*- mode: ruby -*- # vi: set ft=ruby : hosts = { "host0" => "192.168.33.10", "host1" => "192.168.33.11", "host2" => "192.168.33.12" } Vagrant.configure("2") do |config| config.vm.box = "precise64" config.vm.box_url = "http://files.vagrantup.com/precise64.box" config.ssh.private_key_path = File.expand_path('~/.vagrant.d/insecure_private_key') hosts.each do |name, ip| config.vm.define name do |machine| machine.vm.hostname = "%s.example.org"

Is it possible to determine the id of vagrant vm in the vagrantfile?

喜你入骨 提交于 2019-12-13 19:37:09
问题 I read that it's possible to create a file with the name "id" and with the written id inside and put it into .vagrant/... directory. But is it also possible to determine the id in the vagrantfile? 回答1: As Vagrantfile is a ruby script you can always read the id file from Vagrantfile Vagrant.configure(2) do |config| p "read uuid " + File.read(".vagrant/machines/default/virtualbox/index_uuid") p "read id " + File.read(".vagrant/machines/default/virtualbox/id") 来源: https://stackoverflow.com

Failed to mount folders in Linux guest - mesg: ttyname failed: Inappropriate ioctl for device

人走茶凉 提交于 2019-12-13 19:27:28
问题 Vagrant won't mount folders. Tried so many solutions, nothing worked. Versions: Vagrant 1.8.1 / Ubuntu 15.10 / Virtualbox 5.0.16 vagrant up Bringing machine 'default' up with 'virtualbox' provider... ==> default: Checking if box 'ubuntu/wily64' is up to date... ==> default: Clearing any previously set forwarded ports... ==> default: Clearing any previously set network interfaces... ==> default: Preparing network interfaces based on configuration... default: Adapter 1: nat default: Adapter 2:

Vagrant: 192.168.33.10 refused to connect

随声附和 提交于 2019-12-13 13:32:22
问题 Hi, I installed centOS6 in virtual machine by vagrant and also installed httpd and php. But, when I try to access to http://192.168.33.10 which is the ip address I set in the Vagrantfile, I can't open a webpage. I made some files under /var/www/html directory. $ cd /var/www/html/ $ ls index.html test.php This is where I changed the setting in the Vagrantfile # Create a forwarded port mapping which allows access to a specific port # within the machine from a port on the host machine. In the

Is it possible to get inside-out ordering of provisioners in a Vagrant multi-machine setup?

时光怂恿深爱的人放手 提交于 2019-12-13 07:16:33
问题 Is it possible to reverse the order of provisioners from innermost to outermost when using a multi-machine setup? I want a small shell provisioner to create some facts in /etc/facter/facts.d/ before provisioning with puppet, to mimic our current setup as much as possible. (I have inherited a large puppet repo and am trying to create a Vagrant testbed for it before I start doing changes.) The puppet settings are the same for every box, but requires the shell provisioner to run first. Here's an

How to install and run elasticsearch in Vagrant?

亡梦爱人 提交于 2019-12-13 02:06:12
问题 I'm trying to install and run Elasticsearch in Vagrant. The issue is that when I try to run elasticsearch I get the following error: log4j:ERROR setFile(null,true) call failed. java.io.FileNotFoundException: /home/vagrant/elasticsearch-2.3.0/logs/elasticsearch.log (No such file or directory) at java.io.FileOutputStream.open0(Native Method) at java.io.FileOutputStream.open(FileOutputStream.java:270) at java.io.FileOutputStream.<init>(FileOutputStream.java:213) at java.io.FileOutputStream.<init

Vagrant dhcp: get ip addresses

…衆ロ難τιáo~ 提交于 2019-12-12 10:17:38
问题 Good day! I want to up few nodes using dhcp. But I also want to get ip-addresses of this nodes and write them to file. Vagrant docs says "The IP address can be determined by using vagrant ssh to SSH into the machine and using the appropriate command line tool to find the IP, such as ifconfig". So I created a simple bash script for master `vagrant ssh master -c 'ifconfig | grep -oP "inet addr:\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}" | grep -oP "\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}" |

Run code in Vagrantfile only if provisioning

不羁的心 提交于 2019-12-12 08:52:25
问题 I want to display some text on the screen when running vagrant up (or vagrant provision , etc.) if and only if provisioning is being done. (For vagrant up it is only run the first time, or if specifically forced with --provision .) How can this be done? 回答1: Adding a shell provisioner is probably the easiest solution, with the small cost that it is executed on the VM over SSH. Another option is to use the vagrant-host-shell plugin: Vagrant.configure('2') do |config| # other config and