Xenserver – Post install scripts

Having looked at automating the install of Citrix XenServer we can now take this one step further and customize XenServer with scvripts that run after the XenServer has rebooted. This was we join the server to pool, add the license information, connect to storgae repositries or anything really. What we have to realize that any script that runs during the intsall is limited to the context of the installtion OS and not Xenserver. So these scripts are used to copy scripts from a network location to the XenServer to be run of first boot. looking at the answer file we can see that it calls a script called file-copy.sh

<script stage="filesystem-populated" type="url">

That script copies another script to the XenServer and creates a sym-link to it within the rc3.d directory. This means it will run of boot so loand as the link start with an uppper-case S as we have created here.

touch $1/tmp/post-executed
wget -O $1/tmp/first-run.sh
chmod 755 $1/tmp/first-run.sh ##set premissions
ln -s /tmp/first-run.sh $1/etc/rc3.d/S99zzpostinstall

The first-run script then will executes the required xe commands to customize XenServera s required and to ensure it does not run again deletes the link. It may look a little ugly but, as with all scripting, it is easy with a little practice.

Watch the video for the full and gory details, but this also illustrates how having basic Linux skills is required when managing Linux based HyperVisors.



Deixe um comentário

Preencha os seus dados abaixo ou clique em um ícone para log in:

Logotipo do WordPress.com

Você está comentando utilizando sua conta WordPress.com. Sair /  Alterar )

Foto do Google+

Você está comentando utilizando sua conta Google+. Sair /  Alterar )

Imagem do Twitter

Você está comentando utilizando sua conta Twitter. Sair /  Alterar )

Foto do Facebook

Você está comentando utilizando sua conta Facebook. Sair /  Alterar )


Conectando a %s