使用Fedora设置稳定的Xen Dom0:在Fedora 12中使用Xenified Linux Kernel 2.6.32.13安装Xen 3.4.3...

This is the latest stable and recommended stable Xen Dom0 solution on Fedora 12. No serious bug found till now and we will fix the bugs by ourselves if some appears. It also works on Fedora 14 as well. It should not be hard to use this solution on other versions of Fedora or other Linux distribution.

这是Fedora 12上最新的,建议使用的稳定Xen Dom0解决方案。到目前为止,尚未发现严重的错误,如果发现某些错误,我们将自行修复。 它还可以在Fedora 14上运行 。 在其他版本的Fedora或其他Linux发行版上使用此解决方案应该不难。

How to set up Xen Dom0 with Xenified Linux kernel in Fedora 12 will be introduced in this post. We use Xen 3.4.3 from xen.org and Xenified Linux kernel 2.6.32.13. This is a very stable Dom0 solution for Fedora 12. Lot’s DomUs have been tested on this platform.

本文将介绍如何在Fedora 12中使用Xenified Linux内核设置Xen Dom0。 我们使用来自xen.org的Xen 3.4.3和Xenified Linux内核2.6.32.13。 这是用于Fedora 12的非常稳定的Dom0解决方案。很多DomU已在此平台上进行了测试。

硬件: (Hardware:)

Dom0’s hardware platform:

Dom0的硬件平台:

Motherboard: INTEL S5500BC S5500 Quad Core Xeon Server Board
CPU: 2 x Intel Quad Core Xeon E5520 2.26G (5.86GT/sec,8M,Socket 1366)
Memory: 8 x Kingston DDR-3 1333MHz 4GB ECC REG. CL9 DIMM w/Parity & Thermal Sensor
HD: 4 x WD WD10EARS 1 TB, SATA II 3Gb/s, 64 MB Cache

主板:INTEL S5500BC S5500四核Xeon服务器主板
CPU :2个Intel Quad Core Xeon E5520 2.26G(5.86GT / sec,8M,Socket 1366)
内存:8 x金士顿DDR-3 1333MHz 4GB ECC REG。 带奇偶校验和热传感器的CL9 DIMM
高清:4 x WD WD10EARS 1 TB,SATA II 3Gb / s,64 MB缓存

Linux系统: (Linux system:)

Fedora 12 x86_64

Fedora 12 x86_64

SELinux is disabled. Please refer here for detail: Disabled SELinux on Fedora.

SELinux已禁用。 请参考这里获取详细信息: 在Fedora上禁用SELinux

ext3 is recommended for the file system of disk partition for /boot.

推荐将ext3用于/ boot的磁盘分区的文件系统。

Update the system:

更新系统:

# yum update

The Xen and libvirt packages in Fedora should not be installed to avoid conflict.

Fedora中的Xen和libvirt软件包不应安装以避免冲突。

# yum erase xen* libvirt

生成并安装Xen虚拟机管理程序和工具 (Build and install Xen hypervisor and tools)

下载Xen 3.4.3 (Download Xen 3.4.3)
$ wget http://bits.xensource.com/oss-xen/release/3.4.3/xen-3.4.3.tar.gz
$ tar xf xen-3.4.3.tar.gz
构建Xen和工具 (Build Xen and tools)

You may need to install packages depended by this. You can try this for solving the dependencies:

您可能需要安装与此相关的软件包。 您可以尝试解决依赖关系:

# yum install make gcc -y;
# yum groupinstall "Development Libraries" -y;
# yum groupinstall "Development Tools" -y;
# yum install transfig texi2html \
dev86 glibc-devel glibc-devel.i686 \
e2fsprogs-devel gitk mkinitrd \
iasl xz-devel bzip2-devel \
pciutils-libs pciutils-devel \
SDL-devel libX11-devel gtk2-devel \
bridge-utils PyXML qemu-common \
qemu-img mercurial ed -y

The we can make Xen and Xen tools:

我们可以制作Xen和Xen工具:

$ make xen
$ make tools
安装Xen和工具 (Install Xen and tools)
$ make install-xen
$ make install-tools

构建并安装xenified Linux内核 (Build and install xenified Linux kernel)

下载Linux内核2.6.32.13 (Download Linux kernel 2.6.32.13)
$ wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.32.13.tar.bz2
$ tar xf linux-2.6.32.13.tar.bz2
下载2.6.32 Xen补丁v2 (Download 2.6.32 Xen patches v2)
$ wget http://gentoo-xen-kernel.googlecode.com/files/xen-patches-2.6.32-2.tar.bz2
$ mkdir xen-patches-2.6.32-2
$ tar xf xen-patches-2.6.32-2.tar.bz2 -C xen-patches-2.6.32-2
应用Xen补丁 (Apply Xen patches)

Apply all the patches downloaded above following the patch number.

按照补丁编号应用上面下载的所有补丁。

You may need to install patch if it isn’t installed:

如果未安装修补程序,则可能需要安装它:

# yum install patch

This patch.sh script can be used (we assume the patch and the kernel are in the same directory):

可以使用以下patch.sh脚本(我们假设补丁程序和内核位于同一目录中):

patch.sh:

patch.sh:

#!/bin/bash
for P in `ls ../xen-patches-2.6.32-2/6*.patch1 | sort`
do
    patch -p1 -s -i $P
    if [ $? = 0 ]; then
        echo $P applied
    else
        echo "Error processing "$P
        exit 1
    fi
done

Put this script into Linux source directory and execute:

将此脚本放入Linux源目录并执行:

$ sh ./patch.sh

The structure of these directories are as follows:

这些目录的结构如下:

|
|-linux-2.6.32.13
|    |
|    `- patch.sh
` xen-patches-2.6.32-2
      |
      `- 6*.patch1
配置Xenified Linux内核 (Configure Xenified Linux kernel)

A working configuration file that I used can be downloaded directly from here:

我使用的工作配置文件可以直接从此处下载:

config-for-xenified-linux-2.6.32.13

config-for-xenified-linux-2.6.32.13

Just download this file, put it into the kernel source code file directory and rename it to .config .

只需下载此文件,将其放入内核源代码文件目录,然后将其重命名为.config即可

Other than use my configuration file, you can also configure it by yourself by using “make menuconfig”.

除了使用我的配置文件之外,您还可以使用“ make menuconfig”自行配置它。

Make sure you build the kernel with these components enabled:

确保在启用以下组件的情况下构建内核:

    Processor type and features  --->
     [*] Symmetric multi-processing support
     [*] Support sparse irq numbering
     [*] Enable Xen compatible kernel 

    Device Drivers  --->
     XEN  --->
     [*] Privileged Guest (domain 0) 
     <*> Backend driver support (NEW)
     <*>   Block-device backend driver (NEW)
     <*>   Block-device tap backend driver (NEW)
     < > Block-device tap backend driver 2 (NEW) 
     <*> Network-device backend driver (NEW) 
     (8)     Maximum simultaneous transmit requests (as a power of 2) (NEW)
     [ ]     Pipelined transmitter (DANGEROUS) (NEW)
     < >     Network-device loopback driver (NEW)
     < > PCI-device backend driver (NEW) 
     < >   TPM-device backend driver (NEW)
     <M>   SCSI backend driver (NEW)
     <M>   USB backend driver (NEW)
     <M> Block-device frontend driver
     <M> Network-device frontend driver
     <M>   Network-device frontend driver acceleration for Solarflare NICs (NEW)
     <M> SCSI frontend driver (NEW)
     <M> USB frontend driver (NEW)
     [*]   Taking the HCD statistics (for debug) (NEW)
     [ ]   HCD suspend/resume support (DO NOT USE) (NEW)
     <*> User-space granted page access driver (NEW)
     <*> Framebuffer-device frontend driver (NEW)
     <*>   Keyboard-device frontend driver (NEW)
     [*] Disable serial port drivers (NEW)
     <*> Export Xen attributes in sysfs (NEW)
     (256) Number of guest devices (NEW)
     Xen version compatibility (no compatibility code) ---> 
     [*] Place shared vCPU info in per-CPU storage (NEW)
构建内核 (Build kernel)
$ make -jX

X can be two times of the number of the processor. We use this to let make invoke compilation work in X-way parallel.

X可以是处理器数量的两倍。 我们用它来使调用编译在X-way中起作用 平行。

安装模块和内核 (Install modules and kernel)
# make modules_install install

配置grub (Configure grub)

Add one entry for Xen in /boot/grub/grub.conf. This is an example entry:

/boot/grub/grub.conf中为Xen添加一个条目。 这是一个示例条目:

title Xen 3.4.3 - Xenified Linux 2.6.32.13
  root (hd0,0)
  kernel /xen-3.4.3.gz console=vga vga=ask noreboot
  module /vmlinuz-2.6.32.13 ro root=/dev/mapper/VolGroup-LogVol_root noiswmd LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us
  module /initramfs-2.6.32.13.img

The root and other parameters may be different depending on the configuration.

根和其他参数可能会有所不同,具体取决于配置。

在系统启动时使Xend和Xendomains服务自动启动 (Make Xend and Xendomains services automatically start when system boots)

  1. cd /etc/init.d/

    cd /etc/init.d/
  2. chkconfig –add xend

    chkconfig –添加xend
  3. chkconfig –add xendomains

    chkconfig –添加xendomains

Check whether Xend and Xendomains services are automatically started in level 3-5:

检查Xend和Xendomains服务是否在3-5级中自动启动:

# chkconfig --list | grep xend

It should be like this:

应该是这样的:

xend               0:off    1:off    2:off    3:on    4:on    5:on    6:off
xendomains         0:off    1:off    2:off    3:on    4:on    5:on    6:off

现在享受乐趣! (Enjoy the fun now!)

After booting the system, you can try to use xm to check xen info

引导系统后,您可以尝试使用xm检查xen信息

# xm info

Then xm command can be used to start up DomUs.

然后,可以使用xm命令来启动DomU。

使性能更稳定 (Making the performance more stable)

Allocating dedicated CPU core and memory for Dom0 may provide more stable performance for the Xen platform. Please refer to Managing Xen Dom0’s CPU and Memory for detailed instruction.

为Dom0分配专用的CPU内核和内存可能会为Xen平台提供更稳定的性能。 有关详细说明,请参阅管理Xen Dom0的CPU和内存

问题 (Problems)

A list of common problems and tips can be found in Problems during Installing Xen Dom0 in Fedora.

在Fedora中安装Xen Dom0期间的问题中可以找到常见问题和提示的列表。

Please refer to Xen Solutions for the DomU solution and more Xen Dom0 solution.

有关DomU解决方案和更多Xen Dom0解决方案 ,请参考Xen Solutions

翻译自: https://www.systutorials.com/setting-up-stable-xen-dom0-with-fedora-xen-3-4-3-with-xenified-linux-kernel-2-6-32-13-in-fedora-12/

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

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值