Create local ISO Storage in XenServer from remaining space on boot Disk
When installing a XenServer there is a question in the setup wizard which asks where to place the virtual machine files. You can choose your storage and even the remaining space on the boot disk. But where to place to ISO files then? You have to create a NFS share or SMB or whatever to accomplish that. But in a 1 host environment it handy to have it on the same host. I will explain how-to use the remaining free space on the boot disk for an ISO storage repository.
First open the XenServer host console.
Check the current partition table: fdisk –l
As you can see in the screenshot, my boot partition is the /dev/sda1 (SD = Mass Storage Drive, A = First Registered Device, 1 = First Partition)
To get more info on this disk type: gdisk /dev/sda –l
Now you see that there are 3 partitions on my disk: 2x 4GB (SDA1/SDA2) and 1 with the rest (SDA3).
I will use the /dev/sda3 for ISO repository.
Format the /dev/sda3 with the following command: mkfs.ext3 /dev/sda3
After the format is done, we are gone mount it to /mnt/iso.
Create the iso directory: mkdir /mnt/iso
Mount the partition: mount –t ext3 /dev/sda3 /mnt/iso/
The mount must be active after a reboot. So add it to the fstab script: echo “/dev/sda3 /mnt/iso ext3 defaults 1 1” >> /etc/fstab
Make it available in XenServer: xe-mount-iso-sr /mnt/iso –o bind
Use FileZilla to make a SFTP connection to the XenServer host and to upload the ISO files to /mnt/iso
And now the ISO files are ready to use in XenServer.