<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>PKILL.info &#187; dom0</title>
	<atom:link href="http://pkill.info/b/tag/dom0/feed/" rel="self" type="application/rss+xml" />
	<link>http://pkill.info/b</link>
	<description>Solutions, tutorials and tips</description>
	<lastBuildDate>Thu, 09 Sep 2010 02:13:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Setting up Stable Xen Dom0 with Fedora: Xen 3.4.3 with Xenified Linux Kernel 2.6.32.13 in Fedora 12</title>
		<link>http://pkill.info/b/2405/setting-up-stable-xen-dom0-with-fedora-xen-3-4-3-with-xenified-linux-kernel-2-6-32-13-in-fedora-12/</link>
		<comments>http://pkill.info/b/2405/setting-up-stable-xen-dom0-with-fedora-xen-3-4-3-with-xenified-linux-kernel-2-6-32-13-in-fedora-12/#comments</comments>
		<pubDate>Fri, 27 Aug 2010 00:55:23 +0000</pubDate>
		<dc:creator>Zhiqiang Ma</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[client config]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[dom0]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[server config]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[xen]]></category>

		<guid isPermaLink="false">http://pkill.info/b/?p=2405</guid>
		<description><![CDATA[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. 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 [...]

<b>Read more:</b><ul><li><a href='http://pkill.info/b/2412/setting-up-stable-xen-dom0-with-fedora-xen-4-0-1-with-xenified-linux-kernel-2-6-32-13-in-fedora-12/' rel='bookmark' title='Permanent Link: 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 4.0.1 with Xenified Linux Kernel 2.6.32.13 in Fedora 12</a></li>
<li><a href='http://pkill.info/b/2388/setting-up-stable-xen-dom0-with-fedora-xen-3-4-with-xenified-linux-kernel-2-6-32-13-in-fedora-12/' rel='bookmark' title='Permanent Link: 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.2 with Xenified Linux Kernel 2.6.32.13 in Fedora 12</a></li>
<li><a href='http://pkill.info/b/2356/setting-up-stable-xen-dom0-with-fedora-xen-3-4-3-with-xenified-linux-kernel-2-6-31-12-in-fedora-12/' rel='bookmark' title='Permanent Link: 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 3.4.3 with Xenified Linux Kernel 2.6.31.12 in Fedora 12</a></li>
</ul>]]></description>
			<content:encoded><![CDATA[<p>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.</p>
<p>How to set up Xen Dom0 with <em>Xenified</em> 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&#8217;s DomUs have been tested on this platform.</p>
<h3>Hardware:</h3>
<p>Dom0&#8242;s hardware platform:</p>
<p>Motherboard<em>: INTEL S5500BC S5500 Quad Core Xeon Server Board</em><br />
CPU<em>: 2 x Intel Quad Core Xeon E5520 2.26G (5.86GT/sec,8M,Socket  1366)</em><br />
Memory<em>: 8 x Kingston DDR-3 1333MHz 4GB ECC REG. CL9 DIMM  w/Parity &amp;  Thermal Sensor</em><br />
HD<em>: 4 x WD WD10EARS 1 TB, SATA II 3Gb/s, 64 MB Cache</em></p>
<h3>Linux system:</h3>
<p>Fedora 12 x86_64</p>
<p>SELinux is disabled. Please refer here for detail: <a href="http://pkill.info/b/1233/disable-selinux-in-fedora/" target="_blank">Disabled SELinux on Fedora</a>.</p>
<p><em>ext3</em> is recommended for the file system of disk partition for <em>/boot</em>.</p>
<p>Update the system:</p>
<pre># yum update</pre>
<p>The Xen and libvirt packages in Fedora should not be installed to avoid conflict.</p>
<pre># yum erase xen* libvirt</pre>
<h3>Build and install Xen hypervisor and tools</h3>
<h4>Download Xen 3.4.3</h4>
<pre>$ 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</pre>
<h4>Build Xen and tools</h4>
<p>You may need to install packages depended by this. You can try this for solving the dependencies:</p>
<pre>#yum install make gcc -y; \
yum groupinstall "Development Libraries" -y; \
yum groupinstall "Development Tools" -y; \
yum install transfig texi2html \
dev86 glibc-devel \
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 -y</pre>
<p>The we can make Xen and Xen tools:</p>
<pre>$ make xen
$ make tools</pre>
<h4>Install Xen and tools</h4>
<pre>$ make install-xen
$ make install-tools</pre>
<h3>Build and install xenified Linux kernel</h3>
<h4>Download Linux kernel 2.6.32.13</h4>
<pre class="prettyprint">$ 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</pre>
<h4>Download 2.6.32 Xen patches v2</h4>
<pre class="prettyprint">$ 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</pre>
<h4>Apply Xen patches</h4>
<p>Apply all the patches downloaded above following the patch number.</p>
<p>You may need to install <em>patch</em> if it isn&#8217;t installed:</p>
<pre># yum install patch</pre>
<p>This patch.sh script can be used (we assume the patch and the kernel are in the same directory):</p>
<p><em>patch.sh:</em></p>
<pre class="prettyprint">#!/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</pre>
<p>Put this script into Linux source directory and execute:</p>
<pre class="prettyprint">$ sh ./patch.sh</pre>
<h4>Configure Xenified Linux kernel</h4>
<p>A working configuration file that I used can be downloaded directly from here:</p>
<p><a href="https://docs.google.com/a/pkill.info/uc?id=0BxXe2zOqYbxmN2FkZTE3NmItNzI2Yi00MzcxLTkzYTQtMjE3NDBiZjMxNTFj&amp;export=download&amp;hl=en">config-for-xenified-linux-2.6.32.13</a></p>
<p>Just download this file, put it into the kernel source code file directory and rename it to <em>.config</em> .</p>
<p>Other than use my configuration file, you can also configure it by yourself by using “<em>make menuconfig”</em>.</p>
<p>Make sure you build the kernel with these components enabled:</p>
<pre>Processor type and features  ---&gt;
 [*] Symmetric multi-processing support
 [*] Support sparse irq numbering
<strong> [*] Enable Xen compatible kernel</strong>
<strong></strong>
Device Drivers  ---&gt;
 XEN  ---&gt;
<strong> [*] Privileged Guest (domain 0)</strong>
 &lt;*&gt; Backend driver support (NEW)
 &lt;*&gt;   Block-device backend driver (NEW)
 &lt;*&gt;   Block-device tap backend driver (NEW)
<strong> &lt; &gt;   Block-device tap backend driver 2 (NEW)</strong>
<strong> &lt;*&gt;   Network-device backend driver (NEW)</strong>
 (8)     Maximum simultaneous transmit requests (as a power of 2) (NEW)
 [ ]     Pipelined transmitter (DANGEROUS) (NEW)
 &lt; &gt;     Network-device loopback driver (NEW)
<strong> &lt; &gt;   PCI-device backend driver (NEW)</strong>
 &lt; &gt;   TPM-device backend driver (NEW)
 &lt;M&gt;   SCSI backend driver (NEW)
 &lt;M&gt;   USB backend driver (NEW)
 &lt;M&gt; Block-device frontend driver
 &lt;M&gt; Network-device frontend driver
 &lt;M&gt;   Network-device frontend driver acceleration for Solarflare NICs (NEW)
 &lt;M&gt; SCSI frontend driver (NEW)
 &lt;M&gt; USB frontend driver (NEW)
 [*]   Taking the HCD statistics (for debug) (NEW)
 [ ]   HCD suspend/resume support (DO NOT USE) (NEW)
 &lt;*&gt; User-space granted page access driver (NEW)
 &lt;*&gt; Framebuffer-device frontend driver (NEW)
 &lt;*&gt;   Keyboard-device frontend driver (NEW)
 [*] Disable serial port drivers (NEW)
 &lt;*&gt; Export Xen attributes in sysfs (NEW)
 (256) Number of guest devices (NEW)
<strong> Xen version compatibility (no compatibility code)  ---&gt;</strong>
 [*] Place shared vCPU info in per-CPU storage (NEW)</pre>
<h4>Build kernel</h4>
<pre>$ make -jX</pre>
<p><em>X</em> can be two times of the number of the processor. We use this to let <em>make</em> invoke compilation work in X-way<em> </em>parallel.</p>
<h4>Install modules and kernel</h4>
<pre class="prettyprint"># make modules_install install</pre>
<h3>Configure grub</h3>
<p>Add one entry for Xen in <em>/boot/grub/grub.conf</em>. This is an example entry:</p>
<pre class="prettyprint">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</pre>
<p>The root and other parameters may be different depending on the configuration.</p>
<h3>Make Xend and Xendomains services automatically start when system boots</h3>
<pre># cd /etc/init.d/
# chkconfig --add xend
# chkconfig --add xendomains</pre>
<p>Check whether Xend and Xendomains services are automatically started in level 3-5:</p>
<pre># chkconfig --list | grep xend</pre>
<p>It should be like this:</p>
<pre>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</pre>
<h3>Enjoy the fun now!</h3>
<p>After booting the system, you can try to use <em>xm</em> to check xen info</p>
<pre># xm info</pre>
<p>Then <em>xm</em> command can be used to start up DomUs.</p>
<p>This is one working configuration file for one DomU that I use:</p>
<pre class="prettyprint">name="10.0.1.201"
vcpus=2
memory=2048
disk = ['tap:aio:/lhome/xen/vm-10.0.1.201/vmdisk0,xvda,w' ]
# disk = ['file:/lhome/xen/vm-10.0.1.201/vmdisk0,xvda,w' ]
vif = ['bridge=eth0']
bootloader = "/usr/bin/pygrub"
on_reboot = 'restart'
on_crash = 'restart'</pre>
<p>Here we use the <em>blktap </em>backed VBD device which has much better performance than Linux blkback backed VBD device.</p>
<h3>Making the performance more stable</h3>
<p>Allocating dedicated CPU core and memory for Dom0 may provide more stable performance for the Xen platform. Please refer to <a href="http://pkill.info/b/2258/managing-xen-dom0s-cpu-and-memory/" target="_blank">Managing Xen Dom0&#8242;s CPU and Memory/</a> for detailed instruction.</p>
<h3>Problems</h3>
<p>A list of common problems and tips can be found in <a href="http://pkill.info/b/2354/problems-during-installing-xen-dom0-in-fedora/" target="_blank">Problems during Installing Xen Dom0 in Fedora</a>.</p>
<p>Please refer to<br />
<a href="http://pkill.info/b/2367/xen-solutions/">Xen solution</a><br />
for the DomU solution and more Xen Dom0 solution.</p>
<p><span style="font-size: x-small;"><strong>Update history</strong><br />
Sep. 3, 2010. blktap driver is used instead of blktap2; PCI backend driver is disabled.<br />
Sep. 8, 2010. Add install patch; highlight PCI part in make menuconfig.<br />
</span></p>


<b>Read more:</b><ul><li><a href='http://pkill.info/b/2412/setting-up-stable-xen-dom0-with-fedora-xen-4-0-1-with-xenified-linux-kernel-2-6-32-13-in-fedora-12/' rel='bookmark' title='Permanent Link: 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 4.0.1 with Xenified Linux Kernel 2.6.32.13 in Fedora 12</a></li>
<li><a href='http://pkill.info/b/2388/setting-up-stable-xen-dom0-with-fedora-xen-3-4-with-xenified-linux-kernel-2-6-32-13-in-fedora-12/' rel='bookmark' title='Permanent Link: 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.2 with Xenified Linux Kernel 2.6.32.13 in Fedora 12</a></li>
<li><a href='http://pkill.info/b/2356/setting-up-stable-xen-dom0-with-fedora-xen-3-4-3-with-xenified-linux-kernel-2-6-31-12-in-fedora-12/' rel='bookmark' title='Permanent Link: 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 3.4.3 with Xenified Linux Kernel 2.6.31.12 in Fedora 12</a></li>
</ul>]]></content:encoded>
			<wfw:commentRss>http://pkill.info/b/2405/setting-up-stable-xen-dom0-with-fedora-xen-3-4-3-with-xenified-linux-kernel-2-6-32-13-in-fedora-12/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting up Stable Xen Dom0 with Fedora: Xen 4.0.1 with Xenified Linux Kernel 2.6.32.13 in Fedora 12</title>
		<link>http://pkill.info/b/2412/setting-up-stable-xen-dom0-with-fedora-xen-4-0-1-with-xenified-linux-kernel-2-6-32-13-in-fedora-12/</link>
		<comments>http://pkill.info/b/2412/setting-up-stable-xen-dom0-with-fedora-xen-4-0-1-with-xenified-linux-kernel-2-6-32-13-in-fedora-12/#comments</comments>
		<pubDate>Thu, 26 Aug 2010 18:51:15 +0000</pubDate>
		<dc:creator>Zhiqiang Ma</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[client config]]></category>
		<category><![CDATA[dom0]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[server config]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[xen]]></category>

		<guid isPermaLink="false">http://pkill.info/b/?p=2412</guid>
		<description><![CDATA[Please refer to Xen solution for the more latest stable Xen Dom0 solution. &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- How to set up Xen Dom0 with Xenified Linux kernel in Fedora 12 will be introduced in this post. We use Xen 4.0.1 from xen.org and Xenified Linux kernel 2.6.32.13. This solution have been tested quite stable in our cluster. Hardware: [...]

<b>Read more:</b><ul><li><a href='http://pkill.info/b/2405/setting-up-stable-xen-dom0-with-fedora-xen-3-4-3-with-xenified-linux-kernel-2-6-32-13-in-fedora-12/' rel='bookmark' title='Permanent Link: 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.3 with Xenified Linux Kernel 2.6.32.13 in Fedora 12</a></li>
<li><a href='http://pkill.info/b/2388/setting-up-stable-xen-dom0-with-fedora-xen-3-4-with-xenified-linux-kernel-2-6-32-13-in-fedora-12/' rel='bookmark' title='Permanent Link: 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.2 with Xenified Linux Kernel 2.6.32.13 in Fedora 12</a></li>
<li><a href='http://pkill.info/b/2356/setting-up-stable-xen-dom0-with-fedora-xen-3-4-3-with-xenified-linux-kernel-2-6-31-12-in-fedora-12/' rel='bookmark' title='Permanent Link: 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 3.4.3 with Xenified Linux Kernel 2.6.31.12 in Fedora 12</a></li>
</ul>]]></description>
			<content:encoded><![CDATA[<p>Please refer to<br />
<a href="http://pkill.info/b/2367/xen-solutions/">Xen solution</a><br />
for the more latest stable Xen Dom0 solution.<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
How to set up Xen Dom0 with <em>Xenified</em> Linux kernel in Fedora 12 will be introduced in this post. We use Xen 4.0.1 from xen.org and Xenified Linux kernel 2.6.32.13. This solution have been tested quite stable in our cluster.</p>
<h3>Hardware:</h3>
<p>Dom0&#8242;s hardware platform:</p>
<p>Motherboard<em>: INTEL S5500BC S5500 Quad Core Xeon Server Board</em><br />
CPU<em>: 2 x Intel Quad Core Xeon E5520 2.26G (5.86GT/sec,8M,Socket  1366)</em><br />
Memory<em>: 8 x Kingston DDR-3 1333MHz 4GB ECC REG. CL9 DIMM  w/Parity &amp;  Thermal Sensor</em><br />
HD<em>: 4 x WD WD10EARS 1 TB, SATA II 3Gb/s, 64 MB Cache</em></p>
<h3>Linux system:</h3>
<p>Fedora 12 x86_64</p>
<p>SELinux is disabled. Please refer here for detail: <a href="http://pkill.info/b/1233/disable-selinux-in-fedora/" target="_blank">Disabled SELinux on Fedora</a>.</p>
<p><em>ext3</em> is recommended for the file system of disk partition for <em>/boot</em>.</p>
<p>Update the system:</p>
<pre class="prettyprint"># yum update</pre>
<p>The Xen and libvirt packages in Fedora should not be installed to avoid conflict.</p>
<pre class="prettyprint"># yum erase xen* libvirt</pre>
<h3>Build and install Xen hypervisor and tools</h3>
<h4>Download Xen 4.0.1</h4>
<pre class="prettyprint">$ wget http://bits.xensource.com/oss-xen/release/4.0.1/xen-4.0.1.tar.gz
$ tar xf xen-4.0.1.tar.gz</pre>
<h4>Build Xen and tools</h4>
<pre class="prettyprint">$ make xen
$ make tools</pre>
<p>You may need to install packages depended by this. You can try this for solving the dependencies:</p>
<pre># yum groupinstall "Development Libraries" -y; \
yum groupinstall "Development Tools" -y; \
yum install transfig texi2html \
libaio-devel dev86 glibc-devel \
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 -y</pre>
<h4>Install Xen and tools</h4>
<pre class="prettyprint">$ make install-xen
$ make install-tools</pre>
<h3>Build and install xenified Linux kernel</h3>
<h4>Download Linux kernel 2.6.32.13</h4>
<pre class="prettyprint">$ 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</pre>
<h4>Download 2.6.32 Xen patches v2</h4>
<pre class="prettyprint">$ 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</pre>
<h4>Apply Xen patches</h4>
<p>Apply all the patches downloaded above following the patch number. This patch.sh script can be used (we assume the patch and the kernel are in the same directory):</p>
<p>patch.sh:</p>
<pre class="prettyprint">#!/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</pre>
<p>Put this script into Linux source directory and execute:</p>
<pre class="prettyprint">$ sh ./patch.sh</pre>
<h4>Configure Xenified Linux kernel</h4>
<p>A working configuration file that I used can be downloaded directly from here:</p>
<p><a href="https://docs.google.com/leaf?id=0BxXe2zOqYbxmZDMwZGQxMTAtNTVlOS00YTU2LTkyYTEtZmY2MGRhNDc5Nzll&amp;hl=en" target="_blank">config-for-xenified-linux-2.6.32.13</a></p>
<p>Just download this file, put it into the kernel source code file directory and rename it to <em>.config</em> .</p>
<p>Other than use my configuration file, you can also configure it by yourself by using “<em>make menuconfig”</em>.</p>
<p>Make sure you build the kernel with these components enabled:</p>
<pre>Processor type and features  ---&gt;
 [*] Symmetric multi-processing support
 [*] Support sparse irq numbering
<strong> [*] Enable Xen compatible kernel</strong>
<strong> Preemption Model (No Forced Preemption (Server))  ---&gt;</strong>

Device Drivers  ---&gt;
 XEN  ---&gt;
<strong> [*] Privileged Guest (domain 0)</strong>
 &lt;*&gt; Backend driver support (NEW)
 &lt;*&gt;   Block-device backend driver (NEW)
 &lt;*&gt;   Block-device tap backend driver (NEW)
<strong> &lt;*&gt;   Block-device tap backend driver 2 (NEW)</strong>
<strong> &lt;*&gt;   Network-device backend driver (NEW)</strong>
 (8)     Maximum simultaneous transmit requests (as a power of 2) (NEW)
 [ ]     Pipelined transmitter (DANGEROUS) (NEW)
 &lt; &gt;     Network-device loopback driver (NEW)
 &lt;*&gt;   PCI-device backend driver (NEW)
 PCI Backend Mode (Virtual PCI)  ---&gt;
 [ ]     PCI Backend Debugging (NEW)
 &lt; &gt;   TPM-device backend driver (NEW)
 &lt;M&gt;   SCSI backend driver (NEW)
 &lt;M&gt;   USB backend driver (NEW)
 &lt;M&gt; Block-device frontend driver
 &lt;M&gt; Network-device frontend driver
 &lt;M&gt;   Network-device frontend driver acceleration for Solarflare NICs (NEW)
 &lt;M&gt; SCSI frontend driver (NEW)
 &lt;M&gt; USB frontend driver (NEW)
 [*]   Taking the HCD statistics (for debug) (NEW)
 [ ]   HCD suspend/resume support (DO NOT USE) (NEW)
 &lt;*&gt; User-space granted page access driver (NEW)
 &lt;*&gt; Framebuffer-device frontend driver (NEW)
 &lt;*&gt;   Keyboard-device frontend driver (NEW)
 [*] Disable serial port drivers (NEW)
 &lt;*&gt; Export Xen attributes in sysfs (NEW)
 (256) Number of guest devices (NEW)
<strong> Xen version compatibility (no compatibility code)  ---&gt;</strong>
 [*] Place shared vCPU info in per-CPU storage (NEW)</pre>
<h4>Build kernel</h4>
<pre>$ make -j16</pre>
<h4>Install modules and kernel</h4>
<pre class="prettyprint"># make modules_install install</pre>
<h3>Configure grub</h3>
<p>Add one entry for Xen in <em>/boot/grub/grub.conf</em>. This is an example entry:</p>
<pre class="prettyprint">title Xen 4.0.1 - Xenified Linux 2.6.32.13
  root (hd0,0)
  kernel /xen-4.0.1.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</pre>
<p>The root and other parameters may be different depending on the configuration.</p>
<h3>Make Xend and Xendomains services automatically start when system boots</h3>
<pre># cd /etc/init.d/
# chkconfig --add xend
# chkconfig --add xendomains</pre>
<p>Check whether Xend and Xendomains services are automatically started in level 3-5:</p>
<pre class="prettyprint"># chkconfig --list | grep xend</pre>
<p>It should be like this:</p>
<pre class="prettyprint">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</pre>
<h3>Enjoy the fun now!</h3>
<p>After booting the system, you can try to use <em>xm</em> to check xen info</p>
<pre class="prettyprint"># xm info</pre>
<p>Then <em>xm</em> command can be used to start up DomUs.</p>
<p>This is one working configuration file for one DomU that I use:</p>
<pre class="prettyprint">name="10.0.1.201"
vcpus=2
memory=16384
disk = ['tap:aio:/lhome/xen/vm-10.0.1.201/vmdisk0,xvda,w' ]
# disk = ['file:/lhome/xen/vm-10.0.1.201/vmdisk0,xvda,w' ]
vif = ['bridge=eth0']
bootloader = "/usr/bin/pygrub"
on_reboot = 'restart'
on_crash = 'restart'</pre>
<p>Here we use the <em>blktap </em>backed VBD device which has much better performance than Linux blkback backed VBD device.</p>
<h3>Making the performance more stable</h3>
<p>Allocating dedicated CPU core and memory for Dom0 may provide more stable performance for the Xen platform. Please refer to <a href="http://pkill.info/b/2258/managing-xen-dom0s-cpu-and-memory/" target="_blank">Managing Xen Dom0&#8242;s CPU and Memory/</a> for detailed instruction.</p>
<h3>Problems</h3>
<p>Problems and solutions can be found here: <a href="http://pkill.info/b/2354/problems-during-installing-xen-dom0-in-fedora/" target="_blank">Problems during Installing Xen Dom0 in Fedora</a></p>
<p><span style="font-size: x-small;"><strong> </strong><br />
</span></p>


<b>Read more:</b><ul><li><a href='http://pkill.info/b/2405/setting-up-stable-xen-dom0-with-fedora-xen-3-4-3-with-xenified-linux-kernel-2-6-32-13-in-fedora-12/' rel='bookmark' title='Permanent Link: 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.3 with Xenified Linux Kernel 2.6.32.13 in Fedora 12</a></li>
<li><a href='http://pkill.info/b/2388/setting-up-stable-xen-dom0-with-fedora-xen-3-4-with-xenified-linux-kernel-2-6-32-13-in-fedora-12/' rel='bookmark' title='Permanent Link: 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.2 with Xenified Linux Kernel 2.6.32.13 in Fedora 12</a></li>
<li><a href='http://pkill.info/b/2356/setting-up-stable-xen-dom0-with-fedora-xen-3-4-3-with-xenified-linux-kernel-2-6-31-12-in-fedora-12/' rel='bookmark' title='Permanent Link: 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 3.4.3 with Xenified Linux Kernel 2.6.31.12 in Fedora 12</a></li>
</ul>]]></content:encoded>
			<wfw:commentRss>http://pkill.info/b/2412/setting-up-stable-xen-dom0-with-fedora-xen-4-0-1-with-xenified-linux-kernel-2-6-32-13-in-fedora-12/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Setting up Stable Xen Dom0 with Fedora: Xen 3.4.2 with Xenified Linux Kernel 2.6.32.13 in Fedora 12</title>
		<link>http://pkill.info/b/2388/setting-up-stable-xen-dom0-with-fedora-xen-3-4-with-xenified-linux-kernel-2-6-32-13-in-fedora-12/</link>
		<comments>http://pkill.info/b/2388/setting-up-stable-xen-dom0-with-fedora-xen-3-4-with-xenified-linux-kernel-2-6-32-13-in-fedora-12/#comments</comments>
		<pubDate>Wed, 25 Aug 2010 05:21:24 +0000</pubDate>
		<dc:creator>Zhiqiang Ma</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[dom0]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[server config]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[xen]]></category>

		<guid isPermaLink="false">http://pkill.info/b/?p=2388</guid>
		<description><![CDATA[Please refer to Xen solution for the more latest stable Xen Dom0 solution. How to set up Xen Dom0 with Xenified Linux kernel in Fedora 12 will be introduced in this post. We use Xen 3.4.2 from xen.org and Xenified Linux kernel 2.6.32.13. This is a very stable Dom0 solution for Fedora 12. Lot&#8217;s DomUs [...]

<b>Read more:</b><ul><li><a href='http://pkill.info/b/2356/setting-up-stable-xen-dom0-with-fedora-xen-3-4-3-with-xenified-linux-kernel-2-6-31-12-in-fedora-12/' rel='bookmark' title='Permanent Link: 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 3.4.3 with Xenified Linux Kernel 2.6.31.12 in Fedora 12</a></li>
<li><a href='http://pkill.info/b/2405/setting-up-stable-xen-dom0-with-fedora-xen-3-4-3-with-xenified-linux-kernel-2-6-32-13-in-fedora-12/' rel='bookmark' title='Permanent Link: 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.3 with Xenified Linux Kernel 2.6.32.13 in Fedora 12</a></li>
<li><a href='http://pkill.info/b/2412/setting-up-stable-xen-dom0-with-fedora-xen-4-0-1-with-xenified-linux-kernel-2-6-32-13-in-fedora-12/' rel='bookmark' title='Permanent Link: 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 4.0.1 with Xenified Linux Kernel 2.6.32.13 in Fedora 12</a></li>
</ul>]]></description>
			<content:encoded><![CDATA[<p>Please refer to<br />
<a href="http://pkill.info/b/2367/xen-solutions/">Xen solution</a><br />
for the more latest stable Xen Dom0 solution.</p>
<hr />
How to set up Xen Dom0 with <em>Xenified</em> Linux kernel in Fedora 12 will be introduced in this post. We use Xen 3.4.2 from xen.org and Xenified Linux kernel 2.6.32.13. This is a very stable Dom0 solution for Fedora 12. Lot&#8217;s DomUs have been tested on this platform.</p>
<h3>Hardware:</h3>
<p>Dom0&#8242;s hardware platform:</p>
<p>Motherboard<em>: INTEL S5500BC S5500 Quad Core Xeon Server Board</em><br />
CPU<em>: 2 x Intel Quad Core Xeon E5520 2.26G (5.86GT/sec,8M,Socket  1366)</em><br />
Memory<em>: 8 x Kingston DDR-3 1333MHz 4GB ECC REG. CL9 DIMM  w/Parity &amp;  Thermal Sensor</em><br />
HD<em>: 4 x WD WD10EARS 1 TB, SATA II 3Gb/s, 64 MB Cache</em></p>
<h3>Linux system:</h3>
<p>Fedora 12 x86_64</p>
<p>SELinux is disabled. Please refer here for detail: <a href="http://pkill.info/b/1233/disable-selinux-in-fedora/" target="_blank">Disabled SELinux on Fedora</a>.</p>
<p><em>ext3</em> is recommended for the file system of disk partition for <em>/boot</em>.</p>
<p>Update the system:</p>
<pre># yum update</pre>
<p>The Xen and libvirt packages in Fedora should not be installed to avoid conflict.</p>
<pre># yum erase xen* libvirt</pre>
<h3>Build and install Xen hypervisor and tools</h3>
<h4>Download Xen 3.4.2</h4>
<pre>$ wget http://bits.xensource.com/oss-xen/release/3.4.2/xen-3.4.2.tar.gz
$ tar xf xen-3.4.2.tar.gz</pre>
<h4>Build Xen and tools</h4>
<pre>$ make xen
$ make tools</pre>
<p>You may need to install packages depended by this. You can try this for solving the dependencies:</p>
<pre># yum groupinstall "Development Libraries"; \
yum groupinstall "Development Tools"; \
yum install transfig texi2html \
libaio-devel dev86 glibc-devel \
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</pre>
<h4>Install Xen and tools</h4>
<pre>$ make install-xen
$ make install-tools</pre>
<h3>Build and install xenified Linux kernel</h3>
<h4>Download Linux kernel 2.6.32.13</h4>
<pre class="prettyprint">$ 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</pre>
<h4>Download 2.6.32 Xen patches v2</h4>
<pre class="prettyprint">$ 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</pre>
<h4>Apply Xen patches</h4>
<p>Apply all the patches downloaded above following the patch number. This patch.sh script can be used (we assume the patch and the kernel are in the same directory):</p>
<p>patch.sh:</p>
<pre class="prettyprint">#!/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</pre>
<p>Put this script into Linux source directory and execute:</p>
<pre class="prettyprint">$ sh ./patch.sh</pre>
<h4>Configure Xenified Linux kernel</h4>
<p>A working configuration file that I used can be downloaded directly from here:</p>
<p><a href="https://docs.google.com/leaf?id=0BxXe2zOqYbxmZDMwZGQxMTAtNTVlOS00YTU2LTkyYTEtZmY2MGRhNDc5Nzll&amp;hl=en" target="_blank">config-for-xenified-linux-2.6.32.13</a></p>
<p>Just download this file, put it into the kernel source code file directory and rename it to <em>.config</em> .</p>
<p>Other than use my configuration file, you can also configure it by yourself by using “<em>make menuconfig”</em>.</p>
<p>Make sure you build the kernel with these components enabled:</p>
<pre>Processor type and features  ---&gt;
 [*] Symmetric multi-processing support
 [*] Support sparse irq numbering
<strong> [*] Enable Xen compatible kernel</strong>
<strong> Preemption Model (No Forced Preemption (Server))  ---&gt;</strong>

Device Drivers  ---&gt;
 XEN  ---&gt;
<strong> [*] Privileged Guest (domain 0)</strong>
 &lt;*&gt; Backend driver support (NEW)
 &lt;*&gt;   Block-device backend driver (NEW)
 &lt;*&gt;   Block-device tap backend driver (NEW)
<strong> &lt;*&gt;   Block-device tap backend driver 2 (NEW)</strong>
<strong> &lt;*&gt;   Network-device backend driver (NEW)</strong>
 (8)     Maximum simultaneous transmit requests (as a power of 2) (NEW)
 [ ]     Pipelined transmitter (DANGEROUS) (NEW)
 &lt; &gt;     Network-device loopback driver (NEW)
 &lt;*&gt;   PCI-device backend driver (NEW)
 PCI Backend Mode (Virtual PCI)  ---&gt;
 [ ]     PCI Backend Debugging (NEW)
 &lt; &gt;   TPM-device backend driver (NEW)
 &lt;M&gt;   SCSI backend driver (NEW)
 &lt;M&gt;   USB backend driver (NEW)
 &lt;M&gt; Block-device frontend driver
 &lt;M&gt; Network-device frontend driver
 &lt;M&gt;   Network-device frontend driver acceleration for Solarflare NICs (NEW)
 &lt;M&gt; SCSI frontend driver (NEW)
 &lt;M&gt; USB frontend driver (NEW)
 [*]   Taking the HCD statistics (for debug) (NEW)
 [ ]   HCD suspend/resume support (DO NOT USE) (NEW)
 &lt;*&gt; User-space granted page access driver (NEW)
 &lt;*&gt; Framebuffer-device frontend driver (NEW)
 &lt;*&gt;   Keyboard-device frontend driver (NEW)
 [*] Disable serial port drivers (NEW)
 &lt;*&gt; Export Xen attributes in sysfs (NEW)
 (256) Number of guest devices (NEW)
<strong> Xen version compatibility (no compatibility code)  ---&gt;</strong>
 [*] Place shared vCPU info in per-CPU storage (NEW)</pre>
<h4>Build kernel</h4>
<pre>$ make -j16</pre>
<h4>Install modules and kernel</h4>
<pre class="prettyprint"># make modules_install install</pre>
<h3>Configure grub</h3>
<p>Add one entry for Xen in <em>/boot/grub/grub.conf</em>. This is an example entry:</p>
<pre class="prettyprint">title Xen 3.4.2 - Xenified Linux 2.6.32.13
  root (hd0,0)
  kernel /xen-3.4.2.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</pre>
<p>The root and other parameters may be different depending on the configuration.</p>
<h3>Make Xend and Xendomains services automatically start when system boots</h3>
<pre># cd /etc/init.d/
# chkconfig --add xend
# chkconfig --add xendomains</pre>
<p>Check whether Xend and Xendomains services are automatically started in level 3-5:</p>
<pre># chkconfig --list | grep xend</pre>
<p>It should be like this:</p>
<pre>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</pre>
<h3>Enjoy the fun now!</h3>
<p>After booting the system, you can try to use <em>xm</em> to check xen info</p>
<pre># xm info</pre>
<p>Then <em>xm</em> command can be used to start up DomUs.</p>
<p>This is one working configuration file for one DomU that I use:</p>
<pre class="prettyprint">name="10.0.1.201"
vcpus=2
memory=2048
disk = ['tap:aio:/lhome/xen/vm-10.0.1.201/vmdisk0,xvda,w' ]
# disk = ['file:/lhome/xen/vm-10.0.1.201/vmdisk0,xvda,w' ]
vif = ['bridge=eth0']
bootloader = "/usr/bin/pygrub"
on_reboot = 'restart'
on_crash = 'restart'</pre>
<p>Here we use the <em>blktap </em>backed VBD device which has much better performance than Linux blkback backed VBD device.</p>
<h3>Making the performance more stable</h3>
<p>Allocating dedicated CPU core and memory for Dom0 may provide more stable performance for the Xen platform. Please refer to <a href="http://pkill.info/b/2258/managing-xen-dom0s-cpu-and-memory/" target="_blank">Managing Xen Dom0&#8242;s CPU and Memory/</a> for detailed instruction.</p>
<h3>Problems</h3>
<p>A list of common problems and tips can be found in <a href="http://pkill.info/b/2354/problems-during-installing-xen-dom0-in-fedora/" target="_blank">Problems during Installing Xen Dom0 in Fedora</a>.</p>


<b>Read more:</b><ul><li><a href='http://pkill.info/b/2356/setting-up-stable-xen-dom0-with-fedora-xen-3-4-3-with-xenified-linux-kernel-2-6-31-12-in-fedora-12/' rel='bookmark' title='Permanent Link: 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 3.4.3 with Xenified Linux Kernel 2.6.31.12 in Fedora 12</a></li>
<li><a href='http://pkill.info/b/2405/setting-up-stable-xen-dom0-with-fedora-xen-3-4-3-with-xenified-linux-kernel-2-6-32-13-in-fedora-12/' rel='bookmark' title='Permanent Link: 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.3 with Xenified Linux Kernel 2.6.32.13 in Fedora 12</a></li>
<li><a href='http://pkill.info/b/2412/setting-up-stable-xen-dom0-with-fedora-xen-4-0-1-with-xenified-linux-kernel-2-6-32-13-in-fedora-12/' rel='bookmark' title='Permanent Link: 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 4.0.1 with Xenified Linux Kernel 2.6.32.13 in Fedora 12</a></li>
</ul>]]></content:encoded>
			<wfw:commentRss>http://pkill.info/b/2388/setting-up-stable-xen-dom0-with-fedora-xen-3-4-with-xenified-linux-kernel-2-6-32-13-in-fedora-12/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting up Stable Xen Dom0 with Fedora: Xen 3.4.3 with Xenified Linux Kernel 2.6.31.12 in Fedora 12</title>
		<link>http://pkill.info/b/2356/setting-up-stable-xen-dom0-with-fedora-xen-3-4-3-with-xenified-linux-kernel-2-6-31-12-in-fedora-12/</link>
		<comments>http://pkill.info/b/2356/setting-up-stable-xen-dom0-with-fedora-xen-3-4-3-with-xenified-linux-kernel-2-6-31-12-in-fedora-12/#comments</comments>
		<pubDate>Sun, 15 Aug 2010 16:05:54 +0000</pubDate>
		<dc:creator>Zhiqiang Ma</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[dom0]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[server config]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[xen]]></category>

		<guid isPermaLink="false">http://pkill.info/b/?p=2356</guid>
		<description><![CDATA[Please refer to Xen solution for the latest stable Xen Dom0 solution. 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.31.12. Hardware: Dom0&#8242;s hardware platform: Motherboard: INTEL S5500BC S5500 Quad Core Xeon Server Board [...]

<b>Read more:</b><ul><li><a href='http://pkill.info/b/2388/setting-up-stable-xen-dom0-with-fedora-xen-3-4-with-xenified-linux-kernel-2-6-32-13-in-fedora-12/' rel='bookmark' title='Permanent Link: 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.2 with Xenified Linux Kernel 2.6.32.13 in Fedora 12</a></li>
<li><a href='http://pkill.info/b/2405/setting-up-stable-xen-dom0-with-fedora-xen-3-4-3-with-xenified-linux-kernel-2-6-32-13-in-fedora-12/' rel='bookmark' title='Permanent Link: 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.3 with Xenified Linux Kernel 2.6.32.13 in Fedora 12</a></li>
<li><a href='http://pkill.info/b/2412/setting-up-stable-xen-dom0-with-fedora-xen-4-0-1-with-xenified-linux-kernel-2-6-32-13-in-fedora-12/' rel='bookmark' title='Permanent Link: 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 4.0.1 with Xenified Linux Kernel 2.6.32.13 in Fedora 12</a></li>
</ul>]]></description>
			<content:encoded><![CDATA[<p>Please refer to</p>
<p><a href="http://pkill.info/b/2367/xen-solutions/">Xen solution</a></p>
<p>for the latest stable Xen Dom0 solution.</p>
<hr />
<p>How to set up Xen Dom0 with <em>Xenified</em> 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.31.12.</p>
<h3>Hardware:</h3>
<p>Dom0&#8242;s hardware platform:</p>
<p>Motherboard<em>: INTEL S5500BC S5500 Quad Core Xeon Server Board</em><br />
CPU<em>: 2 x Intel Quad Core Xeon E5520 2.26G (5.86GT/sec,8M,Socket  1366)</em><br />
Memory<em>: 8 x Kingston DDR-3 1333MHz 4GB ECC REG. CL9 DIMM  w/Parity &amp;  Thermal Sensor</em><br />
HD<em>: 4 x WD WD10EARS 1 TB, SATA II 3Gb/s, 64 MB Cache</em></p>
<h3>Linux system:</h3>
<p>Fedora 12 x86_64</p>
<p>SELinux is disabled. Please refer here for detail: <a href="http://pkill.info/b/1233/disable-selinux-in-fedora/" target="_blank">Disabled SELinux on Fedora</a>.</p>
<p><em>ext3</em> is recommended for the file system of disk partition for <em>/boot</em>.</p>
<p>Update the system:</p>
<pre># yum update</pre>
<p>The Xen and libvirt packages in Fedora should not be installed to avoid conflict.</p>
<pre># yum erase xen* libvirt</pre>
<h3>Build and install Xen hypervisor and tools</h3>
<h4>Download Xen 3.4.3</h4>
<pre>$ 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</pre>
<h4>Build Xen and tools</h4>
<pre>$ make xen
$ make tools</pre>
<p>You may need to install packages depended by this. You can try this for solving the dependencies:</p>
<pre># yum groupinstall "Development Libraries"; \
yum groupinstall "Development Tools"; \
yum install transfig texi2html \
libaio-devel dev86 glibc-devel \
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</pre>
<h4>Install Xen and tools</h4>
<pre>$ make install-xen
$ make install-tools</pre>
<h3>Build and install xenified Linux kernel</h3>
<h4>Download Linux kernel 2.6.31.12</h4>
<pre>$ wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.31.12.tar.bz2
$ tar xf linux-2.6.31.12.tar.bz2</pre>
<h4>Download 2.6.31 Xen patches v14</h4>
<pre>$ wget http://gentoo-xen-kernel.googlecode.com/files/xen-patches-2.6.31-14.tar.bz2
$ mkdir xen-patches-2.6.31-14
$ tar xf xen-patches-2.6.31-14.tar.bz2 -C xen-patches-2.6.31-14</pre>
<h4>Apply Xen patches</h4>
<p>Apply all the patches downloaded above following the patch number. This patch.sh script can be used (we assume the patch and the kernel are in the same directory):</p>
<p>patch.sh:</p>
<pre class="prettyprint">#!/bin/bash
for P in `ls ../xen-patches-2.6.31-14/6*.patch1 | sort`
do
    patch -p1 -s -i $P
    if [ $? = 0 ]; then
        echo $P applied
    else
        echo "Error processing "$P
        exit 1
    fi
done</pre>
<p>Put this script into Linux source directory and execute:</p>
<pre>$ sh ./patch.sh</pre>
<h4>Configure Xenified Linux kernel</h4>
<p>A working configuration file that I used can be downloaded directly from here:</p>
<p><a href="https://docs.google.com/a/pkill.info/uc?id=0BxXe2zOqYbxmM2FmODQxMzEtNmZkZS00ZTNkLWEyN2ItMDI0MjY3YTRjYTk5&amp;export=download&amp;hl=en" target="_blank">config-2.6.31.12-xenified</a></p>
<p>Just download this file, put it into the kernel source code file directory and rename it to <em>.config</em> .</p>
<p>Other than use my configuration file, you can also configure it by yourself by using “<em>make menuconfig”</em>.</p>
<p>Make sure you build the kernel with these components enabled:</p>
<pre>Processor type and features  ---&gt;
 [*] Symmetric multi-processing support
 [*] Support sparse irq numbering
<strong> [*] Enable Xen compatible kernel</strong>
<strong> </strong>
Device Drivers  ---&gt;
 XEN  ---&gt;
<strong> [*] Privileged Guest (domain 0)</strong>
 &lt;*&gt; Backend driver support (NEW)
 &lt;*&gt;   Block-device backend driver (NEW)
<strong> &lt;*&gt;   Block-device tap backend driver (NEW)</strong>
<strong> &lt;*&gt;   Block-device tap backend driver 2 (NEW)</strong>
<strong> &lt;*&gt;   Network-device backend driver (NEW)</strong>
 (8)     Maximum simultaneous transmit requests (as a power of 2) (NEW)
 [ ]     Pipelined transmitter (DANGEROUS) (NEW)
 &lt;*&gt;     Network-device loopback driver (NEW)
 &lt; &gt;   PCI-device backend driver (NEW)
 &lt; &gt;   TPM-device backend driver (NEW)
 &lt; &gt;   SCSI backend driver (NEW)
 &lt; &gt;   USB backend driver (NEW)
 &lt; &gt; Block-device frontend driver
 &lt; &gt; Network-device frontend driver
 &lt; &gt; SCSI frontend driver (NEW)
 &lt; &gt; USB frontend driver (NEW)
 &lt;*&gt; User-space granted page access driver (NEW)
 &lt;*&gt; Framebuffer-device frontend driver (NEW)
 &lt;*&gt;   Keyboard-device frontend driver (NEW)
 [*] Disable serial port drivers (NEW)
 &lt;*&gt; Export Xen attributes in sysfs (NEW)
 (256) Number of guest devices (NEW)
<strong> </strong>Xen version compatibility (3.0.2 and later)  ---&gt;</pre>
<h4>Build kernel</h4>
<pre>$ make -j16</pre>
<p>-jN: N may be 16 or other numbers depending on the number of processors in the system.</p>
<h4>Install modules and kernel</h4>
<pre># make modules_install install</pre>
<h3>Configure grub</h3>
<p>Add one entry for Xen in <em>/boot/grub/grub.conf</em>. This is an example entry:</p>
<pre>title Xen 3.4.3 - Xenified Linux 2.6.31.12
  root (hd0,0)
  kernel /xen-3.4.3.gz console=vga vga=ask noreboot
  module /vmlinuz-2.6.31.12 ro root=/dev/mapper/VolGroup-LogVol_root noiswmd LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us
  module /initramfs-2.6.31.12.img</pre>
<p>The root and other parameters may be different depending on the configuration.</p>
<h3>Make Xend and Xendomains services automatically start when system boots</h3>
<pre># cd /etc/init.d/
# chkconfig --add xend
# chkconfig --add xendomains</pre>
<p>Check whether Xend and Xendomains services are automatically started in level 3-5:</p>
<pre># chkconfig --list | grep xend</pre>
<p>It should be like this:</p>
<pre>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</pre>
<h3>Enjoy the fun now!</h3>
<p>After booting the system, you can try to use <em>xm</em> to check xen info</p>
<pre># xm info</pre>
<p>Then <em>xm</em> command can be used to start up DomUs.</p>
<p>This is one working configuration file for one DomU that I use:</p>
<pre class="prettyprint">name="10.0.1.201"
vcpus=2
memory=2048
disk = ['tap:aio:/lhome/xen/vm-10.0.1.201/vmdisk0,xvda,w' ]
# disk = ['file:/lhome/xen/vm-10.0.1.201/vmdisk0,xvda,w' ]
vif = ['bridge=eth0']
bootloader = "/usr/bin/pygrub"
on_reboot = 'restart'
on_crash = 'restart'</pre>
<p>Here we use the <em>blktap </em>backed VBD device which has much better performance than Linux blkback backed VBD device.</p>
<h3>Making the performance more stable</h3>
<p>Allocating dedicated CPU core and memory for Dom0 may provide more stable performance for the Xen platform. Please refer to <a href="http://pkill.info/b/2258/managing-xen-dom0s-cpu-and-memory/" target="_blank">Managing Xen Dom0&#8242;s CPU and Memory/</a> for detailed instruction.</p>
<h3>Problems</h3>
<p>A list of common problems and tips can be found in <a href="http://pkill.info/b/2354/problems-during-installing-xen-dom0-in-fedora/" target="_blank">Problems during Installing Xen Dom0 in Fedora</a>.</p>


<b>Read more:</b><ul><li><a href='http://pkill.info/b/2388/setting-up-stable-xen-dom0-with-fedora-xen-3-4-with-xenified-linux-kernel-2-6-32-13-in-fedora-12/' rel='bookmark' title='Permanent Link: 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.2 with Xenified Linux Kernel 2.6.32.13 in Fedora 12</a></li>
<li><a href='http://pkill.info/b/2405/setting-up-stable-xen-dom0-with-fedora-xen-3-4-3-with-xenified-linux-kernel-2-6-32-13-in-fedora-12/' rel='bookmark' title='Permanent Link: 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.3 with Xenified Linux Kernel 2.6.32.13 in Fedora 12</a></li>
<li><a href='http://pkill.info/b/2412/setting-up-stable-xen-dom0-with-fedora-xen-4-0-1-with-xenified-linux-kernel-2-6-32-13-in-fedora-12/' rel='bookmark' title='Permanent Link: 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 4.0.1 with Xenified Linux Kernel 2.6.32.13 in Fedora 12</a></li>
</ul>]]></content:encoded>
			<wfw:commentRss>http://pkill.info/b/2356/setting-up-stable-xen-dom0-with-fedora-xen-3-4-3-with-xenified-linux-kernel-2-6-31-12-in-fedora-12/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Problems during Installing Xen Dom0 in Fedora</title>
		<link>http://pkill.info/b/2354/problems-during-installing-xen-dom0-in-fedora/</link>
		<comments>http://pkill.info/b/2354/problems-during-installing-xen-dom0-in-fedora/#comments</comments>
		<pubDate>Sun, 15 Aug 2010 11:58:36 +0000</pubDate>
		<dc:creator>Zhiqiang Ma</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[dom0]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[server config]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[xen]]></category>

		<guid isPermaLink="false">http://pkill.info/b/?p=2354</guid>
		<description><![CDATA[Here is a list of problem that may occur during installing and configuring Xen Dom0 in Fedora. It is found originally in Fedora systems, but the tips in this post should also be helpful for installing Xen Dom0 on other platforms. BIOS configuration If xen stops at: “I/O virtualization disabled.” We may need to enable [...]

<b>Read more:</b><ul><li><a href='http://pkill.info/b/2405/setting-up-stable-xen-dom0-with-fedora-xen-3-4-3-with-xenified-linux-kernel-2-6-32-13-in-fedora-12/' rel='bookmark' title='Permanent Link: 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.3 with Xenified Linux Kernel 2.6.32.13 in Fedora 12</a></li>
<li><a href='http://pkill.info/b/2388/setting-up-stable-xen-dom0-with-fedora-xen-3-4-with-xenified-linux-kernel-2-6-32-13-in-fedora-12/' rel='bookmark' title='Permanent Link: 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.2 with Xenified Linux Kernel 2.6.32.13 in Fedora 12</a></li>
<li><a href='http://pkill.info/b/2356/setting-up-stable-xen-dom0-with-fedora-xen-3-4-3-with-xenified-linux-kernel-2-6-31-12-in-fedora-12/' rel='bookmark' title='Permanent Link: 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 3.4.3 with Xenified Linux Kernel 2.6.31.12 in Fedora 12</a></li>
</ul>]]></description>
			<content:encoded><![CDATA[<p>Here is a list of problem that may occur during installing and configuring Xen Dom0 in Fedora. It is found originally in Fedora systems, but the tips in this post should also be helpful for installing Xen Dom0 on other platforms.</p>
<h3>BIOS configuration</h3>
<p>If xen stops at:</p>
<p>“I/O virtualization disabled.”</p>
<p>We may need to enable VT and I/O virtualization in BIOS.</p>
<p>These options can be enabled in BIOS:</p>
<pre>Intel (R) Virtualization Technology
Intel (R) VT for Directed I/O
Interrupt Remapping
Coherency Support
ATS Support</pre>
<h3>Limited number of loop devices</h3>
<p>The default number of loop device in this kernel is 8. When we are using blkback backed VBDs and we need to have more than 8 virtual machines, we should <a href="../223/add-more-loop-device-on-linux/" target="_blank">add more loop devices</a>. You need to use the first method (pass parameter max_loop=32 to vmlinuz) if you use my kernel configuration file.</p>
<h3>initramfs related problem</h3>
<p>The <em>initramfs</em> image under /root generated by <em>dracut </em>doesn’t work on some servers. If you have the similiar problem, you can try to use image generated by <em>mkinitrd</em>:</p>
<p>1) Generate initrd-2.6.32.13.img using mkinitrd</p>
<pre>mkinitrd /boot/initrd-2.6.32.13.img 2.6.32.13</pre>
<p>2) Edit entry in <em>/boot/grub/grub.conf</em></p>
<p>Change</p>
<pre>module /initramfs-2.6.32.13.img</pre>
<p>to</p>
<pre>module /initrd-2.6.32.13.img</pre>
<h3><em>drm</em> related problem</h3>
<p>On one of our servers that uses radeon card we have experienced problem related to <em>drm</em>. The system crashes after the kernel printing out information about <em>drm.</em> We can add <em>nomodeset</em> option to kernel command line to bypass this problem.</p>
<p>The kernel command line in <em>/boot/grub.conf</em> will change to:</p>
<pre>module /vmlinuz-2.6.32.13 ro root=/dev/mapper/VolGroup-LogVol_root <strong>nomodeset</strong> noiswmd LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us</pre>
<p>If Linux kernel can&#8217;t boot even <em>nomodeset</em> has been set which may happen when use Intel i915 series hardware, a tricky solution is setting Xen&#8217;s vga option to let Xen use gfx console. This method can bypass the <em>drm</em> problem. Just replace <em>&#8220;vga=ask&#8221;</em> in Xen&#8217;s options with:</p>
<pre>vga=gfx-1280x1024x32</pre>
<p>to use 1280 x 1024 resolution with 32 bit color.</p>
<p>Xen&#8217;s graphical video mode codes are different with <a href="http://pkill.info/b/2218/configuration-of-linux-kernel-video-mode/" target="_blank">Linux Kernel&#8217;s</a>. This is a list of Xen&#8217;s <em>vga</em> option from [1]:</p>
<pre> 'vga=&lt;mode-specifier&gt;[,keep]' where &lt;mode-specifier&gt; is one of:

   'vga=ask':
      display a vga menu of available modes

   'vga=text-80x&lt;rows&gt;':
      text mode, where &lt;rows&gt; is one of {25,28,30,34,43,50,60}

   'vga=gfx-&lt;width&gt;x&lt;height&gt;x&lt;depth&gt;':
      graphics mode, e.g., vga=gfx-1024x768x16

   'vga=mode-&lt;mode&gt;:
      specifies a mode as specified in 'vga=ask' menu
      (NB. menu modes are displayed in hex, so mode numbers here must
           be prefixed with '0x' (e.g., 'vga=mode-0x0318'))

 The option 'keep' causes Xen to continue to print to the VGA console even
 after domain 0 starts to boot. The default behaviour is to relinquish
 control of the console to domain 0.
</pre>
<h3>Build kernel on 32bit platform</h3>
<p>You first need to enable PAE support if you’re building 32 bit version of the kernel. Xen only supports 32 bit PAE kernels nowadays. Xen kernel build options won’t show up if you don’t enable PAE for 32 bit builds.</p>
<p>You can enable PAE in “Processor type and features -&gt; High Memory Support (64GB) -&gt; PAE (Physical Address Extension) Support”</p>
<p>I can find Xen options after enable PAE on my laptop. I have never run Xen Dom0 on a 32bit kernel. I can’t say whether it is stable. Please try it and I will appreciate it if you share your result with me ;)</p>
<p>The <em>clocksource=jiffies </em>kernel parameter may be needed.</p>
<h3>Error message related to <em>ksm</em></h3>
<p>If you get lots error messages generated by ksm, you can disable service <em>ksm</em> and <em>ksmtuned</em> to eliminate these error messages:</p>
<pre># chkconfig ksm off
# chkconfig ksmtuned off</pre>
<h3>Xend conflicts with netplugd</h3>
<p><em>Xend</em> will report error when <em>netplugd</em> is started. <em>Xend</em> will print out a error message after about one minutes:</p>
<pre><span style="color: #000000;">/etc/xen/scripts/network-bridge: line 240: "sigerr" command not found.</span></pre>
<p>And the network interface of Linux doesn&#8217;t change. The new bridge can&#8217;t be started and the physical interface will be change name to pethx.</p>
<p>After disable <em>netplugd</em>, <em>xend </em>can start successfully:</p>
<pre># chkconfig netplugd off
</pre>
<p><strong>References</strong></p>
<p>[1] http://lists.xensource.com/archives/html/xen-changelog/2007-06/msg00206.html</p>
<p><span style="font-size: x-small;"><strong>Update history</strong><br />
Aug. 22, 2010. Add drm tricky and xen video mode; add netplugd caused problem.</span></p>


<b>Read more:</b><ul><li><a href='http://pkill.info/b/2405/setting-up-stable-xen-dom0-with-fedora-xen-3-4-3-with-xenified-linux-kernel-2-6-32-13-in-fedora-12/' rel='bookmark' title='Permanent Link: 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.3 with Xenified Linux Kernel 2.6.32.13 in Fedora 12</a></li>
<li><a href='http://pkill.info/b/2388/setting-up-stable-xen-dom0-with-fedora-xen-3-4-with-xenified-linux-kernel-2-6-32-13-in-fedora-12/' rel='bookmark' title='Permanent Link: 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.2 with Xenified Linux Kernel 2.6.32.13 in Fedora 12</a></li>
<li><a href='http://pkill.info/b/2356/setting-up-stable-xen-dom0-with-fedora-xen-3-4-3-with-xenified-linux-kernel-2-6-31-12-in-fedora-12/' rel='bookmark' title='Permanent Link: 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 3.4.3 with Xenified Linux Kernel 2.6.31.12 in Fedora 12</a></li>
</ul>]]></content:encoded>
			<wfw:commentRss>http://pkill.info/b/2354/problems-during-installing-xen-dom0-in-fedora/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Setting up Stable Xen Dom0 with Fedora: Xen 4.0.0 with Xenified Linux Kernel 2.6.32.13 in Fedora 12</title>
		<link>http://pkill.info/b/2252/setting-up-stable-xen-dom0-with-fedora-xen-4-0-0-with-xenified-linux-kernel-2-6-32-13-in-fedora-12/</link>
		<comments>http://pkill.info/b/2252/setting-up-stable-xen-dom0-with-fedora-xen-4-0-0-with-xenified-linux-kernel-2-6-32-13-in-fedora-12/#comments</comments>
		<pubDate>Mon, 26 Jul 2010 16:39:39 +0000</pubDate>
		<dc:creator>Zhiqiang Ma</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[dom0]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[server config]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[xen]]></category>

		<guid isPermaLink="false">http://pkill.info/b/?p=2252</guid>
		<description><![CDATA[Please refer to Xen solution for the more latest stable Xen Dom0 solution. How to set up Xen Dom0 with Xenified Linux kernel in Fedora 12 will be introduced in this post. We use Xen 4.0.0 from xen.org and Xenified Linux kernel 2.6.32.13. This solution have been tested quite stable in our cluster. Hardware: Dom0&#8242;s [...]

<b>Read more:</b><ul><li><a href='http://pkill.info/b/2412/setting-up-stable-xen-dom0-with-fedora-xen-4-0-1-with-xenified-linux-kernel-2-6-32-13-in-fedora-12/' rel='bookmark' title='Permanent Link: 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 4.0.1 with Xenified Linux Kernel 2.6.32.13 in Fedora 12</a></li>
<li><a href='http://pkill.info/b/2405/setting-up-stable-xen-dom0-with-fedora-xen-3-4-3-with-xenified-linux-kernel-2-6-32-13-in-fedora-12/' rel='bookmark' title='Permanent Link: 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.3 with Xenified Linux Kernel 2.6.32.13 in Fedora 12</a></li>
<li><a href='http://pkill.info/b/2388/setting-up-stable-xen-dom0-with-fedora-xen-3-4-with-xenified-linux-kernel-2-6-32-13-in-fedora-12/' rel='bookmark' title='Permanent Link: 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.2 with Xenified Linux Kernel 2.6.32.13 in Fedora 12</a></li>
</ul>]]></description>
			<content:encoded><![CDATA[<p>Please refer to<br />
<a href="http://pkill.info/b/2367/xen-solutions/">Xen solution</a><br />
for the more latest stable Xen Dom0 solution.</p>
<hr />
<p>How to set up Xen Dom0 with <em>Xenified</em> Linux kernel in Fedora 12 will be introduced in this post. We use Xen 4.0.0 from xen.org and Xenified Linux kernel 2.6.32.13. This solution have been tested quite stable in our cluster.</p>
<h3>Hardware:</h3>
<p>Dom0&#8242;s hardware platform:</p>
<p>Motherboard<em>: INTEL S5500BC S5500 Quad Core Xeon Server Board</em><br />
CPU<em>: 2 x Intel Quad Core Xeon E5520 2.26G (5.86GT/sec,8M,Socket  1366)</em><br />
Memory<em>: 8 x Kingston DDR-3 1333MHz 4GB ECC REG. CL9 DIMM  w/Parity &amp;  Thermal Sensor</em><br />
HD<em>: 4 x WD WD10EARS 1 TB, SATA II 3Gb/s, 64 MB Cache</em></p>
<h3>Linux system:</h3>
<p>Fedora 12 x86_64</p>
<p>SELinux is disabled. Please refer here for detail: <a href="http://pkill.info/b/1233/disable-selinux-in-fedora/" target="_blank">Disabled SELinux on Fedora</a>.</p>
<p><em>ext3</em> is recommended for the file system of disk partition for <em>/boot</em>.</p>
<p>Update the system:</p>
<pre class="prettyprint"># yum update</pre>
<p>The Xen and libvirt packages in Fedora should not be installed to avoid conflict.</p>
<pre class="prettyprint"># yum erase xen* libvirt</pre>
<h3>Build and install Xen hypervisor and tools</h3>
<h4>Download Xen 4.0.0</h4>
<pre class="prettyprint">$ wget http://bits.xensource.com/oss-xen/release/4.0.0/xen-4.0.0.tar.gz
$ tar xf xen-4.0.0.tar.gz</pre>
<h4>Build Xen and tools</h4>
<pre class="prettyprint">$ make xen
$ make tools</pre>
<p>You may need to install packages depended by this. You can try this for solving the dependencies:</p>
<pre># yum groupinstall "Development Libraries" -y; \
yum groupinstall "Development Tools" -y; \
yum install transfig texi2html \
libaio-devel dev86 glibc-devel \
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 -y</pre>
<h4>Install Xen and tools</h4>
<pre class="prettyprint">$ make install-xen
$ make install-tools</pre>
<h3>Build and install xenified Linux kernel</h3>
<h4>Download Linux kernel 2.6.32.13</h4>
<pre class="prettyprint">$ 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</pre>
<h4>Download 2.6.32 Xen patches v2</h4>
<pre class="prettyprint">$ 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</pre>
<h4>Apply Xen patches</h4>
<p>Apply all the patches downloaded above following the patch number. This patch.sh script can be used (we assume the patch and the kernel are in the same directory):</p>
<p>patch.sh:</p>
<pre class="prettyprint">#!/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</pre>
<p>Put this script into Linux source directory and execute:</p>
<pre class="prettyprint">$ sh ./patch.sh</pre>
<h4>Configure Xenified Linux kernel</h4>
<p>A working configuration file that I used can be downloaded directly from here:</p>
<p><a href="https://docs.google.com/leaf?id=0BxXe2zOqYbxmZDMwZGQxMTAtNTVlOS00YTU2LTkyYTEtZmY2MGRhNDc5Nzll&amp;hl=en" target="_blank">config-for-xenified-linux-2.6.32.13</a></p>
<p>Just download this file, put it into the kernel source code file directory and rename it to <em>.config</em> .</p>
<p>Other than use my configuration file, you can also configure it by yourself by using “<em>make menuconfig”</em>.</p>
<p>Make sure you build the kernel with these components enabled:</p>
<pre>Processor type and features  ---&gt;
 [*] Symmetric multi-processing support
 [*] Support sparse irq numbering
<strong> [*] Enable Xen compatible kernel</strong>
<strong> Preemption Model (No Forced Preemption (Server))  ---&gt;</strong>

Device Drivers  ---&gt;
 XEN  ---&gt;
<strong> [*] Privileged Guest (domain 0)</strong>
 &lt;*&gt; Backend driver support (NEW)
 &lt;*&gt;   Block-device backend driver (NEW)
 &lt;*&gt;   Block-device tap backend driver (NEW)
<strong> &lt;*&gt;   Block-device tap backend driver 2 (NEW)</strong>
<strong> &lt;*&gt;   Network-device backend driver (NEW)</strong>
 (8)     Maximum simultaneous transmit requests (as a power of 2) (NEW)
 [ ]     Pipelined transmitter (DANGEROUS) (NEW)
 &lt; &gt;     Network-device loopback driver (NEW)
 &lt;*&gt;   PCI-device backend driver (NEW)
 PCI Backend Mode (Virtual PCI)  ---&gt;
 [ ]     PCI Backend Debugging (NEW)
 &lt; &gt;   TPM-device backend driver (NEW)
 &lt;M&gt;   SCSI backend driver (NEW)
 &lt;M&gt;   USB backend driver (NEW)
 &lt;M&gt; Block-device frontend driver
 &lt;M&gt; Network-device frontend driver
 &lt;M&gt;   Network-device frontend driver acceleration for Solarflare NICs (NEW)
 &lt;M&gt; SCSI frontend driver (NEW)
 &lt;M&gt; USB frontend driver (NEW)
 [*]   Taking the HCD statistics (for debug) (NEW)
 [ ]   HCD suspend/resume support (DO NOT USE) (NEW)
 &lt;*&gt; User-space granted page access driver (NEW)
 &lt;*&gt; Framebuffer-device frontend driver (NEW)
 &lt;*&gt;   Keyboard-device frontend driver (NEW)
 [*] Disable serial port drivers (NEW)
 &lt;*&gt; Export Xen attributes in sysfs (NEW)
 (256) Number of guest devices (NEW)
<strong> Xen version compatibility (no compatibility code)  ---&gt;</strong>
 [*] Place shared vCPU info in per-CPU storage (NEW)</pre>
<h4>Build kernel</h4>
<pre>$ make -j16</pre>
<h4>Install modules and kernel</h4>
<pre class="prettyprint"># make modules_install install</pre>
<h3>Configure grub</h3>
<p>Add one entry for Xen in <em>/boot/grub/grub.conf</em>. This is an example entry:</p>
<pre class="prettyprint">title Xen 4.0.0 - Xenified Linux 2.6.32.13
  root (hd0,0)
  kernel /xen-4.0.0.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</pre>
<p>The root and other parameters may be different depending on the configuration.</p>
<h3>Make Xend and Xendomains services automatically start when system boots</h3>
<pre># cd /etc/init.d/
# chkconfig --add xend
# chkconfig --add xendomains</pre>
<p>Check whether Xend and Xendomains services are automatically started in level 3-5:</p>
<pre class="prettyprint"># chkconfig --list | grep xend</pre>
<p>It should be like this:</p>
<pre class="prettyprint">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</pre>
<h3>BIOS configuration</h3>
<p>If xen stops at:</p>
<p>“I/O virtualization disabled.”</p>
<p>We may need to enable VT and I/O virtualization in BIOS.</p>
<p>These options can be enabled in BIOS:</p>
<pre>Intel (R) Virtualization Technology
Intel (R) VT for Directed I/O
Interrupt Remapping
Coherency Support
ATS Support</pre>
<h3>Enjoy the fun now!</h3>
<p>After booting the system, you can try to use <em>xm</em> to check xen info</p>
<pre class="prettyprint"># xm info</pre>
<p>Then <em>xm</em> command can be used to start up DomUs.</p>
<p>This is one working configuration file for one DomU that I use:</p>
<pre class="prettyprint">name="10.0.1.201"
vcpus=2
memory=16384
disk = ['tap:aio:/lhome/xen/vm-10.0.1.201/vmdisk0,xvda,w' ]
# disk = ['file:/lhome/xen/vm-10.0.1.201/vmdisk0,xvda,w' ]
vif = ['bridge=eth0']
bootloader = "/usr/bin/pygrub"
on_reboot = 'restart'
on_crash = 'restart'</pre>
<p>Here we use the <em>blktap </em>backed VBD device which has much better performance than Linux blkback backed VBD device.</p>
<h3>Making the performance more stable</h3>
<p>Allocating dedicated CPU core and memory for Dom0 may provide more stable performance for the Xen platform. Please refer to <a href="http://pkill.info/b/2258/managing-xen-dom0s-cpu-and-memory/" target="_blank">Managing Xen Dom0&#8242;s CPU and Memory/</a> for detailed instruction.</p>
<h3>Problems</h3>
<p>Here is a list of problem that may occur during the configuration.</p>
<h4>Limited number of loop devices</h4>
<p>The default number of loop device in this kernel is 8. When we are using blkback backed VBDs and we need to have more than 8 virtual machines, we should <a href="http://pkill.info/b/223/add-more-loop-device-on-linux/" target="_blank">add more loop devices</a>. You need to use the first method (pass parameter max_loop=32 to vmlinuz) if you use my kernel configuration file.</p>
<h4>initramfs related problem</h4>
<p>The <em>initramfs</em> image under /root generated by <em>dracut </em>doesn’t work on some servers. If you have the similiar problem, you can try to use image generated by <em>mkinitrd</em>:</p>
<p>1) Generate initrd-2.6.32.13.img using mkinitrd</p>
<pre>mkinitrd /boot/initrd-2.6.32.13.img 2.6.32.13</pre>
<p>2) Edit entry in <em>/boot/grub/grub.conf</em></p>
<p>Change</p>
<pre class="prettyprint">module /initramfs-2.6.32.13.img</pre>
<p>to</p>
<pre class="prettyprint">module /initrd-2.6.32.13.img</pre>
<h4>drm related problem</h4>
<p>On one of our servers that uses radeon card we have experienced problem related to <em>drm</em>. The system crashes after the kernel printing out information about <em>drm.</em> We can add <em>nomodeset</em> option to kernel command line to bypass this problem.</p>
<p>The kernel command line in <em>/boot/grub.conf</em> will change to:</p>
<pre class="prettyprint">module /vmlinuz-2.6.32.13 ro root=/dev/mapper/VolGroup-LogVol_root <strong>nomodeset</strong> noiswmd LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us</pre>
<h4>Build kernel on 32bit platform</h4>
<p>You first need to enable PAE support if you’re building 32 bit version of the kernel. Xen only supports 32 bit PAE kernels nowadays. Xen kernel build options won’t show up if you don’t enable PAE for 32 bit builds.</p>
<p>You can enable PAE in “Processor type and features -&gt; High Memory Support (64GB) -&gt; PAE (Physical Address Extension) Support”</p>
<p>I can find Xen options after enable PAE on my laptop. I have never run Xen Dom0 on a 32bit kernel. I can’t say whether it is stable. Please try it and I will appreciate it if you share your result with me ;)</p>
<p>The <em>clocksource=jiffies </em>kernel parameter may be needed. Please refer to Larry Matter&#8217;s reply below. He installed Xen with 32bit kernel successfully.<cite><strong> </strong></cite></p>
<h4>Error message about ksm</h4>
<p>If you get lots error messages generated by ksm, you can disable service <em>ksm</em> and <em>ksmtuned</em> to eliminate these error messages:</p>
<pre class="prettyprint"># chkconfig ksm off
# chkconfig ksmtuned off</pre>
<p>More problems and solutions can be found here: <a href="http://pkill.info/b/2354/problems-during-installing-xen-dom0-in-fedora/" target="_blank">Problems during Installing Xen Dom0 in Fedora</a></p>
<p><span style="font-size: x-small;"><strong>Update history</strong><br />
Aug. 10, 2010. Add clocksource kernel parameter for 32bit; Add dependency list;<br />
</span></p>


<b>Read more:</b><ul><li><a href='http://pkill.info/b/2412/setting-up-stable-xen-dom0-with-fedora-xen-4-0-1-with-xenified-linux-kernel-2-6-32-13-in-fedora-12/' rel='bookmark' title='Permanent Link: 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 4.0.1 with Xenified Linux Kernel 2.6.32.13 in Fedora 12</a></li>
<li><a href='http://pkill.info/b/2405/setting-up-stable-xen-dom0-with-fedora-xen-3-4-3-with-xenified-linux-kernel-2-6-32-13-in-fedora-12/' rel='bookmark' title='Permanent Link: 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.3 with Xenified Linux Kernel 2.6.32.13 in Fedora 12</a></li>
<li><a href='http://pkill.info/b/2388/setting-up-stable-xen-dom0-with-fedora-xen-3-4-with-xenified-linux-kernel-2-6-32-13-in-fedora-12/' rel='bookmark' title='Permanent Link: 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.2 with Xenified Linux Kernel 2.6.32.13 in Fedora 12</a></li>
</ul>]]></content:encoded>
			<wfw:commentRss>http://pkill.info/b/2252/setting-up-stable-xen-dom0-with-fedora-xen-4-0-0-with-xenified-linux-kernel-2-6-32-13-in-fedora-12/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Managing Xen Dom0&#8242;s CPU and Memory</title>
		<link>http://pkill.info/b/2258/managing-xen-dom0s-cpu-and-memory/</link>
		<comments>http://pkill.info/b/2258/managing-xen-dom0s-cpu-and-memory/#comments</comments>
		<pubDate>Mon, 26 Jul 2010 15:12:54 +0000</pubDate>
		<dc:creator>Zhiqiang Ma</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[dom0]]></category>
		<category><![CDATA[domu]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[server config]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[xen]]></category>

		<guid isPermaLink="false">http://pkill.info/b/?p=2258</guid>
		<description><![CDATA[The performance of Xen&#8217;s Dom0 is important for the overall system. The disk and network drivers are running on Dom0. I/O intensive guests&#8217; workloads may consume lots Dom0&#8242;s CPU cycles. The Linux kernel calculates various network related parameters based on the amount of memory at boot time. The kernel also allocate memory for storing memory [...]

<b>Read more:</b><ul><li><a href='http://pkill.info/b/615/a-simple-cpu-and-memory-performance-test-of-xen-dom0-and-domu/' rel='bookmark' title='Permanent Link: A simple CPU and memory performance test of xen Dom0 and DomU'>A simple CPU and memory performance test of xen Dom0 and DomU</a></li>
<li><a href='http://pkill.info/b/2354/problems-during-installing-xen-dom0-in-fedora/' rel='bookmark' title='Permanent Link: Problems during Installing Xen Dom0 in Fedora'>Problems during Installing Xen Dom0 in Fedora</a></li>
<li><a href='http://pkill.info/b/2412/setting-up-stable-xen-dom0-with-fedora-xen-4-0-1-with-xenified-linux-kernel-2-6-32-13-in-fedora-12/' rel='bookmark' title='Permanent Link: 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 4.0.1 with Xenified Linux Kernel 2.6.32.13 in Fedora 12</a></li>
</ul>]]></description>
			<content:encoded><![CDATA[<p>The performance of Xen&#8217;s Dom0 is important for the overall system. The disk and network drivers are running on Dom0. I/O intensive guests&#8217; workloads may consume lots Dom0&#8242;s CPU cycles. The Linux kernel calculates various network related parameters based on the amount of memory at boot time. The kernel also allocate memory for storing memory metadata (per page info structures) is also based on the boot time amount of memory. After ballooning down Dom0&#8242;s memory, the network related parameters will not be correct. Ballooning down busy Dom0&#8242;s memory sometimes cause SSH to die from our observation, which is a nightmare for the administrator since SSH is usually the only way for remote control of the server. Another bed effect is that it&#8217;s a waste of memory with a large memory metadata for a smaller memory amount.</p>
<p>Now let&#8217;s look at how to menage Xen Dom0&#8242;s CPU and memory in a better way.</p>
<h3>Dedicate a CPU core for Dom0</h3>
<p>Dom0 will have free CPU time to process the I/O requests from the DomUs if it has dedicated CPU core(s). Better performance may be achieved by this since there are less CPU context switches to do in Dom0.</p>
<p>We can dedicate CPU core for Dom0 by passing &#8220;<strong><em>dom0_max_vcpus=X dom0_vcpus_pin</em></strong>&#8221; options to Xen hypervisor (<em>xen.gz</em>) in <em>/boot/grub/grub.conf</em>. <em>X</em> is the number of vcpus dedicated to Dom0.</p>
<p>As hyperthreading technology is enabled in most modern CPUs, we need to specify two processors to dedicate one CPU core. So the <em>&#8220;X&#8221;</em> above should usually be <em>2</em> for one CPU core.</p>
<pre>kernel /xen.gz console=vga vga=ask noreboot <strong>dom0_max_vcpus=2 dom0_vcpus_pin</strong></pre>
<p>After booting the system, the VCPU list can be got on Dom0 by this command:</p>
<pre># xm vcpu-list</pre>
<p>Even after booting the system, the VCPU number can be configured by <em>xm</em> command. We can set Domain-0 have two VCPUs and processor 0 and 1 to be dedicated to Dom0 by these commands:</p>
<pre># xm vcpu-set Domin-0 2
# xm vcpu-pin Domain-0 0
# xm vcpu-pin Domain-0 1</pre>
<h3>Dedicate memory for Dom0</h3>
<p>We should always dedicate fixed amount of memory for Xen Dom0.</p>
<p>We can set the initial memory size of Dom0 by passing &#8220;<em>dom0_mem=xxx&#8221;</em> (in KB) option to Xen hypervisor (<em>gen.gz</em>) in <em>/boot/grub/grub.conf.</em> &#8220;<em>xxx&#8221; </em>is the amount of memory for Dom0 in KB.</p>
<p>If we set the initial memory size of Dom0 to 2GB, just change the entry in <em>grub.conf</em> to:</p>
<pre>kernel /xen.gz console=vga vga=ask noreboot dom0_max_vcpus=2 dom0_vcpus_pin <strong>dom0_mem=2097152</strong></pre>
<h4>Set lowest permissible memory for Dom0</h4>
<p>The option dom0-min-mem in Xend configuration file <em>/etc/xen/xend-config.sxp</em> is used to specify the lowest permissible memory for Dom0.</p>
<p>The value of <em>dom0-min-mem</em> (in MB) is the lowest permissible memory level for Dom0. The default value is 256. If we limit the memory size of Dom0 to 2G, just set:</p>
<pre>(dom0-min-mem 2048)</pre>
<h4>Preventing dom0 memory ballooning</h4>
<p>The &#8220;<em>enable-dom0-ballooning</em>&#8221; option in Xend configuration file is used to specify whether Dom0&#8242;s memory can be ballooned out. Setting<em> &#8220;enable-dom0-ballooning&#8221; </em>to <em>&#8220;no&#8221;</em> will make sure Xend never takes any memory away from Dom0:</p>
<pre>(enable-dom0-ballooning no)</pre>


<b>Read more:</b><ul><li><a href='http://pkill.info/b/615/a-simple-cpu-and-memory-performance-test-of-xen-dom0-and-domu/' rel='bookmark' title='Permanent Link: A simple CPU and memory performance test of xen Dom0 and DomU'>A simple CPU and memory performance test of xen Dom0 and DomU</a></li>
<li><a href='http://pkill.info/b/2354/problems-during-installing-xen-dom0-in-fedora/' rel='bookmark' title='Permanent Link: Problems during Installing Xen Dom0 in Fedora'>Problems during Installing Xen Dom0 in Fedora</a></li>
<li><a href='http://pkill.info/b/2412/setting-up-stable-xen-dom0-with-fedora-xen-4-0-1-with-xenified-linux-kernel-2-6-32-13-in-fedora-12/' rel='bookmark' title='Permanent Link: 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 4.0.1 with Xenified Linux Kernel 2.6.32.13 in Fedora 12</a></li>
</ul>]]></content:encoded>
			<wfw:commentRss>http://pkill.info/b/2258/managing-xen-dom0s-cpu-and-memory/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Setting up Xen pvops Dom0 on Fedora : Xen 3.4.2 + Kernel 2.6.31 with paravirt_ops in Fedora 12</title>
		<link>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/</link>
		<comments>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/#comments</comments>
		<pubDate>Tue, 04 May 2010 08:20:28 +0000</pubDate>
		<dc:creator>Zhiqiang Ma</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[dom0]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[server config]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[xen]]></category>

		<guid isPermaLink="false">http://zhiqiangma.info/?p=1535</guid>
		<description><![CDATA[Please refer to Xen solution for the latest stable Xen Dom0 solution. How to set up Xen Dom0 with paravirt_ops technology in Fedora 12 will be introduced in this post. The Fedora 12 release has xen 3.4.2 which support paravirt_ops Dom0 and Domu but lack of Dom0 kernel. We use xen 3.4.2 in Fedora 12&#8242;s [...]

<b>Read more:</b><ul><li><a href='http://pkill.info/b/2412/setting-up-stable-xen-dom0-with-fedora-xen-4-0-1-with-xenified-linux-kernel-2-6-32-13-in-fedora-12/' rel='bookmark' title='Permanent Link: 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 4.0.1 with Xenified Linux Kernel 2.6.32.13 in Fedora 12</a></li>
<li><a href='http://pkill.info/b/2405/setting-up-stable-xen-dom0-with-fedora-xen-3-4-3-with-xenified-linux-kernel-2-6-32-13-in-fedora-12/' rel='bookmark' title='Permanent Link: 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.3 with Xenified Linux Kernel 2.6.32.13 in Fedora 12</a></li>
<li><a href='http://pkill.info/b/2388/setting-up-stable-xen-dom0-with-fedora-xen-3-4-with-xenified-linux-kernel-2-6-32-13-in-fedora-12/' rel='bookmark' title='Permanent Link: 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.2 with Xenified Linux Kernel 2.6.32.13 in Fedora 12</a></li>
</ul>]]></description>
			<content:encoded><![CDATA[<p>Please refer to</p>
<p><a href="http://pkill.info/b/2367/xen-solutions/">Xen solution</a></p>
<p>for the latest stable Xen Dom0 solution.</p>
<hr />
<p>How to set up Xen Dom0 with <em>paravirt_ops</em> technology in Fedora 12 will be introduced in this post. The Fedora 12 release has xen 3.4.2 which support <em>paravirt_ops</em> Dom0 and Domu but lack of Dom0 kernel. We use xen 3.4.2 in Fedora 12&#8242;s repository and build a <em>paravirt_ops</em> enabled Dom0 kernel by ourseves.</p>
<h3>Hardware<strong>:</strong></h3>
<p>Dom0 hardware platform:</p>
<p>Motherboard<em>: INTEL S5500BC S5500 Quad Core Xeon Server Board<br />
</em>CPU<em>: 2 x Intel Quad Core Xeon E5520 2.26G (5.86GT/sec,8M,Socket  1366)<br />
</em>Memory<em>: 8 x Kingston DDR-3 1333MHz 4GB ECC REG. CL9 DIMM  w/Parity &amp;  Thermal Sensor<br />
</em>HD<em>: 4 x WD WD10EARS 1 TB, SATA II 3Gb/s, 64 MB Cache</em></p>
<h3>Linux system:</h3>
<p>Fedora 12 x86_64<br />
SELinux is disabled. Please refer here for detail: <a href="http://pkill.info/b/1233/disable-selinux-in-fedora/" target="_blank">disabled SELinux on Fedora</a>.</p>
<p><em>ext3</em> is recommended for the file system of disk partition for <em>/boot</em>.</p>
<p>Update system:</p>
<pre># yum update</pre>
<h3>Install xen</h3>
<p>Install xen-3.4.2 from Fedora 12&#8242;s repository:</p>
<pre># yum install xen*</pre>
<p>This is the packages that we have installed:</p>
<pre>[root@localhost xen]# rpm -qa | grep xen
xen-hypervisor-3.4.2-1.fc12.x86_64
xen-3.4.2-1.fc12.x86_64
xenner-0.47-3.fc12.x86_64
xen-libs-3.4.2-1.fc12.x86_64
xenwatch-0.5.4-3.fc12.x86_64
xen-doc-3.4.2-1.fc12.x86_64
xen-runtime-3.4.2-1.fc12.x86_64
xen-devel-3.4.2-1.fc12.x86_64</pre>
<h3>Install paravirt_ops technology enabled kernel</h3>
<h4>Download kernel 2.6.31.13</h4>
<p>The kernel I used can be downloaded from here:</p>
<p><a href="https://docs.google.com/leaf?id=0BxXe2zOqYbxmMmJkN2RiOWMtNjhiYy00Y2QyLThlYTUtOTlmMzZmOGU5NWNh&amp;hl=en" target="_blank">Dowload Dom0 kernel 2.6.31.13</a></p>
<p>This kernel is downloaded from Jeremy&#8217;s git repository on Apr. 30, 2010:</p>
<p><a href="http://git.kernel.org/?p=linux/kernel/git/jeremy/xen.git" target="_blank">http://git.kernel.org/?p=linux/kernel/git/jeremy/xen.git</a></p>
<h4>Configuraton</h4>
<p>The configuration file that I used can be downloaded from here:</p>
<p><a href="https://sites.google.com/a/pkill.info/pkill/home/kernel-dom0/config-kernel-xen-2.6.31.13?attredirects=0&amp;d=1" target="_blank">Download config-kernel-xen-2.6.31.13</a></p>
<p>Just download this file, put it into the kernel source code file and rename it to .config .</p>
<p>You can also configure it by yourself using &#8220;<em>make menuconfig&#8221; </em>if you don&#8217;t want to use my configuration file or you need more components to be enabled.</p>
<p>Make sure you build the kernel with these components enabled:</p>
<pre>Processor type and features  ---&gt;
--- Paravirtualized guest support
[*]   Xen guest support
(32)  Maximum allowed size of a domain in gigabytes
[*]   Enable Xen debug and tuning parameters in debugfs
[*]   Enable Xen privileged domain support
[ ]   Enable support for Xen PCI passthrough devices
[*]   KVM paravirtualized clock
[*]   KVM Guest support
-*-   Enable paravirtualization code
[ ]     Paravirtualization layer for spinlocks

Device Drivers ---&gt;
[*] Xen memory balloon driver
[*]   Scrub pages before returning them to system
&lt;*&gt; Xen /dev/xen/evtchn device
[*] Backend driver support
&lt;*&gt;   Block-device backend driver
&lt;*&gt;   Block-device tap backend driver
&lt;*&gt;   Xen backend network device
&lt;*&gt;   PCI-device backend driver
       PCI Backend Mode (Virtual PCI)  ---&gt;
         [ ]     PCI Backend Debugging
&lt;*&gt; Xen filesystem
     [*]   Create compatibility mount point /proc/xen
[*] Create xen entries under /sys/hypervisor</pre>
<h4>Build kernel</h4>
<pre># make -j16</pre>
<h4>Install modules and kernel</h4>
<pre># make modules_install install</pre>
<h3>Configure grub</h3>
<p>Add one entry in <em>/boot/grub/grub.conf</em>:</p>
<pre class="prettyprint">title Xen 3.4.2 - Fedora (2.6.31.13)
  root (hd0,0)
  kernel /xen-3.4.2.gz console=vga vga=ask noreboot
  module /vmlinuz-2.6.31.13 ro root=/dev/mapper/VolGroup-LogVol_root max_loop=32 noiswmd LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us
  module /initramfs-2.6.31.13.img</pre>
<p>The root and other parameters may be different depending on the configuration.</p>
<h3>Configure xend</h3>
<pre># cd /etc/xen
# cp xend-config.sxp xend-config.sxp.bak
# vim xend-config.sxp</pre>
<p>Find:</p>
<pre>#(network-script network-bridge)
(network-script /bin/true)</pre>
<p>Change it to:</p>
<pre>(network-script network-bridge)
#(network-script /bin/true)</pre>
<p>After changing the configure file, reboot the system and choose xen + fedora entry which I have added in grub.</p>
<h3>BIOS configuration</h3>
<p>If xen stops at:</p>
<p>&#8220;I/O virtualization disabled.&#8221;</p>
<p>Enable VT and I/O virtualization in BIOS.</p>
<p>You may enable these in BIOS:</p>
<pre>Intel (R) Virtualization Technology
Intel (R) VT for Directed I/O
Interrupt Remapping
Coherency Support
ATS Support</pre>
<h3>Enjoy it!</h3>
<p>After booting the system, you can try to use <em>xm</em> to check xen info</p>
<pre>[root@localhost xen]# xm info
host                   : localhost.localdomain
release                : 2.6.31.13
version                : #1 SMP Tue May 4 15:04:27 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           : 32705
free_memory            : 3158
node_to_cpu            : node0:0-15
node_to_memory         : node0:3158
xen_major              : 3
xen_minor              : 4
xen_extra              : .2
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.2 20091027 (Red Hat 4.4.2-7) (GCC)
cc_compile_by          : mockbuild
cc_compile_domain      : (none)
cc_compile_date        : Fri Dec 11 05:58:50 EST 2009
xend_config_format     : 4</pre>
<p>Then <em>xm</em> command can be used to set up Domus.</p>
<p>This is the configuration file for one DomU that I use. It works well:</p>
<pre class="prettyprint">name="vm-10.0.1.201"
memory=16384
disk = ['file:/lhome/xen/vm-10.0.1.201/vmdisk0,xvda,w' ]
vif = ['bridge=eth0']
bootloader = "/usr/bin/pygrub"
vcpus=2
on_reboot = 'restart'
on_crash = 'restart'</pre>
<p>Here the <em>loopback </em>backed vbd device is used.</p>
<h3>Making the performance more stable</h3>
<p>I have test both Dom0 and DomU. The performance is stable but not as stable as the native Linux kernel. I saying not quite stable means that if we run a piece of code and we may find the time for it is a bit different from time to time. The difference may be up to 10%.</p>
<p>If you need a stable, you can configure xend to make Dom0 use one CPU. The Dom0 will change to UP mode. There are less virtual CPUs that physical CPUs. I don&#8217;t know the exact reason by now. But this method will make the performance stable.</p>
<p>We have also tested this solution. Both Dom0 and DomU (SMP mode of course) have as stable performance as native Linux.</p>
<p>The configuration:</p>
<pre># vim /etc/xen/xend-config.sxp</pre>
<p>Find</p>
<pre>(dom0-cpus 0)</pre>
<p>Then change it to</p>
<pre>(dom0-cpus 1)</pre>
<h3>Dom0 memory management</h3>
<h4>Initial memory size of Dom0</h4>
<p>We can set the initial memory size of Dom0 by adding option <em>dom0_mem</em> (in KB) to xen in <em>grub.conf.</em></p>
<p>If we set the initial memory size of Dom0 to 1GB, just change the line in grub entry to:</p>
<pre class="prettyprint">kernel /xen-3.4.2.gz console=vga vga=ask noreboot dom0_mem=1048576</pre>
<h4>Lowest permissible memory for dom0</h4>
<p>The value <em>dom0-min-mem</em> (in MB) is the lowest permissible memory level for Dom0. The default value is 256. If we limit the memory size of Dom0 to larger than 1G, just set:</p>
<pre>(dom0-min-mem 1024)</pre>
<h3>Problems</h3>
<h4>Limited number of loop devices</h4>
<p>The default number of loop device in this kernel is 8. When we need to have more than 8 virtual machines, we need to <a href="http://pkill.info/b/223/add-more-loop-device-on-linux/" target="_blank">add more loop devices</a>. You need to use the first method (pass parameter max_loop=32 to vmlinuz) if you use my kernel configuration file.</p>
<h4>initramfs related problem</h4>
<p>We have found the <em>initramfs</em> image under /root generated by <em>dracut </em>doesn&#8217;t work on one of our servers (Use Xeon 5700 CPU). If you have this problem, you can try to use image generated by <em>mkinitrd</em>:</p>
<p>1) Generate initrd-2.6.31.13.img using mkinitrd</p>
<pre>mkinitrd /boot/initrd-2.6.31.13.img 2.6.31.13</pre>
<p>2) Edit entry in <em>/boot/grub/grub.conf</em></p>
<p>Change</p>
<pre>module /initramfs-2.6.31.13.img</pre>
<p>to</p>
<pre>module /initrd-2.6.31.13.img</pre>
<h4>drm related problem</h4>
<p>On one of our servers that uses radeon card we have experienced problem related to <em>drm</em>. The system crashes after the kernel printing out information about <em>drm.</em> We can add <em>nomodeset</em> option to kernel command line to bypass this problem.</p>
<p>The kernel command line in <em>/boot/grub.conf</em> will change to:</p>
<pre class="prettyprint">module /vmlinuz-2.6.31.13 ro root=/dev/mapper/VolGroup-LogVol_root <strong>nomodeset</strong> max_loop=32 noiswmd LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us</pre>
<h4>Build kernel on 32bit platform</h4>
<p>You first need to enable PAE support if you’re building 32 bit version of the kernel. Xen only supports 32 bit PAE kernels nowadays. Xen kernel build options won’t show up if you don’t enable PAE for 32 bit builds.<br />
You can enable PAE in “Processor type and features -&gt; High Memory Support (64GB) -&gt; PAE (Physical Address Extension) Support”</p>
<p>I can find Xen options after enable PAE on my laptop. I have never run Xen Dom0 on a 32bit kernel. I can’t say whether it is stable. Please try it and I will appreciate it if you share your result with me ;)</p>
<h4>Error message about ksm</h4>
<p>We can disable service <em>ksm</em> and <em>ksmtuned</em> to eliminate these error messages:</p>
<pre># chkconfig ksm off
# chkconfig ksmtuned off</pre>
<p><span style="font-size: x-small;"><strong>Update history:<br />
</strong>Updated on Jun 18. 2010. Correct the error in hardware configuration. The memory is 24GB.<br />
Updated on Jun 12. 2010. Add drm related problem.<br />
Updated on May 5. 2010. Add download link of kernel 2.6.31.13.<br />
Updated on May 5. 2010. Add info that SELinux is disabled.<br />
Updated on May 6. 2010. Add info that the /boot partition should in ext3 format rather than ext4.<br />
Updated on May 6. 2010. Add info about dracut generated initramfs&#8217;s problem on one of our platform.<br />
Updated on May 6. 2010. Add method to add more loop devices for setting up more than 8 virtual machines.<br />
Updated on May 6. 2010. Add info that PAE should be enabled first before building 32bit Dom0 kernel.<br />
Updated on May 10, 2010. Add the Dom0 memory management part.<br />
Updated on May 16, 2010. Add ksm related problem.<br />
</span></p>


<b>Read more:</b><ul><li><a href='http://pkill.info/b/2412/setting-up-stable-xen-dom0-with-fedora-xen-4-0-1-with-xenified-linux-kernel-2-6-32-13-in-fedora-12/' rel='bookmark' title='Permanent Link: 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 4.0.1 with Xenified Linux Kernel 2.6.32.13 in Fedora 12</a></li>
<li><a href='http://pkill.info/b/2405/setting-up-stable-xen-dom0-with-fedora-xen-3-4-3-with-xenified-linux-kernel-2-6-32-13-in-fedora-12/' rel='bookmark' title='Permanent Link: 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.3 with Xenified Linux Kernel 2.6.32.13 in Fedora 12</a></li>
<li><a href='http://pkill.info/b/2388/setting-up-stable-xen-dom0-with-fedora-xen-3-4-with-xenified-linux-kernel-2-6-32-13-in-fedora-12/' rel='bookmark' title='Permanent Link: 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.2 with Xenified Linux Kernel 2.6.32.13 in Fedora 12</a></li>
</ul>]]></content:encoded>
			<wfw:commentRss>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/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Setting up Xen Dom0 on Fedora : Xen 3.4.1 with Linux Kernel 2.6.29 on Fedora 12</title>
		<link>http://pkill.info/b/1566/setting-up-xen-dom0-on-fedora-xen-3-4-1-with-linux-kernel-2-6-29-on-fedora-12/</link>
		<comments>http://pkill.info/b/1566/setting-up-xen-dom0-on-fedora-xen-3-4-1-with-linux-kernel-2-6-29-on-fedora-12/#comments</comments>
		<pubDate>Mon, 12 Apr 2010 13:22:57 +0000</pubDate>
		<dc:creator>Zhiqiang Ma</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[dom0]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[server config]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[xen]]></category>

		<guid isPermaLink="false">http://zhiqiangma.info/?p=1566</guid>
		<description><![CDATA[Please refer to Xen solution 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 [...]

<b>Read more:</b><ul><li><a href='http://pkill.info/b/2412/setting-up-stable-xen-dom0-with-fedora-xen-4-0-1-with-xenified-linux-kernel-2-6-32-13-in-fedora-12/' rel='bookmark' title='Permanent Link: 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 4.0.1 with Xenified Linux Kernel 2.6.32.13 in Fedora 12</a></li>
<li><a href='http://pkill.info/b/2405/setting-up-stable-xen-dom0-with-fedora-xen-3-4-3-with-xenified-linux-kernel-2-6-32-13-in-fedora-12/' rel='bookmark' title='Permanent Link: 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.3 with Xenified Linux Kernel 2.6.32.13 in Fedora 12</a></li>
<li><a href='http://pkill.info/b/2388/setting-up-stable-xen-dom0-with-fedora-xen-3-4-with-xenified-linux-kernel-2-6-32-13-in-fedora-12/' rel='bookmark' title='Permanent Link: 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.2 with Xenified Linux Kernel 2.6.32.13 in Fedora 12</a></li>
</ul>]]></description>
			<content:encoded><![CDATA[<p>Please refer to</p>
<p><a href="http://pkill.info/b/2367/xen-solutions/">Xen solution</a></p>
<p>for the latest stable Xen Dom0 solution.<br />
==========================================</p>
<p>In this post, the detailed tutorial for setting up <em>Xen </em>3.4.1 dom0 on  top of Fedora 12 with kernel 2.6.29 will be introduced.</p>
<h3>Hardware<strong>:</strong></h3>
<p>Dom0 hardware platform:</p>
<p>Motherboard<em>: INTEL S5500BC S5500 Quad Core Xeon Server Board<br />
</em>CPU<em>: 2 x Intel Quad Core Xeon E5520 2.26G (5.86GT/sec,8M,Socket 1366)<br />
</em>Memory<em>: 4 x Kingston DDR-3 1333MHz 4GB ECC REG. CL9 DIMM w/Parity &amp;  Thermal Sensor<br />
</em>HD<em>: 4 x WD WD10EARS 1 TB, SATA II 3Gb/s, 64 MB Cache</em></p>
<p>Disk Partitions:</p>
<pre>[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</pre>
<h3>Linux<strong>:</strong></h3>
<p>Fedora 12 x86_64, updated to Apr. 10, 2010.</p>
<p>No xen and libvirt installed:</p>
<pre># rpm -qa | grep xen
# rpm -qa | grep virt</pre>
<p>And SELinux is diabled.</p>
<h3>Packages<strong>:</strong></h3>
<p>Xen 3.4.1: <a href="http://bits.xensource.com/oss-xen/release/3.4.1/xen-3.4.1.tar.gz">http://bits.xensource.com/oss-xen/release/3.4.1/xen-3.4.1.tar.gz</a></p>
<p>linux-2.6.29-xen-r4-aka-suse-xenified-2.6.29-62.1: <a href="https://docs.google.com/leaf?id=0BxXe2zOqYbxmOTZlMTMyZTEtZmJhYi00ZjM1LTlmMDQtMDVjNmU4OTg5OGJl&amp;hl=en">Download here</a>.</p>
<p>download these packages and unzip them.</p>
<h3>Build and install Xen</h3>
<p>Uncompress <em>xen </em>and put all the source code files of <em>xen </em>to &#8220;/usr/src/xen/xen-3.4.1/&#8221;:</p>
<pre># 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</pre>
<p>Build xen, tools and docs:</p>
<pre># make -j16 dist-xen dist-tools dist-docs</pre>
<p>You may need to install some packages that are required and listed.</p>
<p>Install xen:</p>
<pre># cd dist
# sh ./install.sh</pre>
<h3>Build and install Linux kernel</h3>
<p>The <em>.config</em> file I used can be downloaded from here:</p>
<p><a href="https://sites.google.com/site/ericzqma/linux/kernel_config_xen_zma?attredirects=0" target="_blank">https://sites.google.com/site/ericzqma/linux/kernel_config_xen_zma?attredirects=0</a></p>
<p>My <em>.config</em> file can be used directly.</p>
<p>Or please use menuconfig to create one:</p>
<pre># make menuconfig</pre>
<p>When using &#8220;<em>make menuconfig</em>&#8220;, some options require special attention:</p>
<pre>Subarchitecture Type (Enable Xen compatible kernel)
( ) PC-compatible
(X) Enable Xen compatible kernel
( ) Support for ScaleMP vSMP
Device Drivers ---&gt;
XEN ---&gt;
[*] Privileged Guest (domain 0)
&lt;*&gt;Backend driver support
&lt;*&gt;Block-device backend driver
&lt;*&gt;Block-device tap backend driver
&lt;*&gt; Network-device backend driver</pre>
<p>After configuration, build and install this Linux kernel:</p>
<pre># make -j16
# make modules_install install</pre>
<h3>Create a <em>grub</em> entry</h3>
<pre># vim /boot/grub/grub.conf</pre>
<p>Then add this entry:</p>
<pre>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</pre>
<p>The &#8220;<em>root=</em>&#8221; and other options will be  different depending on the partitions of the system.</p>
<h3>Configure services</h3>
<p>Add <em>xend </em>and <em>xendomains</em> to services that automatically start when  system boot.</p>
<pre># 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</pre>
<p>Disable <em>ksmtuned</em> service.</p>
<pre># chkconfig ksmtuned off</pre>
<h3>Reboot now</h3>
<pre># reboot</pre>
<p>After booting the system in the <em>xen </em>environment. the <em>xm </em>command can be  used:</p>
<pre>[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</pre>
<p>Then xm can be used to create and manage virtual machines on the  server.</p>
<pre>[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</pre>


<b>Read more:</b><ul><li><a href='http://pkill.info/b/2412/setting-up-stable-xen-dom0-with-fedora-xen-4-0-1-with-xenified-linux-kernel-2-6-32-13-in-fedora-12/' rel='bookmark' title='Permanent Link: 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 4.0.1 with Xenified Linux Kernel 2.6.32.13 in Fedora 12</a></li>
<li><a href='http://pkill.info/b/2405/setting-up-stable-xen-dom0-with-fedora-xen-3-4-3-with-xenified-linux-kernel-2-6-32-13-in-fedora-12/' rel='bookmark' title='Permanent Link: 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.3 with Xenified Linux Kernel 2.6.32.13 in Fedora 12</a></li>
<li><a href='http://pkill.info/b/2388/setting-up-stable-xen-dom0-with-fedora-xen-3-4-with-xenified-linux-kernel-2-6-32-13-in-fedora-12/' rel='bookmark' title='Permanent Link: 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.2 with Xenified Linux Kernel 2.6.32.13 in Fedora 12</a></li>
</ul>]]></content:encoded>
			<wfw:commentRss>http://pkill.info/b/1566/setting-up-xen-dom0-on-fedora-xen-3-4-1-with-linux-kernel-2-6-29-on-fedora-12/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A simple CPU and memory performance test of xen Dom0 and DomU</title>
		<link>http://pkill.info/b/615/a-simple-cpu-and-memory-performance-test-of-xen-dom0-and-domu/</link>
		<comments>http://pkill.info/b/615/a-simple-cpu-and-memory-performance-test-of-xen-dom0-and-domu/#comments</comments>
		<pubDate>Thu, 14 Jan 2010 07:25:33 +0000</pubDate>
		<dc:creator>Zhiqiang Ma</dc:creator>
				<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[cpu]]></category>
		<category><![CDATA[dom0]]></category>
		<category><![CDATA[domu]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[xen]]></category>

		<guid isPermaLink="false">http://zhiqiangma.info/a-simple-cpu-and-memory-performance-test-of-xen-dom0-and-domu/</guid>
		<description><![CDATA[Please refer to here for the platform of this test. I have done some simple performance test on DomU and Dom0 and compare with the performance on physical machines. These test are simple, but it can provides some performance factor of xen. I test the CPU bound, memory write and memory read performance of Dom0, [...]

<b>Read more:</b><ul><li><a href='http://pkill.info/b/2258/managing-xen-dom0s-cpu-and-memory/' rel='bookmark' title='Permanent Link: Managing Xen Dom0&#8242;s CPU and Memory'>Managing Xen Dom0&#8242;s CPU and Memory</a></li>
<li><a href='http://pkill.info/b/810/an-io-performance-comparison-between-loopback-backed-and-blktap-backed-xen-file-backed-vbd/' rel='bookmark' title='Permanent Link: An I/O performance comparison between loopback backed and blktap backed Xen file-backed VBD'>An I/O performance comparison between loopback backed and blktap backed Xen file-backed VBD</a></li>
<li><a href='http://pkill.info/b/2256/setting-up-stable-xen-domu-with-fedora-unmodified-fedora-12-on-top-of-xenified-fedora-12-dom0-with-xen-4-0-0/' rel='bookmark' title='Permanent Link: Setting up Stable Xen DomU with Fedora: Unmodified Fedora 12 on top of Xenified Fedora 12 Dom0 with Xen 4.0'>Setting up Stable Xen DomU with Fedora: Unmodified Fedora 12 on top of Xenified Fedora 12 Dom0 with Xen 4.0</a></li>
</ul>]]></description>
			<content:encoded><![CDATA[<p>Please refer to <a href="http://pkill.info/b/197/set-up-xen-341-dom0-on-top-of-fedora-11-with-kernel-2-6-29/">here</a> for the platform of this test.</p>
<p>I have done some simple performance test on DomU and Dom0 and compare with the performance on physical machines. These test are simple, but it can provides some performance factor of xen. I test the CPU bound, memory write and memory read performance of Dom0, DomU and compare them with the result of the test on physical machine. Each test are done for 50 times and the the Average (E), Standard deviation (SD) and SD/E are calculated.</p>
<p><strong>Test method:</strong></p>
<p>I only past the C code here because I think it is clear enough.</p>
<p>1) CPU bound:<br />
The code:</p>
<pre><span style="color: #990000;">  const</span><span style="color: #ff6633;"> int</span> test_limit<strong><span style="color: #663300;"> =</span></strong><span style="color: #999900;"> 100000</span><strong><span style="color: #663300;">;</span></strong>
  cout<strong><span style="color: #663300;"> &lt;&lt;</span></strong><span style="color: #009900;"> "-----------------------------"</span><strong><span style="color: #663300;"> &lt;&lt;</span></strong> endl<strong><span style="color: #663300;">;</span></strong>
  cout<strong><span style="color: #663300;"> &lt;&lt;</span></strong><span style="color: #009900;"> "cpu bound test begins."</span><strong><span style="color: #663300;"> &lt;&lt;</span></strong> endl<strong><span style="color: #663300;">;</span></strong>
  clock_t begin_time<strong><span style="color: #663300;"> =</span></strong> clock<strong><span style="color: #663300;">();</span></strong><span style="color: #990000;">
  register</span><span style="color: #ff6633;"> int</span> a<strong><span style="color: #663300;"> =</span></strong><span style="color: #999900;"> 0</span><strong><span style="color: #663300;">;</span></strong><span style="color: #ff0000;">
  for</span><strong><span style="color: #663300;"> (</span></strong><span style="color: #990000;">register</span><span style="color: #ff6633;"> int</span> i<strong><span style="color: #663300;"> =</span></strong><span style="color: #999900;"> 0</span><strong><span style="color: #663300;">;</span></strong> i<strong><span style="color: #663300;"> &lt;</span></strong> test_limit<strong><span style="color: #663300;">;</span></strong> i<strong><span style="color: #663300;">++) {</span></strong><span style="color: #ff0000;">
    for</span><strong><span style="color: #663300;"> (</span></strong><span style="color: #990000;">register</span><span style="color: #ff6633;"> int</span> j<strong><span style="color: #663300;"> =</span></strong><span style="color: #999900;"> 0</span><strong><span style="color: #663300;">;</span></strong> j<strong><span style="color: #663300;"> &lt;</span></strong> test_limit<strong><span style="color: #663300;">;</span></strong> j<strong><span style="color: #663300;">++) {</span></strong>
      a<strong><span style="color: #663300;"> +=</span></strong> i<strong><span style="color: #663300;"> +</span></strong> j<strong><span style="color: #663300;">;
    }
  }</span></strong>
  clock_t end_time<strong><span style="color: #663300;"> =</span></strong> clock<strong><span style="color: #663300;">();</span></strong>
  do_nothing<strong><span style="color: #663300;">(</span></strong>a<strong><span style="color: #663300;">);</span></strong><span style="color: #ff6633;">
  int</span> time<strong><span style="color: #663300;"> = (</span></strong>end_time<strong><span style="color: #663300;"> -</span></strong> begin_time<strong><span style="color: #663300;">) / (</span></strong>CLOCKS_PER_SEC<strong><span style="color: #663300;"> /</span></strong><span style="color: #999900;"> 1000</span><strong><span style="color: #663300;">);</span></strong></pre>
<p>2) Memory read:</p>
<p>The code:</p>
<pre><span style="color: #990000;">  const</span><span style="color: #ff6633;"> int</span> test_times<strong><span style="color: #663300;"> =</span></strong><span style="color: #999900;"> 1000000</span><strong><span style="color: #663300;">;</span></strong><span style="color: #990000;">
  const</span><span style="color: #ff6633;"> int</span> data_size<strong><span style="color: #663300;"> =</span></strong><span style="color: #999900;"> 1000000000</span><strong><span style="color: #663300;">;</span></strong><span style="color: #990000;">
  const</span><span style="color: #ff6633;"> int</span> data_interval<strong><span style="color: #663300;"> =</span></strong><span style="color: #999900;"> 1000000</span><strong><span style="color: #663300;">;</span></strong><span style="color: #ff6633;">
  int</span><strong><span style="color: #663300;">*</span></strong> array_read<strong><span style="color: #663300;"> =</span></strong><span style="color: #990000;"> new</span><span style="color: #ff6633;"> int</span><strong><span style="color: #663300;">[</span></strong>data_size<strong><span style="color: #663300;">];</span></strong>
  cout<strong><span style="color: #663300;"> &lt;&lt;</span></strong><span style="color: #009900;"> "----------------------"</span><strong><span style="color: #663300;"> &lt;&lt;</span></strong> endl<strong><span style="color: #663300;">
       &lt;&lt;</span></strong><span style="color: #009900;"> "Memory read bound test begins."</span><strong><span style="color: #663300;"> &lt;&lt;</span></strong> endl<strong><span style="color: #663300;">;</span></strong><span style="color: #990000;">

  register</span><span style="color: #ff6633;"> int</span> read_value<strong><span style="color: #663300;"> =</span></strong><span style="color: #999900;"> 0</span><strong><span style="color: #663300;">;</span></strong><span style="color: #ff6633;">
  long</span> read_begin<strong><span style="color: #663300;"> =</span></strong><span style="color: #999900;">0</span><strong><span style="color: #663300;">;</span></strong><span style="color: #ff6633;">
  long</span> read_end<strong><span style="color: #663300;"> =</span></strong><span style="color: #999900;"> 0</span><strong><span style="color: #663300;">;</span></strong><span style="color: #ff6633;">
  int</span> data_range<strong><span style="color: #663300;"> =</span></strong> data_size<strong><span style="color: #663300;"> -</span></strong> test_times<strong><span style="color: #663300;">;</span></strong>

  read_begin<strong><span style="color: #663300;"> =</span></strong> clock<strong><span style="color: #663300;">();</span></strong><span style="color: #ff0000;">
  for</span><strong><span style="color: #663300;"> (</span></strong><span style="color: #990000;">register</span><span style="color: #ff6633;"> int</span> t<strong><span style="color: #663300;"> =</span></strong><span style="color: #999900;"> 0</span><strong><span style="color: #663300;">;</span></strong> t<strong><span style="color: #663300;"> &lt;</span></strong> test_times<strong><span style="color: #663300;">;</span></strong> t<strong><span style="color: #663300;">++) {</span></strong><span style="color: #ff0000;">
    for</span><strong><span style="color: #663300;"> (</span></strong><span style="color: #990000;">register</span><span style="color: #ff6633;"> int</span> i<strong><span style="color: #663300;"> =</span></strong><span style="color: #999900;"> 0</span><strong><span style="color: #663300;">;</span></strong> i<strong><span style="color: #663300;"> &lt;</span></strong> data_range<strong><span style="color: #663300;">;</span></strong> i<strong><span style="color: #663300;"> +=</span></strong> data_interval<strong><span style="color: #663300;">) {</span></strong>
      read_value<strong><span style="color: #663300;"> =</span></strong> array_read<strong><span style="color: #663300;">[</span></strong>i<strong><span style="color: #663300;"> +</span></strong> t<strong><span style="color: #663300;">];
    }
  }</span></strong>

  read_end<strong><span style="color: #663300;"> =</span></strong> clock<strong><span style="color: #663300;">();</span></strong>
  do_nothing<strong><span style="color: #663300;">(</span></strong>read_value<strong><span style="color: #663300;">);</span></strong><span style="color: #ff6633;">
  int</span> time<strong><span style="color: #663300;"> = (</span></strong>read_end<strong><span style="color: #663300;"> -</span></strong> read_begin<strong><span style="color: #663300;">) / (</span></strong>CLOCKS_PER_SEC<strong><span style="color: #663300;"> /</span></strong><span style="color: #999900;"> 1000</span><strong><span style="color: #663300;">);</span></strong></pre>
<p>3) Memory write:</p>
<p>The code:</p>
<pre><span style="color: #990000;">  const</span><span style="color: #ff6633;"> int</span> test_times<strong><span style="color: #663300;"> =</span></strong><span style="color: #999900;"> 1000000</span><strong><span style="color: #663300;">;</span></strong><span style="color: #990000;">
  const</span><span style="color: #ff6633;"> int</span> data_size<strong><span style="color: #663300;"> =</span></strong><span style="color: #999900;"> 1000000000</span><strong><span style="color: #663300;">;</span></strong><span style="color: #990000;">
  const</span><span style="color: #ff6633;"> int</span> data_interval<strong><span style="color: #663300;"> =</span></strong><span style="color: #999900;"> 1000000</span><strong><span style="color: #663300;">;</span></strong><span style="color: #ff6633;">

  int</span><strong><span style="color: #663300;">*</span></strong> array_write<strong><span style="color: #663300;"> =</span></strong><span style="color: #990000;"> new</span><span style="color: #ff6633;"> int</span><strong><span style="color: #663300;">[</span></strong>data_size<strong><span style="color: #663300;">];</span></strong>

  cout<strong><span style="color: #663300;"> &lt;&lt;</span></strong><span style="color: #009900;"> "----------------------"</span><strong><span style="color: #663300;"> &lt;&lt;</span></strong> endl<strong><span style="color: #663300;">
       &lt;&lt;</span></strong><span style="color: #009900;"> "Memory write bound test begins."</span><strong><span style="color: #663300;"> &lt;&lt;</span></strong> endl<strong><span style="color: #663300;">;</span></strong><span style="color: #ff6633;">

  long</span> write_begin<strong><span style="color: #663300;"> =</span></strong><span style="color: #999900;"> 0</span><strong><span style="color: #663300;">;</span></strong><span style="color: #ff6633;">
  long</span> write_end<strong><span style="color: #663300;"> =</span></strong><span style="color: #999900;"> 0</span><strong><span style="color: #663300;">;</span></strong><span style="color: #ff6633;">
  int</span> data_range<strong><span style="color: #663300;"> =</span></strong> data_size<strong><span style="color: #663300;"> -</span></strong> test_times<strong><span style="color: #663300;">;</span></strong>
  write_begin<strong><span style="color: #663300;"> =</span></strong> clock<strong><span style="color: #663300;">();</span></strong><span style="color: #ff0000;">

  for</span><strong><span style="color: #663300;"> (</span></strong><span style="color: #990000;">register</span><span style="color: #ff6633;"> int</span> t<strong><span style="color: #663300;"> =</span></strong><span style="color: #999900;"> 0</span><strong><span style="color: #663300;">;</span></strong> t<strong><span style="color: #663300;"> &lt;</span></strong> test_times<strong><span style="color: #663300;">;</span></strong> t<strong><span style="color: #663300;">++) {</span></strong><span style="color: #ff0000;">
    for</span><strong><span style="color: #663300;"> (</span></strong><span style="color: #990000;">register</span><span style="color: #ff6633;"> int</span> i<strong><span style="color: #663300;"> =</span></strong><span style="color: #999900;"> 0</span><strong><span style="color: #663300;">;</span></strong> i<strong><span style="color: #663300;"> &lt;</span></strong> data_range<strong><span style="color: #663300;">;</span></strong> i<strong><span style="color: #663300;"> +=</span></strong> data_interval<strong><span style="color: #663300;">) {</span></strong>
      array_write<strong><span style="color: #663300;">[</span></strong>i<strong><span style="color: #663300;"> +</span></strong> t<strong><span style="color: #663300;">] =</span></strong><span style="color: #999900;"> 528283</span><strong><span style="color: #663300;">;
    }
  }</span></strong>

  write_end<strong><span style="color: #663300;"> =</span></strong> clock<strong><span style="color: #663300;">();</span></strong><span style="color: #ff6633;">
  int</span> time<strong><span style="color: #663300;"> = (</span></strong>write_end<strong><span style="color: #663300;"> -</span></strong> write_begin<strong><span style="color: #663300;">) / (</span></strong>CLOCKS_PER_SEC<strong><span style="color: #663300;"> /</span></strong><span style="color: #999900;"> 1000</span><strong><span style="color: #663300;">);</span></strong></pre>
<p><strong>The result:</strong></p>
<p>Performance result on the physical machine:<br />
<!--        BODY,DIV,TABLE,THEAD,TBODY,TFOOT,TR,TH,TD,P { font-family:"Liberation Sans"; font-size:x-small } --></p>
<table border="0" cellspacing="0" frame="void" rules="none">
<colgroup>
<col width="86"></col>
<col width="56"></col>
<col width="91"></col>
<col width="95"></col>
</colgroup>
<tbody>
<tr>
<td style="border: 1px solid;" width="86" height="16" align="center"><strong><span style="font-family: Liberation Serif;"><br />
</span></strong></td>
<td style="border: 1px solid;" colspan="3" width="242" align="center"><strong><span style="font-family: Liberation Serif;">Physical machines test fedora kernel:</span></strong></td>
</tr>
<tr>
<td style="border: 1px solid;" height="16" align="right"><strong><span style="font-family: Liberation Serif;"><br />
</span></strong></td>
<td style="border: 1px solid;" align="right"><strong><span style="font-family: Liberation Serif;">cpu</span></strong></td>
<td style="border: 1px solid;" align="right"><strong><span style="font-family: Liberation Serif;">memory read</span></strong></td>
<td style="border: 1px solid;" align="right"><strong><span style="font-family: Liberation Serif;">memory write</span></strong></td>
</tr>
<tr>
<td style="border: 1px solid;" height="16" align="left"><strong><span style="font-family: Liberation Serif;">Average:</span></strong></td>
<td style="border: 1px solid;" align="right"><span style="font-family: Liberation Serif;">13257.6</span></td>
<td style="border: 1px solid;" align="right"><span style="font-family: Liberation Serif;">21449.6</span></td>
<td style="border: 1px solid;" align="right"><span style="font-family: Liberation Serif;">22243.8</span></td>
</tr>
<tr>
<td style="border: 1px solid;" height="16" align="left"><strong><span style="font-family: Liberation Serif;">Standard deviation:</span></strong></td>
<td style="border: 1px solid;" align="right"><span style="font-family: Liberation Serif;">4.72</span></td>
<td style="border: 1px solid;" align="right"><span style="font-family: Liberation Serif;">17.2</span></td>
<td style="border: 1px solid;" align="right"><span style="font-family: Liberation Serif;">18.96</span></td>
</tr>
<tr>
<td style="border: 1px solid;" height="16" align="left"><strong><span style="font-family: Liberation Serif;">SD/E:</span></strong></td>
<td style="border: 1px solid;" align="right"><span style="font-family: Liberation Serif;">0</span></td>
<td style="border: 1px solid;" align="right"><span style="font-family: Liberation Serif;">0</span></td>
<td style="border: 1px solid;" align="right"><span style="font-family: Liberation Serif;">0</span></td>
</tr>
<tr>
<td style="border: 1px solid;" height="16" align="left"><strong><span style="font-family: Liberation Serif;"><br />
</span></strong></td>
<td style="border: 1px solid;" align="left"><span style="font-family: Liberation Serif;"><br />
</span></td>
<td style="border: 1px solid;" align="left"><span style="font-family: Liberation Serif;"><br />
</span></td>
<td style="border: 1px solid;" align="left"><span style="font-family: Liberation Serif;"><br />
</span></td>
</tr>
<tr>
<td style="border: 1px solid;" height="16" align="left"><strong><span style="font-family: Liberation Serif;">Perf/Perf on Phy:</span></strong></td>
<td style="border: 1px solid;" align="right"><span style="font-family: Liberation Serif;">100.00%</span></td>
<td style="border: 1px solid;" align="right"><span style="font-family: Liberation Serif;">100.00%</span></td>
<td style="border: 1px solid;" align="right"><span style="font-family: Liberation Serif;">100.00%</span></td>
</tr>
</tbody>
</table>
<p>Performance result on Dom0:<br />
<!--        BODY,DIV,TABLE,THEAD,TBODY,TFOOT,TR,TH,TD,P { font-family:"Liberation Sans"; font-size:x-small } --></p>
<table border="0" cellspacing="0" frame="void" rules="none">
<colgroup>
<col width="86"></col>
<col width="56"></col>
<col width="91"></col>
<col width="95"></col>
</colgroup>
<tbody>
<tr>
<td style="border: 1px solid;" width="86" height="16" align="left"><span style="font-family: Liberation Serif;"><br />
</span></td>
<td style="border: 1px solid;" colspan="3" width="242" align="center"><strong><span style="font-family: Liberation Serif;">Dom0 suse kernel test</span></strong></td>
</tr>
<tr>
<td style="border: 1px solid;" height="16" align="left"><span style="font-family: Liberation Serif;"><br />
</span></td>
<td style="border: 1px solid;" align="right"><strong><span style="font-family: Liberation Serif;">cpu</span></strong></td>
<td style="border: 1px solid;" align="right"><strong><span style="font-family: Liberation Serif;">memory read</span></strong></td>
<td style="border: 1px solid;" align="right"><strong><span style="font-family: Liberation Serif;">memory write</span></strong></td>
</tr>
<tr>
<td style="border: 1px solid;" height="16" align="left"><strong><span style="font-family: Liberation Serif;">Average:</span></strong></td>
<td style="border: 1px solid;" align="right"><span style="font-family: Liberation Serif;">13283</span></td>
<td style="border: 1px solid;" align="right"><span style="font-family: Liberation Serif;">23059</span></td>
<td style="border: 1px solid;" align="right"><span style="font-family: Liberation Serif;">23856.6</span></td>
</tr>
<tr>
<td style="border: 1px solid;" height="16" align="left"><strong><span style="font-family: Liberation Serif;">Standard deviation:</span></strong></td>
<td style="border: 1px solid;" align="right"><span style="font-family: Liberation Serif;">4.58</span></td>
<td style="border: 1px solid;" align="right"><span style="font-family: Liberation Serif;">22.38</span></td>
<td style="border: 1px solid;" align="right"><span style="font-family: Liberation Serif;">18.07</span></td>
</tr>
<tr>
<td style="border: 1px solid;" height="16" align="left"><strong><span style="font-family: Liberation Serif;">SD/E:</span></strong></td>
<td style="border: 1px solid;" align="right"><span style="font-family: Liberation Serif;">0</span></td>
<td style="border: 1px solid;" align="right"><span style="font-family: Liberation Serif;">0</span></td>
<td style="border: 1px solid;" align="right"><span style="font-family: Liberation Serif;">0</span></td>
</tr>
<tr>
<td style="border: 1px solid;" height="16" align="left"><strong><span style="font-family: Liberation Serif;"><br />
</span></strong></td>
<td style="border: 1px solid;" align="left"><span style="font-family: Liberation Serif;"><br />
</span></td>
<td style="border: 1px solid;" align="left"><span style="font-family: Liberation Serif;"><br />
</span></td>
<td style="border: 1px solid;" align="left"><span style="font-family: Liberation Serif;"><br />
</span></td>
</tr>
<tr>
<td style="border: 1px solid;" height="16" align="left"><strong><span style="font-family: Liberation Serif;">Perf/Perf on Phy:</span></strong></td>
<td style="border: 1px solid;" align="right"><span style="color: #ff0000;"><span style="font-family: Liberation Serif;">99.81%</span></span></td>
<td style="border: 1px solid;" align="right"><span style="color: #ff0000;"><span style="font-family: Liberation Serif;">93.02%</span></span></td>
<td style="border: 1px solid;" align="right"><span style="color: #ff0000;"><span style="font-family: Liberation Serif;">93.24%</span></span></td>
</tr>
</tbody>
</table>
<p>Performance result on DomU:<br />
<!--        BODY,DIV,TABLE,THEAD,TBODY,TFOOT,TR,TH,TD,P { font-family:"Liberation Sans"; font-size:x-small } --></p>
<table border="0" cellspacing="0" frame="void" rules="none">
<colgroup>
<col width="86"></col>
<col width="56"></col>
<col width="91"></col>
<col width="95"></col>
</colgroup>
<tbody>
<tr>
<td style="border: 1px solid;" width="86" height="16" align="left"><span style="font-family: Liberation Serif;"><br />
</span></td>
<td style="border: 1px solid;" colspan="3" width="242" align="center"><strong><span style="font-family: Liberation Serif;">DomU fedora kernel test</span></strong></td>
</tr>
<tr>
<td style="border: 1px solid;" height="16" align="left"><span style="font-family: Liberation Serif;"><br />
</span></td>
<td style="border: 1px solid;" align="right"><strong><span style="font-family: Liberation Serif;">cpu</span></strong></td>
<td style="border: 1px solid;" align="right"><strong><span style="font-family: Liberation Serif;">memory read</span></strong></td>
<td style="border: 1px solid;" align="right"><strong><span style="font-family: Liberation Serif;">memory write</span></strong></td>
</tr>
<tr>
<td style="border: 1px solid;" height="16" align="left"><strong><span style="font-family: Liberation Serif;">Average:</span></strong></td>
<td style="border: 1px solid;" align="right"><span style="font-family: Liberation Serif,Times New Roman;">13307.6</span></td>
<td style="border: 1px solid;" align="right"><span style="font-family: Liberation Serif,Times New Roman;">23667.8</span></td>
<td style="border: 1px solid;" align="right"><span style="font-family: Liberation Serif,Times New Roman;">24459.2</span></td>
</tr>
<tr>
<td style="border: 1px solid;" height="16" align="left"><strong><span style="font-family: Liberation Serif;">Standard deviation:</span></strong></td>
<td style="border: 1px solid;" align="right"><span style="font-family: Liberation Serif,Times New Roman;">13.2</span></td>
<td style="border: 1px solid;" align="right"><span style="font-family: Liberation Serif,Times New Roman;">33.96</span></td>
<td style="border: 1px solid;" align="right"><span style="font-family: Liberation Serif,Times New Roman;">37.19</span></td>
</tr>
<tr>
<td style="border: 1px solid;" height="16" align="left"><strong><span style="font-family: Liberation Serif;">SD/E:</span></strong></td>
<td style="border: 1px solid;" align="right"><span style="font-family: Liberation Serif,Times New Roman;">0</span></td>
<td style="border: 1px solid;" align="right"><span style="font-family: Liberation Serif,Times New Roman;">0</span></td>
<td style="border: 1px solid;" align="right"><span style="font-family: Liberation Serif,Times New Roman;">0</span></td>
</tr>
<tr>
<td style="border: 1px solid;" height="16" align="left"><strong><span style="font-family: Liberation Serif;"><br />
</span></strong></td>
<td style="border: 1px solid;" align="left"><span style="font-family: Liberation Serif;"><br />
</span></td>
<td style="border: 1px solid;" align="left"><span style="font-family: Liberation Serif;"><br />
</span></td>
<td style="border: 1px solid;" align="left"><span style="font-family: Liberation Serif;"><br />
</span></td>
</tr>
<tr>
<td style="border: 1px solid;" height="16" align="left"><strong><span style="font-family: Liberation Serif;">Perf/Perf on Phy:</span></strong></td>
<td style="border: 1px solid;" align="right"><span style="color: #ff0000;"><span style="font-family: Liberation Serif;">99.62%</span></span></td>
<td style="border: 1px solid;" align="right"><span style="color: #ff0000;"><span style="font-family: Liberation Serif;">90.63%</span></span></td>
<td style="border: 1px solid;" align="right"><span style="color: #ff0000;"><span style="font-family: Liberation Serif;">90.94%</span></span></td>
</tr>
</tbody>
</table>
<p>From the test, we can see that the CPU performance is nearly 100%. But the memory performance is not so good especially for the DomU. This maybe because of the memory validation of Xen. But the CPU and memory performance of Xen VM is pretty good as a virtual machine.</p>


<b>Read more:</b><ul><li><a href='http://pkill.info/b/2258/managing-xen-dom0s-cpu-and-memory/' rel='bookmark' title='Permanent Link: Managing Xen Dom0&#8242;s CPU and Memory'>Managing Xen Dom0&#8242;s CPU and Memory</a></li>
<li><a href='http://pkill.info/b/810/an-io-performance-comparison-between-loopback-backed-and-blktap-backed-xen-file-backed-vbd/' rel='bookmark' title='Permanent Link: An I/O performance comparison between loopback backed and blktap backed Xen file-backed VBD'>An I/O performance comparison between loopback backed and blktap backed Xen file-backed VBD</a></li>
<li><a href='http://pkill.info/b/2256/setting-up-stable-xen-domu-with-fedora-unmodified-fedora-12-on-top-of-xenified-fedora-12-dom0-with-xen-4-0-0/' rel='bookmark' title='Permanent Link: Setting up Stable Xen DomU with Fedora: Unmodified Fedora 12 on top of Xenified Fedora 12 Dom0 with Xen 4.0'>Setting up Stable Xen DomU with Fedora: Unmodified Fedora 12 on top of Xenified Fedora 12 Dom0 with Xen 4.0</a></li>
</ul>]]></content:encoded>
			<wfw:commentRss>http://pkill.info/b/615/a-simple-cpu-and-memory-performance-test-of-xen-dom0-and-domu/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
