geerlingguy / drupal-vm

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

After updating to Drupal VM 4.0 `vagrant up` stalls #1077

Closed jrbeeman closed 7 years ago

jrbeeman commented 7 years ago

Issue Type

Your Environment

Vagrant 1.9.1
VirtualBox 5.0.30r112061
ansible 2.2.0.0
  config file =
  configured module search path = Default w/o overrides

Your OS

Full console output

$ vagrant up
Bringing machine 'watercooler' up with 'virtualbox' provider...
==> watercooler: Importing base box 'geerlingguy/ubuntu1404'...
==> watercooler: Matching MAC address for NAT networking...
==> watercooler: Checking if box 'geerlingguy/ubuntu1404' is up to date...
==> watercooler: Setting the name of the VM: watercooler.localhost
==> watercooler: Clearing any previously set network interfaces...
==> watercooler: Preparing network interfaces based on configuration...
    watercooler: Adapter 1: nat
    watercooler: Adapter 2: hostonly
==> watercooler: Forwarding ports...
    watercooler: 22 (guest) => 2222 (host) (adapter 1)
==> watercooler: Running 'pre-boot' VM customizations...
==> watercooler: Booting VM...
==> watercooler: Waiting for machine to boot. This may take a few minutes...
    watercooler: SSH address: 127.0.0.1:2222
    watercooler: SSH username: vagrant
    watercooler: SSH auth method: private key

Summary

While updating my BLT-based project from Drupal VM 3.4 to 4.0, I ran into an issue where the vagrant up process would stall at the last line indicated above in "Full console output."

Solution:

  1. Open up the VirtualBox GUI
  2. Click on the running VM in the list (not the base image)
  3. Click Settings, Network
  4. Go to the first (NAT) adapter and see if the 'Cable connected' checkbox is checked.
  5. If the box is unchecked, check it and click "OK".
japerry commented 7 years ago

Older versions of VirtualBox have this problem, and it will re-occur every time you run vagrant destroy/vagrant up.

When I've upgraded folks to a version past 5.1.4 this issue goes away.

geerlingguy commented 7 years ago

Yeah; the quick fix is to use the solution above. The better long-term fix is to make sure you're running the latest version of VirtualBox (5.1.10 or 5.1.12 as of this writing).

Note that VirtualBox doesn't automatically update past minor version bumps (e.g. if you're on 5.0.x, it will never tell you 5.1.x is available).

nikunjkotecha commented 7 years ago

@geerlingguy Can we add a small fix in VagrantFile for backward compatibility?

we just need v.customize ['modifyvm', :id, '--cableconnected1', 'on'] for the virtualbox provider

I'll update VirtualBox but for a recent project I had to stick to older version (not able to recall why)

geerlingguy commented 7 years ago

@nikunjkotecha - You should be able to add that if needed through a Vagrantfile.local: see http://docs.drupalvm.com/en/latest/extending/vagrantfile/