Educational ICT Virtualisation Specialist

Twitter LinkedIn E-mail
Precedence Technologies Ltd
Technology House, 36a Union Lane
Cambridge, CB4 1QB, United Kingdom
T: +44 (0)8456 446 800 / +44 (0)1223 359900
E: enquiries@precedence.co.uk
XenServer-LocalISO

Jump To: Support > KB > Citrix > XenServer > LocalISO

Add local ISO SR

If you have no shared storage and all your fileservers are virtualised, you probably have no useful place to store ISO images. If your local storage on the XenServer is ext3 format, you can mount a subdir of this as a local iso:

  1. Determine UUID of local storage (by name) and check it is of type ext - can also get from XenCenter:
    [root@xenserver01 ~]# xe sr-list name-label=Local\ storage
    uuid ( RO)                : 273752be-58f8-6d04-4a92-191f2015403a
              name-label ( RW): Local storage
        name-description ( RW):
                    host ( RO): xenserver01
                    type ( RO): ext
            content-type ( RO): user
    
  2. Make an empty subdirectory (altering UUID as necessary):
    [root@xenserver01 ~]# mkdir /var/run/sr-mount/273752be-58f8-6d04-4a92-191f2015403a/iso
    
  3. Add as storage repository (SR), which will return the UUID of the new SR:
    [root@xenserver01 ~]# xe sr-create name-label=ISO type=iso content-type=iso device-config:legacy_mode=true device-config:location=/var/run/sr-mount/273752be-58f8-6d04-4a92-191f2015403a/iso
    d1230b75-d592-af0c-ffee-646d2b5f4b05
    
  4. Scan the storage repository:
    [root@xenserver01 ~]# xe sr-scan uuid=d1230b75-d592-af0c-ffee-646d2b5f4b05
    

You can now use something like WinSCP to copy the .iso files to the new directory. Remember to rescan the SR after copying .iso files to it. If you would like to access this as /iso rather than something like /var/run/sr-mount/273752be-58f8-6d04-4a92-191f2015403a/iso, you can use a loopback mount to make the directory accessible as /iso:

  1. Make a friendly directory /iso:
    [root@xenserver01 ~]# mkdir /iso
    
  2. Then edit /etc/fstab with nano and add:
    /var/run/sr-mount/273752be-58f8-6d04-4a92-191f2015403a/iso /iso none bind 0 0
    
  3. Test with mount:
    [root@xenserver01 ~]# mount /iso
    [root@xenserver01 ~]# df /iso
    Filesystem           1K-blocks      Used Available Use% Mounted on
    /var/run/sr-mount/273752be-58f8-6d04-4a92-191f2015403a/iso
                         567397488  39008964 499566408   8% /iso
    
© Copyright Precedence Technologies 1999-2024
Page last modified on October 11, 2023, at 04:51 PM by sborrill