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

[经验分享] Compiling Xen-4.4 From Source And Installing It On Ubuntu Server (Amd-64)

[复制链接]

尚未签到

发表于 2015-4-13 12:39:48 | 显示全部楼层 |阅读模式

  •   First of all, you should install a clean Ubuntu Server (Amd-64) on your server. (Version 14.04 is strongly recommended for the best compatibility)

  •   Get the souce code of Xen ready by "git clone". ((If some errors occur in this step, you may check the /ect/apt/source.list and update it by running "$ sudo apt-get update")



    1 $ git clone git://xenbits.xen.org/xen.git
    If you have not yet install "git", please run "sudo apt-get install git" on your terminal.


    1 $ cd xen
    Use "git branch" to show the versions of Xen:


    1 $ git branch -av  
    2   master                     3e2331d VT-d: suppress UR signaling for further desktop chipsets
    3   remotes/origin/HEAD        -> origin/master
    4   remotes/origin/master      3e2331d VT-d: suppress UR signaling for further desktop chipsets
    5   remotes/origin/stable-4.0  2692df2 compat/gnttab: Prevent infinite loop in compat code
    6   remotes/origin/stable-4.1  8995a94 page-alloc: scrub pages used by hypervisor upon freeing
    7   remotes/origin/stable-4.2  7bcdeb9 update Xen version to 4.2.5
    8   remotes/origin/stable-4.3  a153d8a update Xen version to 4.3.3
    9   remotes/origin/stable-4.4  be84c34 evtchn: check control block exists when using FIFO-based events
    10   remotes/origin/staging     3e2331d VT-d: suppress UR signaling for further desktop chipsets
    11   remotes/origin/staging-4.0 2692df2 compat/gnttab: Prevent infinite loop in compat code
    12   remotes/origin/staging-4.1 8995a94 page-alloc: scrub pages used by hypervisor upon freeing
    13   remotes/origin/staging-4.2 7bcdeb9 update Xen version to 4.2.5
    14   remotes/origin/staging-4.3 a153d8a update Xen version to 4.3.3
    15   remotes/origin/staging-4.4 be84c34 evtchn: check control block exists when using FIFO-based events
      Checkout to "stable-4.4" and create a new branch named "netopt" and then checkout to it:



    1 $ git checkout stable-4.4
    2 Switched to branch 'stable-4.4'
    3 $ git branch netopt
    4 $ git checkout netopt
    5 Switched to branch 'net opt'
  •   Before compiling the source code of Xen, you must install the dependencies: (If some errors occur in this step, you may check the /ect/apt/source.list and update it by running "$ sudo apt-get update")



    1 $ sudo apt-get install build-essential
    2 $ sudo apt-get install bcc bin86 gawk bridge-utils iproute libcurl3 libcurl4-openssl-dev bzip2 module-init-tools transfig tgif
    3 $ sudo apt-get install texinfo texlive-latex-base texlive-latex-recommended texlive-fonts-extra texlive-fonts-recommended pciutils-dev mercurial
    4 $ sudo apt-get install make gcc libc6-dev zlib1g-dev python python-dev python-twisted libncurses5-dev patch libvncserver-dev libsdl-dev libjpeg-dev
    5 $ sudo apt-get install iasl libbz2-dev e2fslibs-dev git-core uuid-dev ocaml ocaml-findlib libx11-dev bison flex xz-utils libyajl-dev
    6 $ sudo apt-get install gettext pandoc markdown python-dev
    7 $ sudo apt-get install libperl-dev libgtk2.0-dev libaio-dev gcc-multilib
  •   Now you can compile the source code and install Xen: (Note that this step takes a long time. Be patient!)



    1 $ ./configure
    2 $ make world
    3 $ sudo make install
  •   After step 4, Xen is already successfully installed on your machine. However, some post-installation operations is necessary:
      You can enable automatic start of Xen Project services on system startup:



    1 $ sudo update-rc.d xencommons defaults 19 18
    2 $ sudo update-rc.d xendomains defaults 21 20
    3 $ sudo update-rc.d xen-watchdog defaults 22 23
      By running "$ ls /etc/init.d/", you can find "xencommons", "xendomains" and "xen-watchdog". Note that Starting with Xen-4.3, "xend" is abandoned and replace by "xl".
      You also need to make some changes to "/boot/grub/grub.cfg" to correctly boot to xen.gz:



    1 $ sudo update-grub
    2 $ sudo vim /boot/grub/grub.cfg
      Modify the grub default option from "0" to "2": set default="2" (The option "2" normally locates the menuentry of "xen.gz")

  •   Reboot the Ubuntu Server: (Now your machine will automatically boot from Xen's core)



    1 $ sudo reboot
  •   You can run "sudo xl list" to test whether Xen is running correctly. If some errors occur, try to add a soft link to "libxenctrl.so.4.4":



    1 $ ln -s /usr/local/lib/libxenctrl.so.4.4 libxenctrl.so.4.4
    2 $ sudo ldconfig
      Then restart service xencommons:



    1 $ sudo service xencommons start/restart
      or:



    1 $ sudo /etc/init.d/xencommons start/restart
    Congradulations! All steps are completed and now you can create a virtual machine by "sudo xl create **".

运维网声明 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-56667-1-1.html 上篇帖子: XEN cpu 调度问题 下篇帖子: xen安装CentOS虚拟机(使用163镜像)
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

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

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

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

扫描微信二维码查看详情

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


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


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


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



合作伙伴: 青云cloud

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