Changes between Version 14 and Version 15 of Xen_Installation


Ignore:
Timestamp:
Jun 2, 2010, 10:20:45 AM (14 years ago)
Author:
rock
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Xen_Installation

    v14 v15  
    11[[PageOutline]]
    2 = Xen Installation =
    3 [[BR]]
    4 == 1. Installation ==
    5 === 1.1 Install from Debian package (the latest version -> Xen-3.0.3) ===
    6  * Our OS is Debian etch, we use deb package to install Xen
    72{{{
    8 $ sudo aptitude install xen-linux-system-2.6.18-6-xen-686
    9 (you can refer to our installation log in attache file)
    10 
    11 $ sync ; sudo reboot
    12 (reboot system and choose xen-enable kernel)
     3#!html
     4<h1 style="text-align: center; color: blue">Xen Installation</h1>
    135}}}
    14 === 1.2 Install form Xen source (the latest version -> Xen-3.2.0, !OpenNebula just spuuort Xen-3.1 later) ===
    15  * Install requirement package
    16 {{{
    17 $ aptitude install mercurial 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 pciutils pciutils-dev libc6.xen
    18 }}}
    19  * Install Xen-3.2.0
    20 {{{
    21 $ wget http://bits.xensource.com/oss-xen/release/3.2.0/xen-3.2.0.tar.gz
    22 $ wget http://bits.xensource.com/oss-xen/release/3.2.0/linux-2.6.18-xen-3.2.0.tar.gz
    23 $ mkdir ~/xen
    24 $ tar zxvf xen-3.2.0.tar.gz -C ~/xen/ && tar zxvf linux-2.6.18-xen-3.2.0.tar.gz -C ~/xen/
    25 $ cd ~/xen/xen-3.2.0
    26 $ hg clone http://xenbits.xensource.com/linux-2.6.18-xen.hg
    27 $ make dist && make install
    28 $ depmod 2.6.18-xen
    29 $ mkinitramfs -o /boot/initrd.img-2.6.18-xen 2.6.18-xen
    30 $ update-grub
    31 }}}
    32 == 2. Check Xen ==
    33  * Check our Xen system
    34 {{{
    35 $ uname -a
    36 Linux one 2.6.18-6-xen-686 #1 SMP Sun Feb 10 22:43:13 UTC 2008 i686 GNU/Linux
    37 }}}
    38  * Configure our Xen environment
    39 {{{
    40 $ vim /etc/xen/xend-config.sxp
    41 71:    network-script network-bridge
    42 87: #network-script netwok-dummy
    43 
    44 $ xend restart
    45 $ xm list
    46 }}}
    47 
    48 [[BR]]
    49 [[BR]]
    50 == 3. Xen Operation ==
    51 === 3.1 Install Guest OS (DomU) ===
    52 
    53  * To create simple Guest OS, try ''xen-create-image'' which is included in ''[http://www.xen-tools.org/ xen-tools]''
    54 {{{
    55 $ man xen-create-image
    56 }}}
    57    * Debian package: [http://packages.debian.org/etch/xen-tools xen-tools]
    58  * Install Guest OS
    59 {{{
    60 $ sudo mkdir /home/xen_img
    61 $ sudo dd if=/dev/zero of=/home/xen_img/etch.img bs=1G count=5
    62 $ sudo dd if=/dev/zero of=/home/xen_img/etch.swap bs=514MB count=1
    63 $ sudo /home/xen_img/mkfs.ext3 etch.img
    64 $ sudo /home/xen_img/mkswap etch.swap
    65 $ sudo mount -o loop etch.img /mnt
    66 $ sudo debootstrap --arch i386 etch /mnt/ http://free.nchc.org.tw/debian
    67 }}}
    68  * Config Guest OS
    69 {{{
    70 $ sudo vim /etc/fstab
    71 /etc/fstab
    72 /dev/hda1    /          ext3      defaults 0 1
    73 /dev/hda2   swap    swap      defaults 0 0
    74 proc             /proc   proc      defaults 0 0
    75 
    76 $ sudo vim /etc/hostname
    77 etch
    78 
    79 $ sudo vim /etc/hosts
    80 $ sudo vim /etc/network/interfaces
    81 $ sudo cp /etc/apt/sources.list /mnt/etc/apt/
    82 $ sudo cp -r /lib/modules/2.6.18-6-xen-686/ /mnt/lib/modules/
    83 
    84 $ sudo chroot /mnt
    85 $ passwd root
    86 $ adduser rock
    87 $ sudo umount /mnt
    88 }}}
    89  * Edit Guest OS configuration
    90 {{{
    91 $ sudo vim /home/xen_img/etch.cfg
    92 # Kernel image
    93 kernel = "/boot/vmlinuz-2.6.18-6-xen-686"
    94 ramdisk = "/boot/inird.img-2.6.18-6-xen-686"
    95 # Domain name
    96 name = "etch"
    97 # 0achine information
    98 vcpus = 4
    99 memory = 256
    100 disk = ['file:/home/xen_img/etch.img,hda1,w','file:/home/xen_img/etch.swap,hda2,w']
    101 vif = ['mac=00:00:00:00:00:01,bridge=xenbr1']
    102 }}}
    103  * Guest OS problem
    104 {{{
    105 $ mount /home/xen_img/etch.img /mnt
    106 $ chroot /mnt
    107 
    108 Guest booting Error: 4gb seg fixup, process init (pid 1), cs:ip 73:b7e192fc
    109 $ aptitinstall libc6-xen
    110 
    111 locale problem:
    112 $ aptitinstall install locales
    113 $ dpkg-reconfigure -a locale
    114 $ tzxonfig
    115 }}}
    116 
    117 [[BR]]
    118 [[BR]]
    119 = Refrenece =
    120  * http://www.howtoforge.com/debian_etch_xen_3.1
    121  * http://wiki.xensource.com/xenwiki/InstallationNotes
    122  * http://www.option-c.com/xwiki/Xen_Debian_Quick_Start
    123  * https://help.ubuntu.com/community/Xen
     6----
     7【Documents】
     8 * [Xen_Installation/Xen3 Xen 3.0.X Installation (Debian Etch)]
     9 * [Xen_Installation/Xen4 Xen 4.0 Installation (Debian Lenny)]
     10----
     11【Reference】
     12 * [http://www.xen.org/support/documentation.html Xen Documentation Support]