You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cloudstack.apache.org by Muhammad Adeel Zahid <16...@lums.edu.pk> on 2017/05/31 18:54:02 UTC
Startup script after setting up a VM (KVM)
Hi,
I have installed apache cloudstack 4.9 and am using KVM for hpyervisors. I need to have some startup scripts that executes automatically once the VM is up and running. Basically, that script would be responsible for creating db from .sql files in mysql database and also make few changes in a config file to reflect the connection string settings.
Currently, I have no idea what to start with? How do I write a script? should it be a bash script or something? How to make it execute on VM creation? I am using CentOS 6.8 on cloudstack and my hypervisors as well.
Regards
Adeel
Re: Startup script after setting up a VM (KVM)
Posted by Casey Boone <cb...@ena.com.INVALID>.
There are a lot of paths you can take, but I would start by looking into cloud-init: https://cloudinit.readthedocs.io/en/latest/
I would also consider some kind of configuration management tool such as Puppet, Chef, Salt, Ansible, and/or Gru
cloud-init can be used to bootstrap your VM into being managed by one of the aforementioned tools
Casey Boone
Systems Engineer
Education Networks of America
<http://www.ena.com/>
618 Grassmere Park Drive
Suite 12
Nashville, TN 37211
Phone: 615-312-6037
CTAC: 888-612-2880
General Office: 615-312-6000
website <http://www.ena.com/>
blog <http://www.ena.com/blog>
support <http://support.ena.com/>
<http://www.facebook.com/ENAConnects> <http://twitter.com/#!/ENAConnects/> <http://www.linkedin.com/company/15330>
On 5/31/17, 1:54 PM, "Muhammad Adeel Zahid" <16...@lums.edu.pk> wrote:
Hi,
I have installed apache cloudstack 4.9 and am using KVM for hpyervisors. I need to have some startup scripts that executes automatically once the VM is up and running. Basically, that script would be responsible for creating db from .sql files in mysql database and also make few changes in a config file to reflect the connection string settings.
Currently, I have no idea what to start with? How do I write a script? should it be a bash script or something? How to make it execute on VM creation? I am using CentOS 6.8 on cloudstack and my hypervisors as well.
Regards
Adeel