Return-Path: X-Original-To: apmail-cloudstack-users-archive@www.apache.org Delivered-To: apmail-cloudstack-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 28FD910523 for ; Thu, 3 Sep 2015 06:59:44 +0000 (UTC) Received: (qmail 53922 invoked by uid 500); 3 Sep 2015 06:59:42 -0000 Delivered-To: apmail-cloudstack-users-archive@cloudstack.apache.org Received: (qmail 53750 invoked by uid 500); 3 Sep 2015 06:59:42 -0000 Mailing-List: contact users-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@cloudstack.apache.org Delivered-To: mailing list users@cloudstack.apache.org Received: (qmail 53558 invoked by uid 99); 3 Sep 2015 06:59:41 -0000 Received: from Unknown (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Sep 2015 06:59:41 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 68BB11A8B64 for ; Thu, 3 Sep 2015 06:59:41 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 4.001 X-Spam-Level: **** X-Spam-Status: No, score=4.001 tagged_above=-999 required=6.31 tests=[HTML_MESSAGE=3, KAM_LAZY_DOMAIN_SECURITY=1, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id 4yh9RdFDQOEX for ; Thu, 3 Sep 2015 06:59:35 +0000 (UTC) Received: from mail-io0-f170.google.com (mail-io0-f170.google.com [209.85.223.170]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTPS id 6B1E0213A1 for ; Thu, 3 Sep 2015 06:59:34 +0000 (UTC) Received: by iofh134 with SMTP id h134so47791033iof.0 for ; Wed, 02 Sep 2015 23:59:34 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=7YVCE1iCxM+/uNNd7Y3b/hBxeQGhNL0BqlSc6r7ZNCg=; b=BVwQ3TBbYcHYeQmVf/dUOfRaS0KizRk20dWffgDSxhyVimdpYqgvmfu8Ul+LT2Wa8a 4h3ELUO9n4gbtO1CHYM+cgAlhx/itOgeqiaBZW3o45MOI3I4tleCGFL2/bS3Dq5o2h3T 0LSbVt6XvWGLqGCA6eVuNCvWTXxoJKoTJT66XMR9KWvzv/01xf9tl2An49sHcMw7jP1k ymc6qF1ydoV01/EtDF681ZyayFq0Q4ykndo5CFBY8N/snEQXR8waFapSHuMrjvFDlZDy mAAWzNCO6u4b8l+N2WSgd9ha/X1Lr0pObO3oNmWPH0I+02U2c+k9/Sn4ifreJft8D8Vn deHA== X-Gm-Message-State: ALoCoQmnMD30iTXCxHB3hBizcF/6YEmLrH91hKGOUHHmPqSvcjPqTjVAXmiFrxse1/84hQREW5LJ MIME-Version: 1.0 X-Received: by 10.107.137.162 with SMTP id t34mr15808552ioi.103.1441263574365; Wed, 02 Sep 2015 23:59:34 -0700 (PDT) Received: by 10.79.30.5 with HTTP; Wed, 2 Sep 2015 23:59:34 -0700 (PDT) In-Reply-To: References: Date: Thu, 3 Sep 2015 14:59:34 +0800 Message-ID: Subject: Re: cloud-set-guest-password script for CentOS 7 template From: Indra Pramana To: "users@cloudstack.apache.org" , "dev@cloudstack.apache.org" Content-Type: multipart/alternative; boundary=001a113eacda60d0f8051ed25353 --001a113eacda60d0f8051ed25353 Content-Type: text/plain; charset=UTF-8 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 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- > --001a113eacda60d0f8051ed25353--