wiki:GTD_Cloud_xen_ubuntu

Version 5 (modified by rock, 16 years ago) (diff)

--

Install Xen-3.1.3 on ubuntu Server 8.04 (AMD64)

0.Software Information

1.Requirement packages

sudo aptitude install build-essential libncurses5-dev kernel-package iproute bridge-utils \
python-twisted gcc binutils make zlib1g-dev python-dev transfig bzip2 screen ssh debootstrap \ 
libcurl3-dev libncurses5-dev x-dev libsdl1.2-dev bin86 bcc python-pam patch latex-make \ 
qemu qemu-launcher qemuctl graphviz graphviz-dev lvm2 libvncserver-dev libjpeg62-dev libjpeg62 \
 gettext python-xml gawk tetex-extra tetex-base openssl libssl-dev mercurial quilt libc6-dev-i386


2. Install Xen-3.1.3

  • Xen-3.1.3
    $ cd /usr/src ; wget http://bits.xensource.com/oss-xen/release/3.1.3/xen-3.1.3.tar.gz
    $ tar zxvf xen-3.1.3.tar.gz
    $ cd xen-3.1.3
    $ make -j 4 world
    $ make install
    $ mkinitramfs -o /boot/initrd.img-2.6.18.8-xen 2.6.18.8-xen
    $ update-grub
    
    ###  If your loop is build-in kernel ###
    $ vim /boot/grub/menu.lst
    netloop.nloopbacks=200
    


3. Install xen-tools

  • xen-tools
    $ wget http://www.xen-tools.org/software/xen-tools/xen-tools-3.9.tar.gz
    $ tar xen-tools-3.9.tar.gz
    $ cd xen-tools-3.9 ; make install
    
    ###  Edit xen-tools config ###
    $ vim /etc/xen-tools/xen-tools.conf
    


4. Test Xen

###  Edit xen config for you demand  ###
$ vim /etc/xen/xend-config.sxp

###  Startup Xen  ###
$ xend start

###  Check Xen  ###
$ ifconfig
$ less /var/log/xen/xend.log
$ less /var/log/xen/xend-debug.log
//If xend and xen networking can normal startuped, you can go to next step. 
//If you meet problem, check your xen config, network, loop device and log message.

###  Create VM  ###
$ xen-create-image --hostname vm01 --ip 140.110.X.X

###  Booting VM01  ###
$ cd /etc/xen
$ xm create vm01.cfg -c
//If vm01 can normal booting! God job!