-
-
Save thapakazi/ddfe2f7f587b3f542b9f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Script to install a ubuntu trusty tahr 14.04 LTS template on xcp or | |
# Citrix (TM) Xenserver 5.6 and above. | |
# Copyright (C) 2014 Arne-Kristian Hingst - All Rights Reserved | |
# Permission to copy and modify is granted under the eupl license | |
# http://ec.europa.eu/idabc/servlets/Docbb6d.pdf?id=31979 | |
# Last revised 04/20/2014 | |
# | |
# Add your favourite mirror here | |
MIRROR=http://ubuntu.ntc.net.np | |
# No need to edit something below | |
UBUNTU=$(xe template-list name-label=Ubuntu\ Precise\ Pangolin\ 12.04\ \(64-bit\) --minimal) | |
if [[ -z $UBUNTU ]] ; then | |
UBUNTU=$(xe template-list name-label=Ubuntu\ Lucid\ Lynx\ 10.04\ \(64-bit\) --minimal) | |
if [[ -z $UBUNTU ]] ; then | |
echo "Cant find Ubuntu 64bit template, is this on 5.6 or above?" | |
exit 1 | |
fi | |
fi | |
NEWUUID=$(xe vm-clone uuid=$UBUNTU new-name-label="Ubuntu Trusty Tahr 14.04 (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=trusty | |
xe vm-param-set uuid=$NEWUUID other-config-install-repository=$MIRROR |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment