Reputation: 23
I am trying to execute "vagrant up" command. It was working until yesterday, but now I am getting following error:
There was an error while executing
VBoxManage
, a CLI used by Vagrant for controlling VirtualBox. The command and stderr is shown below. Command: ["modifyvm", "7db01b4e-...", "--natpf1", "delete", "ssh"]
I'm on Mac OS. How do I fix it?
Upvotes: 2
Views: 2859
Reputation: 847
I had a similar issue with the vagrant
command itself, it just did nothing. It turned out I had an alias called vagrant and hadn't removed it properly. I thought I did but I hadn't. The whole thing was driving me crazy. So in my case solution: check your ~/.bash_profile
and always double check you do source ~/.bash_profile
on the command line.
Upvotes: 0
Reputation: 1284
I have similar problem with vagrant up
command in Mac OS
Command: ["startvm", "a7c6ef51-dcce-4253-a761-b1e26ca8534b", "--type", "headless"]
Stderr: VBoxManage: error: The virtual machine 'VagrantEnv_default_1562209910304_49097' has terminated unexpectedly during startup with exit code 1 (0x1)
VBoxManage: error: Details: code NS_ERROR_FAILURE (0x80004005), component MachineWrap, interface IMachine
This article saved my life https://medium.com/@Aenon/mac-virtualbox-kernel-driver-error-df39e7e10cd8
What you need to do is to open the Security & Privacy
settings in your machine and then press Allow
button for your Oracle software (virtual box).
Try vagrant up again and hopefully it's working now
Upvotes: 3
Reputation: 486
Have you by any chance deleted the VM in "/Users//VirtualBox VMs" on your MacOS? If yes, then try this - Go to the directory where you executed "vagrant up" command from and remove .vagrant directory
rm -rf .vagrant/
When you execute "vagrant up" command, (I think that) the vagrant script looks for .vagrant directory, and if it finds the .vagrant directory, then it looks for the corresponding VM in "VirtualBox VMs" directory. And if you happened to have deleted the VM, you'll see the above error. By removing the .vagrant directory, you'll force the vagrant script to create a new .vagrant directory and associate a new VM with it.
Now try
vagrant up
Hopefully you will not see this error.
Upvotes: 3