VMware Fusion: how can I access an Apache server in my Ubuntu VM from my Mac Host?

Solution:

  • Shut down the virtual machine
  • on the menu bar go to Virtual Machine > Settings > Add Devices
  • Create a new Network device, set configuration to "Private to my Mac" under Custom, and generate a MAC address for it.
  • Start up Ubuntu and Apache2 server ** If you want to be sure, In the settings app, and under network there should be more than one connection. Click the gear icon for each connection until you find the one with a matching MAC address. Copy the IP address for it.
  • Follow this tutorial to change the IP Address to a static one (in the netplan file, use the IP address copied in the step above). This will make the IP address stay the same.
  • Entering the IP address on the VM host should take you to Apache's test page.