xen3.4.3源碼編譯

來源:互聯網
上載者:User

xen3.4.3源碼編譯

1. Xen Hypervisior安裝


安裝必備軟體包# yum groupinstall "Development Tools"# yum install hmaccalc ncurses-devel zlib-devel openssl-devel python-devel \bridge-utils  libtool-ltdl iasl xorg-x11-drv-evdev xorg-x11-drv-fbdev \xorg-x11-drv-i810-devel xorg-x11-drv-via-devel xorg-x11-proto-devel \xorg-x11-server-sdk xorg-x11-xtrans-devel 下載xen源碼:wget http://bits.xensource.com/oss-xen/release/3.4.3/xen-3.4.3.tar.gztar zxvf xen-3.4.3.tar.gzcd xen-3.4.3
使用make world可以一次性安裝,但是指令碼會自動下載一個Kernel,過程比較慢,執行下面的命令可以加快編譯速度:
make xen
make tools
make stubdom
make install-xen
make install-tools
make install-stubdom

為了簡單,直接執行:make world
編譯完成後,執行:make install,這樣就完成了Xen Hypervisior安裝。
編譯完成後,發現/boot目錄下多了下面的檔案vmlinuz-2.6.18.8-xen
xen-3.4.3.gz
config-2.6.18.8-xen
xen-3.4.gz
xen-3.gz
xen.gz
System.map-2.6.18.8-xen

2. 發現沒有自動建立inird檔案,手動建立
cd linux-2.6.18-xen.hg/
mkinitrd initrd-2.6.18.8-xen.img .
cp initrd-2.6.18.8-xen.img /boot/

grub配置:
title CentOS (2.6.18.8-xen-mybuild)
     root (hd0,0)
     kernel /boot/xen-3.4.3.gz
     module /boot/vmlinuz-2.6.18.8-xen ro root=LABEL=/ rhgb quiet
     module /boot/initrd-2.6.18.8-xen.img
3. 啟動虛機,發現模組錯誤,無法啟動,需要重新編譯核心
cd xen-3.4.3/linux-2.6.18-xen.hg/
$ make menuconfig

Processor type and features --->
  [*] Enable Xen compatible kernel
Networking support --->
  Networking options --->
    <*> 802.1d Ethernet Bridging
Device Drivers --->
  XEN --->
    [*] Privileged Guest (domain 0)
     Backend driver support
       Block-device backend driver
       Block-device tap backend driver
       Block-device tap backend driver 2
       Network-device backend driver
       PCI-device backend driver
       SCSI backend driver
       USB backend driver
    <*> Block-device frontend driver
    <*> Network-device frontend driver
     SCSI frontend driver
     USB frontend driver
    <*> Framebuffer-device frontend driver
    <*>   Keyboard-device frontend driver
    [*] Disable serial port drivers
    <*> Export Xen attributes in sysfs
        Xen version compatibility (3.3.0 and later) --->
           3.3.0 and later
$ make
$ make modules
# make modules_install
# make install
# depmod 2.6.18.8-xen# cd /boot# mkinitrd -v -f --with=sd_mod --with=scsi_mod initrd-2.6.18.8-xen.img 2.6.18.8-xen
grub配置:
title CentOS (2.6.18.8-xen-mybuild)
     root (hd0,0)
     kernel /boot/xen-3.4.3.gz
     module /boot/vmlinuz-2.6.18.8-xen ro root=LABEL=/ rhgb quiet
     module /boot/initrd-2.6.18.8-xen.img
啟動成功
通過yum安裝xen3.4.3

yum install xen kernel-xen即可。
安裝後的grub:
title CentOS (2.6.18-274.7.1.el5xen)
     root (hd0,0)
     kernel /boot/xen.gz-3.4.3
     module /boot/vmlinuz-2.6.18-274.7.1.el5xen ro root=LABEL=/ rhgb quiet
     module /boot/initrd-2.6.18-274.7.1.el5xen.img

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.