Citrix Project Accelerator

Citrix documentation can be a bit hit and miss. I was struggling to find a decent reference architecture guide for XenDesktop 7.1 when I came across the Citrix Project Accelerator – https://project.citrix.com/. This is a basic design wizard for XenDesktop (and XenApp) which takes into account workload, user count, feature requirement etc. and then creates a basic design with bill of materials etc. This obviously isn’t capable of giving a full design, but as a starting point or sanity check of an existing design it does a reasonable job, and considering you can go through the wizard in 10-15 minutes it’s a worthwhile exercise.


VMware ESXi 5.5 zero touch builds – part 3 – storage

A note on storage

I won’t spend any time on NFS storage – it’s relatively straight forward, using a VMK with appropriate uplinks and failover. 

As hinted at in the previous post (interface vmmic override) ISCSI storage does however require additional configuration as per the ESXi storage guide http://pubs.vmware.com/vsphere-55/topic/com.vmware.ICbase/PDF/vsphere-esxi-vcenter-server-55-storage-guide.pdf (page 84). In short this boils down to a vmkernel interface having to be attached to a single vmnic  in a one-to-one configuration to be compatible with iSCSI port binding.

This can be achieved in two different ways:

  • Two separate vSwitches with a single VMkernel interface each and a single vmnic each. In this scenario the two VMkernel interfaces need to be configured on separate subnets to ensure no connectivity issues. As most storage platforms are presented on the same subnet this is not normally a viable option.
  • A single vSwitch uplinked with two vmnics and configured with two VMkernel interfaces. The vmnic adapter binding is overridden for each VMkernel interface with one active and one unused vmnic. This is more easily achieved and is in most situations the natural choice.  Read More

VMware ESXi 5.5 zero touch builds – part 2 – network configuration

Some notes on dynamic variables

Creating pointers / variable variables is required to loop through any number of vSwitches listed in the host configuration file. The easiest way is to normally use the “${!ReferenceVariable}” syntax, or arrays/associative arrays, but as mentioned in part 1 these simply don’t work in the Busybox Ash shell. The only way I’ve managed to get this to work is “$(eval echo “\${ReferenceVariable”)” – this seems to work OK, and I’ll stick with it until I come across something better.


All fairly straight forward – loop through the vSwitch variables set in the host configuration file and configure accordingly. I’ve set these up with standard vSwitches with

  • Uplinks
  • Failover / failback
  • Switch notify
  • Loadbalancing
  • Number of ports
  • MTU
  • etc

but this can be expanded to include any config required.

Read More


VMware ESXi 5.5 zero touch builds – part 1 – basics


I won’t go into too much detail about the ESXi automated build process – VMware do a good job of that in the ESXi 5.5 installation guide, on top of this the default kickstart file /etc/vmware/weasel/ks.cfg is a good starting point.

Creating dynamic zero touch builds is possibly overkill for most SME environments, but can be useful in it large scale estates like service provider environments. Ideally these should tie into proper CMDB / inventory databases, source control, continuous integration environments, etc., but this all depends on how much time/manpower/money you have available.


All files – including apache license – can be found on https://github.com/dagsonstebo/VMware-ESXi-5.5-zero-touch-build-scripts.

Host specific PXE boot process

The standard VMware build PXE menu configuration is roughly as follows:

Read More


Host config file export VBA script

Quick followup on the previous build script posts. In short the following will write host specific config files based on spreadsheet data, writing to files based on hostname in column 1 – in the following example “xs62cn1.cfg”.  

So, in short, a spreadsheet with the following entries:


will result in a new config file xs62cn1.cfg with the following entries:


VBA script:

Sub CreateHostConfigFiles()
'Exports spreadsheet data to config files

Dim intCol, intRow, arrHeaders(), intMaxcols, strOutputbuffer, objFSO, strFilename, arrFilename, objFile
    intRow = 2
    intCol = 1
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    'Find headings
    ReDim arrHeaders(0)
    While Cells(1, intCol) <> ""
        ReDim Preserve arrHeaders(UBound(arrHeaders) + 1)
        arrHeaders(intCol - 1) = Cells(1, intCol)
        intCol = intCol + 1
    intCol = intCol - 1
    intMaxcols = intCol
    'Write config
    While Cells(intRow, 1) <> ""
        strFilename = Left(Cells(intRow, 1), InStr(Cells(intRow, 1), ".") - 1) & ".cfg"
        Set objFile = objFSO.CreateTextFile(strFilename, True)
        For intCol = 1 To intMaxcols
            strOutputbuffer = strOutputbuffer & arrHeaders(intCol - 1) & "=" & Chr(34) & Cells(intRow, intCol) & Chr(34) & ";" & Chr(10)
        objFile.write strOutputbuffer
        strOutputbuffer = ""
        intRow = intRow + 1
MsgBox "All done"
End Sub

Citrix Xenserver 6.2 zero touch build scripts


Scripted builds for Xenserver 6.2 is outlined in http://support.citrix.com/servlet/KbServlet/download/34970-102-706044/installation.pdf. Xenserver build scripts run in the bash shell so are a bit more flexible than in ESXi. The following scripts allow for host specific dynamic zero touch builds – mainly for larger environments but can be used for any number of hosts.

All files discussed in this post can be found on https://github.com/dagsonstebo/Citrix-Xenserver-6.2-zero-touch-build-scripts.

PXE boot process

The PXE boot process for Xenserver builds is as follows:

  1. Host is PXE booted from pxelinux.cfg menu, each host specific menu entry specifies host specific  XML answer file.
  2. Host specific XML answer file specifies hostname and post build script.
  3. Post build script preloads actual build script, patches and drivers as well as host specific configuration file.
  4. Upon reboot build script configures host.

I.e. for each host we require a XML answer file and a host configuration file.

The menu config for Xenserver 6.2 is as follows:

LABEL XS62CN1 Xen 6.2
kernel mboot.c32
append xenserver62/xen.gz dom0_max_vcpus=1-2 dom0_mem=752M,max:752M \
com1=115200,8n1 console=com1,vga --- xenserver62/vmlinuz xencons=hvc \
console=hvc0 console=tty0 answerfile= \
-answerfile install --- xenserver62/install.img

Answer file

The answer file specifies (see install guide for all options):

  • Install location
  • Keyboard mapping
  • Install file location
  • Root password
  • Post install script
  • NIC used during installation
  • Timezone
  • Hostname

Read More