Skip to content
Luca Dell'Oca Principal Cloud Architect @Veeam
Virtual To The Core Virtual To The Core

Virtualization blog, the italian way.

  • Media
  • About me
Virtual To The Core
Virtual To The Core

Virtualization blog, the italian way.

Quickly configure PhotonOS virtual machines with static IPs

Luca Dell'Oca, May 22, 2018May 21, 2018
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. 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.
1- Get PhotonOS
My choice has been the VMware PhotonOS appliance. I’ve seen other OVA templates that are even smaller, but they are usually ugly and not easy to be used. PhotonOS appliance is only 110MB in size, which is ok for my needs. Even on my smallest lab, I can easily deploy a dozen of these. You can freely obtain the OVA file here.
Once you have the OVA file, just deploy a new virtual machine using it.
2- configure PhotonOS
The initial configuration is done with just two steps. The first one is to change the root password. The default is “changeme”, and at the first login, the system asks to change it with a new one:
Once we are inside the machine, we need to configure a static IP addres, which can be accomplished quickly with this commands:
networkctl (to check the name of the interface which will be used later, in my example is eth0)
cd /etc/systemd/network (you will find here already a configuration file for dhcp settings)
vi 10-static.network , and put this text (edit it where needed) in the newly created file:
[Match]
Name=eth0
[Network]
Address=10.2.113.100/24
Gateway=10.2.113.254
DNS=8.8.8.8
chmod 644 10-static.network
systemctl restart systemd-networkd
Our machine is now correctly connected to the network and ready to be used:

Share this:

  • Click to share on X (Opens in new window) X
  • Click to share on Facebook (Opens in new window) Facebook
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to email a link to a friend (Opens in new window) Email
  • Click to share on Tumblr (Opens in new window) Tumblr
  • Click to share on Pinterest (Opens in new window) Pinterest
  • Click to share on Reddit (Opens in new window) Reddit
  • Click to share on WhatsApp (Opens in new window) WhatsApp
  • Click to share on Pocket (Opens in new window) Pocket
Tech configurationiposphotonstaticvmware

Post navigation

Previous post
Next post

Search

Sponsors

Latest Posts

  • Migrate WSL (Windows Subsystem for Linux) to a new computer
  • Pass keystrokes to a pfSense virtual machine to install it automatically
  • Automatically deploy pfSense with Terraform and Ansible
  • My Automated Lab project: #6 Create a S3 Bucket with Terraform
  • My Automated Lab project: #5 Deploy a Linux vSphere VM with Terraform and custom disks
©2025 Virtual To The Core | WordPress Theme by SuperbThemes
We use cookies to ensure that we give you the best experience on our website, and to collect anonymous data regarding navigations stats using 3rd party plugins; they all adhere to the EU Privacy Laws. If you continue to use this site we will assume that you are ok with it.OkNoPrivacy Policy