rdbreak / rhcsa8env

This is a RHCSA8 study environment built with Vagrant/Ansible
https://join.slack.com/t/redhat-certs/shared_invite/zt-7ju3rz7b-_G3Njp3PDwdBG_81SwPeLA
MIT License
295 stars 177 forks source link

VBoxmanage error when creating network devices #71

Open Celeris113 opened 2 years ago

Celeris113 commented 2 years ago

When creating the VM, I get the following error: ==> server2: Clearing any previously set network interfaces... 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", "vboxnet0", "--ip", "192.168.55.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

This seems like a issue with the latest Virtualbox versions (I'm on 6.1.32).

BBGrimmett2 commented 2 years ago

I also am having this issue

wilderness95 commented 1 year ago

The solution is very simple. You have to edit the /etc/vbox/networks.conf file(if it is not exsist you have to create) and add the following line:

* 192.168.55.0/24

After that, try vagrant up again.

For more info check this page: https://www.virtualbox.org/manual/ch06.html#network_hostonly

daxiaraoming commented 1 year ago

On Linux, macOS and Solaris Oracle VM VirtualBox will only allow IP addresses in 192.168.56.0/21 range to be assigned to host-only adapters. For IPv6 only link-local addresses are allowed. If other ranges are desired, they can be enabled by creating /etc/vbox/networks.conf and specifying allowed ranges there. For example, to allow 10.0.0.0/8 and 192.168.0.0/16 IPv4 ranges as well as 2001::/64 range put the following lines into /etc/vbox/networks.conf:

  * 10.0.0.0/8 192.168.0.0/16
  * 2001::/64