设为首页 收藏本站
查看: 1283|回复: 0

[经验分享] Set up Xen 3.4.3 Dom0 via xenified 2.6.31.12 kernel on top of Ubuntu 9.10 Server

[复制链接]
累计签到:6 天
连续签到:1 天
发表于 2016-1-9 16:11:09 | 显示全部楼层 |阅读模式
Set up Xen 3.4.3 Dom0 via xenified 2.6.31.12 kernel on top of Ubuntu 9.10 Server
  Following bellow is build Xen Host on top Ubuntu 9.10 Server.It is based on direct clone via “hg” and build Xen 3.4.3-rc4 from xensource.com , applying Andrew Lyon’s 2.6.31 patch set V12 to vanilla kernel 2.6.31.12 along with tuning patched kernel via “make menuconfig” and building aka Suse xenified kernel in Ubuntu 9.10 environment.Notice that forward porting of original patch set was done by Jan Beulich for 2.6.31.8 kernel on OpenSuse 11.2. Built in patched kernel open-source NVIDIA and Radeon HD drivers work just fine on Ubuntu 9.10, providing Gnome Desktop Environment right away.

# cd /usr/src/build/
# wget http://gentoo-xen-kernel.googlecode.com/files/xen-patches-2.6.31-12.tar.bz2

4.Untar linux-2.6.31.12.tar.bz2 and apply patches.

# cd /usr/src/build/
# bzcat linux-2.6.31.8.tar.bz2 | tar xf -
# mkdir -p xen-patches-2.6.31-12
# cd xen-patches-2.6.31-12
# bzcat ../xen-patches-2.6.31-12.tar.bz2 | tar xf -
# cd ../linux-2.6.31.8

Run script

#!/bin/bash
for P in `ls ../xen-patches-2.6.31-12/6*.patch1 | sort `
do
patch -p1 -s -i $P
if [ $? = 0 ]; then
echo $P applied
else
echo "Error processing "$P
exit 1
fi
done

Build kernel :-

# make menuconfig

Processor type and features ->
  • Symmetric multi-processing support
    [ ] Support sparse irq numbering
  • Enable MPS table
  • Enable Xen compatible kernel
  • Single-depth WCHAN output
    Processor family (Generic-x86-64) --->
    [ ] Configure Maximum number of SMP Processors and NUMA Nodes
    (64) Maximum number of CPUs
    Preemption Model (No Forced Preemption (Server)) --->
    [ ] Machine Check Exception

    Device Drivers -> XEN
  • Privileged Guest (domain 0)
    <*> Backend driver support
    <*> Block-device backend driver
    <*> Block-device tap backend driver
    <*> Block-device tap backend driver 2
    >*> Network-device backend driver
    (8) Maximum simultaneous transmit requests (as a power of 2)
    [ ] Pipelined transmitter (DANGEROUS)
    < > Network-device loopback driver
    <*> PCI-device backend driver
    PCI Backend Mode (Virtual PCI) --->
    [ ] PCI Backend Debugging
    < > TPM-device backend driver
    <M> SCSI backend driver
    <M> USB backend driver
    <M> Block-device frontend driver
    <M> Network-device frontend driver
    <M> Network-device frontend driver acceleration for Solarflare NICs
    <M> SCSI frontend driver
    <M> USB frontend driver
  • Taking the HCD statistics (for debug)
    <*> User-space granted page access driver
    <*> Framebuffer-device frontend driver


    # make -j(x)(number_of_cores)
    # make modules_install install
    # mkinitramfs -o /boot/initrd-2.6.31.12.img 2.6.31.12

    Different option is to install pvops enabled kernel 2.6.32.9 via download :-

    # git clone git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen.git linux-2.6-xen
    # cd linux-2.6-xen
    # git checkout origin/xen/stable -b xen/stable

    Notice :-

    # git checkout origin/xen/master -b xen/master

    will result building the most recent 2.31.6 version of pvops kernel. Branch above , actually is not required to be checked out . It’s default branch of “git clone”. Difference in meantime is “acpi” branch not merged yet to xen/stable. However, APIC rework has been committed for 2.6.32.9.

    # make menuconfig
    # make
    # make modules_install install
    # mkinitramfs -o /boot/initrd-2.6.32.9.img 2.6.32.9




    With the most recent 2.6.32.9 i was able to enable DRM for Radeon and get positive dmesg report on F12 and Ubuntu Karmic Koala Server.





    To test 2.6.31.12 xenified aka Suse kernel setup Xen 3.4.3 on to top of Ubuntu Karmic Server. First – install on Ubuntu Karmic Server all packages required for Xen build along with Ubuntu-Desktop ( via tasksel). Of course, Xen Host doesn’t require GUI. Install Ubuntu-Desktop just make work comfortable and faster.

    apt-get install libcurl4-openssl-dev \
    xserver-xorg-dev \
    python2.6-dev \
    mercurial gitk \
    build-essential \
    libncurses5-dev \
    uuid-dev gawk \
    gettext texinfo bcc

    Second – build Xen from source

    # cd /usr/src
    # hg clone http://xenbits.xensource.com/xen-3.4-testing.hg
    # cd xen-3.4-testing.hg
    Set in Config.mk
    PYTHON = python
    PYTHON_PREFIX_ARG =
    # make install-xen
    # make install-tools
    # make install-stubdom

    Tuning Config.mk results Xen packages to be placed into /usr/local/lib/python2.6/dist-packages due to Changeset 19594 in xen-3.4-testing.hg. Otherwise, Xen packages would go to /usr/lib/python2.6/site-packages, which is not default location for python 2.6 on Ubuntu 9.10 ( vs F12 ). Thus you won’t be able to start xend in Dom0. Same thing happens when building Xen Unstable on Ubuntu 9.10 Server.
    Add entry to /boot/grub/grab.cfg:-

    menuentry "Xen 3.4 / Ubuntu 9.10 kernel 2.6.31.12 xenified" {
    insmod ext2
    set root=(hd1,8)
    multiboot (hd1,8)/boot/xen-3.4.gz
    module (hd1,8)/boot/vmlinuz-2.6.31.12
    module (hd1,8)/boot/initrd-2.6.31.12.img
    }

    and rebooted into xen host.Tested OSOL 133 PV DomU,F12 PV DomU, Ubuntu Kamic HVM and PV DomUs sharing same image device.


  • 运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
    2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
    3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
    4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
    5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
    6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
    7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
    8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

    所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-162305-1-1.html 上篇帖子: 谈VPS:Xen与OpenVZ性能测试 到底孰优孰劣 下篇帖子: linode XEN VPS (Linux)
    您需要登录后才可以回帖 登录 | 立即注册

    本版积分规则

    扫码加入运维网微信交流群X

    扫码加入运维网微信交流群

    扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

    扫描微信二维码查看详情

    客服E-mail:kefu@iyunv.com 客服QQ:1061981298


    QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


    提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


    本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



    合作伙伴: 青云cloud

    快速回复 返回顶部 返回列表