Application to create a Node.XML file from an Input File

Recently a couple of my fellow technical specialists and I were working on a Top 500 run at a major US university. We needed to create node.XML templates that associated MAC addresses with node names. It would also be nice if it could also list the rack location of the node. We wanted to deploy the cluster by rack to allow for more orderly provisioning. The client gave us a text file that they created from the LINUX configuration of the cluster. This text file contained several pieces of data for each node. There was one node entry per line in the text file. The important data was the node name, MAC address and node location. To help ease creation of the node.XML templates I wrote a c# application that takes as input a text file with per rack data and created a node template for that rack.

So it takes input like the following:


node16 00:14:5E:55:AF:D4 rack01
node17 00:14:5E:55:8E:67 rack01
node18 00:14:5E:55:A4:D9 rack01


and creates a node.xml template that looks like:


<?xml version="1.0" encoding="utf-8"?>
<Nodes xmlns:xsi="" xmlns:xsd="" xmlns="">
  <Node Name="node16" Domain="mshpc">
    <Template Name="HPCTemplate" />
    <Location Primary="rack01" />
  <Node Name="node17" Domain="mshpc">
    <Template Name="HPCTemplate" />
    <Location Primary="rack01" />
  <Node Name="node18" Domain="mshpc">
    <Template Name="HPCTemplate" />
    <Location Primary="rack01" />


The node.xml template has the following key items that are created by the program:

  • Node Name - The name to give the node in provisioning

  • Domain - The domain that the cluster  belongs to.

  • Template Name - The name of the template that is recognized by HPC Server

  • Location Primary - The Rack identification of the node

  • MacAddress - The MAC address of the node.

Of course the program is expandable to allow for more data to be written to the node.xml template and I will be updating the code as needed as well as making the source available to the community to allow others to update as necessary. The domain and template name that are listed above are contained in a configuration file that is used by the application. This file app.config needs to be changed by the user to add their domain and template name. Below is what the createnodetemplate.exe.config file looks like:

<?xml version="1.0" encoding="utf-8" ?>
    <add key="domain" value="mshpc"/>
    <add key="MAC delimiter" value=":"/>
    <add key="Template Name" value="HPCTemplate"/>

So the user will need to add their domain name replacing "mshpc" with the updated name in double quotes. They will also have to give a template name in double quotes. The MAC delimiter entry is currently not allowed to be changed. The MAC address must be in the 00:00:00:00:00 format with each pair separated by ':'.

The application has the following command line:

createnodetemplate infile outfile

The following command would take input data in rack11.dat and create a node template file named rack11.xml 

createnodetemplate rack11.dat rack11.xml

A zip file of the executable and sample data and xml files is attached to this posting for download.

I hope the community finds this tool useful for deploying large cluster from bare metal.

Comments (0)

Skip to main content