How to create a local ISO repository in XenServer 6


First let’s check the available disk space

You do that with the df command:

df-h

 Create a Local Repo in XenServer 6 - Checking disk space

  

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

 Create a local repo in XenServer 6 - check available physical disk space

 

I am going to use /dev/sda3 VG_XenStorage-f6671bd5-b027-865f-3fd6-7f9bba82b017

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

Type vgs to check the Volume Group(s)

 

vgs

 Create a local iso repo on XenServer 6 - Checking the volume group

  

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-f6671bd5-b027-865f-3fd6-7f9bba82b017

 Creating a local iso repo on XenServer 6 - creating a new LV in the volume group

 

Create filesystem on our newly created Logical Volume (LV)

type mkfs.ext3 /dev/And your VG_XenStorage

 Creating a local iso repo in XenServer 6 - Creating a filesystem on new LV

 

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

 

Output will look like the following:

uuid ( RO)                     : f6671bd5-b027-865f-3fd6-7f9bba82b017

          name-label ( RW): ISOimage

name-description ( RW):

                      host ( RO): xxx-xxx-xxx-xxx.phx.dedicated.codero.com

                      type ( RO): iso

         content-type ( RO): iso

 

Mount the ISO Repository

mount -t ext3 /dev/VG_XenStorage-f6671bd5-b027-865f-3fd6-7f9bba82b017/isoImages /mnt/isoImages

 

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

 

echo "/dev/VG_XenStorage-f6671bd5-b027-865f-3fd6-7f9bba82b017/isoImages /mnt/isoImages ext3 defaults 1 1" >> /etc/fstab

 

You should now be able to see your repo in Xencenter and be able to upload ISOs to it.

Posted in
Last update:
2016-06-15 15:05
Average rating:0 (0 Votes)