Quickly configure PhotonOS virtual machines with static IPs

Sometimes, we all need a large group of small virtual machines for our tests in vSphere. I tried in the past several linux distributions that claim to be small and easy to be deployed, but they usually failed in one of the two aspects, and it’s usually the ease of deployment. They are all fine if there’s a DHCP server around, but setting up a static IP configuration has always been a problem: mouse drivers in graphical mode are horrible, there’s little to no documentation about which distribution they are based on (in order to find out which commands and configuration files should be used), in summary, a living hell.
So, I decided to spend an afternoon doing some research and tests, and I came out with “my own” preferred procedure, based on VMware PhotonOS. It may be good for you too, or maybe not, depending on your own needs. I documented all the steps I’ve done, so that I (and you) can follow them start to end in order to obtain a working tiny VM with a static IP address.