Have you ever wished your Hypervisor could be installed at the push of a button, without the tedious searching for the install CD and answering the same boring installation questions? HTG explains how to PXE an automated installation of Citrix-Xen.

Photo Credit: Pink Sherbet Photography via Compfight cc

Overview

We’ve shown you what is PXE and how you can easily install a server for it with FOG. In this guide, we will again extend on the excellent FOG foundation and add a menu entry to install an automated Citrix-Xen server.

Like in the Ubuntu live from FOG tutorial, the installation procedure isn’t purely PXE. It starts as PXE, as we provide the base “kernel”, “initial ram disk” (initrd) & other required files over PXE, but the rest of the procedure pulls the required files via HTTP.

This procedure is mentioned in the Citrix-Xen knowledge base/instillation guide, but isn’t really a copy & paste type of a recipe, like the one that we will try to give you today.

In general, the components to this guide will be:

Make the install CD files available via HTTP. Create an automated answers file. Add the PXE files + menus entry.

Don’t worry, because we are building upon the FOG foundation, this will be easy…

Let’s get cracking.

Installation CD via HTTP

One of the nice things with building upon the FOG foundation is that we already have a web-server up and running and ready to serve the required installation files.

We will copy the installation files over and not “loopback mount” the ISO like we did in the Ubuntu guide, because we want to keep the option of slip-streaming supplemental packs into the installation process.

Create the directory that will hold the install files:

Copy the entirety of the install CD into this directory.

Note: you may create as many directories as you wish. For example, I’ve had a directory for every major version of Citrix-Xen since v5.0.

Automated answers file (Optional)

This stage is marked as optional, because you may wish to not automate the installation. If you opt to not automate the procedure, you will have to answer the installation questions on your own with one noticeable difference: when prompted for the installation source, you would have to choose “HTTP” instead of “local media” and provide the address manually.

Just to keep the option of having the install CD mounted as a loopback device, we will put the answer file in the root of the webserver.

Create the answer-file by issuing:

Make its content look like:

Where you would need to change the “timezone”, “root-password and “source url” to suit your requirements.

PXE Files

As mentioned in the overview, we need some files from the install CD to be available in our TFTP directory.

To do this, create the TFTP directory that will hold the files by issuing:

Copy the files from the CD or the www directory by issuing:

Note: The last file we copied, the “mboot.c32” module, needs to be compatible with your FOG’s version of PXElinux, If it isn’t, the boot procedure will fail. The module is easily obtainable from the Syslinux package.

PXE Menus

In the original FOG guide, we’ve hinted that we may be adding sub-directories in the future and have left a “template” menu file just for that. Let’s spawn another menu by copying the template file:

Edit it by issuing:

Append to its content to include the below:

Where you would have to edit the IP to get the answer file to be your FOG’s IP.

Note: The “DEFAULT” and “PASSWD” directives are commented out because they don’t suit every situation. With that said, consider enabling them, because installing an OS could be really destructive if users get their hands on it…

Now add to the default menu entry, the newly created menu by issuing:

Append to its content to include the below:

Note: Location, in this case, matters. I suggest you don’t put it below the “fog.local” label.

That’s it, you should be all set… Enjoy :)

Fog, lend me your power…