Comment 20 for bug 1771382

Revision history for this message
In , Martin Steigerwald (ms-proact) wrote :

(In reply to Martin Steigerwald from comment #8)
> Just removing the generator leads to cloud-init services not being run at
> startup on my SLES 12 SP 3 VM with
>
> slestemplate:~ # find /etc/systemd | grep cloud
> /etc/systemd/system/cloud-init.target.wants
> /etc/systemd/system/cloud-init.target.wants/cloud-final.service
> /etc/systemd/system/cloud-init.target.wants/cloud-config.service
> /etc/systemd/system/cloud-init.target.wants/cloud-init-local.service
> /etc/systemd/system/cloud-init.target.wants/cloud-init.service
[…]
> slestemplate:~ # systemctl status cloud-init.target
> ● cloud-init.target - Cloud-init target
> Loaded: loaded (/usr/lib/systemd/system/cloud-init.target; static; vendor
> preset: disabled)
> Active: inactive (dead)
[…]
> So it is still not working out of the box. I enabled all services and the
> targets with systemctl enable. It is not obvious for me to enable cloud init
> in case the Systemd generator does not do it. I thought I did, but
> apparently I did not.

With the work-around

slestemplate:/etc/systemd/system # mv cloud-init.target.wants/* multi-user.target.wants/

cloud-init is started on boot.

Seems cloud-init.target is never triggered. I am not really experienced with targets in Systemd.