How-To: Run Xen in Ubuntu Intrepid without compiling a Kernel by yourself

Tags: , , , , , ,


20 Comments Leave yours

  1. liz #

    Toooold yaaaaa befooooooore ;-)
    I never liked Ubuntu (especially their colour scheme *g*), but XEN always worked well for me on RedHat. Sadly RedHat now also decided to support KVM :(

    Maybe we should go commercial and try VMWare ESX or something like that for server virtualization?

  2. dan #

    thanks. works. but why isn’t this a good idea?

  3. because you don’t get security updates by simply installing a package. Plus these packages were intended for debian but ubuntu.

  4. Backport Intrepid Xen 3.3 Hypervisor to Ubuntu Hardy Dom0 (2.6.24-21-xen)
    http://lxer.com/module/newswire/view/112045/index.html

  5. @Boris
    thanks for the hint!

  6. Getting your stuff to work downloaded and installed:-
    Xen 3.3 Hypervisor from repos plus
    linux-modules-2.6.26-1-xen-amd64_2.6.26-12_amd64.deb
    inux-image-2.6.26-1-xen-amd64_2.6.26-12_amd64.deb
    Reboot.
    eth1,peth1 show up same IP-address via ifconfig.
    Network access to the Net via ADSL Modem is dead.
    I had to comment out all xen-bridge definitions in
    /etc/xen/xend-config.sxp and manually define bridge in /etc/network/interfaces:-

    # The loopback network interface
    auto lo
    iface lo inet loopback
    # The primary network interface
    auto eth1
    iface eth1 inet dhcp

    auto br0
    iface br0 inet static
    address 192.168.1.45
    network 192.168.0.0
    netmask 255.255.255.0
    broadcast 192.168.1.255
    gateway 192.168.1.1
    bridge_ports eth1
    bridge_fd 9
    bridge_hello 2
    bridge_maxage 12
    bridge_stp off

    Reboot.Only at this point i’ve got networking done on Xen 3.3 Ubuntu Intrepid Server Dom0 (kernel 2.6.26-1-xen-amd64).

    root@IntrepidSRV:~# brctl show
    bridge name bridge id STP enabled interfaces
    br0 8000.001e8c25cca5 no eth1
    pan0 8000.000000000000 no

    root@IntrepidSRV:~# ifconfig

    br0 Link encap:Ethernet HWaddr 00:1e:8c:25:cc:a5
    inet addr:192.168.1.45 Bcast:192.168.1.255 Mask:255.255.255.0
    inet6 addr: fe80::21e:8cff:fe25:cca5/64 Scope:Link
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:10387 errors:0 dropped:0 overruns:0 frame:0
    TX packets:9072 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:23709253 (23.7 MB) TX bytes:937257 (937.2 KB)

    eth0 Link encap:Ethernet HWaddr 00:1e:8c:25:d9:23
    UP BROADCAST MULTICAST MTU:1500 Metric:1
    RX packets:0 errors:0 dropped:0 overruns:0 frame:0
    TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
    Interrupt:17

    eth1 Link encap:Ethernet HWaddr 00:1e:8c:25:cc:a5
    inet6 addr: fe80::21e:8cff:fe25:cca5/64 Scope:Link
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:55382 errors:0 dropped:0 overruns:0 frame:0
    TX packets:39418 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:80800515 (80.8 MB) TX bytes:2916410 (2.9 MB)
    Interrupt:16 Base address:0x6c00

    lo Link encap:Local Loopback
    inet addr:127.0.0.1 Mask:255.0.0.0
    inet6 addr: ::1/128 Scope:Host
    UP LOOPBACK RUNNING MTU:16436 Metric:1
    RX packets:22797 errors:0 dropped:0 overruns:0 frame:0
    TX packets:22797 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:0
    RX bytes:117429741 (117.4 MB) TX bytes:117429741 (117.4 MB)

    wlan0 Link encap:Ethernet HWaddr 00:15:af:51:c2:c0
    UP BROADCAST MULTICAST MTU:1500 Metric:1
    RX packets:0 errors:0 dropped:0 overruns:0 frame:0
    TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

    wmaster0 Link encap:UNSPEC HWaddr 00-15-AF-51-C2-C0-00-00-00-00-00-00-00-00-00-00
    UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
    RX packets:0 errors:0 dropped:0 overruns:0 frame:0
    TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
    collisions:0 txqueuelen:1000
    RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

  7. @Boris
    thanks again. haven’t noticed that there is a new minor version of the linux image. i’ll update the post now ;)

  8. it’s me again… your admin ;)

    @Boris
    I replied to your post on your blog.

  9. Hi, you have twice the dpkg for the modules package.

    Thanks for tips!

  10. Andrew #

    I was equally disappointed that Ubuntu dropped support for Xen. I was also very annoyed to run into several bugs in the 2.6.24-22-xen kernel from Hardy. Thanks for the tip on installing the kernel from Debian!

  11. Hi, thanks for posting this article. Do you know where I can find more information on this. Thanks

  12. frankabel #

    I try with Karmic and don’t work, someone have tried with Karmic?

  13. Michi #

    Me! And does not work with Karmic neither with Intrepid. I just got to work with Ubuntu Hardy and the kernel-xen-blablabla… on the officials repositories. =/

    But with CentOS , it’s ran like a charm.

    @frankabel

    • What do you mean doesn’t work? Do you get any errors? Runs reliable for more than a year now at my server with Intrepid. But I have to agreee that there are better distributions when it comes to Xen!

  14. Hi Chris,

    I followed the steps, but when I rebooted to launch the Xen modified Kernel, it shows up : error: You need to load the Kernel first.
    Am I doing something wrong ?

    Thanks,
    Vivek

  15. #
    # DO NOT EDIT THIS FILE
    #
    # It is automatically generated by /usr/sbin/grub-mkconfig using templates
    # from /etc/grub.d and settings from /etc/default/grub
    #

    ### BEGIN /etc/grub.d/00_header ###
    if [ -s /boot/grub/grubenv ]; then
    have_grubenv=true
    load_env
    fi
    set default=”0″
    if [ ${prev_saved_entry} ]; then
    saved_entry=${prev_saved_entry}
    save_env saved_entry
    prev_saved_entry=
    save_env prev_saved_entry
    fi
    insmod ext2
    set root=(hd0,7)
    search –no-floppy –fs-uuid –set 0e870eb0-05b5-4d16-8af9-81bb2f9c3737
    if loadfont /usr/share/grub/unicode.pf2 ; then
    set gfxmode=640×480
    insmod gfxterm
    insmod vbe
    if terminal_output gfxterm ; then true ; else
    # For backward compatibility with versions of terminal.mod that don’t
    # understand terminal_output
    terminal gfxterm
    fi
    fi
    if [ ${recordfail} = 1 ]; then
    set timeout=-1
    else
    set timeout=10
    fi
    ### END /etc/grub.d/00_header ###

    ### BEGIN /etc/grub.d/05_debian_theme ###
    set menu_color_normal=white/black
    set menu_color_highlight=black/white
    ### END /etc/grub.d/05_debian_theme ###

    ### BEGIN /etc/grub.d/10_linux ###
    menuentry “Ubuntu, Linux 2.6.31-14-generic-pae” {
    recordfail=1
    if [ -n ${have_grubenv} ]; then save_env recordfail; fi
    set quiet=1
    insmod ext2
    set root=(hd0,7)
    search –no-floppy –fs-uuid –set 0e870eb0-05b5-4d16-8af9-81bb2f9c3737
    linux /boot/vmlinuz-2.6.31-14-generic-pae root=UUID=0e870eb0-05b5-4d16-8af9-81bb2f9c3737 ro quiet splash
    initrd /boot/initrd.img-2.6.31-14-generic-pae
    }
    menuentry “Ubuntu, Linux 2.6.31-14-generic-pae (recovery mode)” {
    recordfail=1
    if [ -n ${have_grubenv} ]; then save_env recordfail; fi
    insmod ext2
    set root=(hd0,7)
    search –no-floppy –fs-uuid –set 0e870eb0-05b5-4d16-8af9-81bb2f9c3737
    linux /boot/vmlinuz-2.6.31-14-generic-pae root=UUID=0e870eb0-05b5-4d16-8af9-81bb2f9c3737 ro single
    initrd /boot/initrd.img-2.6.31-14-generic-pae
    }
    menuentry “Ubuntu, Linux 2.6.26-1-xen-686″ {
    recordfail=1
    if [ -n ${have_grubenv} ]; then save_env recordfail; fi
    set quiet=1
    insmod ext2
    set root=(hd0,7)
    search –no-floppy –fs-uuid –set 0e870eb0-05b5-4d16-8af9-81bb2f9c3737
    linux /boot/vmlinuz-2.6.26-1-xen-686 root=UUID=0e870eb0-05b5-4d16-8af9-81bb2f9c3737 ro quiet splash
    initrd /boot/initrd.img-2.6.26-1-xen-686
    }
    menuentry “Ubuntu, Linux 2.6.26-1-xen-686 (recovery mode)” {
    recordfail=1
    if [ -n ${have_grubenv} ]; then save_env recordfail; fi
    insmod ext2
    set root=(hd0,7)
    search –no-floppy –fs-uuid –set 0e870eb0-05b5-4d16-8af9-81bb2f9c3737
    linux /boot/vmlinuz-2.6.26-1-xen-686 root=UUID=0e870eb0-05b5-4d16-8af9-81bb2f9c3737 ro single
    initrd /boot/initrd.img-2.6.26-1-xen-686
    }
    ### END /etc/grub.d/10_linux ###

    ### BEGIN /etc/grub.d/20_memtest86+ ###
    menuentry “Memory test (memtest86+)” {
    linux16 /boot/memtest86+.bin
    }
    menuentry “Memory test (memtest86+, serial console 115200)” {
    linux16 /boot/memtest86+.bin console=ttyS0,115200n8
    }
    ### END /etc/grub.d/20_memtest86+ ###

    ### BEGIN /etc/grub.d/30_os-prober ###
    menuentry “Windows NT/2000/XP (on /dev/sda3)” {
    insmod fat
    set root=(hd0,3)
    search –no-floppy –fs-uuid –set e47a-f974
    drivemap -s (hd0) ${root}
    chainloader +1
    }
    ### END /etc/grub.d/30_os-prober ###

    ### BEGIN /etc/grub.d/40_custom ###
    # This file provides an easy way to add custom menu entries. Simply type the
    # menu entries you want to add after this comment. Be careful not to change
    # the ‘exec tail’ line above.
    ### END /etc/grub.d/40_custom ###

    • Your BL config looks like Grub2. Do you really run Intrepid? I haven’t had the time to test this workaround with newer Ubuntu releases.
      But: I don’t see you telling the BL to boot the xen hypervisor first. In Grub(1) it looks like:
      title Xen 3.3 / Ubuntu 8.10, kernel 2.6.24-21-xen
      root (hd0,0)
      kernel /boot/xen-3.3.gz
      module /boot/vmlinuz-2.6.24-21-xen root=/dev/md0 ro console=tty0
      module /boot/initrd.img-2.6.24-21-xen
      quiet

      You should try adjusting your BL configuration.

  16. Just to update, I had installed Ubuntu Enterprise Cloud (which comes with Ubuntu 9.10 Karmic). I needed the Xen hypervisor instead of KVM, and hence I followed your steps to have the Dom0 Kernel.

2 Trackbacks

Leave a Reply





Christian KildauHi, my name is Chris. I am a wannabe photog, traveler & geek that is again a student and lives in Hesse, Germany. more about me...

PayPal - The safer, easier way to pay online!
Please consider supporting me


enjoyyourcamera.com


Advertise here Advertise here Advertise here Advertise here
Nikon-Blogger-Linkring :: powered by KLUGERD Photo Blogs Blogs - Blog Catalog Blog Directory Photoblogs.org - The Photoblogging Resource blogarama - the blog directory