How to Create ISO Storage on XenServer

Published: 30 Apr 2013

This post walks you through how to create local volume on a XenServer host to serve as ISO repo.

1. ssh to the XenServer host

2. Check free local disk space:

df -h

Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda1              4127440   1976852   1940924  51% /
none                    381120         4    381116   1% /dev/shm
                         52408     52408         0 100% /var/xen/xc-install 

3. Check available physical disk space:

[root@Host1 ~]# pvs
  PV         VG                                                 Fmt  Attr PSize   PFree  
  /dev/sda3  VG_XenStorage-43851e54-d3bf-0602-5e84-93629cfe7851 lvm2 a-   457.75G 457.75G

4. Check volume groups:

[root@Host1 ~]# vgs
  VG                                                 #PV #LV #SN Attr   VSize   VFree  
  VG_XenStorage-43851e54-d3bf-0602-5e84-93629cfe7851   1   1   0 wz--n- 457.75G 457.75G

5. Create the new LV (Logical Volume) in the available VG:

lvcreate -L 10G -n iso-images VG_XenStorage-43851e54-d3bf-0602-5e84-93629cfe7851

6. list:


7. make a filesystem on this new LV:

mkfs.ext3 /dev/VG_XenStorage-43851e54-d3bf-0602-5e84-93629cfe7851/iso-images

8. create a mount point:

mkdir /mnt/iso-images

9. make the LV in the VG known to the kernel:

vgchange -a y

10. create the repository:

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

11. confirm new repository listed in XenServer:

xe sr-list

12. mount the new FS:

mount /dev/VG_XenStorage-43851e54-d3bf-0602-5e84-93629cfe7851/iso-images /mnt/iso-images/

13. [OPTIONAL] edit /etc/fstab to mount at boot

After following these steps, you can now use something like wget to download ISO images to the /mnt/iso-images mount and have them available to XenServer.

XenServer Jobs

jobs by Indeed job search