#!/bin/bash ## Script to install a Debian Jessie 8.0 template on Xenserver 6.5 ## https://gist.github.com/hingstarne/5320400 # Add your favourite mirror here MIRROR=http://ftp.de.debian.org/debian/ # No need to edit something below WHEEZY=$(xe template-list name-label=Debian\ Wheezy\ 7.0\ \(64-bit\) --minimal) if [[ -z $WHEEZY ]] ; then WHEEZY=$(xe template-list name-label=Debian\ Wheezy\ 7.0\ \(64-bit\)\ \(experimental\) --minimal) if [[ -z $WHEEZY ]] ; then echo "Cant find Wheezy 64bit template, is this on 6.5 or above?" exit 1 fi fi NEWUUID=$(xe vm-clone uuid=$WHEEZY new-name-label="Debian Jessie Webinstall") xe template-param-set uuid=$NEWUUID other-config:install-methods=http,ftp,nfs other-config:default_template=false xe template-param-set uuid=$NEWUUID other-config:install-methods=http other-config:debian-release=jessie # DISK # erste Disk 1 GB # zweite Disk 50GB xe template-param-set uuid=$NEWUUID other-config:disks='' # CPU´s # http://support.citrix.com/article/CTX126524 xe template-param-set uuid=$NEWUUID platform:cores-per-socket=4 xe template-param-set uuid=$NEWUUID VCPUs-max=4 xe template-param-set uuid=$NEWUUID VCPUs-at-startup=4 # Memory angabe in KiB, MiB, GiB or TiB xe template-param-set uuid=$NEWUUID memory-static-max=2GiB xe template-param-set uuid=$NEWUUID memory-dynamic-max=2GiB xe template-param-set uuid=$NEWUUID memory-dynamic-min=2GiB xe template-param-set uuid=$NEWUUID memory-static-min=1GiB xe vm-param-set uuid=$NEWUUID other-config-install-repository=$MIRROR