= Xen Installation = [[BR]] == 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) }}} [[BR]] * 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 }}} [[BR]] * Configure our Xen environment {{{ $ vim /etc/xen/xend-config.sxp 71: network-script network-bridge 87: #network-script netwok-dummy $ xend restart $ xm list }}} [[BR]] [[BR]] == Xen Operation == === Install Guest OS (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 }}} [[BR]] * 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/ $ sudo cp -r /lib/modules/2.6.18-6-xen-686/ /mnt/lib/modules/ $ sudo chroot /mnt $ passwd root $ adduser rock $ sudo umount /mnt }}} [[BR]] * Edit Guest OS configuration {{{ $ sudo vim /home/xen_img/etch.cfg # Kernel image kernel = "/boot/vmlinuz-2.6.18-6-xen-686" ramdisk = "/boot/inird.img-2.6.18-6-xen-686" # Domain name name = "etch" # 0achine information vcpus = 4 memory = 256 disk = ['file:/home/xen_img/etch.img,hda1,w','file:/home/xen_img/etch.swap,hda2,w'] vif = ['mac=00:00:00:00:00:01,bridge=xenbr1'] }}} * Guest OS problem {{{ $ mount /home/xen_img/etch.img /mnt $ chroot /mnt 4gb seg fixup problem: $ aptitinstall libc6-xen locale problem: $ aptitinstall install locales $ dpkg-reconfigure -a locale $ tzxonfig }}} [[BR]] [[BR]] = Refrenece = * http://www.howtoforge.com/debian_etch_xen_3.1 * http://wiki.xensource.com/xenwiki/InstallationNotes * http://www.option-c.com/xwiki/Xen_Debian_Quick_Start * https://help.ubuntu.com/community/Xen