经验总结:
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然后
检查/boot/下发现sudo make install-xen sudo make install-tools PYTHON_PREFIX_ARG= sudo make install-stubdom
/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
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
大功告成!!!