#!/bin/bash
CENTOS=$(xe template-list name-label="CentOS 5 (32-bit)" --minimal)
distro="CentOS 5.6"
arches=("32-bit" "64-bit")
for arch in ${arches[@]} ; do
echo "Attempting $distro ($arch)"
if [[ -n $(xe template-list name-label="$distro ($arch)" params=uuid --minimal) ]] ; then
echo "$distro ($arch)" already exists, Skipping
else
NEWUUID=$(xe vm-clone uuid=$CENTOS new-name-label="$distro ($arch)")
xe template-param-set uuid=$NEWUUID other-config:install-methods=http,ftp,nfs \
other-config:default_template=true
echo "Success"
fi
done
echo "Done"
This entry was posted
on Sunday, July 24th, 2011 at 21:52 by Rob Goodair and is filed under XenServer.
You can follow any responses to this entry through the RSS 2.0 feed.
Responses are currently closed, but you can trackback from your own site.