XenServer/DDK

Installation

 * 1) Download Extract the xvda from the DDK ISO (ddk.iso)
 * 2) Import the XVA (ova.xml) into XenServer
 * 3) The VM should auto start after import (takes a while to import)
 * 4) View the console and set the root password.

Installation as ESX VM
yes, I know, blasphemer and all that...

Still looking for a good way to convert it to OVF...
 * Maybe: XenCenter Linux VM -> vCenter Converter -> ESXi Server
 * or http://didyourestart.blogspot.com/2013/03/convert-xenserver-xva-to-vmdk-for.html
 * or http://www.mytechrants.com/converting-citrix-xva-file-to-microsoft-hyper-v-vhd/

My ugly ugly solution:
 * 1) deploy XVA to Citrix and power on
 * 2) create larger (10G+) ESX VMDK attached to running CentOS 5.9 VM
 * 3) dd/netcat to ESX VM's secondary hdd
 * 4) * xen vm: dd if=/dev/xvda1 | nc [OTHERSERVER] 8000
 * 5) * esx vm nc -l 8000 | dd of=/dev/sda
 * 6) fdisk, delete partition, recreate as full disk size, mark as bootable
 * 7) expand file system resize2fs /dev/sda1
 * 8) mount file system mount /dev/sda1 /mnt
 * 9) reinstall grub on secondary drive grub-install --root-directory=/mnt /dev/sda
 * 10) fix /etc/fstab and /boot/grub/grub.conf and change /dev/xvda1 to /dev/sda1
 * 11) chroot to the file system and rebuild initrd chroot /mnt  /sbin/mkinitrd /boot/hack.img 3.10.0+0
 * 12) finally point grub to the new initrd /boot/hack.img
 * 13) boot and profit... phew...

Version
DDK Based off of RedHat EL5. XenServer DDK 6.2.0-70446c Linux xenserver-ddk 2.6.32.43-0.4.1.xs1.8.0.835.170778xen #1 SMP Wed May 29 18:06:30 EDT 2013 i686 i686 i386 GNU/Linux

Second HDD
Perform an online resize:
 * 1) With the DDK VM powered off, go to storage and edit the virtual disk
 * 2) Increase the size (Ex. 20G)
 * 3) Power on the VM
 * 4) fdisk /dev/xvda
 * 5) * p d 1 n p 1 [enter] [enter] w
 * 6) resize2fs /dev/xvda1
 * 7) profit!

-- alternative method --

The DDK VM has minimal space free. Let's add a second for development room.

Add second virtual disk for data: fdisk /dev/xvdc mkfs.ext3 -L /data /dev/xvdc1 mkdir -p /data echo "/dev/xvdc1     /data           ext3    defaults,noatime 0 0" >> /etc/fstab mount /data
 * 1) partition: n p 1 [enter] [enter] w

mkdir /data/src ln -s /data/src /root/.src

Note: You will end up with this error in yum if you don't add a second data disk: Insufficient space in download directory

Yum Configuration
Disable broken Citrix repo: sed -i "s/enabled=1/enabled=0/" /etc/yum.repos.d/Citrix.repo

This fixes this error: ... Could not retrieve mirrorlist http://updates.vmd.citrix.com/XenServer/6.4.93/domain0/mirrorlist error was [Errno 14] HTTP Error 404: Not Found Error: Cannot find a valid baseurl for repo: citrix
 * 1) yum list

Exclude kernel from updates: (already built into /etc/yum.repos.d/CentOS-Base.repo, with "exclude=kernel-xen*, *xen*") echo "exclude=kernel*" >> /etc/yum.conf
 * 1) echo "exclude=kernel-xen*, *xen*" >> /etc/yum.conf

Install Tools
Install vim: yum --enablerepo base install vim-enhanced

HG Dependencies: yum --enablerepo base install zlib-devel bzip2-devel

Install Python

 * 1) PYTHON
 * 1) PYTHON

mkdir -p ~/.src ; cd ~/.src wget --no-check-certificate http://www.python.org/ftp/python/2.7.6/Python-2.7.6.tgz tar -zvxf Python-2.7.6.tgz cd Python-2.7.6 ./configure --prefix=/opt/python-2.7.6 && make && make install && echo "SUCCESS"

export PATH=/opt/python-2.7.6/bin:$PATH echo -e "\n\nexport PATH=/opt/python-2.7.6/bin:\$PATH\n" >> ~/.bash_profile

Install Mercurial

 * 1) MERCURIAL
 * 1) MERCURIAL

MVER=3.0 mkdir -p ~/.src ; cd ~/.src wget --no-check-certificate http://mercurial.selenic.com/release/mercurial-$MVER.tar.gz tar -zvxf mercurial-$MVER.tar.gz cd mercurial-$MVER python setup.py install

Setup mercurial config cat > ~/.hgrc << "EOF" [ui] username = My User editor = vim
 * 1) ssh = ssh -l [USER]

[extensions] color = purge = transplant = rebase = mq = graphlog = pager =

[pager] pager = LESS='FRX' less EOF

Install Scons
See scons

SVER=2.3.1 mkdir -p ~/.src ; cd ~/.src wget http://sourceforge.net/projects/scons/files/scons/$SVER/scons-$SVER.tar.gz/download -O scons-$SVER.tar.gz tar -zvxf scons-$SVER.tar.gz cd scons-$SVER python setup.py install
 * 1) wget http://sourceforge.net/projects/scons/files/scons/$SVER/scons-$SVER.tar.gz/download