domingo, 23 de agosto de 2015

Script para Adicionar Template Debian 8 Jessie XenServer 6.5


Script to install a Debian Jessie 8.0 template on Xenserver 6.5

xenserver_create_jessie_template_64bit.sh

#!/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.us.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 8.1 (64-bit)")
xe template-param-set uuid=$NEWUUID other-config:install-methods=http,ftp,nfs other-config:default_template=true
xe template-param-set uuid=$NEWUUID other-config:install-methods=http other-config:debian-release=jessie
xe vm-param-set uuid=$NEWUUID other-config-install-repository=$MIRROR



https://gist.github.com/jniltinho/0455fb5f01cfd8bbdbff

Nenhum comentário: