Browse code

Script for Ubuntu 11.10 on Xenserver

This script creates a template for an Ubuntu 11.10 VM on Xenserver.
This is not officially supported by Citrix, but is useful, as most
of the Openstack development and instructions are based on it.

Change-Id: I8457f88ebe1065429d4c03de11d7ab0ef22f357a

Renuka Apte authored on 2012/03/09 06:15:03
Showing 2 changed files
... ...
@@ -100,3 +100,9 @@ Step 6: Do cloudy stuff!
100 100
 * Play with horizon
101 101
 * Play with the CLI
102 102
 * Log bugs to devstack and core projects, and submit fixes!
103
+
104
+Ubuntu 11.10 VM on Xenserver
105
+----------------------------
106
+Run ./scripts/xenoneirictemplate.sh on your Xenserver host. This creates a
107
+template to be able to install a Ubuntu Oneiric (11.10) virtual machine.
108
+Once the template is created, follow the wizard to complete the network install.
103 109
new file mode 100755
... ...
@@ -0,0 +1,41 @@
0
+#!/bin/bash
1
+## makeubuntu.sh, this creates Ubuntu server 11.10 32 and 64 bit templates
2
+## on Xenserver 6.0.2 Net install only
3
+## Original Author: David Markey <david.markey@citrix.com>
4
+## Author: Renuka Apte <renuka.apte@citrix.com>
5
+## This is not an officially supported guest OS on XenServer 6.02
6
+
7
+LENNY=$(xe template-list name-label=Debian\ Lenny\ 5.0\ \(32-bit\) --minimal)
8
+
9
+if [[ -z $LENNY ]] ; then
10
+    echo "Cant find lenny 32bit template, is this on 6.0.2?"
11
+    exit 1
12
+fi
13
+
14
+distro="Ubuntu 11.10"
15
+arches=("32-bit" "64-bit")
16
+
17
+
18
+for arch in ${arches[@]} ; do
19
+    echo "Attempting $distro ($arch)"
20
+    if [[ -n $(xe template-list name-label="$distro ($arch)" params=uuid --minimal) ]] ; then
21
+        echo "$distro ($arch)" already exists, Skipping
22
+    else
23
+
24
+        NEWUUID=$(xe vm-clone uuid=$LENNY new-name-label="$distro ($arch)")
25
+        xe template-param-set uuid=$NEWUUID other-config:install-methods=http,ftp \
26
+         other-config:install-repository=http://archive.ubuntu.net/ubuntu \
27
+         PV-args="-- quiet console=hvc0 partman/default_filesystem=ext3 locale=en_US console-setup/ask_detect=false keyboard-configuration/layoutcode=us netcfg/choose_interface=eth3 netcfg/get_hostname=unassigned-hostname netcfg/get_domain=unassigned-domain auto url=http://images.ansolabs.com/devstackubuntupreseed.cfg" \
28
+         other-config:debian-release=oneiric \
29
+         other-config:default_template=true
30
+
31
+        if [[ "$arch" == "32-bit" ]] ; then
32
+            xe template-param-set uuid=$NEWUUID other-config:install-arch="i386"
33
+        else
34
+            xe template-param-set uuid=$NEWUUID other-config:install-arch="amd64"
35
+        fi
36
+        echo "Success"
37
+    fi
38
+done
39
+
40
+echo "Done"