Blog

Deploying New Photon VM From Template and Docker Up

I’ve prepared a Photon micro image as a VSphere Template. I use this to get a tiny Linux host for hosting Docker.

Change the default root password

Default password for root is “changeme” and must be changes when logging in the first time.

Clearing the Machine ID of a Cloned Instance for DHCP

Photon OS uses the contents of /etc/machine-id to determine the DHCP unique identifier (duid) that is used for DHCP requests. If you use a Photon OS instance as the base system for cloning to create additional Photon OS instances, you should clear the machine-id with this command:

1
echo -n > /etc/machine-id

With the value cleared, systemd regenerates the machine-id and, as a result, all DHCP requests will contain a unique duid.

Update the package manager

1
tdnf update

Install nano

tdnf install nano

Change from DHCP to static address

1
2
3
4
mv /etc/systemd/network/99-dhcp-eth0.network  /etc/systemd/network/99-static-en.network
nano /etc/systemd/network/99-static-en.network

systemctl restart systemd-networkd.service

or reboot

Check and set hostname

1
2
hostnamectl status
hostnamectl set-hostname rancher_master.rylander.io

Upgrade Docker

1
2
3
tdnf upgrade docker -y
systemctl daemon-reload
systemctl restart docker

Start Docker and enable it to start att boot time

1
2
systemctl start docker
systemctl enable docker

reboot the system

1
reboot