2016-07-09

The (default) generated homestead VM does not have an IPv4 address and how to fix this

When I first went on installing a Homestead VM, it did not get an IPv4 address. And there was nothing that indicated a failure:

  • neither when the VM is booting (no errors, all appears "OK")
  • using the "ifconfig" command, we can see that our adapters do not have an IPv4 address (whereas we were expecting 192.168.10.10 to be used)
  • the “lspci” command allows us to see what devices are used. We can see the Ethernet controllers there.

tl;dr

I have written a much longer article about the analysis of the problem and all the possibilities offered by Virtual Box in terms of virtual ethernet adapters, and how to configure the Vagrant NIC Types, and you can read it here:


But a long story short:

Finally


Configuring the adapter type through the Vagrant file did not work as it created a third adapter and was ineffective.


But changing manually the NIC adapters in the VirtualBox VM setting and using Paravirtualized network adapter (virtio-net) finally gave the best results












No comments:

Post a Comment