Setting up Xen Dom0 on Fedora : Xen 3.4.1 with Linux Kernel 2.6.29 on Fedora 11
Tags: Linux, server config, tutorials, Virtualization, xen
Please refer to
for the latest stable Xen Dom0 solution.
==========================================
In this post, the detailed tutorial of seting up Xen 3.4.1 dom0 on top of Fedora 11 with kernel 2.6.29 will be introduced.
Hardware:
Platform 1 (This introduction is based on this platform):
IBM eServer X3650M2:
2 x Intel Xeon X5570 2.93 8MB Cache Processor
4 x 4GB DDR3-1333 Memory
2 x 300GB 10K-SFF Hot-Swap HD – RAID 0
Platform 2:
2 x Intel Xeon E5520 2.27GHz 8MB cache
6 x 4G DDRIII REG ECC 1333
2 x ST 1000G NS 32M
The instruction below is based on platform 1.
Disk Partitions:
# df -hT Filesystem Type Size Used Avail Use% Mounted on /dev/sda2 ext4 58G 6.3G 49G 12% / /dev/sda1 ext3 388M 52M 316M 15% /boot /dev/sda5 ext4 490G 14G 452G 3% /home
Linux:
Fedora 11, updated to 23-09-2009.
No xen and libvirt installed:
# rpm -qa | grep xen # rpm -qa | grep virt
And SELinux is diabled.
Packages:
Xen 3.4.1: http://bits.xensource.com/oss-xen/release/3.4.1/xen-3.4.1.tar.gz
linux-2.6.29-xen-r4-aka-suse-xenified-2.6.29-62.1: here
download these packages and unzip them.
Installation:
1. Install Xen:
# sh ./install.sh
1. Install Xen:
Copy all the content of xen to “/usr/src/xen/3.4.1/xen-3.4.1/”
$ make world # make install
2. Install Kernel
The .config file I used can be downloaded here: https://sites.google.com/a/pkill.info/pkill/home/kernel-dom0/kernel_config_xen_zma?attredirects=0&d=1
My .config file can be used directly. Or menuconfig can be used:
# 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:
# make # make modules_install install
3. Create a Grub entry:
title xen 3.4.1 - kernel 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=UUID=ac0c173e-abca-4795-a7d6-23444e730d40
module /initrd-2.6.29-xen-r4.img
The “root=UUID=ac0c173e-abca-4795-a7d6-23444e730d40″ will be different depending on the partitions of the system.
4. Add xend and xendomains to services that automatically start when system boot.
# chkconfig --add xend # chkconfig --add xendomains # chkconfig --list | grep xend 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
Then boot the system in the xen environment. the xm should can be used:
# xm info host : lgcpu3 release : 2.6.29-xen-r4 version : #2 SMP Wed Sep 16 11:10:45 EDT 2009 machine : x86_64 nr_cpus : 16 nr_nodes : 1 cores_per_socket : 4 threads_per_core : 2 cpu_mhz : 2933 hw_caps : bfebfbff:28100800:00000000:00000340:009ce3bd:00000000:00000001:00000000 virt_caps : hvm total_memory : 16373 free_memory : 127 node_to_cpu : node0:0-15 node_to_memory : node0:127 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.1 20090725 (Red Hat 4.4.1-2) (GCC) cc_compile_by : root cc_compile_domain : ibm.net cc_compile_date : Wed Sep 16 08:17:31 EDT 2009 xend_config_format : 4
# xm list Name ID Mem VCPUs State Time(s) Domain-0 0 16043 16 r----- 3903.8
Then xm can be used to create and manage virtual machines on the server.
Problems:
There are problems with ipv6 modules.
If ipv6 is not used, just diable it:
In /etc/modprobe.conf
add:
alias net-pf-10 off
alias ipv6 off
Problems:
Some time some CPU stuck! We can get a message like this from Dom0:
“soft lockup – CPU#x stuck for xxx s!”
There is a trick to by pass this problem:
Change in the /etc/xen/xend-config.sxp file the line
- (dom0-cpus 0) + (dom0-cpus 1)
The Dom0 will switch to UP mode from SMP mode.
Updated on 17 Jan. 2010. Add another platform.
Updated on 26 Feb. 2010. Change format.
Read more:
- Setting up Stable Xen Dom0 with Fedora: Xen 4.0.1 with Xenified Linux Kernel 2.6.32.13 in Fedora 12
- Setting up Stable Xen Dom0 with Fedora: Xen 3.4.3 with Xenified Linux Kernel 2.6.32.13 in Fedora 12
- Setting up Stable Xen Dom0 with Fedora: Xen 3.4.2 with Xenified Linux Kernel 2.6.32.13 in Fedora 12
- Setting up Stable Xen Dom0 with Fedora: Xen 3.4.3 with Xenified Linux Kernel 2.6.31.12 in Fedora 12
- Setting up Stable Xen Dom0 with Fedora: Xen 4.0.0 with Xenified Linux Kernel 2.6.32.13 in Fedora 12
- Setting up Xen Dom0 on Fedora : Xen 3.4.1 with Linux Kernel 2.6.29 on Fedora 12
















Nice tutorial! Hope it works with Fedora 12 as well!
Keep up the good work!
mad mad mod
Updated on 24-Nov-2009.
Add one trick to solve the problem that CPU stuck for many seconds.
Nice tutorial, will give it a try.
However, I wonder how do you deal with updates, especially those that do kernel updates?
@Carsten
Thanks!
As Kernel and Xen are installed manually, I must compile and install the new version of them again when I want to upgrade. So I am eager to see that Fedora supports Dom0 again.
Great tut, I am in the process of setting up Fedora 13 and attempting to get xen going.
@249 designs
Please use this post: http://pkill.info/b/1535/setting-up-xen-pvops-dom0-on-fedora-xen-3-4-2-kernel-2-6-31-with-paravirt_ops-in-fedora-12/
I believe the newer pv_ops enabled kernel has already be released.
[...] refer to here for the platform of this [...]