/var/db/dhcpd_leases: no such file or directory
# sudo touch /var/db/dhcpd_leases
I find the advice above very poor. The VM is trying to get an IP address, and you provide an empty file. Once that is created, the consequence is natural:
cannot map MAC address "nnn" to IP: Could not find an IP address
tmp/stackman-*.log shows 29 attempts to get the IP address.
I was running into this issue with the VM 7.3.2 on MacOS 10.11.6
It turned out to be a firewall issue in my case. TBH, when the host firewall asked to allow incoming connections for 'bootpd', I initially denied. But setting it to allow later did not help either. So my workaround was as follows:
* There is no /var/db/dhcpd_leases
* Delete previous .bitnami files
* unplug Ethernet, cut the wifi cable
* turn MacOS firewall off in the System Preferences -> Security and Privacy
* start XAMPP again for the "first time"
* the IP address in the General tab appears as 192.168.64.2
* on the host, /var/db/dhcpd_leases has been created,
-rw-r--r-- 1 root wheel 122 4 Mar 19:35 /var/db/dhcpd_leases
which contains
- Code: Select all
{
name=debian
ip_address=192.168.64.2
hw_address=1,d2:a:1c:3d:cf:32
identifier=1,d2:a:1c:3d:cf:32
lease=0x5c7ec185
}
* see that a process bootpd is running on the host, which didn't before:
root 90994 0.0 0.0 2491600 3844 ?? Ss 7:35pm 0:00.02 /usr/libexec/bootpd
* turn the firewall back on
* replug the Ethernet, repair the wifi cable
* #ifconfig on the host shows that an interface was created: bridge100: inet 192.168.64.1
* VM with its servers is fully running
When I shut the VM down, keep the firewall on, and start it again, it gets an IP address:
- time="2019-03-04T21:30:19+01:00" level=info msg="Machine IP Adress: 192.168.64.2"
which is not shown in the General tab, but fails to get a ssh connection:
- time="2019-03-04T21:30:25+01:00" level=debug msg="Shell not ready: failed to dial: dial tcp 192.168.64.2:22: connect: no route to host"
Indeed I cannot ping 192.168.64.2.
Again, temporarily switching the firewall off during start helps, after switching it on I can still ping 192.168.64.2, though according to the log starting the ssh took 5 attempts during 20 sec.