ring0 » blog

How to install XenServer 6 + RAID1 remotely

tags: XenServer, RAID1, unattended 2012-02-15 15:25 by lwi

Recently we decided to switch the ISP and therefore a new server needed to be set up. Since Xen runs great we figured to stick with it. Unfortunately not many Linux distributions support Xen so we ended up with XenServer Free from Citrix.

Our new ISP of course does not offer an automated installation for XenServer but quite a lot of other options (even an outdated OpenBSD). The first approach to sneak in XenServer was by installing some random Linux distribution, mounting the second hard drive and using KVM to install it there. Afterwards a chainloader entry in Grub would save the day. At least in theory since it failed in practise. With all hope lost on that approach surfing the web to look for suitable solutions seemed the right way to continue in this endeavour.

Luckily someone had the exact the same problem and came up with a clever solution (german): Launching the unattended installer via Grub. Infact it worked like a charm.

Full of joy I launched the management console and was almost creating VMs when I noticed there was one further thing I almost missed: software raid. We had it before and wanted to keep it that way. It turns out Citrix does not recommand using software RAID. They dont just say that, they also make sure you are unable to configure your system to run software RAID. The website I found also had a chapter for creating a software RAID, but I was not able to see any partitions from the rescue system. A quick web search revealed that one had to disable GUID Partition Tables first. The provided approach however was based on a live setup and not an unattended one. In order to overcome that challenge the installation image install.img had to be modified since it contained the python script we want to modify. After unpacking one needs to edit opt/xensource/installer/constants.py and change GPT_SUPPORT = True to False. The newly created image did the job and XenServer was installed using an old partition table.

After all the desired setup was achieved and everyone happy not knowing further adventures were waiting for them (such as OpenBSD HVM unter XenServer, missing Grub configs or mastering a mail/xmpp migration without downtime).

EOF