Build Photon OS appliance using packer.io

I found a great article from William Lam about how to build an Photon OS virtual appliance which includes OVF settings for configuration. During my initial tests I faced some issues like the virtual machine network did not connect properly and others. First I had changed the existing scripts to work with the vmware-iso builder which was in the end working but the performance was pretty bad. So I decided to convert the existing template from vmware-iso to vsphere-iso.

The base code is really good an most of it can be re-used. My changes can be found in my fork of his repo.

https://github.com/mdhemmi/photonos-appliance

And here a video of a build run.

Source:

https://www.virtuallyghetto.com/2019/11/packer-reference-for-building-photonos-virtual-appliance-using-ovf-properties.html

Photon OS rsyslog send to Syslog Server – Quick Guide

Requirements:

* Photon OS based virtual machine
* VMware vRealize Log Insight or any other Syslog server

Configuration of Photon OS:

Install rsyslog
tdnf install rsyslog

Extend /etc/rsyslog.conf with Syslog Server target

replace the following line:
*.* @@remote-host:514

with for example (syslog.local is the IP or name of your syslog server):
*.* @@syslog.local:514

restart rsyslog
systemctl restart rsyslog.service

in case rsyslog is not enabled
systemctl enable rsyslog.service

That’s the basic setup. Now how to send a specific log to syslog.

vi /etc/rsyslog.d/application.conf

$ModLoad imfile
$InputFilePollInterval 10
$InputFileName /opt/vmware/log/app.log
$InputFileTag APP
$InputFileStateFile Stat-APP
$InputFileSeverity app
$InputFileFacility local7
$InputRunFileMonitor
$InputFilePersistStateInterval 1000

restart rsyslog service

systemctl restart rsyslog.service

Result: