38
votes
Accepted
Unprocessed orphan inode list in VirtualBox VM
I managed to solve this problem this morning. Here are the steps I took in case anyone else encounters this problem:
Download a bootable linux .iso.
I am running Ubuntu 14.04 x64 in my VM, so I ...
- 671
33
votes
Run script on host machine during vagrant up
Simple (and complete) Solution
(I say complete because the accepted answer does not check if the user is using vagrant up. Therefore, the script is executed on each command, which is not what the OP ...
- 721
30
votes
How to fix extremely slow Virtualbox network download speed?
For vagrant users, add the following to your Vagrant file:
config.vm.provider "virtualbox" do |v|
v.customize ["modifyvm", :id, "--nictype1", "virtio"]
end
I ...
- 983
28
votes
Need to do Bridged Adapter only in Vagrant, no NAT
eth0 as NAT is a fundamental requirement of Vagrant in its current state. But you can override the default router configuration for eth1.
From the Vagrant docs:
Default Router
Depending on your ...
- 575
28
votes
Accepted
How do I upgrade Vagrant to the latest version in Ubuntu?
The official Download Vagrant webpage has all the available downloads for the latest version of Vagrant (2.0.1). Please download the proper package for your operating system (Linux deb) and ...
- 13.2k
28
votes
Accepted
How to add a 'Host-only Adapter' to a VirtualBox machine via Vagrant file configuration?
I think I have found an answer.
config.vm.provider "virtualbox" do |vb|
config.vm.network "private_network", :type => 'dhcp', :name => 'vboxnet0', :adapter => 2
end
This will create a ...
- 4,658
27
votes
Accepted
Vagrant VM stuck in 'stopping' state
Only way I could do it is by killing the process:
ps aux | grep VBox
Then, select the appropiate vm process pid and:
kill $pid
- 386
24
votes
How do I upgrade Vagrant to the latest version in Ubuntu?
If you don’t want to have to update manually, Hashicorp now has an official repository you can install from to get automatic updates. To use it, just run:
curl -fsSL https://apt.releases.hashicorp.com/...
- 370
23
votes
How to solve `ttyname failed: Inappropriate ioctl for device` in Vagrant?
1) open /root/.profile
2) remove the offensive line
3) replace it with:
tty -s && mesg n
Happy linuxing and a merry new year.
George Hart, LSU
- 347
18
votes
How to fix extremely slow Virtualbox network download speed?
I have found mach simpler solution for me
Host ubuntu 14.04
guest ubuntu 14.04
Nat with port forwarding
extremely slow upload speed from guest. It was so slow that speed test even cant measure that.
...
- 281
15
votes
Run script on host machine during vagrant up
Based on @tmatilai's answer but updated for 2019, vagrant-triggers has been merged into Vagrant. So you can now do something like so:
node.trigger.before [:up, :provision] do |trigger|
trigger.info =...
- 151
15
votes
Is it possible to create a swap file for a Linux guest VM managed by Vagrant?
Simply add this line to your vagrant file
Vagrantfile
# Enable Dynamic Swap Space to prevent Out of Memory crashes
config.vm.provision "shell", inline: "sudo apt install swapspace -y"
And then ...
- 1,611
15
votes
How to solve `ttyname failed: Inappropriate ioctl for device` in Vagrant?
It looks like this is caused by an interaction between the default vagrant configuration of config.ssh.shell to be bash -l (which simulates a login shell, thus processing login-related configuration ...
- 450
15
votes
Vagrant complains "A VirtualBox machine with the name 'homestead-7' already exists"
The Vagrantfile script of Homestead attempts (by calling scripts/homestead.rb script) to create a machine with a default name of 'homestead-7'. That's why it fails, if a box with that name already ...
- 531
14
votes
Accepted
How can I relocate or disable the VirtualBox logfile when starting a vm from Vagrant?
I managed to change the log file location as per this post. To change the log file location to a folder called /temp relative to my Vagrantfile, I added this to the Vagrantfile (inside the Vagrant....
- 377
13
votes
Run script on host machine during vagrant up
Put this near the top of your Vagrantfile:
module LocalCommand
class Config < Vagrant.plugin("2", :config)
attr_accessor :command
end
class Plugin < Vagrant.plugin("2")
...
- 1,195
12
votes
Accepted
Vagrant box URL for JSON metadata file
As of today (2016-07-12, vagrant 1.8.4), if you want to run your own catalog in a manual way (that is, manually updating the boxes and editing the metadata.json file), but still have it behave like an ...
- 146
12
votes
Need to do Bridged Adapter only in Vagrant, no NAT
(Sorry, quite naive about vagrant/virtualbox so forgive the lack of proper networking terminology)
Your choice of bridge: en4) Thunderbolt is most likely the issue.
Here's what I assume you want/...
- 742
12
votes
What are the names of my network adapters? (Vagrant related)
In Windows it's a bit messy.
What you want to do is to use VBoxManage.exe list bridgedifs to list the possible bridge interface names (the actual names are device names, not connection names which ...
- 968
11
votes
Accepted
Can I get Vagrant to keep the insecure keys?
Yes:
# By default, Vagrant 1.7+ automatically inserts a different
# insecure keypair for each new VM created. The easiest way
# to use the same keypair for all the machines is to disable
# this ...
- 1,416
11
votes
Accepted
How to force Vagrant to have a single, bridged, network interface
You can try to add the adapter: 1 to the config. Although I still find some problem with it. See if it will help you starts from somewhere.
Example:
config.vm.network "public_network", bridge: "...
- 238
11
votes
How can I connect Filezilla to a Vagrant VM?
On my machine (windows) the default is for Vagrant's sftp to be available on port 2222. So, from Filezilla, I use:
host: 127.0.0.1
port: 2222
protocol: sftp
logon type: normal (with the default ...
- 211
11
votes
Accepted
How to solve `ttyname failed: Inappropriate ioctl for device` in Vagrant?
I noticed that even this message was shown as an error (in RED colour), the script was executed successfully! A few days later I saw a possible fix and I posted an answer on SO. The "fix" is:
# ...
- 242
10
votes
HyperV - Static Ip with Vagrant
Background
The Asker, and anyone with a similar use-case, is likely operating on a workstation (not Windows Server edition), for local development purposes, and prefers not to run a DHCP server ...
- 1,218
8
votes
Accepted
Installing vagrant plugin on the corporate network
The Ruby file hackery in the comments/answers is definitely not recommended as it negates the benefits of having SSL protecting your connections.
The "right" way (aka IT won't hunt you down way) is ...
- 922
7
votes
Accepted
Vagrant and Ansible facts
Solved, Using Vagrant and Ansible, Running Ansible Manually
ansible -i hosts default -m setup --user vagrant \
-i .vagrant/provisioners/ansible/inventory/vagrant_ansible_inventory \
--private-...
- 101
7
votes
How do I reboot a Vagrant guest from a provisioner?
If you only want to reboot after provisioning is complete (not between provisioning steps), you can use a trigger to achieve this:
config.trigger.after [:provision] do |t|
t.name = "Reboot after ...
- 2,301
6
votes
vagrant fails to create box with libvirt
I got this Error while connecting to libvirt error but it was simply a case that I was running vagrant up without specifying the provider.
In my case I needed
$ vagrant up --provider virtualbox
- 535
6
votes
How to ssh between a cluster of Vagrant guest VMs
In the Vagrantfile give each of the machines a static private address.
Vagrant.configure(2) do |config|
config.vm.define "master" do |master|
master.vm.box = "ubuntu/trusty64"
...
- 1,100
6
votes
Accepted
Is there a way for Vagrant to import a local box file with a specified version?
Based on this answer, to specify a version for local boxes, you need to create a metadata.json.
The minimum content of the file looks like this:
{
"name": "USERNAME/BOXNAME",
"versions": [{
...
- 176
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
vagrant × 547virtualbox × 269
ubuntu × 73
virtual-machine × 66
linux × 62
ssh × 60
networking × 57
macos × 36
windows-10 × 33
windows × 32
centos × 21
virtualization × 21
windows-7 × 18
docker × 16
hyper-v × 13
puppet × 12
libvirt × 11
bash × 10
powershell × 10
port-forwarding × 9
apache-http-server × 8
vmware × 8
chef × 8
debian × 7
vpn × 7