Dear all, Anyone has tried creating CentOS 7 OS template in CloudStack and experiencing similar problem?
Thank you. -ip- On Wed, Sep 2, 2015 at 1:25 PM, Indra Pramana <in...@sg.or.id> wrote: > Dear all, > > I am using ACS 4.2.0 with KVM hypervisor. I am trying to create a CentOS 7 > template and everything is running fine except the CloudStack password > reset script template. > > CentOS 7 is using systemd so I have created the required > /usr/lib/systemd/system/cloud-set-guest-password.service as follows: > > === > [Unit] > Description=Cloudstack set guest password > After=network.target > > [Service] > Type=oneshot > User=root > Group=root > ExecStart=/etc/init.d/cloud-set-guest-password start > Type=forking > > [Install] > WantedBy=multi-user.target > === > > I also modified the /etc/init.d/cloud-set-guest-password slightly since > CentOS 7 is using NetworkManager by default: > > === > # Add your DHCP lease folders here > DHCP_FOLDERS="/var/lib/NetworkManager/*" > === > > The script is running perfectly fine if I run it manually. However, it > doesn't seem to be started automatically upon boot-up even though I have > enable it via systemctl. > > === > [root@test-centos7-20150819 ~]# systemctl enable > cloud-set-guest-password.service > ln -s '/usr/lib/systemd/system/cloud-set-guest-password.service' > '/etc/systemd/system/multi-user.target.wants/cloud-set-guest-password.service' > > [root@test-centos7-20150819 ~]# systemctl status > cloud-set-guest-password.service > cloud-set-guest-password.service - Cloudstack set guest password > Loaded: loaded > (/usr/lib/systemd/system/cloud-set-guest-password.service; enabled) > Active: inactive (dead) > === > > Anyone has similar experience before? How to ensure that the script can be > executed during boot-up so that the password will be changed? > > Thanks in advance. > > -ip- >