geerlingguy / drupal-vm

A VM for Drupal development
https://www.drupalvm.com/
MIT License
1.37k stars 647 forks source link

Recommend different default IP Address #2181

Closed einsty closed 2 years ago

einsty commented 2 years ago

Issue Type

Your Environment

Vagrant 2.2.18
VirtualBox 6.1.28r147628
ansible [core 2.11.6] 
  config file = None
  configured module search path = ['/Users/orin.fink/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/local/Cellar/ansible/4.7.0_1/libexec/lib/python3.10/site-packages/ansible
  ansible collection location = /Users/orin.fink/.ansible/collections:/usr/share/ansible/collections
  executable location = /usr/local/bin/ansible
  python version = 3.10.0 (default, Oct 13 2021, 06:45:00) [Clang 13.0.0 (clang-1300.0.29.3)]
  jinja version = 3.0.2
  libyaml = True

Your OS

Full console output

...

 INFO ssh: Setting SSH_AUTH_SOCK remotely: /tmp/ssh-AcdhxtMGRU/agent.694
DEBUG ssh: stderr: 41e57d38-b4f7-4e46-9c38-13873d338b86-vagrant-ssh
DEBUG ssh: Exit status: 0
DEBUG ssh: Re-using SSH connection.
 INFO ssh: Execute: mount -o vers=3 192.168.88.1:/System/Volumes/Data/Users/username/public-test /var/nfs/Users/username/public-test (sudo=true)
DEBUG ssh: Re-using SSH connection.
 INFO ssh: Execute: echo; printf $SSH_AUTH_SOCK (sudo=false)
DEBUG ssh: stderr: 41e57d38-b4f7-4e46-9c38-13873d338b86-vagrant-ssh
DEBUG ssh: Exit status: 0
 INFO ssh: Setting SSH_AUTH_SOCK remotely: /tmp/ssh-AcdhxtMGRU/agent.694
DEBUG ssh: stderr: mesg: 
DEBUG ssh: stderr: ttyname failed
DEBUG ssh: stderr: : 
DEBUG ssh: stderr: Inappropriate ioctl for device

and eventually the infamous

mount.nfs: Connection timed out

Summary

The range of supported "host only" IP Addresses in VirtualBox 6.1.28 has been reduced. The Drupal VM address of 192.168.88.88 is not in the supported range. It will be a problem when trying to create the NFS share.

https://www.virtualbox.org/manual/ch06.html#network_hostonly

On Linux, Mac OS X 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.

For Discussion / Options

Either modify the default IP address used by Drupal VM to be in the 192.168.56.0/21 range, and/or add a lot of heads up about this issue.

I did find that by using an IP address of say 192.168.57.57 (as an example) I no longer had any trouble with the NFS shares being mounted.

frob commented 2 years ago

In my testing this issue NFS will timeout only if you have created the VM before. If this is a completely fresh then the error is:

==> www-mlc.local.ciservers.net: 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", "vboxnet3", "--ip", "192.168.0.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

The only solution I found is to add a file /etc/vbox/networks.conf with the contents:

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

This is the relevant docs page from VirtualBox. https://www.virtualbox.org/manual/ch06.html#network_hostonly

stale[bot] commented 2 years ago

This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!

Please read this blog post to see the reasons why I mark issues as stale.

stale[bot] commented 2 years ago

This issue has been closed due to inactivity. If you feel this is in error, please reopen the issue or file a new issue with the relevant details.