vagrant up fails on MacOS with Virtualbox
Dear community, I'm facing an issue when running vagrant up on Macos
Vagrant version
Run vagrant -v to show the version. If you are not running the latest version
of Vagrant, please upgrade before submitting an issue.
Vagrant 2.3.0
Host operating system
MacOS Monterey v12.6
Guest operating system
config.vm.box = "rockylinux/8"
Vagrantfile
Vagrant.configure("2") do |config|
config.vm.box = "rockylinux/8"
config.vm.network "private_network", ip: "192.168.56.54"
if Vagrant.has_plugin?("vagrant-vbguest")
config.vbguest.auto_update = false
end
end
Please ensure the Vagrantfile provided is a minimal Vagrantfile which contains only the required configuration to reproduce the behavior. Please note that if your Vagrantfile contains an excess of configuration unrelated the the reported issue, or is in a different format, we may be unable to assist with your issue. Always start with a minimal Vagrantfile and include only the relevant configuration to reproduce the reported behavior.
Debug output
centos8 vagrant up
sh: netsh: command not found
sh: cscript: command not found
It seems that you don't have the privileges to change the firewall rules. NFS will not work without that firewall
changes. Execute the following commands via cmd as administrator:
netsh advfirewall firewall add rule name="VagrantWinNFSd-1.4.0" dir="in" action=allow protocol=any program="\Users\pradchenko\.vagrant.d\gems\2.7.6\gems\vagrant-winnfsd-1.4.0\bin\winnfsd.exe" profile=any
netsh advfirewall firewall add rule name="VagrantWinNFSd-1.4.0" dir="out" action=allow protocol=any program="\Users\pradchenko\.vagrant.d\gems\2.7.6\gems\vagrant-winnfsd-1.4.0\bin\winnfsd.exe" profile=any
If you are an Windows XP user run the following command instead:
netsh firewall add allowedprogram "\Users\pradchenko\.vagrant.d\gems\2.7.6\gems\vagrant-winnfsd-1.4.0\bin\winnfsd.exe" VagrantWinNFSd-1.4.0 ENABLE
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'rockylinux/8'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'rockylinux/8' version '5.0.0' is up to date...
==> default: Setting the name of the VM: centos8_default_1663572335563_48858
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
default: Adapter 2: hostonly
==> default: Forwarding ports...
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
default: SSH address: 127.0.0.1:2222
default: SSH username: vagrant
default: SSH auth method: private key
default:
default: Vagrant insecure key detected. Vagrant will automatically replace
default: this with a newly generated keypair for better security.
default:
default: Inserting generated public key within guest...
default: Removing insecure key from the guest if it's present...
default: Key inserted! Disconnecting and reconnecting using new SSH key...
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
default: No guest additions were detected on the base box for this VM! Guest
default: additions are required for forwarded ports, shared folders, host only
default: networking, and more. If SSH fails on this machine, please install
default: the guest additions and repackage the box to continue.
default:
default: This is not an error message; everything may continue to work properly,
default: in which case you may ignore this message.
==> default: Configuring and enabling network interfaces...
==> default: Exporting NFS shared folders...
==> default: Attempting graceful shutdown of VM...
==> default: Destroying VM and associated drives...
Traceback (most recent call last):
118: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/batch_action.rb:86:in `block (2 levels) in run'
117: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/machine.rb:203:in `action'
116: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/machine.rb:203:in `call'
115: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/environment.rb:631:in `lock'
114: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/machine.rb:217:in `block in action'
113: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/machine.rb:248:in `action_raw'
112: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/runner.rb:101:in `run'
111: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/util/busy.rb:19:in `busy'
110: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/runner.rb:101:in `block in run'
109: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/builder.rb:180:in `call'
108: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/warden.rb:48:in `call'
107: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/providers/virtualbox/action/check_virtualbox.rb:26:in `call'
106: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/warden.rb:48:in `call'
105: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/builtin/call.rb:53:in `call'
104: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/runner.rb:101:in `run'
103: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/util/busy.rb:19:in `busy'
102: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/runner.rb:101:in `block in run'
101: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/builder.rb:180:in `call'
100: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/warden.rb:48:in `call'
99: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/warden.rb:127:in `block in finalize_action'
98: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/warden.rb:48:in `call'
97: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/builtin/handle_box.rb:56:in `call'
96: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/warden.rb:48:in `call'
95: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/warden.rb:127:in `block in finalize_action'
94: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/warden.rb:48:in `call'
93: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
92: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/warden.rb:48:in `call'
91: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/builtin/call.rb:53:in `call'
90: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/runner.rb:101:in `run'
89: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/util/busy.rb:19:in `busy'
88: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/runner.rb:101:in `block in run'
87: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/builder.rb:180:in `call'
86: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/warden.rb:48:in `call'
85: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/warden.rb:127:in `block in finalize_action'
84: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/warden.rb:48:in `call'
83: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/providers/virtualbox/action/check_accessible.rb:18:in `call'
82: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/warden.rb:48:in `call'
81: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/providers/virtualbox/action/customize.rb:40:in `call'
80: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/warden.rb:48:in `call'
79: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/builtin/prepare_clone.rb:15:in `call'
78: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/warden.rb:48:in `call'
77: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/providers/virtualbox/action/prepare_clone_snapshot.rb:17:in `call'
76: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/warden.rb:48:in `call'
75: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/providers/virtualbox/action/import.rb:13:in `call'
74: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/providers/virtualbox/action/import.rb:78:in `import'
73: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/warden.rb:48:in `call'
72: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/providers/virtualbox/action/discard_state.rb:15:in `call'
71: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/warden.rb:48:in `call'
70: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/providers/virtualbox/action/match_mac_address.rb:22:in `call'
69: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/warden.rb:48:in `call'
68: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/warden.rb:127:in `block in finalize_action'
67: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/warden.rb:48:in `call'
66: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/builtin/env_set.rb:19:in `call'
65: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/warden.rb:48:in `call'
64: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/providers/virtualbox/action/check_virtualbox.rb:26:in `call'
63: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/warden.rb:48:in `call'
62: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/builtin/config_validate.rb:25:in `call'
61: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/warden.rb:48:in `call'
60: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/builtin/box_check_outdated.rb:93:in `call'
59: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/warden.rb:48:in `call'
58: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/builtin/call.rb:53:in `call'
57: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/runner.rb:101:in `run'
56: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/util/busy.rb:19:in `busy'
55: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/runner.rb:101:in `block in run'
54: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/builder.rb:180:in `call'
53: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/warden.rb:48:in `call'
52: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/warden.rb:127:in `block in finalize_action'
51: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/warden.rb:48:in `call'
50: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/builtin/call.rb:53:in `call'
49: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/runner.rb:101:in `run'
48: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/util/busy.rb:19:in `busy'
47: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/runner.rb:101:in `block in run'
46: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/builder.rb:180:in `call'
45: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/warden.rb:48:in `call'
44: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/warden.rb:127:in `block in finalize_action'
43: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/warden.rb:48:in `call'
42: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/builtin/call.rb:53:in `call'
41: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/runner.rb:101:in `run'
40: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/util/busy.rb:19:in `busy'
39: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/runner.rb:101:in `block in run'
38: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/builder.rb:180:in `call'
37: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/warden.rb:48:in `call'
36: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/warden.rb:127:in `block in finalize_action'
35: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/warden.rb:48:in `call'
34: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/providers/virtualbox/action/check_accessible.rb:18:in `call'
33: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/warden.rb:48:in `call'
32: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/providers/virtualbox/action/clean_machine_folder.rb:26:in `call'
31: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/warden.rb:48:in `call'
30: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/providers/virtualbox/action/set_name.rb:50:in `call'
29: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/warden.rb:48:in `call'
28: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/providers/virtualbox/action/clear_forwarded_ports.rb:15:in `call'
27: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/warden.rb:48:in `call'
26: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/builtin/provision.rb:80:in `call'
25: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/warden.rb:48:in `call'
24: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/builtin/env_set.rb:19:in `call'
23: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/warden.rb:48:in `call'
22: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/providers/virtualbox/action/prepare_forwarded_port_collision_params.rb:30:in `call'
21: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/warden.rb:48:in `call'
20: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/builtin/handle_forwarded_port_collisions.rb:52:in `call'
19: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/warden.rb:48:in `call'
18: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/providers/virtualbox/action/prepare_nfs_valid_ids.rb:12:in `call'
17: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/warden.rb:48:in `call'
16: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/synced_folders/nfs/action_cleanup.rb:25:in `call'
15: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/warden.rb:48:in `call'
14: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/builtin/synced_folder_cleanup.rb:28:in `call'
13: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/warden.rb:48:in `call'
12: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/builtin/delayed.rb:19:in `call'
11: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/warden.rb:48:in `call'
10: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/builtin/synced_folders.rb:90:in `call'
9: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/builtin/synced_folders.rb:90:in `each'
8: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/action/builtin/synced_folders.rb:93:in `block in call'
7: from /Users/pradchenko/.vagrant.d/gems/2.7.6/gems/vagrant-winnfsd-1.4.0/lib/vagrant-winnfsd/synced_folder.rb:39:in `enable'
6: from /Users/pradchenko/.vagrant.d/gems/2.7.6/gems/vagrant-winnfsd-1.4.0/lib/vagrant-winnfsd/synced_folder.rb:39:in `synchronize'
5: from /Users/pradchenko/.vagrant.d/gems/2.7.6/gems/vagrant-winnfsd-1.4.0/lib/vagrant-winnfsd/synced_folder.rb:41:in `block in enable'
4: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/environment.rb:631:in `lock'
3: from /Users/pradchenko/.vagrant.d/gems/2.7.6/gems/vagrant-winnfsd-1.4.0/lib/vagrant-winnfsd/synced_folder.rb:43:in `block (2 levels) in enable'
2: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/capability_host.rb:111:in `capability'
1: from /opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/lib/vagrant/capability_host.rb:111:in `call'
/opt/vagrant/embedded/gems/2.3.0/gems/vagrant-2.3.0/plugins/hosts/bsd/cap/nfs.rb:11:in `nfs_export': wrong number of arguments (given 4, expected 5) (ArgumentError)
Expected behavior
vagrant up and running
Actual behavior
vagrant fails
What actually happened?
Steps to reproduce
- vagran up
Hey there, thanks for opening up an issue. Could you please provide a full debug log as a gist
$ vagrant up --debug &> vagrant.log
Hey @soapy1 thank you very much for the reply, I've prepared the gist with debug log: https://gist.github.com/ep4sh/92be97c06f10adf91c24322acb7fed43
Heya @ep4sh,
so it looks like this error is coming from a plugin you have installed vagrant-winnfsd. Looks like it gets loaded in and used as the synced folder plugin. From that plugins documentation, it looks like it's meant to run on Windows hosts, but your are running darwin. So, I would recommend uninstalling that plugin and it should resolve this issue.
Thank you, @soapy1, I can't figure out how it happened :D
for now, I'm facing another issue, but this one has been solved. Really appreciate your help!!
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.