Choose the VMware Fusion* network you want the network adapter connected to.
In the following example, we’ll connect the network adapter to a custom network which has NAT enabled and no DHCP service. Since DHCP is not enabled, VMs connected to this network will not be assigned an IP address automatically. We’ll see how to do this manually in the final step.
Close the Settings screen and power on the VM.
How to assign a static IP to Ubuntu
After running ifconfig, you’ll notice the new network adapter is not configured. We’ll configure it in the following steps.
Run ifconfig -a to find the name of the new network adapter.
In the example above, the network adapter is named ens38. The network address of the custom VMware Fusion network the adapter is connected to is 198.18.0.0 and the subnet mask is 255.255.255.0.
Let’s say we wanted to assign an IP of 198.18.0.11 to the new network adapter of the VM. The netplan config in Ubuntu 18.04 would look like the following:
Now when running ifconfig we can see the adapter is configured:
We should now be able to ping the VM from the Mac and also ping the Mac from the VM using its address of 198.18.0.1.
For more details on how to configure static IP addresses on Ubuntu see the following tutorials:
Tony is the founder and editor of GraspingTech, a blog which provides tutorials for Cloud Architects, DevOps Engineers and System Administrators. He has written over one hundred tech tutorials which have been read by more than a million people.