wiki:Xen_Installation/Xen4.x

Xen 4.x Installation (Ubuntu 10.04.1 x86_64 LTS Lucid)


【安裝基本套件】

$ sudo apt-get install bcc bin86 gawk bridge-utils iproute libcurl3 libcurl4-openssl-dev bzip2 module-init-tools transfig tgif texinfo texlive-latex-base texlive-latex-recommended texlive-fonts-extra texlive-fonts-recommended pciutils-dev mercurial build-essential make gcc libc6-dev zlib1g-dev python python-dev python-twisted libncurses5-dev patch libvncserver-dev libsdl-dev libjpeg62-dev iasl libbz2-dev e2fslibs-dev git-core uuid-dev ocaml libx11-dev
  • 若是 Debian/Ubuntu? 64bit 所需另外安裝套件
    $ sudo apt-get install gcc-multilib
    

【安裝 Xen 4.0 最新測試版】

[Step1:編譯與安裝 Xen Paravirt_Ops Linux kernel - 2.6.32.16]

$ cd /usr/src
$ sudo git clone git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen.git linux-2.6-xen
$ cd ./linux-2.6-xen
$ sudo git reset --hard
$ sudo git checkout -b xen/stable-2.6.32.x origin/xen/stable-2.6.32.x
$ sudo git pull   //往後在此更新至 latest kernel revision//
$ sudo make menuconfig   //See the attached kernel config file for details//
$ sudo make -j 4
$ sudo make modules -j 4
$ sudo make modules_install install
$ sudo depmod -a
$ sudo mkinitramfs -o /boot/initrd.img-2.6.32.16 2.6.32.16
  • 修改 Grub.cfg 開機選單 (Grub2路徑:/boot/grub/grub.cfg)
     menuentry 'Xen-4.x, with Linux 2.6.32.16' --class ubuntu --class gnu-linux --class gnu --class os {
              recordfail
              insmod ext2
              set root='(hd0,1)'
              multiboot (hd0,1)/boot/xen-4.0.gz dummy=dummy
              module  /boot/vmlinuz-2.6.32.16 dummy=dummy root=UUID=04c43ab3-b033-448d-aef9-c75beb222f99 ro nomodeset
              module  /boot/initrd.img-2.6.32.16
    }
    

[Step2:編譯與安裝 Xen-4.x Hypersior Testing/Stable版本]

### (1) Testing ###
$ cd /usr/src
$ sudo hg clone http://xenbits.xen.org/xen-4.0-testing.hg
$ cd ./xen-4.0-testing.hg
### (2) Stable ###
$ wget http://bits.xensource.com/oss-xen/release/4.0.1/xen-4.0.1.tar.gz
$ sudo tar zxvf xen-4.0.1.tar.gz -C /usr/src/ 
$ cd /usr/src/xen-4.0.1
##################
$ sudo make xen -j 4
$ sudo make tools -j 4
$ sudo make stubdom -j 4
$ sudo make install-xen
$ sudo make install-tools PYTHON_PREFIX_ARG=
$ sudo make install-stubdom
$ sudo update-rc.d xend defaults 20 21
$ sudo update-rc.d xendomains defaults 21 20
$ sudo reboot

[Additional Step:Up-to-date Xen-4.x Hypersior]

$ cd xen-4.0-testing.hg
$ make clean
$ hg pull
$ hg update

[Additional Step:Check status & Information]

sudo xm list
Name                                        ID   Mem VCPUs      State   Time(s)
Domain-0                                     0  7044     4     r-----     16.7
$ sudo xm info
host                   : XenServer
release                : 2.6.32.16
version                : #1 SMP Tue Aug 3 16:18:47 CST 2010
machine                : x86_64
nr_cpus                : 4
nr_nodes               : 1
cores_per_socket       : 4
threads_per_core       : 1
cpu_mhz                : 2826
hw_caps                : bfebfbff:20100800:00000000:00000940:0408e3fd:00000000:00000001:00000000
virt_caps              : hvm hvm_directio
total_memory           : 8025
free_memory            : 1631
node_to_cpu            : node0:0-3
node_to_memory         : node0:1631
node_to_dma32_mem      : node0:806
max_node_id            : 0
xen_major              : 4
xen_minor              : 0
xen_extra              : .1-rc6-pre
xen_caps               : xen-3.0-x86_64 xen-3.0-x86_32p hvm-3.0-x86_32 hvm-3.0-x86_32p hvm-3.0-x86_64 
xen_scheduler          : credit
xen_pagesize           : 4096
platform_params        : virt_start=0xffff800000000000
xen_changeset          : Mon Aug 02 17:19:06 2010 +0100 21301:ef5f25de00da
xen_commandline        : 
cc_compiler            : gcc version 4.4.3 (Ubuntu 4.4.3-4ubuntu5) 
cc_compile_by          : root
cc_compile_domain      : 
cc_compile_date        : Tue Aug  3 17:01:16 CST 2010
xend_config_format     : 4

【Reference】

Last modified 14 years ago Last modified on Aug 30, 2010, 12:07:25 PM

Attachments (1)

Download all attachments as: .zip