Home > Xenserver > Adding a local storage repository for ISO images

Adding a local storage repository for ISO images

October 6, 2011

Adding a local storage repository for ISO images
If you want to upload an ISO image to the server and make it available for use with the installation of a VPS you can do so by creating a local ISO storage repository.
In XenServer 5 this has already been set up for you. You will find an ISO storage repository configured for the /iso_import/images directory. Simply copy your ISO images to that directory and rescan the repository with this command:

xe sr-scan uuid=`xe sr-list | /usr/bin/perl -e \
'while (<STDIN>) { if (/^uuid.* ([^ ]*)$/) { $uuid = $1; } \
if (/name-label \( RW\): ISOs/) { last; } } print "$uuid";'`

Your ISO images should now be available to you in the XenCenter client.
For XenServer 4 you start by creating a directory where you would like to copy your ISO images to (we’ll assume /var/opt/xen/iso_import for this example):

mkdir -p /var/opt/xen/iso_import

Now copy your ISO images to the /var/opt/xen/iso_import directory.
Now create a repository with this command (in this example we’ll name it “ISOs”):

xe sr-create name-label=ISOs type=iso \
device-config:location=/var/opt/xen/iso_import device-config:legacy_mode=true 
content-type=iso

Lastly you need to attach the ISO library with this command:

xe-mount-iso-sr /var/opt/xen/iso_import

Your ISO images should now appear in XenCenter.

Advertisements
Categories: Xenserver
%d bloggers like this: