• How to add local ISO storage repo in Citrix XenServer

    If you do not have a fileserver to host your ISO repository ,and you have a shared area on your XenServer that is formatted as EXT3 ,you can create a local ISO SR where you can place your ISO files.

    Here, I have made a NFS share on the XenServer in order to move it to any file server later .

    mkdir /templates
    mkfs.ext3 /dev/sd(name of the device you will be used)

    In my situation ,I have made an LVM from the local storage ,then format it ext3 as following :

    lvdisplay

    --- Logical volume ---
     LV Name /dev/VG_XenStorage-d9489c8d-de3a-67fa-df66-3246402ff671/VHD-491e4e3a-995b-4fbb-9846-3be3435ed13e
     VG Name VG_XenStorage-d9489c8d-de3a-67fa-df66-3246402ff671
     LV UUID leYnbC-Vsa5-ly1u-6lX0-EE08-WXi4-CpVdFn
     LV Write Access read/write
     LV Status available
     # open 1
     LV Size 30.07 GB
     Current LE 7697
     Segments 1
     Allocation inherit
     Read ahead sectors auto
     - currently set to 1024
     Block device 252:1

    You may find that LV Status is unavailable ,so you have to run the following command ;

     vgchange -a y VG_XenStorage-d9489c8d-de3a-67fa-df66-3246402ff671

    Then ,

    mkfs.ext3 /dev/VG_XenStorage-d9489c8d-de3a-67fa-df66-3246402ff671/VHD-f7b358ff-2fdf-4a3e-8025-4737c6276d5c
    
    mount /dev/VG_XenStorage-d9489c8d-de3a-67fa-df66-3246402ff671/VHD-f7b358ff-2fdf-4a3e-8025-4737c6276d5c /templates

    Then, configure nfs share as following :

    # vi /etc/exports
    /templates 192.168.1.0/24(rw,async,no_root_squash)##write subnet you want
    
    #exportfs -a

    Note:You have to disable NFS4 as CitrixXen is working on NFS3 and edit portmap to listen to all IPs ;

    #vi /etc/sysconfig/portmap
    PMAP_ARGS=""
    # vi /etc/sysconfig/nfs
     # Turn off v4 protocol support
     RPCNFSDARGS="-N 4"
    /etc/init.d/nfs restart
    [root@Raafat ~]# rpcinfo -p
     program vers proto port
     100000 2 tcp 111 portmapper
     100000 2 udp 111 portmapper
     100024 1 udp 708 status
     100024 1 tcp 711 status
     100003 2 udp 2049 nfs
     100003 3 udp 2049 nfs
     100003 4 udp 2049 nfs
     100021 1 udp 40834 nlockmgr
     100021 3 udp 40834 nlockmgr
     100021 4 udp 40834 nlockmgr
     100021 1 tcp 37882 nlockmgr
     100021 3 tcp 37882 nlockmgr
     100021 4 tcp 37882 nlockmgr
     100003 2 tcp 2049 nfs
     100003 3 tcp 2049 nfs
     100003 4 tcp 2049 nfs
     100005 1 udp 738 mountd
     100005 1 tcp 741 mountd
     100005 2 udp 738 mountd
     100005 2 tcp 741 mountd
     100005 3 udp 738 mountd
     100005 3 tcp 741 mountd
    [root@Raafat ~]# showmount -e
    Export list for Raafat:
    /templates 192.168.1.0/24

    It seems that everything is working with no problems ,now you can create ISO SR :

     xe sr-create name-label="Local ISO" type=iso device-config:location=192.168.1.10:/templates/  content-type=iso

    Note:192.168.1.10 is the XenServer IP where we have created NFS share on.

     

     

     

     

     

     

     

    Categories: CitrixXen

    Comments are currently closed.