Can't override a systemd unit's ConditionVirtualization on Archlinux on Distrod on WSL
2
votes
1
answer
2753
views
I'm trying to start systemd-timesyncd on Archlinux that was installed via Distrod on top of WSL. By default systemd-timesyncd's unit file prevents it from starting up on virtualized environment, the unit file has a
ConditionVirtualization=!container
flag. I'm trying to override this with the following configuration:
[root@valentine ~]# systemd-detect-virt
wsl
[root@valentine ~]# cat /etc/systemd/system/systemd-timesyncd.service.d/override.conf
[Unit]
ConditionVirtualization=wsl
[root@valentine ~]# systemctl daemon-reload
[root@valentine ~]# systemctl start systemd-timesyncd.service
[root@valentine ~]# systemctl status systemd-timesyncd.service
○ systemd-timesyncd.service - Network Time Synchronization
Loaded: loaded (/usr/lib/systemd/system/systemd-timesyncd.service; enabled; preset: enabled)
Drop-In: /etc/systemd/system/systemd-timesyncd.service.d
└─override.conf
Active: inactive (dead)
Condition: start condition failed at Mon 2023-02-27 10:38:46 CET; 6s ago
└─ ConditionVirtualization=!container was not met
Docs: man:systemd-timesyncd.service(8)
Feb 27 10:38:46 valentine systemd: Network Time Synchronization was skipped because of an unmet condition check (ConditionVirtualization=!container).
It seems like systemd is picking p the override configuration, yet, it doesn't seem to use the overridden configuration flag.
What's the best way to solve this issue and have systemd-timesyncd run in a virtualized envrionment?
Asked by Zizzencs
(163 rep)
Feb 27, 2023, 12:21 PM
Last activity: Mar 1, 2023, 08:02 PM
Last activity: Mar 1, 2023, 08:02 PM