Quick Config | chronyd will not start in LXD containers

Quick Config | chronyd will not start in LXD containers

Table of Contents

I have been working to get FreeIPA server installed and configured in an LXD container and found that the installation dept failing and complained that chronyd.service would not start. I tried manually restarting the service unsuccessfully. Off to Google I went.

After lot of searching, I was able to find the answer here in a post from another blog related to IP Clients. It seems that the if is very simple and only required editing the unit script to add an additional flag to the start command (-x) as outlined below.

**_# Edit vi /usr/lib/systemd/system/chronyd.service_**
root@ldc01 ~]# vi vi /usr/lib/systemd/system/chronyd.service

_[ Unit]
Description=NTP client/server
Documentation=man:chronyd(8) man:chrony.conf(5)
After=ntpdate.service sntp.service ntpd.service
Conflicts=ntpd.service systemd-timesyncd.service
ConditionCapability=CAP_SYS_TIME

[Service]
Type=forking
PIDFile=/run/chrony/chronyd.pid
EnvironmentFile=-/etc/sysconfig/chronyd
ExecStart=/usr/sbin/chronyd **-x** $OPTIONS
ExecStartPost=/usr/libexec/chrony-helper update-daemon
ExecStopPost=/usr/libexec/chrony-helper remove-daemon-state
PrivateTmp=yes
ProtectHome=yes
ProtectSystem=full

[Install]
WantedBy=multi-user.target_

I made this change and reloaded the daemons (systemctl reload-daemons) and this resolved the issue. FreeIPA installation was successful in my LXD container.

Share :

Related Posts

Raspberry Pi | Automated script to change the password

Raspberry Pi | Automated script to change the password

Recently I was performing a network audit and discovered a large number of Raspberry Pi devices that were configured wit...

Ubuntu 22.04 | Install and configure an OpenLDAP Server

Ubuntu 22.04 | Install and configure an OpenLDAP Server

Adventures in the LXD Lab | Authentication Services Tinkering is what I do but this article goes a bit beyond tinkering ...

Pop!_OS 22.04 | Building an LXD Lab

Pop!_OS 22.04 | Building an LXD Lab

Adventures in the LXD Lab | In the beginning there was….