Create local ISO repository XenServer 6

This time I’ll show you how to create local ISO repository for your XenServer 6 host.

First let’s check the available disk space

You do that with the df command: 

df -h

Read more about the  df [Command]

df -h is the command to check disk space

As you see there is not a lot of space available for an ISO repository on /dev/sdb1

Let’s create  a new Logical Volume (LV)

To do this we need to check the available physical disk space:

Type the following to check available physical disk space



pvs output

I am going to use  /dev/sdb3 VG_XenStorage-62aac8ce-f974-9ecc-5a6f-6e601fcef97a

Now lets check the Volume Group(s) (VG):

Type vgs to check the Volume Group(s)



vgs output


 Let’s create the new LV in the Volume Group

I have decided to create a 20G ISO storage for my server so let’s create the new LV.

Type: lvcreate -L 20G -n isoImages And your VG_XenStorage

lvcreate -L 20G -n isoImages VG_XenStorage-62aac8ce-f974-9ecc-5a6f-6e601fcef97a


lvcreate output


Create filesystem on our newly created Logical Volume (LV)

type mkfs.ext3 /dev/And your VG_XenStorage

mkfs.ext3 /dev/sdb3 VG_XenStorage-62aac8ce-f974-9ecc-5a6f-6e601fcef97a


mkfs output

Create a mount point

Type the following to create isoImage under /mnt directory

mkdir /mnt/isoImages

Update changes to The Volume Group

Now we must make the newly created Logical Volume in the Volume Group visible to the XenServer core system. We do that by typing:

vgchange -a y

 Now it’s time to create the ISO Repository

We use the command xe sr-create to make the ISO Repository

xe sr-create name-label=ISOimages type=iso device-config:location=/mnt/isoImages/ device-config:legacy_mode=true content-type=iso

Let’s check the new repository listing with: xe sr-list

uuid ( RO)                : f8c14526-f2b9-6fd3-dae4-00d111739b98
          name-label ( RW): ISOimage
    name-description ( RW):
                host ( RO): xenghetto.sitedevelopments.local
                type ( RO): iso
        content-type ( RO): iso

 Mount the ISO Repository

mount -t ext3 /dev/VG_XenStorage-62aac8ce-f974-9ecc-5a6f-6e601fcef97a/isoImages /mnt/isoImages

Edit /etc/fstab to make sure the isoImages mounts at reboot.

echo "/dev/VG_XenStorage-62aac8ce-f974-9ecc-5a6f-6e601fcef97a/isoImages /mnt/isoImages ext3 defaults 1 1" >> /etc/fstab


 Upload ISO’s to your ISO Repository.

I am a Senior System Administrator that work daily with Virtualization,Xenserver, Linux, IT automation, Ansible,Windows, Active Directory, Exchange and a lot more. Here you will find tips and trix from early junior, middle junior and senior to unique information of the topics I mentioned earlier. If you need help with something do not hesitate to contact me I will gladly help.

Tagged with: , , , , ,

0 Comments on “Create local ISO repository XenServer 6