XenServer and its damn too small system disks

I love XenServer. I love the product, I believe it to be a very good answer for SMBs, and enterprises. It lacks on external support, true, but the price tag for many of the ‘external capabilities’ on VMware, for instance, are very high, so many SMBs, especially, learn to live without them. XenServer gives a nice pack of features, at a very reasonable price.

One of the missing features is the management packs of hardware vendors, such as HP, Dell and IBM. Well, HP does have something, and its installation is always some sort of a challenge, but they do, so scratch that. Others, however, do not supply management packs. The bright side is that with Domain0 being a full featured i386 Centos 5 distribution, I can install the Centos/RHEL management packs, and have a ball. This brings us to another challenge there – the size of the system disk (root partition) by default is too small – 4GB, and while it works quite well without any external components, it tends to get filled very fast with external packages installed, like Dell tools, etc. Not only that, but on a system with many patches the patches backups take their toll, and consume valuable space. While my solution will not work for those who aim at the smallest possible space, such as SD or Disk-on-Key for the XenServer OS, it aims for the most of us all, where the system resides on several tenths of gigabytes at least, and is capable of sustaining the ‘loss’ of additional 4GB. This process modifies the install.img file, and authors the CD as a new one, your own privately-modified instance of XenServer installation. Mind you that this change will be effective only for new installations. I have not tested this as the upgrade path for existing systems, although I believe no harm will be done to those who upgrade. Also – it was performed and tested on XenServer 6.2, and not 6.2 SP1, or prior versions, although I believe that the process should look pretty similar in nature.

You will need a Linux machine to perform this operation, end to end. You could probably use some Windows applications on the way, but I have no idea as to which or what.

Step one: Open the ISO, and copy it to somewhere useful (assume /tmp is useful):

mkdir /tmp/ISO
mkdir /tmp/RW
mount -o loop /path/to/XenServer-6.2.0-install-cd.iso /tmp/ISO
cd /tmp/ISOtar cf – . | ( cd /tmp/RW ; tar xf – )

Step two: Extract the contents of the install.img file in the root of the CDROM:

mkdir /tmp/install
cd /tmp/install
cat /tmp/RW/install.img | gzip -dc | cpio -id

Step three: Edit the contents of the definitions file:

vi opt/xensource/installer/constants.py

Change the value of ‘root_size’ to something to your taste. Mind you that with 4GB it was tight, but still usable, even with additional 3rd party tools, so don’t become greedy. I defined it to be 6GB (6144)

Step four: Wrap it up:

cd /tmp/install ; find . | cpio -o -H newc | gzip -9 > /tmp/RW/install.img

Step five: Author the CD, and prepare it to be burned:

cd /tmp/RW
mkisofs -J -T -o /share/temp/XenServer-6.2-modified.iso -V “XenServer 6.2″ -volset “XenServer 6.2″ -A “XenServer 6.2″ \
-b boot/isolinux/isolinux.bin -no-emul-boot -boot-load-size 4 -boot-info-table -R -m TRANS.TBL .

You now have a file called ‘XenServer-6.2-modified.iso’ in your /tmp, which will install your XenServer with the disk partition size you have set it to install. Cheers.

BTW, and to make it entirely clear – I cannot be held responsible to any damage caused to any system you tweaked using this (or for that matter – any other) guide I published.

Enjoy your XenServer’s new apartment!

Tags: , ,

4 Responses to “XenServer and its damn too small system disks”

  1. Jim P. Says:

    I found this and really wanted to try it out. to be fair I probably shouldn’t and should just keep everything standard, but I wanted to make the modifications once and move on. I attempted to follow the instructions and simply could not. I’m not a Linux guy (yet) in fact this project is giving more reason to learn Linux than any other so far. OK back to the stuff, found some typos that I figured out on my own but I’m stumped at this time I’m trying to find an alternate way to perform the edit. Any info would be appreciated. Would it be out of the question to provide the install.img file with different sized boot folders already? I.E. 6 gig 7 gig 8gig? let me know. Regards Jim

  2. ez-aton Says:

    Hi Jum.
    Unfortunately, the img file is pretty large, and the edit operation is fairly simple.
    Try with the following:
    1. Obtain the XS CD image, and place it on local hard drive
    2. Use Ubuntu live CD (as an example). I think it should have everything
    3. Have access to the hard drive, because you cannot run this entire thinge from RAM. The drive should be the one holding the ISO file you downloaded earlier
    4. Open terminal, and run: ‘sudo bash’ (without the tags)
    5. Follow my instructions. Instead of /tmp , create a temporary directory on your hard drive. Work from there (/tmp in live systems is in-memory)

    That should work for you, and should require less time than you fear it will. Also – it will be educating, to a certain level.

    Ez

  3. Jim P. Says:

    Sorry for late response I’m going to give it a shot again but what I meant by providing the file was just the modified file that could be dropped into the existing iso. That would be helpful to others I think, but as I said I’ll give it another try. Regards Jim

  4. ez-aton Says:

    Good luck with that!

Leave a Reply