CloudStack Guest Scripts

Sometime back, I made modifications to the original generic CloudStack cloud-set-guest-password and cloud-set-guest-sshkey to make them work on other Linux distros and FreeBSD.

You can find them on Github.

The platforms I have tested them to work are…

  1. SuSE Enterprise Linux
  2. CentOS 6.x
  3. Debian / Ubuntu
  4. FreeBSD

You can also find DHCP hooks to set the hostname for FreeBSD.

Ideally, I would have liked to merge these OS specific ones back into a unified script but looks like these scripts have found their way into other people’s tool sets.

Leaving them as-is for now.

Shanker Balan

Shanker Balan is a devops and infrastructure freelancer with over 14 years of industry experience in large scale Internet systems. He is available for both short term and long term projects on contract. Please use the Contact Form for any enquiry.

More Posts - Website

Follow Me:

5 Replies to “CloudStack Guest Scripts”

  1. Thanks for the script it helped alot but in the Ubuntu script you have used username as ubuntu where as normally people would be using root to make it standard so user=root

  2. Hi Ammar,

    Actually, its considered a good practice to not use the “root” account. If you look at the AWS Ubuntu cloud instances, they all use “ubuntu” as the default username.

  3. Where would you place these scripts on the guest VM and how do you “use” them during a instance provision from CloudStack? Thank you.

  4. Thank you,nice script!

    I tried to use cloud-set-guest-password-centos on Centos7 vm. It works, except actual password reset.
    I changed from:
    echo $password | passwd –stdin $user
    echo “$user:$password”|chpasswd
    now it works for me, dunno why.

    also , you have a small copy/paste error in “Usage” section. To avoid such errors /me myself started to use such coding style:

    script_name=$(basename $0)
    echo $”Usage: $script_name {start}”

Leave a Reply