This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "IPFire 2.x development tree".
The branch, next has been updated via 61cf8114ea71d62fe953cd4a9d97e8a8ca8fbf30 (commit) via 3c4c5466ce687de0d33e6dab9cfff4f8f2e6c96a (commit) via 51fe9ff8e369bb123d81fe51bef6e9a7da026aa2 (commit) from d2dcd8b2e28face37be18ced3c2f22624e7e567a (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit 61cf8114ea71d62fe953cd4a9d97e8a8ca8fbf30 Author: Arne Fitzenreiter arne_f@ipfire.org Date: Thu May 22 18:40:13 2014 +0200
xen-image-maker: add support vor XenCenter xva image output.
commit 3c4c5466ce687de0d33e6dab9cfff4f8f2e6c96a Author: Arne Fitzenreiter arne_f@ipfire.org Date: Thu May 22 08:11:11 2014 +0200
xen-image-maker: default fs to ext3.
many xen server still not support ext4.
commit 51fe9ff8e369bb123d81fe51bef6e9a7da026aa2 Author: Arne Fitzenreiter arne_f@ipfire.org Date: Thu May 22 08:08:56 2014 +0200
xen-image-maker: remove legacy xen kernel.
-----------------------------------------------------------------------
Summary of changes: config/xen-image/README | 4 +++ config/xen-image/ipfire.cfg | 8 +++--- config/xen-image/xen-image-maker.sh | 50 ++++++++++++++++++++++++------------- 3 files changed, 40 insertions(+), 22 deletions(-)
Difference in files: diff --git a/config/xen-image/README b/config/xen-image/README index 3813572..a59b6fa 100644 --- a/config/xen-image/README +++ b/config/xen-image/README @@ -18,3 +18,7 @@ other usefull commands from the Dom0: - shutdown the fire: "xm shutdown ipfire-xen" - reset the fire: "xm destroy ipfire-xen" - look what is going on: "xm top" or "xm list" + +This script can also build a Citrix XenCenter xva image. +- run "XEN_IMAGE_TYPE=xva sh xen-image-maker.sh" to build an xva image. +- import the vm with "xe vm-import file=ipfire.xfa" diff --git a/config/xen-image/ipfire.cfg b/config/xen-image/ipfire.cfg index 594c82a..38bfdff 100644 --- a/config/xen-image/ipfire.cfg +++ b/config/xen-image/ipfire.cfg @@ -17,8 +17,8 @@ vif = [
disk = [ - 'file:/mnt/test/ipfire-boot.img,xvda1,w', - 'file:/mnt/test/ipfire-swap.img,xvda2,w', - 'file:/mnt/test/ipfire-root.img,xvda3,w', - 'file:/mnt/test/ipfire-var.img,xvda4,w' + 'file:./ipfire-boot.img,xvda1,w', + 'file:./ipfire-swap.img,xvda2,w', + 'file:./ipfire-root.img,xvda3,w', + 'file:./ipfire-var.img,xvda4,w' ] #### Change path diff --git a/config/xen-image/xen-image-maker.sh b/config/xen-image/xen-image-maker.sh index 1a2a004..06f9f2e 100644 --- a/config/xen-image/xen-image-maker.sh +++ b/config/xen-image/xen-image-maker.sh @@ -28,23 +28,12 @@ KVER=xxxKVERxxx KERN_PACK=xxxKERN_PACKxxx KRNDOWN=http://mirror0.ipfire.org/pakfire2/$VERSION/paks CONSOLE=hvc0 -############################################################################### -# If you really want to use outdated legacy kernel uncomment this lines. ##### -# Not recommended!!! ########################################################## -###################### -#KERN_TYPE=xen -#KVER=2.6.32.61 -#KERN_PACK=29 -#KRNDOWN=http://mirror0.ipfire.org/pakfire2/2.15/paks -#CONSOLE=xvc0 -###############################################################################
SIZEboot=64 SIZEswap=512 SIZEroot=1024 SIZEvar=1024 -# ct'server does not support ext4 so change this to ext3. -FSTYPE=ext4 +FSTYPE=ext3
##############################################################################
@@ -62,6 +51,25 @@ IMGvar=./$SNAME-var.img
KERNEL=linux-$KERN_TYPE-$KVER-$KERN_PACK.ipfire
+if [ "$XEN_IMG_TYPE" == "xva" ]; then + # download xva.py if it not exist. + if [ ! -e xva.py ]; then + wget http://source.ipfire.org/source-2.x/xva.py + fi + # XenCenter use other devicenames and + # xvdd seems to be reserved (converter bug?). + P1=xvda + P2=xvdb + P3=xvdc + P4=xvde +else + # old style xen image partition names + P1=xvda1 + P2=xvda2 + P3=xvda3 + P4=xvda4 +fi + rm -rf $TMPDIR && mkdir -p $MNThdd && mkdir -p $ISODIR echo -------------------------------------------------------- echo - Download $SOURCEISO ... @@ -108,7 +116,8 @@ mount -o loop $IMGboot $MNThdd/boot mount -o loop $IMGvar $MNThdd/var
# Install IPFire without kernel modules -tar -C $MNThdd/ -xvf $ISODIR/$SNAME-$VERSION.tlz --lzma \ +xz -d < $ISODIR/$SNAME-$VERSION.tlz > $TMPDIR/$SNAME-$VERSION.tar +tar -C $MNThdd/ -xvf $TMPDIR/$SNAME-$VERSION.tar \ --exclude=lib/modules* --exclude=boot* --numeric-owner
#Install Kernel @@ -121,7 +130,7 @@ mkdir $MNThdd/boot/grub echo "timeout 10" > $MNThdd/boot/grub/grub.conf echo "default 0" >> $MNThdd/boot/grub/grub.conf echo "title IPFire ($KERN_TYPE-kernel)" >> $MNThdd/boot/grub/grub.conf -echo " kernel /vmlinuz-$KVER-ipfire-$KERN_TYPE root=/dev/xvda3 rootdelay=10 panic=10 console=$CONSOLE ro" \ +echo " kernel /vmlinuz-$KVER-ipfire-$KERN_TYPE root=/dev/$P3 rootdelay=10 panic=10 console=$CONSOLE ro" \ >> $MNThdd/boot/grub/grub.conf echo " initrd /ipfirerd-$KVER-$KERN_TYPE.img" >> $MNThdd/boot/grub/grub.conf echo "# savedefault 0" >> $MNThdd/boot/grub/grub.conf @@ -150,10 +159,10 @@ mount --bind /proc $MNThdd/proc mount --bind /dev $MNThdd/dev mount --bind /sys $MNThdd/sys chroot $MNThdd /usr/bin/perl -e "require '/var/ipfire/lang.pl'; &Lang::BuildCacheLang" -sed -i -e "s|DEVICE1|/dev/xvda1|g" $MNThdd/etc/fstab -sed -i -e "s|DEVICE2|/dev/xvda2|g" $MNThdd/etc/fstab -sed -i -e "s|DEVICE3|/dev/xvda3|g" $MNThdd/etc/fstab -sed -i -e "s|DEVICE4|/dev/xvda4|g" $MNThdd/etc/fstab +sed -i -e "s|DEVICE1|/dev/$P1|g" $MNThdd/etc/fstab +sed -i -e "s|DEVICE2|/dev/$P2|g" $MNThdd/etc/fstab +sed -i -e "s|DEVICE3|/dev/$P3|g" $MNThdd/etc/fstab +sed -i -e "s|DEVICE4|/dev/$P4|g" $MNThdd/etc/fstab
sed -i -e "s|FSTYPE|$FSTYPE|g" $MNThdd/etc/fstab
@@ -192,6 +201,11 @@ umount $MNThdd
umount $ISODIR rm -rf ./ipfire-tmp + +if [ "$XEN_IMG_TYPE" == "xva" ]; then + python xva.py --sparse -c $SNAME.cfg -f $SNAME.xva + rm -f $SNAME*.img +fi echo -------------------------------------------------------- echo - Done. echo --------------------------------------------------------
hooks/post-receive -- IPFire 2.x development tree