bradleyd / devops_for_the_desperate

The companion code for the book DevOps for the Desperate
120 stars 67 forks source link

[Chapter 1] Vagrant up fails #13

Closed codisfy closed 2 years ago

codisfy commented 2 years ago

Platform : linux Vagrant 2.2.9 Vbox 6.1.34

Issue Running vagrant up fails with

There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.

Command: ["hostonlyif", "ipconfig", "vboxnet2", "--ip", "172.28.128.1", "--netmask", "255.255.255.0"]

Stderr: VBoxManage: error: Code E_ACCESSDENIED (0x80070005) - Access denied (extended info not available)
VBoxManage: error: Context: "EnableStaticIPConfig(Bstr(pszIp).raw(), Bstr(pszNetmask).raw())" at line 242 of file VBoxManageHostonly.cpp

Possible Solution

I don't know much about the best practice, but for me it worked when I added an IP address to Vagrantfile on line 36

config.vm.network "private_network", type: "dhcp", ip: "192.168.56.11"

bradleyd commented 2 years ago

@codisfy Thank you for reporting this! Did this error happen on first up?

bradleyd commented 2 years ago

@codisfy I tried it on Linux and could not reproduce it. I did see one difference though. I am using vagrant 2.2.19. I found a issue/comment on the Vagrant forum https://discuss.hashicorp.com/t/vagrant-2-2-18-osx-11-6-cannot-create-private-network/30984/22

Can you try upgrading and remove the static IP line the Vagrantfile and try again?

bradleyd commented 2 years ago

I am going to close this issue since the response is older than 60 days.

matt-savvy commented 1 year ago

I had a similar issue on mac OS, which was resolved by the answer here https://stackoverflow.com/questions/70088002/error-executing-vboxmanage-on-virtualbox-when-running-vagrant-up-in-terminal

bradleyd commented 1 year ago

@matt-savvy thanks for letting us know!