Skip to main content
XenServer

Automate XenServer Installs

In this video we look at automating the install of Citrix XenServer 6.02 by using PXE with answer files. We have previously set up PXE installs of XenServer, now we add in the XML answer file. The PXE boot file could look like:

default local
prompt 1
timeout 60
label local
localboot 0
label install-xenserver
kernel mboot.c32
append xs602/xen.gz  --- xs602/vmlinuz xencons=hvc console=hvc0 console=tty0 answerfile=http://webserver/xs.xml--- xs602/install.img

Once we boot into the install the answers are provided by the supplied answer file. In this case on our web server and called xs.xml. The answer file again could look like this depending on your requirements.

<?xml version="1.0"?>
<installation mode="fresh" srtype="ext">
<primary-disk>sda</primary-disk>
<keymap>uk</keymap>
<hostname>XenServer1</hostname>
<root-password type="hash"> $1$FwjF6PE7$8sXs2JzyJood3w5VwHC.8. </root-password>
<source type="url">http://192.168.1.1/suse/xs602/</source>
<script stage="filesystem-populated" type="url">
http://192.168.1.1/suse/file-copy.sh
</script>
<admin-interface name="eth0" proto="static">
<ip>192.168.1.11</ip>
<subnet-mask>255.255.255.0</subnet-mask>
<gateway>192.168.1.2</gateway>
</admin-interface>
<timezone>Europe/London</timezone>
<time-config-method>ntp</time-config-method>
<ntp-servers>192.168.1.1</ntp-servers>
<nameserver>192.168.1.1</nameserver>
</installation>

Note the hash as the type for the root password. This is not in the Citrix documentation but allows for hashed passwords in the answer file. Just grab the password from /etc/passwd on an existing XenServer