cloudstack-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pierre-Luc Dion <pd...@cloudops.com>
Subject Re: cloud-set-guest-password script for CentOS 7 template
Date Thu, 03 Sep 2015 12:37:21 GMT
I think you have to update the cloud-set-guest-password.sh to properly set
the dhcp path, something like /var/lib/dhcp. I think the dhcp client path
changed in centos7.


On Sep 3, 2015 03:59, "Erik Weber" <terbolous@gmail.com> wrote:

> Nux is using cloud-init to do it in his templates, see here:
>
> https://github.com/NuxRo/openvm/blob/master/kickstarts/vanilla/7/post_cloudstack.ks
>
> --
> Erik
>
> On Thu, Sep 3, 2015 at 9:20 AM, <christian.kirmse@zv.fraunhofer.de> wrote:
>
> > Hi,
> >
> > I encountered a similar issues, although I'm still not quite as far as
> you
> > building a systemd script.
> > I also changed the script to the right directory for the lease files.
> > When the vm starts it takes approximately 15 minutes to be ready, that
> > must have something to do with the script, but I’m not quiet sure if it
> is
> > the password script or the ssh key script, which I also installed in the
> > template.
> > In the next couple days I’ll take some time for that script, maybe I get
> > some steps further.
> >
> > If someone has already the solution, it would be great.
> >
> > Kind Regards
> > Christian
> >
> > > On 03 Sep 2015, at 08:59, Indra Pramana <indra@sg.or.id> wrote:
> > >
> > > 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 <indra@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-
> > >>
> >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message