Compiling Xen-4.4 from source and installing it on Ubuntu server (Amd-64)

Source: Internet
Author: User
Tags ocaml
  1. First of all, you shocould install a clean Ubuntu server (Amd-64) on your server. (version 14.04 is stronugly recommended for the best compatibility)

  2. 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 events10   remotes/origin/staging     3e2331d VT-d: suppress UR signaling for further desktop chipsets11   remotes/origin/staging-4.0 2692df2 compat/gnttab: Prevent infinite loop in compat code12   remotes/origin/staging-4.1 8995a94 page-alloc: scrub pages used by hypervisor upon freeing13   remotes/origin/staging-4.2 7bcdeb9 update Xen version to 4.2.514   remotes/origin/staging-4.3 a153d8a update Xen version to 4.3.315   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.42 Switched to branch ‘stable-4.4‘3 $ git branch netopt4 $ git checkout netopt5 Switched to branch ‘net opt‘
  3. 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-essential2 $ 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 mercurial4 $ sudo apt-get install make gcc libc6-dev zlib1g-dev python python-dev python-twisted libncurses5-dev patch libvncserver-dev libsdl-dev libjpeg-dev5 $ sudo apt-get install iasl libbz2-dev e2fslibs-dev git-core uuid-dev ocaml ocaml-findlib libx11-dev bison flex xz-utils libyajl-dev6 $ sudo apt-get install gettext pandoc markdown python-dev7 $ sudo apt-get install libperl-dev libgtk2.0-dev libaio-dev gcc-multilib
  4. Now you can compile the source code and install xen: (Note that this step takes a long time. Be patient !)

    1 $ ./configure2 $ make world3 $ sudo make install
  5. After step 4, xen is already successfully installed on your machine. However, some post-installation operations is necessary:

    You can enable automatic IC start of xen Project Services on system startup:

    1 $ sudo update-rc.d xencommons defaults 19 182 $ sudo update-rc.d xendomains defaults 21 203 $ 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-grub2 $ 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 ")

  6. Reboot the Ubuntu server: (now your machine will automatically boot from xen's core)

    1 $ sudo reboot
  7. 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.42 $ 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 **".

Compiling Xen-4.4 from source and installing it on Ubuntu server (Amd-64)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.