Add and Use ISO Library Storage Repository in Xen XCP-ng

Posted on 104 views

In our previous articles we walked you through the installation of XCP-ng Hypervisor and how to manage XCP-ng Hypervisor with XenCenter | XCP-ng Center. Once the hypervisor and management from XenCenter is configured, configuration of networking and storage repositories can be performed. In Xen virtualization Storage Repository is the place for your VM disks (VDI SR) and storage of  ISO files. In this guide we look at how you can configure ISO Library Storage Repository in Xen and upload some ISO files to it.

There are two types of ISO SR that can be configured in Xen:

  • NFS ISO – This SR type handles CD images stored as files in ISO format available as an NFS share.
  • Windows File Sharing (SMB/CIFS) – This SR type handles CD images stored as files in ISO format available as a Windows (SMB/CIFS) share.

Configure new ISO Storage Repository in Xen

We’ll be using XenCenter/XCP-ng Center in this setup but Xen Orchestra can also be used to achieve the same.

NFS Server is needed for the storing ISO images. We’ll configure NFS share on a Linux server.

Step 1: Install NFS Server

Use the commands below to install NFS Server on Ubuntu / Debian system:

# Debian / Ubuntu
sudo apt update
sudo apt install nfs-kernel-server -y

Install NFS Server on CentOS / RHEL 8 / CentOS 7:

sudo yum -y install nfs-utils

Once NFS Server is installed use the commands below to enable the service:

sudo systemctl enable --now rpcbind nfs-server

Step 2: Configure NFS Share

Create ISO Library directory in your NFS Server:

sudo mkdir -p /mnt/isos

Configure NFS Share by editing the file /etc/exports

$ sudo vim /etc/exports
# Examples
/mnt/isos *(rw,no_root_squash,no_subtree_check) #Allow access from any IP
/mnt/isos,no_root_squash,no_subtree_check) #Allow access only from hosts in subnet
/mnt/isos,no_root_squash,no_subtree_check) #Allow access only from single host IP

Export your shares

$ sudo exportfs -rrv

On CentOS NFS Server

If you have Firewalld running allow NFS service:

sudo firewall-cmd --add-service=nfs --permanent
sudo firewall-cmd --reload

#If use NFSv3 allow the following
sudo firewall-cmd --add-service=nfs3,mountd,rpc-bind --permanent
sudo firewall-cmd --reload

Step 3: Add ISO Storage Repository

Open your XenCenter/XCP-ng Center console and click “Storage” > “New SR” on the toolbar.


In the next screen choose “ISO library


Give the storage repository a name. The default can be used without renaming.


Enter NFS share path inside “Share Name” box. Example:


  • is the IP Address of NFS server
  • /mnt/isos is the path to ISO files directory as exported in NFS server.


For Windows File Sharing SMB/CIFS the share name will have format like \server\sharename

Confirm storage repository has been added and visible.


Step 4: Add ISO files to NFS share

Let’s download some ISO files to the NFS share.

Switch to nfs share directory:

sudo su -
cd /mnt/isos

Download ISO files to the directory. See below examples;

# Ubuntu 22.04 ISO

# Rocky Linux 8 Minimal ISO

# Debian 11 netinstall ISO

Confirm if ISO files can be seen on the XCP-ng server end:


In our next guide we’ll discuss installation of Linux and Windows virtual machines from the ISO files in the ISO Library.


Gravatar Image
A systems engineer with excellent skills in systems administration, cloud computing, systems deployment, virtualization, containers, and a certified ethical hacker.