在OpenSUSE 12.1 上編譯Dom0(linux kernel 3.2.1) + Xen-4.1.2 + Virt-manager 0.9.0

來源:互聯網
上載者:User

經驗總結:

1. 不要使用獨立顯卡,因為驅動不支援pv_ops kernel構架

2. 不要使用64位的發行版(ubuntu除外)

步驟:

1. 安裝32bit OpenSUSE 12.1

請安裝linux kernel development 和python 相關dependency package

。。。。。。

2. 準備

zypper install dev86

zypper install ncurses-devel bridge-utils

3. 編譯Xen-4.1.2

從www.xen.org下載最新的xen-4.1.2

sudo tar -xzvf xen-4.1.2.tar.gz
cd xen-4.1.2
sudo make xensudo make toolssudo make stubdom

然後

sudo make install-xensudo make install-tools PYTHON_PREFIX_ARG=sudo make install-stubdom

檢查/boot/下發現

/boot/xen-4.0.gz/boot/xen-4.gz/boot/xen.gz

這時可以放心的繼續下面的步驟了

4. 編譯dom0 kernel

下載最新的kernel

$ git clone git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen.git linux
cd linux
改變branch
git checkout -b upstream/xen origin/upstream/xen

拷貝/boot/下opensuse12.1的設定檔(以config開頭那個)到linux/中並命名為.config

make menuconfig

--> Processor type and features  --> Paravirtualized guest support        選擇: Xen guest support        選擇: Enable Xen privileged domain support        optional: Enable other features
--> Device Driver
     把和xen有關的都選上以防萬一

sudo make

如果出現了需要手動選擇的Module,我們的原則是有y選y沒y選m,寧可多選別少選

然後就是漫長的等待了,一般在1個小時左右

如果沒有問題

make modules_install install

至此,核心編譯完畢

5. 配置grub

opensuse用的是grub1 我們需要修改的是/boot/grub/menu.lst檔案

在這之前,開啟/etc/xen/xend-config.sxp,將

(xend-unix-server no)

的注釋符刪掉,然後把no改成yes

得到

(xend-unix-server yes)

修改menu.lst檔案

title        Xen 4.1.2root         (hd0,5) 我的opensuse12.1 裝在sda6分區所以是(hd0,5)kernel       /boot/xen-4.1.2.gzmodule       /boot/vmlinuz-3.1.2rc root=/dev/sda6 (編譯dom0核心後得到的vmlinuz-3.1.2rc, 可以在在/boot/內找到)module       /boot/initrd.img-3.1.2rc(可以在/boot/內找到,也是編譯dom0核心後得到的)

6. 編譯

Virt-manager 0.9.0

從virt-manager.org下載最新的virt-manager0.9.0

準備:

  • python >= 2.4 - virt-manager is written in Python!
  • pygtk2 >= 1.99.12-6 - the Python GTK2 bindings are used for the UI
  • gnome-python2-gconf >= 1.99.11-7 - GConf stores application preferences
  • libvirt-python >= 0.4.0 - libVirt is for talking to Xen, QEMU, KVM and other virtualization backensd
  • dbus-python >= 0.61 - optionally expose a service on the bus for control of the UI
  • gnome-python-desktop >= 2.15.4 - optionally store VNC server passwords in GNOME keyring
  • libxml2-python >= 2.6.23 - used to parse XML from libvirt
  • vte >= 0.12.2 - for displaying / interacting with the serial console
  • virtinst >= 0.300.3 - python library for assisting in creating VMs
  • gtk-vnc-python >= 0.3.4 - GTK widget for displaying VNC sessions

yast派上用場了,把這些依賴都安裝上

然後解壓安裝包,tar -zxvf

然後 make 

最後make install

大功告成!!!

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.