Xen Cloud Platform (XCP) – Local ISO Storage Repositories

image_pdfimage_print

XCP supports local ISO storage on an internal hard drive. It is not available as an option in the xsconsole – Disk and Storage Repositories menu. However you can set one up with a little bit of command line magic.

The best way to do this is by using a second hard drive in the server. Once installed use fdisk to create the partition.

fdisk /dev/sdb

Proceed to follow the prompts and create a new partition using the ext3 file system.

Once the partition is created format it:

mke2fs -j /dev/sdb1

Now make the directory that will be the mount point for the volume.

mkdir -p /var/opt/xen/iso_import

Mount it.

mount /dev/sdb1 /var/opt/xen/iso_import 

Then add the following entry in /etc/fstab so that the partition is mounted at boot.

/dev/sdb1   /var/opt/xen/iso_import   ext3  defaults    0 0

Now let Xen know it’s there.

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

That’s it. You can now place ISO images in /var/opt/xen/iso_import and they should automatically show up in XenCenter under local storage. You will also be able to use them to install new virtual machines via the drop down menu.