[CentOS] How to start a script to complete configuration

Wed Nov 9 13:13:14 UTC 2016
Barak Korren <bkorren at redhat.com>

On 9 November 2016 at 15:06, Bill Howe <howe.bill at gmail.com> wrote:
> Forgot to mention. After this is setup, shutdown the VM and create a
> template from it.
> Then, any VMs created from this new template will auto execute your scripts.

If you're just talking about VMs and templates, you can try
'virt-builder' or 'virt-sysprep' for manipulating the templates
directly (Instead of booting them up in a full VM).

Theses tools also allow you to inject scripts and commands to be run once a
VM created from the template is brought up for the 1st time.

Another option to consider is installing the cloud-init package in the VM. Some
virtual environments allow you to inject instructions into VMs using

Barak Korren
bkorren at redhat.com
RHCE, RHEV-DevOps Team