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

经验总结:

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 xen
sudo make tools
sudo make stubdom
然后
sudo make install-xen
sudo 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.2
root         (hd0,5) 我的opensuse12.1 装在sda6分区所以是(hd0,5)
kernel       /boot/xen-4.1.2.gz
module       /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

大功告成!!!






  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值