Xen 4.0.1-rc1 source & kernels packaged for Ubuntu

The whole procedure can be run by simple:

wget https://virtualusr.files.wordpress.com/2010/06/mk-xen40x6.doc
catdoc mk-xen40x6.doc > mk-xen40x.sh
sh mk-xen40x.sh

Ubuntu-package latest “xen 4.0” by:

./packageXen40x.sh RELEASE-4.0.0    # or
./packageXen40x.sh 4.0.1-rc1    # or
./packageXen40x.sh # latest tagged release, today same as above

Ubuntu-package latest “xensource” kernels by:

./remakeXenKernel.sh stable-2.6.31.x~1
./remakeXenKernel.sh stable-2.6.32.x
./remakeXenKernel.sh stable-2.6.33.x

Any corrections and suggestions are very welcome.

WARNING: No warranty whatsoever, this happens to work for me, while it may or may not work for you.

Enjoy Ubuntu Xen4.0 server

* Updated 2010-05-28: Corrected package dependency error preventing install of the latest 4.0.1rc1-0ubuntu1. I am running this at the moment.

* Updated 2010-06-03: Murphies Law, same error again, corrected for good I hope. I will reinstall my system with the published version to test for the 3rd time.

This entry was posted in Xen and tagged , . Bookmark the permalink.

10 Responses to Xen 4.0.1-rc1 source & kernels packaged for Ubuntu

  1. Jordan says:

    Thank you so much for putting this script together! I was trying to find a good starting point for Xen on 10.04 64bit, but didn’t have any luck until now. All good so far, it is building now 🙂 Thanks again!

  2. Jimmy Christensen says:

    Also there seems to be a problem with the depency of the generated package xen-utils-4.0 which has the depency libxen4 (<4.0.1)

    • virtualusr says:

      Thanks for your notice, and missing fakeroot dependency. Fixed. I am running the published version myself now for triple test. Works here.

  3. Adrian St. says:

    Thank you for your hard work virtualusr. I know how painful debian packaging can be. Could you tell us on which platform you compile these packages? I can build the hypervisor package perfectly but the remakeXenKernel.sh exits while compiling some modules. I use Lucid amd64 with linux-image-server. As I understand correctly it shouldn’t be a problem to compile it on an intel machine? My opteron machines are quite busy with other tasks right now. 😉

    Otherwise I’ll try to compile it in a VirtualBox environment.

    best regards,


    • virtualusr says:

      Hi Adrian

      Unfortunately, most kernel git commits are (one way or the other) broken. I will post a new version of remakeXenKernel.sh that enables you to simply select the commit-id known to work.

      I am using all kinds of -xen kernels with (and without) the corresponding
      at the moment testing suggestion of somebody on xen mailing list to choose commit
      4dd582f35f28707a039111be9fdb8101fecb07de 100517202304 Merge remote branch ‘stable-2.6.32/master’ into xen/stable-2.6.32.x
      100517202304 is UTC time stamp of the CommitDate: to xen/stable-2.6.32.x
      You must use “git log –pretty=fuller –date=iso” to see it

  4. dbaxps says:

    Your’s packageXen40x.sh contains :-
    sudo apt-get install libcurl4-openssl-dev xserver-xorg-dev mercurial gitk build-essential libncurses5-dev uuid-dev gawk gettext texinfo bcc libncurses5-dev dpkg-dev debhelper iasl texinfo catdvi fakeroot
    sudo apt-get build-dep xen-3.3
    To build tools at xen-4.0-testing.hg two more package are required :-
    apt-get install bison flex.
    How you build xen-4.0.1rc(X) ?

  5. dbaxps says:

    @User Virtual
    I believe to be done with yours charade 😉
    Reproduced your build for 4.0.1-rc2 :-

    # cp xen-4.0_4.0.1rc1-0ubuntu1.diff.gz xen-4.0_4.0.1rc2-0ubuntu1.diff.gz
    # ./packageXen40x.sh 4.0.1-rc2

    Build succeed:-
    root@ServerLDX:/usr/src/build# find . -name “*.deb” -print

    Actually , it matches 4.0.1-rc2 . Installed debian packages been built and loaded JF’s ( which requires rc2)
    under yours Xen 4.0.1-rc2 Hypervisor

    Made sure:-
    root@ServerLNX:/dev/xen# ls -l
    total 0
    crw-rw—- 1 root root 10, 60 2010-06-17 16:15 evtchn
    crw-rw—- 1 root root 10, 59 2010-06-17 16:15 gntdev

    It’s a fair . Udev created evtchn device required for successful xend start under pvops 2.6.32.(x). Edited your xend , removing attempt to load xen-evtchn module, which was hard linked with

    # /etc/init.d/xend start

    root@ServerLNX:~# xm info
    host : ServerLNX
    release :
    version : #8 SMP Sun Jun 13 14:34:17 MSD 2010
    machine : x86_64
    nr_cpus : 2
    nr_nodes : 1
    cores_per_socket : 2
    threads_per_core : 1
    cpu_mhz : 2999
    hw_caps : bfebfbff:20100800:00000000:00000940:0008e3fd:00000000:00000001:00000000
    virt_caps : hvm
    total_memory : 8191
    free_memory : 1666
    node_to_cpu : node0:0-1
    node_to_memory : node0:1666
    node_to_dma32_mem : node0:805
    max_node_id : 0
    xen_major : 4
    xen_minor : 0
    xen_extra : .1-rc2
    xen_caps : xen-3.0-x86_64 xen-3.0-x86_32p hvm-3.0-x86_32 hvm-3.0-x86_32p hvm-3.0-x86_64
    xen_scheduler : credit
    xen_pagesize : 4096
    platform_params : virt_start=0xffff800000000000
    xen_changeset : unavailable
    xen_commandline :
    cc_compiler : gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5)
    cc_compile_by : root
    cc_compile_domain :
    cc_compile_date : Thu Jun 17 15:24:31 MSD 2010
    xend_config_format : 4

    root@ServerLNX:~# brctl show
    bridge name bridge id STP enabled interfaces
    eth1 8000.00221563f99f no peth1
    virbr0 8000.000000000000 yes

    root@ServerLNX:~# virsh version
    Compiled against library: libvir 0.8.1
    Using library: libvir 0.8.1
    Using API: Xen 3.0.1
    Running hypervisor: Xen 4.0.0

    I also believe , that it’s possible to write a proper one xen-4.0_4.0.1rc2-0ubuntu1.diff.gz
    to create debian packages supposed to install Xen 4.0.1-rc2 and load pvops
    for Dom0 support with xend starting with no issues.

  6. Pingback: Hackery Xen 4.0.1-rc1 source & kernels packaged for Ubuntu Lucid @Virtualusr Site up to 4.0.1-rc3 « Xen Virtualization on Linux and Solaris

    • virtualusr says:

      Thank for your attempts to correct the bugs published by me, but I recommend using my later posts to pack all releases of Xen4.0.*

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s