Questions tagged [vagrant]
Vagrant is a tool for building and distributing virtualized development environments.
559
questions
273
votes
5
answers
139k
views
Why should I use Vagrant instead of just VirtualBox?
I've been using VirtualBox for many years to create a development environment.
A lot of my colleagues are talking about Vagrant and many people seem very excited about it but I just can't seem to ...
59
votes
1
answer
26k
views
Is it possible to disable default /vagrant synced folder?
According to source code - it's not, but what if I'm wrong?
So the final question: is it possible to run a vagrant VM (virtualbox-driven) without /vagrant synced folder?
52
votes
5
answers
51k
views
Run script on host machine during vagrant up
I'd like to run a bash script on the host machine when vagrant provisions the server.
What would be the best method of achieving this?
45
votes
5
answers
117k
views
Need to do Bridged Adapter only in Vagrant, no NAT
So I'm having an issues with a Vagrant setup of 'hashicorp/precise64' on my MAC book.
First, my config:
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config....
42
votes
7
answers
95k
views
How do I upgrade Vagrant to the latest version in Ubuntu?
How do I upgrade Vagrant to latest version in Ubuntu?
$ sudo apt-get update
$ sudo apt-get install vagrant
$ vagrant -v
Vagrant 1.4
Latest version is 1.6.5
42
votes
3
answers
30k
views
Can I rename a Vagrant box?
I misspelled the name of a box when I added it to my box list:
vagrant box list
debian
ubnutu
Can I rename the box without repackaging it?
42
votes
18
answers
86k
views
Vagrant ssh fails with VirtualBox
vagrant up fails when it gets to the ssh part:
myterminal$ vagrant up
[default] VM already created. Booting if its not already running...
[default] Running any VM customizations...
[default] Clearing ...
39
votes
3
answers
58k
views
How to fix extremely slow Virtualbox network download speed?
I'm using an Ubuntu 12.04 VM (hashicorp/precise32) via Vagrant/Virtualbox. It seems to have an exremely slow download speed compared to my host system. This is what I get with the host system (OSX) ...
36
votes
1
answer
23k
views
How to enable Vagrant's 'verbose' mode?
I'm using Vagrant in a Windows 7 box, and I'm having trouble with the ssh client. I'd like to know how can I make Vagrant 'verbose' (as in report more than a user friendly message) and if it is ...
30
votes
6
answers
113k
views
How to solve `ttyname failed: Inappropriate ioctl for device` in Vagrant?
When using this snippet (inline shell provisioner):
config.vm.provision "shell" do |s|
s.inline = <<-SHELL
<shell code>
SHELL
end
it results in:
==> default: mesg:
==> ...
28
votes
1
answer
26k
views
Copy vagrant box locally
I have a vagrant box running on VirtualBox, and I need to make a copy (with all its existing config and data), so that I can make changes on it without affecting the original.
The problem is that my ...
26
votes
2
answers
54k
views
How to exit SSH of vagrant in terminal
Following the README in this repository, I am supposed to secure shell my way into a virtual machine I've created, but once I've done so, how do I get out?
Here are the instructions:
$ git clone git:...
24
votes
2
answers
36k
views
How to add a 'Host-only Adapter' to a VirtualBox machine via Vagrant file configuration?
A lot of answers out there are only applicable version 1 of Vagrant file configuration. e.g.
config.vm.network :hostonly, :adapter => 2
The new public network does not support this feature. e.g. ...
22
votes
7
answers
46k
views
SSH Basics on Vagrant VMs
I'm building a vagrant machine (Ubuntu 12.04) with the following requirements:
SSH access via Vagrant to a user with sudo-privileges.
I've generated public/private keys (via ssh-keygen) on the host ...
20
votes
5
answers
17k
views
Vagrant box URL for JSON metadata file
In my Vagrantfile, I can specify the URL of a box:
config.vm.box_url = "http://example.com/my-box.pkg"
According to the more recent documentation, I should be able to create a JSON file that ...
19
votes
2
answers
8k
views
Unprocessed orphan inode list in VirtualBox VM
Recently while using my VirtualBox VM, the system crashed. Afterwords, the VM would no longer boot (I am using Vagrant). In my troubleshooting, I turned on the VirtualBox GUI and found that the ...
16
votes
1
answer
10k
views
Vagrant VM stuck in 'stopping' state
I cannot shutdown a VirtualBox VM on a Linux host, launched by Vagrant:
$ vagrant halt -f my-vm
$ vagrant status
Current machine states:
my-vm stopping (virtualbox)
The VM is ...
16
votes
7
answers
47k
views
Can't ping to vagrant box
I'm trying to create a Vagrant base box following the 2 resources here:
http://docs-v1.vagrantup.com/v1/docs/base_boxes.html
https://github.com/fespinoza/checklist_and_guides/wiki/Creating-a-vagrant-...
13
votes
5
answers
40k
views
vagrant fails to create box with libvirt
I am trying to setup a box with vagrant and libvirt with the following Vagrantfile
Vagrant.configure("2") do |config|
config.vm.define :test_vm do |test_vm|
test_vm.vm.box = "test"
test_vm....
12
votes
1
answer
37k
views
How to setup HyperV virtual machine to have static IP and have access to internet?
Is possible to setup HyperV virtual machine to have static IP and also have access to internet ? (on latest Windows 10 Pro)
To sum up, requirements are like so:
virtual machine should have local (...
11
votes
3
answers
20k
views
How to git clone private repos within Vagrant VM, using host's SSH keys?
I'm able to use PuppetLabs vcsrepo to clone public git repos, but I'd like to also be able to clone private repos, using the host's SSH keys.
What would the configuration look like for Vagrantfile ...
11
votes
3
answers
11k
views
HyperV - Static Ip with Vagrant
I'm using Laravel Homestead with Vagrant, and I thought I'd would make sense to use Hyper-V instead of Virtual Box, as it's integrated with Windows.
Here is my problem. Every now and then my Hyper-v ...
11
votes
1
answer
3k
views
How can I relocate or disable the VirtualBox logfile when starting a vm from Vagrant?
When I run vagrant up using VirtualBox as a provider, it creates a logfile called ubuntu-xenial-16.04-cloudimg-console.log in the project root. This causes difficulty with PHPStorm, as it doesn't have ...
11
votes
3
answers
12k
views
How to ssh between a cluster of Vagrant guest VMs
I have 3 Ubuntu 12.04 VMs configured with bridged networking and setup with Vagrant. I can access all of them from the host using "vagrant ssh", but I can't figure out how I connect from one guest VM ...
11
votes
2
answers
20k
views
How can I reset windows powershell/command prompt, like reset in bash?
When I use vagrant on Windows I will sometimes find that newlines aren't respected properly. This is typically after doing a vagrant ssh. So text ends up looking like
This machine with the name '...
10
votes
1
answer
6k
views
Why is ping resolving to an IP 198.105.254.228 for any random hostname that i type?
I have a precise32 (ubuntu 12.04) vagrant vm running on my system.
If i try to ping a random string, eg ping "thisip.doesnot" it resolves to an IP 198.105.254.228 . This is try for any other random ...
10
votes
1
answer
13k
views
What are the names of my network adapters? (Vagrant related)
I'm trying to use mVagrant to set up a bridge on the correct network adapter.
I keep getting this message:
Specific bridge 'Wireless LAN adapter Wireless Network Connection' not
found. You may ...
9
votes
6
answers
19k
views
How do I reboot a Vagrant guest from a provisioner?
Relative newcomer to Vagrant here, trying to eliminate going through the install process manually every time I want to spin up a new Ubuntu VM.
My usual process, after completing the install, is to ...
9
votes
3
answers
13k
views
Is it possible to create a swap file for a Linux guest VM managed by Vagrant?
In my Vagrantfile I have the following provider defined:
Excerpt from Vagrantfile:
config.vm.provider :virtualbox do |vb|
vb.gui = false
vb.customize ["modifyvm", :id, "--memory", "4096"]
end
...
9
votes
3
answers
9k
views
How can I connect Filezilla to a Vagrant VM?
A friend has set up a vagrant vm running Ubuntu with many directories and files in it. The VM is running locally on my computer using Virtual Box. I don't want to setup a shared folder in it but I ...
9
votes
1
answer
6k
views
Vagrant - share host VPN with guest
So I have an interface for a VPN connection (jnc0), and also a vagrant guest which talks to my machine through another separate interface (vboxnet1). My host OS is OS X Mountain Lion, and the Vagrant (...
9
votes
5
answers
22k
views
How to authenticate to a VM using Vagrant up?
Authentication failure during Vagrant Up, while vagrant ssh and ssh vagrant@localhost -p2222 works
I would like to execute a shell script using Vagrant at boot. Vagrant is unable to Authenticate, ...
9
votes
1
answer
23k
views
How to force Vagrant to have a single, bridged, network interface
Using vagrant 1.7.2 on OSX (MacBook Pro), Ubuntu 14.04 guests, VirtualBox 4.3.26. Mac is connected to the world via standard WiFi interface.
I want the Vagrant boxes to use the bridged network on the ...
9
votes
3
answers
5k
views
Is there a way for Vagrant to import a local box file with a specified version?
I'm using versioned boxes, but not using Vagrant Cloud (I have a custom box host). Downloading versioned boxes works well.
However, when I'm developing new versions of my box locally, I don't want to ...
9
votes
1
answer
6k
views
How to use ipv6 with Vagrant and VirtualBox?
I have a Vagrant setup running Ubuntu in VirtualBox. I'm trying to create a public virtual network interface that I can access from the host. I have had no problem doing this with ipv4. Using ipv6 I ...
9
votes
2
answers
4k
views
Vagrant Reports Different Installed GuestAdditions version
I've seem posts on the Internet about similar issues like this one, but I couldn't get it to work.
Host OS: Mac OS X 10.11.1 (El Capitan)
Guest OS: Ubuntu 14.04 LTS
Virtualbox 5.0.8
Vagrant 1.7.4
$ ...
8
votes
1
answer
4k
views
Running docker inside an (ubuntu) vagrant box on Windows 10
I've just recently been introduced to Docker, my knowledge of how it works is quite limited and I'm currently constrained by time in deciding on which way to go.
Was running Windows 10 Home, could ...
8
votes
4
answers
19k
views
Truly delete all traces of a Vagrant machine
How do I remove all traces of a Vagrant box without having to go into the file system manually?
I am creating a custom box using Packer, building and destroying a lot of test cases. When finished ...
8
votes
3
answers
12k
views
Vagrant shared folder and symbolic links under Windows 10
I have a vagrant box with Linux inside under Windows 10 (VirtualBox 5.1.4, Vagrant 1.8.5). I'm working with the Git Bash as normal user. Inside the vagrant box I cannot create a symlink:
c:/path/to/...
7
votes
2
answers
15k
views
Vagrant Private Network IPs not working, but DHCP does
I have a vagrant config file with three VMs configured in it. All are identical except on has a static IP and the other two are on DHCP. The two which are assigned IPs by DHCP can talk to each other ...
7
votes
2
answers
9k
views
Connection to postgresql inside Virtualbox via portforwarding fails
I have a postgresql server inside a virtualbox created by vagrant.
I have also set up a portforwarding from 5432 inside the box to 15432 on the host system via the Vagrant file.
When connecting via ...
7
votes
1
answer
2k
views
Vagrant VirtualBox VM is initializing new instead of loading the existing VM after VagrantFile change
I setup a Vagrant Ubuntu 12.04 box (VirtualBox as the provider) on Windows and it's been working great for the past few months. Yesterday, I added another forwarded port to the VagrantFile and did ...
7
votes
2
answers
3k
views
How to check the disk size of a Vagrant Box?
Is there any way for me to check the disk size of a Vagrant Box, preferably before downloading/using it?
Ideally, I'd want to go to the Vagrant Box search page and be able to see what the disk size ...
7
votes
1
answer
3k
views
Auto Shutdown / Suspend Vagrant upon shutdown on Windows Host
I use vagrant in my development workflow on a Windows machine. Sometimes, I forget to do a vagrant halt or suspend before restarting or shutting windows down. I read that this could possibly break ...
6
votes
2
answers
4k
views
Can I get Vagrant to keep the insecure keys?
It seems that Vagrant generates a new key pair if it detects insecure ones. Is it possible to prevent that behavior?
6
votes
3
answers
8k
views
Can't vagrant install a plugin: gem dependency fails despite being installed
I am attempting to install the vagrant-vbguest plugin in Windows 7 from within cygwin 64.
$ vagrant plugin install vagrant-vbguest
Installing the 'vagrant-vbguest' plugin. This can take a few minutes....
6
votes
1
answer
4k
views
Vagrant error: The provider 'aws' could not be found
I am using Vagrant 1.6.5 and trying to deploy to Amazon AWS. I can successfully deploy to DigitalOcean, but with AWS I get the error:
The provider 'aws' could not be found, but was requested to
back ...
6
votes
1
answer
8k
views
How to configure a firewall on Centos using Vagrant and Chef
I've created a server box using Vagrant and Chef and everything is up and running correctly. However, when the box is installed from scratch the default iptables rules are in place and so I need to ...
6
votes
2
answers
19k
views
DNS not functioning on command line
I recently did a combination of Vagrant + VirtualBox stuff on my machine to try to get a virtualized Ubuntu install working. However, I had no luck with it so I just uninstalled everything. Ever since ...
6
votes
1
answer
1k
views
VMware vmnet2 routes collide with en0
I am getting the following error when starting a vagrant box:
gajus:vagrant gajus$ vagrant up
Bringing machine 'default' up with 'vmware_fusion' provider...
==> default: Checking if box '...