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.

090dc010-44ec-4153-bca8-34530c4e2e4a.png

Change the default root password

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

change-the-default-root-password.png

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.

clearing-the-machine-id-of-a-cloned-instance-for-dhcp.png

Update the package manager

1
tdnf update
update-the-package-manager.png

Install nano

tdnf install nano

install-nano.png

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

change-from-dhcp-to-static-address.png

Check and set hostname

1
2
hostnamectl status
hostnamectl set-hostname rancher_master.rylander.io
check-and-set-hostname.png

Upgrade Docker

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

Start Docker and enable it to start att boot time

1
2
systemctl start docker
systemctl enable docker

reboot the system

1
reboot