Friday, October 9, 2020

How to install and configure xCAT (for beginners)

Are you fed-up of manual server installation?

Are you not a fan of managing your cluster using DVDs and USB sticks anymore?

Are you afraid that configuration on some of your servers in your HPC cluster might be inconsistent?

To find answers to these questions and to make your life easier, follow this guide and enjoy being a real Sys admin!!!

 Here comes…

xCAT tutorial for beginners…


Table of contents

xCAT introduction

Downloading and installing xCAT

Configuring xCAT

Node Deployment (Installation)

Thursday, October 8, 2020


Title: How to install and configure xCAT - Tutorial

OS: CentOS Linux release 7.8.2003 (Core)

Kernel Version: 3.10.0-1127.13.1.el7.x86_64

Software: xCAT

Software Version: 2.13.7

User Account: Use ‘sudo’ (recommended)

Reboot Required: No

 Requirements for your ‘proof of concept’ (POC) environment:

Servers: 1 x Management node & 1 x Compute node (Actual hardware or VMs i.e using VirtualBox)

Cluster Network: (Netmask:


IP Address




xCAT management server


Compute Node


Note: For actual hardware (servers) connect them over ethernet (ideally to a Gigabit switch)

1        What is xCAT?

xCAT is a cluster deployment and management tool which can be used to easily manage different types of servers with different operating systems (OS). It’s very powerful tool for managing HPC clusters. For more information check this out:     


                        <Tutorial Home>        Next>>

Wednesday, October 7, 2020

xCAT Installation

1.1         Downloading xCAT

 mkdir -p /tools/software/sources/xcat

export XCAT_SOURCE_DIR=/tools/software/sources/xcat



tar xfj xcat-2.13.7.lenovo2_confluent-1.7.2_lenovo-confluent-0.7.1-el7.tar.bz2


1.2         Installing xCAT

The following procedure can be followed to install xCAT

cd ${XCAT_SOURCE_DIR}/lenovo-hpc-el7


yum –y install xCAT

Note: Make sure the OS repositories are accessible by YUM (either online repos or local)

Verify xCAT installation.

source /etc/profile.d/

tabdump site

If installation is successful, the above command will return similar outputs as it’s listed below.








































      <<Previous        <Tutorial Home>        Next>>

Tuesday, October 6, 2020

xCAT Configuration

 xCAT configuration is saved in a database which consists of many tables (commandtabdumpcan show a list of all tables). The default DB xCAT uses issqlite’. This can be changed to MySQL (MariaDB), PostgreSQL or others.

Different tables in xCAT DB are for different purposes. There are a handful of common tables which need to be configured for all kind of hardware but there are some specific tables which are only used for specific kind of environment. For example ppc’ table will only be used when using Power PC based hardware and prodkey’ table will only be used when installing MS Windows environment.

It’s time to configure common xCAT tables. Let’s do it.

tabedit site

Make sure you edit these lines. If these lines are not present then add new ones.






Note: You need to use the network interface which is set with IP10.0.0.11’. In my case it isenp0s3

tabedit networks

The table should be looking like this



It’s always a good idea to changenetname’ to a name which is easy to understand. Also add dynamicrange’ for DHCP. Other fields are normally pre-filled.

Useful Notes: Since this is just a POC environment and we don’t need any IPMI or other networks i.e 10G or IPoIB (Infiniband). In real world these networks are normally required.

 tabedit hosts

Add all nodes with their IP addresses. This will help us in generating ‘/etc/hostsfile.




tabedit noderes



You can use ‘pxe’ instead of ‘xnba’ but ‘xnba’ is recommended as this supports more options than ‘pxe’

tabedit passwd



Password can be in plain text or encrypted. Encrypted password can be copied from/etc/shadowfile.

tabedit chain



This was the minimal table configuration. To deploy nodes an OS ISO needs to be copied to omasternode. Type this command to get this done.

copycds CentOS-7-x86_64-Everything-2003.iso

This will copy the OS into /install directory. The ISO doesn’t have to include Everything, normal ISO is good enough for installation.

Here you go. This is the least configuration we need to add.

      <<Previous        <Tutorial Home>        Next>>

Monday, October 5, 2020

xCAT Node Deployment


1.1       Adding nodes into xCAT DB

Follow these steps to addcompute001into xCAT DB.

nodeadd omaster groups=mgmt

nodeadd compute001 groups=compute,node



makedhcp –n

makedhcp –a

makedns –n

 makedns -a


Once done check if DNS is working correctly.

host compute001

Expected output:

compute001.cluster.local has address

Hmmm, is your name resolution not working? Check if your ‘/etc/resolv.conf’ file is correct.

It should look like similar to this:

search cluster.local




Bottom two lines can be different as they reflect your own environment.


1.2       Node Discovery

It’s time to have real fun. We need to add a new node and then deploy it with CentOS 7.

There are three ways you can add node MAC addresses into xCAT.

1)      Add MAC addresses manually

2)      Discovering nodes using ‘Sequential Node Discovery’ method &

3)      Auto discovery


1)      Add MAC addresses manually

The easiest method to add nodes in xCAT is to add their MAC addresses intomac table.

If you are using a VM then its pretty easy to get the MAC address of the node (in my case compute001has MAC address08:00:27:E9:BB:DB’)

To add the MAC follow this:

tabedit mac

The table should be looking like as below:



2)      Discovering nodes using ‘Sequential Node Discovery’ method &

Follow these steps

·        Keep compute001off

·        Typenodediscoverstart noderange=compute001on omasternode

·        Turn compute001on and wait

·        If you have access to its console, keep looking. It should be able to get an IP from DHCP and xCAT should start discovering this node.

·        Upon success,tabdump macshould show its MAC address automatically added.

·        Typenodediscoverls’ to see what xCAT has discovered and type nodediscoverstop’ to stop the process.


3)      Auto discovery

Auto discovery process will be covered in ‘Advanced Tutorial’. Watch this space…


1.3            xCAT OS images

To deploy a system with xCAT, it requires an OS image. OS image is just the information in xCAT DB to help xCAT create a kickstart file (for Redhat, CentOS etc) for the installation.

When copycdscommand is executed, it automatically creates some images by default but it’s always good to create a custom one for our purpose.

You can list all OS images using this command:

lsdef –t osimage

Use these lines to create an OS image named ascompute

mkdef -t osimage compute imagetype=linux osarch=x86_64 \

osname=Linux osvers=centos7.8 \

otherpkgdir=/install/post/otherpkgs/centos7.8/x86_64 \

pkgdir=/install/centos7.8/x86_64 \

pkglist=/install/templates/compute/pkglist \

profile=compute provmethod=install \

template=/install/templates/compute/tmpl \

partitionfile=/install/templates/compute/partfile \

otherpkglist=/install/templates/compute/otherpkgs.pkglist \



Now it’s time to configure files we have mentioned in the image (above).

Luckily xCAT installation comes with most of these files so it’s just a matter of copying them to our custom directory /install/templates/compute’

Let’s get it done…

mkdir –p /install/templates/compute

rsync -avp /opt/xcat/share/xcat/install/centos/compute.centos7.tmpl /install/templates/compute/tmpl

rsync -avp /opt/xcat/share/xcat/install/centos/compute.centos7.pkglist /install/templates/compute/pkglist

touch /install/templates/compute/otherpkgs.pkglist

touch /install/templates/compute/synclist


Function of ‘otherpkgs.pkglist’ and ‘synclist’ files will be covered in the advanced tutorial. For now the existence of these files is sufficient for xCAT to installcompute001’.

The file /install/templates/compute/partfile’ is used by xCAT to create custom disk partitioning for nodes. This file can be modified according to the requirements and also depending on the disk sizes.


part /boot/efi --size=100 --fstype=exfat

part /boot --fstype=ext4 --size=500

part pv.1 --grow --size=1

volgroup system --pesize=4096 pv.1

logvol swap --name=swap --vgname=system --size=2048

logvol / --fstype=ext4 --name=root --vgname=system --grow --size=4096


1.4            Nodes Installation

nodeset compute001 osimage=compute

Reset ‘compute001’ and make sure it boots up over network to receive DHCP and TFTP information from xCAT server (omaster).

Wow! You have managed to install a compute node using xCAT. That’s an achievement!

Monitor the screen of the node and make sure it completes the installations. It should automatically boot up and you should be able to SSH into it without any password.

For further reading and understanding please check out my ‘xCAT Tutorial for advanced users’ (coming soon…)


      <<Previous        <Tutorial Home>                                                                                                               


How to install and configure xCAT (for beginners)

Are you fed-up of manual server installation? Are you not a fan of managing your cluster using DVDs and USB sticks anymore? Are you afra...