[lxc-users] hostnamectl doesn't work in a lxc container

Yuri Kanivetsky yuri.kanivetsky at gmail.com
Fri Feb 10 12:48:14 UTC 2017


Hi,

Upon further investigation, here's what I see in system log:

Feb 10 12:39:04 start-life dbus[79]: [system] Activating via systemd:
service name='org.freedesktop.hostname1'
unit='dbus-org.freedesktop.hostname1.service'
Feb 10 12:39:05 start-life systemd[1]: Starting Hostname Service...
Feb 10 12:39:05 start-life systemd[2935]: systemd-hostnamed.service:
Failed at step NETWORK spawning /lib/systemd/systemd-hostnamed:
Permission denied
Feb 10 12:39:05 start-life systemd[1]: systemd-hostnamed.service: Main
process exited, code=exited, status=225/NETWORK
Feb 10 12:39:05 start-life systemd[1]: Failed to start Hostname Service.
Feb 10 12:39:05 start-life systemd[1]: systemd-hostnamed.service: Unit
entered failed state.
Feb 10 12:39:05 start-life systemd[1]: systemd-hostnamed.service:
Failed with result 'exit-code'.
Feb 10 12:39:29 start-life dbus[79]: [system] Failed to activate
service 'org.freedesktop.hostname1': timed out

And on the other server where it works:

Feb 10 14:40:26 chatrulez-staging dbus[25957]: [system] Activating via
systemd: service name='org.freedesktop.hostname1'
unit='dbus-org.freedesktop.hostname1.service'
Feb 10 14:40:26 chatrulez-staging systemd[1]: Starting Hostname Service...
Feb 10 14:40:26 chatrulez-staging systemd-hostnamed[18340]: Warning:
nss-myhostname is not installed. Changing the local hostname might
make it unresolveable. Please install nss-myhostname!
Feb 10 14:40:26 chatrulez-staging dbus[25957]: [system] Successfully
activated service 'org.freedesktop.hostname1'
Feb 10 14:40:26 chatrulez-staging systemd[1]: Started Hostname Service.

Regards,
Yuri


More information about the lxc-users mailing list