[SOLVED] ERPNext Vagrant Networking Issue

I tried using the Vagrant boxes in the URL ‘https://erpnext.com/download’ and the GIT repository with the URL ‘GitHub - frappe/erpnext_vagrant: Vagrantfile and Bootstrap for creating a dev environment for ERPNext’. Both Vagrant boxes are timing out after using the ‘vagrant up’ command. The following messages are encountered:


Bringing machine ‘default’ up with ‘virtualbox’ provider…
==> default: Importing base box ‘ERPNext’…
==> default: Matching MAC address for NAT networking…
==> default: Setting the name of the VM: ERPNextVagrantBox_default_1470058729106_5281
==> default: Clearing any previously set forwarded ports…
==> default: Clearing any previously set network interfaces…
==> default: Preparing network interfaces based on configuration…
default: Adapter 1: nat
==> default: Forwarding ports…
default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Booting VM…
==> default: Waiting for machine to boot. This may take a few minutes…
default: SSH address: 127.0.0.1:2222
default: SSH username: frappe
default: SSH auth method: password
Timed out while waiting for the machine to boot. This means that
Vagrant was unable to communicate with the guest machine within
the configured (“config.vm.boot_timeout” value) time period.

If you look above, you should be able to see the error(s) that
Vagrant had when attempting to connect to the machine. These errors
are usually good hints as to what may be wrong.

If you’re using a custom box, make sure that networking is properly
working and you’re able to connect to the machine. It is a common
problem that networking isn’t setup properly in these boxes.
Verify that authentication configurations are also setup properly,
as well.

If the box appears to be booting properly, you may want to increase
the timeout (“config.vm.boot_timeout”) value.

I tried checking the user interface of the virtual machine. Network configuration are not loading correctly. The message ‘Waiting for network configuration’ is displayed for a long time. The message ‘Booting system without full network configuration’ then is returned after a timeout.

@saleem, maybe your VM have corrupted the disk file, open the Vagrantfile and change the line vb.gui = false to vb.gui = true

And reboot your vagrant again!

If the disk was damaged you can reinstall it again or recover the disk using fsck

The virtual machine is booting correctly after the ‘Booting system without full network configuration’ message. It shows a prompt after the message and commands are executing correctly. Could it still be corrupted in that case?

@saleem I guess no!

The box “hashicorp/precise32” from HashiCorp is starting correctly and the ‘vagrant ssh’ command is successfully connecting. I am encountering the problem on the boxes from ERPNext.

Using ‘allow-hotplug’ in the network configuration at the path ‘/etc/network/interfaces’ fixed the problem based on the information in the URL ‘Bug #916890 ""Waiting for network configuration” on every boot” : Bugs : ifupdown package : Ubuntu’.

The problem was with Intel network adapters based on information in the URL ‘Issues with virtualbox provisioner `private_network` mode in cloud ubuntu 14.04 box · Issue #3860 · hashicorp/vagrant · GitHub’.

The following settings in the Vagrantfile solved the issue:

config.vm.provider “virtualbox” do |vb|
### Change network card to PCnet-FAST III
# For NAT adapter
vb.customize [“modifyvm”, :id, “–nictype1”, “Am79C973”]
# For host-only adapter
vb.customize [“modifyvm”, :id, “–nictype2”, “Am79C973”]
end

1 Like