|

Setting Up Xen Dom0 on Fedora : Xen 3.4.1 with Linux Kernel 2.6.29 on Fedora 12

Please refer to for the latest stable Xen Dom0 solution.


In this post, the detailed tutorial for setting up Xen 3.4.1 dom0 on top of Fedora 12 with kernel 2.6.29 will be introduced.

Hardware:

Dom0 hardware platform:

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: 4 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

Disk Partitions:

[root@localhost vm0]# df -hT
Filesystem    Type    Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup-LogVol_root
 ext4     50G   12G   38G  23% /
tmpfs        tmpfs    7.9G     0  7.9G   0% /dev/shm
/dev/sda1     ext3    504M  110M  369M  23% /boot
/dev/mapper/VolGroup-LogVol_lhome
 ext4    858G   21G  794G   3% /lhome

Linux:

Fedora 12 x86_64, updated to Apr. 10, 2010.

No xen and libvirt installed:

 # rpm -qa | grep xen
 # rpm -qa | grep virt

And SELinux is diabled.

Packages:

Xen 3.4.1

linux-2.6.29-xen-r4-aka-suse-xenified-2.6.29-62.1: Download here.

download these packages and unzip them.

Build and install Xen

Uncompress xen and put all the source code files of xen to “/usr/src/xen/xen-3.4.1/”:

 # mkdir -p /usr/src/xen/
 # tar -xf xen-3.4.1.tar.gz -C /usr/src/xen/
 # cd /usr/src/xen/xen-3.4.1

Build xen, tools and docs:

# make -j16 dist-xen dist-tools dist-docs

You may need to install some packages that are required and listed.

Install xen:

 # cd dist
 # sh ./install.sh

Build and install Linux kernel

The .config file I used can be downloaded from here:

https://drive.google.com/file/d/0B1qt7fnWrEczQTZkc2JfOFRHXzQ/view

My .config file can be used directly.

Or please use menuconfig to create one:

# make menuconfig

When using “make menuconfig“, some options require special attention:

    Subarchitecture Type (Enable Xen compatible kernel)
    ( ) PC-compatible
    (X) Enable Xen compatible kernel
    ( ) Support for ScaleMP vSMP
    Device Drivers --->
    XEN --->
    [*] Privileged Guest (domain 0)
    <*>Backend driver support
    <*>Block-device backend driver
    <*>Block-device tap backend driver
    <*> Network-device backend driver

After configuration, build and install this Linux kernel:

 # make -j16
 # make modules_install install

Create a grub entry

# vim /boot/grub/grub.conf

Then add this entry:

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

The “root=” and other options will be different depending on the partitions of the system.

Configure services

Add xend and xendomains to services that automatically start when system boot.

 # chkconfig --add xend
 # chkconfig --add xendomains
 # chkconfig xend on
 # chkconfig xendomains on
 # chkconfig --list | grep xend
xend            0:off   1:off   2:on   3:on    4:on    5:on    6:off
xendomains      0:off   1:off   2:on   3:on    4:on    5:on    6:off

Disable ksmtuned service.

# chkconfig ksmtuned off

Reboot now

# reboot

After booting the system in the xen environment. the xm command can be used:

[root@localhost ~]# xm info
host                   : localhost.localdomain
release                : 2.6.29-xen-r4
version                : #1 SMP Mon Apr 12 00:41:42 HKT 2010
machine                : x86_64
nr_cpus                : 16
nr_nodes               : 1
cores_per_socket       : 4
threads_per_core       : 2
cpu_mhz                : 2266
hw_caps                : bfebfbff:28100800:00000000:00000340:009ce3bd:00000000:00000001:00000000
virt_caps              : hvm
total_memory           : 16321
free_memory            : 4
node_to_cpu            : node0:0-15
node_to_memory         : node0:4
xen_major              : 3
xen_minor              : 4
xen_extra              : .1
xen_caps               : xen-3.0-x86_64 xen-3.0-x86_32p hvm-3.0-x86_32 hvm-3.0-x86_32p hvm-3.0-x86_64
xen_scheduler          : credit
xen_pagesize           : 4096
platform_params        : virt_start=0xffff800000000000
xen_changeset          : unavailable
cc_compiler            : gcc version 4.4.3 20100127 (Red Hat 4.4.3-4) (GCC)
cc_compile_by          : root
cc_compile_domain      : localdomain
cc_compile_date        : Mon Apr 12 01:53:45 HKT 2010
xend_config_format     : 4

Then xm can be used to create and manage virtual machines on the server.

[root@localhost ~]# xm list
Name                                        ID   Mem VCPUs      State   Time(s)
Domain-0                                     0 15093    16     r-----    228.2
vm0                                          1  1024     2     -b----      4.4

Similar Posts

  • |

    The length of timeslices for processes under CFS process scheduling algorithm in Linux Kernel

    Abstract As is known, CFS (Completely Fair Scheduling) is a famous process scheduling algorithm in Linux Kernel but there is no convenient way for developers to get the timeslices of processes if CFS is chosen. In this article, I will introduce one way to hack the timeslices of process easily for CFS in Linux Kernel….

  • |

    Storage Architecture and Challenges by Andrew Fikes at Google Faculty Summit 2010

    Storage Architecture and Challenges in Faculty Summit, July 29, 2010, by Andrew Fikes, Principal Engineer. Download PDF (from archive.org). This slides introduces some of Google’s storage systems with insights and discussion of problems. Read more: Data Consistency Models of Public Cloud Storage Services: Amazon S3, Google Cloud Storage and Windows Azure Storage What are the…

  • Reading List for Distributed Systems and Cloud Computing

    Understanding the literature is usually the first step to do research, which is the same for systems research on cloud computing. A reading list may help a lot to those that just start in cloud computing research. Prof. Lin Gu, my PhD supervisor, compiled a reading list for system research on cloud computing. The reading…

  • Chinese Charactor Configuration on Fedora 11

    最新的更新版本请看: Fedora 中文字体设置. 使用Linux时我个人倾向使用英文环境系统,而Fedora11在英文环境下中文字体有时会不太好看,经常遇到需要字体优化美化的问题。 以下是我的配置方案,经测试效果还算不错,解决了Fedora 11 中文字体难看的问题: 方案1:使用uming和ukai字体,即AR PL UMing CN等。 关键是使用的字体包如下: 首先要安装这两个字体: cjkuni-ukai-fonts cjkuni-uming-fonts 然后配置一下~/.fonts.conf文件. 使sans-serif serif monospace字体中文使用uming/ukai即可. 我的.fonts.conf文件可以从这里下载(两种选择, 我喜欢前者): https://github.com/zma/config_files 使用Liberation和uming/ukai字体: .fonts.cofn.liberation 使用dejavu和uming/ukai字体: .fonts.conf.dejavu 下载后放到自己的$HOME下改名为.fonts.conf就可以了。 使用uming字体效果如下(请放大后看效果): 方案2:安装文泉驿字体,这个非常简单,安装相应包即可了。 如果喜欢其它的字体选择性的安装上就可以了,只要注意只安装自己需要的就行了。有人使用微软雅黑字体,首先这是侵权的,其次开源的字体做得其实已经很不错了。 最后将字体平滑选项打开, KDE和gnome都有相关设置方法。 以上内容只是针对使用xft字体系统的设置。对于使用核心字体系统的X程序来说字体依然会出现很丑的情况。 下面是针对emacs的设置方法: 首先需要安装这个字体包: xorg-x11-fonts-misc 注意到在中文系统下emacs的中文显示非常好,而在英文环境中去非常差,我们可以利用这一点,在运行emacs前首先将系统环境设为中文即可。 在~/bin/下建立一文件ema 内容如下: #!/bin/bash rm -f ~/.emacs ln -s ~/.emacs.x ~/.emacs LANG=zh_CN.UTF-8 emacs –fullheight -r $* 然后加入执行权限即可: chmod +x…

Leave a Reply

Your email address will not be published. Required fields are marked *