wiki:Xen_Installation

Version 4 (modified by rock, 17 years ago) (diff)

--

Xen Installation


Installation

  • Our OS is Debian etch, we use deb package to install Xen
    $ sudo aptitude install xen-linux-system-2.6.18-6-xen-686
    (you can refer to our installation log in attache file)
    
    $ sync ; sudo reboot
    (reboot system and choose xen-enable kernel)
    


  • Check our Xen system
    $ uname -a
    Linux one 2.6.18-6-xen-686 #1 SMP Sun Feb 10 22:43:13 UTC 2008 i686 GNU/Linux
    


  • Configure our Xen environment
    $ vim /etc/xen/xend-config.sxp
    71:    network-script network-bridge
    87: #network-script netwok-dummy
    
    $ xend restart
    $ xm list
    

Xen Operation

Install Guest (DomU)

  • Install Guest OS
    $ sudo mkdir /home/xen_img
    $ sudo dd if=/dev/zero of=/home/xen_img/etch.img bs=1G count=5
    $ sudo dd if=/dev/zero of=/home/xen_img/etch.swap bs=514MB count=1
    $ sudo /home/xen_img/mkfs.ext3 etch.img
    $ sudo /home/xen_img/mkswap etch.swap
    $ sudo mount -o loop etch.img /mnt
    $ sudo debootstrap --arch i386 etch /mnt/ http://free.nchc.org.tw/debian
    


  • Config Guest OS
    $ sudo vim /etc/fstab
    /etc/fstab
    /dev/hda1    /          ext3      defaults 0 1
    /dev/hda2   swap    swap      defaults 0 0
    proc             /proc   proc      defaults 0 0
    
    $ sudo vim /etc/hostname
    etch
    
    $ sudo vim /etc/hosts
    $ sudo vim /etc/network/interfaces
    $ sudo cp /etc/apt/sources.list /mnt/etc/apt/
    


Refrenece