<?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; Linux</title>
	<atom:link href="http://pkill.info/b/tag/linux/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>Creating Fedora Live USB Media</title>
		<link>http://pkill.info/b/2463/creating-fedora-live-usb-media/</link>
		<comments>http://pkill.info/b/2463/creating-fedora-live-usb-media/#comments</comments>
		<pubDate>Tue, 07 Sep 2010 16:45:43 +0000</pubDate>
		<dc:creator>Zhiqiang Ma</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[client config]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[gnome]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[tutorials]]></category>

		<guid isPermaLink="false">http://pkill.info/b/?p=2463</guid>
		<description><![CDATA[How to create a Fedora live USB media is introduced in this post. We can boot to Fedora operating system environment through a live USB system in the USB flash media on a USB-bootable computer without writing the computer&#8217;s hard disk. We can also install Fedora operating system from the live system environment. Remember to [...]

<b>Read more:</b><ul><li><a href='http://pkill.info/b/2418/setting-up-stable-xen-domu-with-fedora-unmodified-fedora-11-with-pv_ops-kernel/' rel='bookmark' title='Permanent Link: Setting up Stable Xen DomU with Fedora: Unmodified Fedora 11 with pv_ops Kernel'>Setting up Stable Xen DomU with Fedora: Unmodified Fedora 11 with pv_ops Kernel</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>How to create a Fedora live USB media is introduced in this post. We can boot to Fedora operating system environment through a live USB system in the USB flash media on a USB-bootable computer without writing the computer&#8217;s hard disk. We can also install Fedora operating system from the live system environment.</p>
<p>Remember to backup data in the USB stick before proceeding the method below.</p>
<h3>Command line method</h3>
<h4>Download the Fedora Live ISO image</h4>
<p>We can download Fedora 12 Live ISO image by:</p>
<pre>$ wget http://download.fedora.redhat.com/pub/fedora/linux/releases/12/Live/i686/Fedora-12-i686-Live.iso</pre>
<p>Or if you are using x86_64 system:</p>
<pre>$ wget http://download.fedora.redhat.com/pub/fedora/linux/releases/12/Live/x86_64/Fedora-12-x86_64-Live.iso</pre>
<p>Other Fedora Live ISO image with different releases version can be found from: http://download.fedora.redhat.com/pub/fedora/linux/releases/</p>
<p>You can even download an <em>boot.iso</em> and <em>netinst.iso</em> with smaller size if you want to install from network of local image. The method in this part works with these images too.</p>
<h4>Directly copy the image to USB media</h4>
<p>We can use <em>dd</em> to make a direct copy from the image to USB media. Remember to backup your data on the USB media since all data will be lost after <em>dd.</em></p>
<pre># dd if=./F12-Live-i686.iso of=/dev/sdX bs=8M
</pre>
<p><em>/dev/sdX</em> is device name of the USB stick.</p>
<h4>Test the Live USB media</h4>
<p>We can use <em>qemu</em> or other virtualization tools to try boot from the Live USB media we created.</p>
<pre># umount /dev/sdbX
# qemu -hda /dev/sdX -m 256 -vga std
</pre>
<p>/dev/sdX is the Live USB media&#8217;s device name.</p>
<h3>Graphical method with liveusb-creator</h3>
<p>This method can be used on both Linux and Windows. For windows users the <em>liveusb-creator</em> application can be downloaded from: <a href="http://fedorahosted.org/liveusb-creator" target="_blank">http://fedorahosted.org/liveusb-creator</a></p>
<p>For Fedora users, <em>liveusb-creator </em>is already in the repository.</p>
<pre># yum install liveusb-creator
</pre>
<p>Run<em> liveusb-creator </em>and select the &#8220;Live CD image&#8221; path and the &#8220;Target Device&#8221;, and then click &#8220;Create Live USB&#8221;. The application will write the Live image to the USB stick.</p>
<p>After it finishes, we can also use <em>qemu </em>as described above to test the Live USB media.</p>


<b>Read more:</b><ul><li><a href='http://pkill.info/b/2418/setting-up-stable-xen-domu-with-fedora-unmodified-fedora-11-with-pv_ops-kernel/' rel='bookmark' title='Permanent Link: Setting up Stable Xen DomU with Fedora: Unmodified Fedora 11 with pv_ops Kernel'>Setting up Stable Xen DomU with Fedora: Unmodified Fedora 11 with pv_ops Kernel</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/2463/creating-fedora-live-usb-media/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.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 DomU with Fedora: Unmodified Fedora 11 with pv_ops Kernel</title>
		<link>http://pkill.info/b/2418/setting-up-stable-xen-domu-with-fedora-unmodified-fedora-11-with-pv_ops-kernel/</link>
		<comments>http://pkill.info/b/2418/setting-up-stable-xen-domu-with-fedora-unmodified-fedora-11-with-pv_ops-kernel/#comments</comments>
		<pubDate>Thu, 26 Aug 2010 21:36:17 +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[domu]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[xen]]></category>

		<guid isPermaLink="false">http://pkill.info/b/?p=2418</guid>
		<description><![CDATA[Creating file-backed virtual block device (VBD) for Xen virtual machines and installing Fedora 11 in Xen DomU via internet will be introduced. The Dom0 platform on top of which this DomU is set up is introduced also in this site. Please refer to Xen solution for the latest stable Xen Dom0 solution. Create file-backed VBD: [...]

<b>Read more:</b><ul><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>
<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>Creating file-backed virtual block device (VBD) for Xen virtual machines and installing Fedora 11 in Xen DomU via internet will be introduced.</p>
<p>The Dom0 platform on top of which this DomU is set up is introduced also in this site. 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>
<h3>Create file-backed VBD:</h3>
<p>The actual space of VBD will be the amount of disk the virtual machine used. And it will be convenient if the virtual machine will be duplicated since the work is just copying the VBD file and changing some configurations.</p>
<p>Create a 20GB sparse file-backed VBD:</p>
<pre># dd if=/dev/zero of=/lhome/xen/f11install/vmdisk0 bs=1k seek=20480k count=1</pre>
<p>Make a ext4 file system in the disk file:</p>
<pre># mkfs -t ext4 vmdisk0</pre>
<h3>Install Fedora 11 Linux via Internet</h3>
<p>First download the pxeboot kernel of Fedora 11 for installation via Internet. Download vmlinuz and initrd.img from here:</p>
<pre>http://download.fedora.redhat.com/pub/fedora/linux/releases/11/Fedora/x86_64/os/images/pxeboot/</pre>
<p>We assume these two files are stored in /lhome/xen/f11install/.</p>
<p>Create an installation profile f11.install:</p>
<pre>name="F11INSTALL"
vcpus=2
memory=2048
disk = ['<strong>file</strong>:/lhome/xen/f11install/vmdisk0,xvda,w' ]
vif = [ 'bridge=eth0' ]
kernel = "/lhome/xen/f11install/vmlinuz"
ramdisk = "/lhome/xen/f11install/initrd.img"
on_reboot = 'restart'
on_crash = 'restart'</pre>
<p>The virtual machine’s name is “F11INSTALL”, memory is 2G, CPU number is 2, disk, kernel and ramdisk is prepared in the above steps.</p>
<p>Start this virtual machine and connect to this virtual machine’s console and complete the installation:</p>
<pre># xm create -c f11.install</pre>
<p>The console can be released by &#8220;<em>Ctrl+]&#8221;</em>. And it can be reconnected by:</p>
<pre># xm console F11INSTALL</pre>
<p>The installation of Fedora 11 will start. The gateway and DNS server should be set according to the network configuration.</p>
<p>The URL of installation source I used during installation is:</p>
<pre>http://download.fedora.redhat.com/pub/fedora/linux/releases/11/Fedora/x86_64/os/</pre>
<p>After successfully installation of this virtual machine. It can be shut down by:</p>
<pre># xm shutdown F11INSTALL</pre>
<p>This virtual machine can be duplicated to get more VMs: <a href="http://pkill.info/b/605/how-to-duplicate-xen-domu-virtual-machines/" target="_blank">How to duplicate Xen DomU virtual machines</a>.</p>
<h3>Start DomU</h3>
<p>Remember to <strong>update</strong> your system after the first boot. The 2.6.30 kernel is more stable running as DomU than the default one.</p>
<p>Create a profile <em>vm-10.0.0.123.run</em> for loading the virtual machine:</p>
<pre>name="10.0.0.123"
vcpus=2
memory=2048
disk = ['file:/lhome/xen/vm-10.0.0.123/vmdisk0,xvda,w' ]
vif = [ 'bridge=eth0' ]
bootloader = "/usr/bin/pygrub"
on_reboot = 'restart'
on_crash = 'restart'</pre>
<p>Here we use the PyGrub (“/usr/bin/pygrub”) as the bootloader. PyGrub starts Linux DomUs with the kernels that lie in the filesystem of the DomU instead of the kernels that lie in the filesystem of the Dom0. That makes the kernel update and management easier.</p>
<p>The blktap2 VBD driver has better performance than blkback backed VBD. The blkback backed driver is used here for safety writing to the disk. The disk driver can be changed to use blktap2 driver later after updating the system. A blktap2 driver can be configured like this:</p>
<pre>disk = ['tap:aio:/lhome/xen/f11install/vmdisk0,xvda,w' ]</pre>
<p>Then the DomU can be started using this profile:</p>
<pre># xm create vm-10.0.0.123.run</pre>
<p>The console of this DomU can be connected to:</p>
<pre># xm console vm-10.0.0.123</pre>
<p>The console can be released by &#8220;<em>Ctrl+]&#8221;</em>.</p>


<b>Read more:</b><ul><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>
<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/2418/setting-up-stable-xen-domu-with-fedora-unmodified-fedora-11-with-pv_ops-kernel/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>Xen Solutions</title>
		<link>http://pkill.info/b/2367/xen-solutions/</link>
		<comments>http://pkill.info/b/2367/xen-solutions/#comments</comments>
		<pubDate>Mon, 16 Aug 2010 20:00:31 +0000</pubDate>
		<dc:creator>Zhiqiang Ma</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[client config]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[server config]]></category>
		<category><![CDATA[Solutions]]></category>
		<category><![CDATA[tutorials]]></category>
		<category><![CDATA[xen]]></category>

		<guid isPermaLink="false">http://pkill.info/b/?p=2367</guid>
		<description><![CDATA[The Xen solutions including installing and configuring Dom0 and DomU are summarized here. This post will be updated when our solution changes. Dom0 installation and configuration Stable Dom0 solution (recommended): Setting up Stable Xen Dom0 with Fedora: Xen 3.4.3 with Xenified Linux Kernel 2.6.32.13 in Fedora 12 Latest Xen 4.0.1 Dom0 solution (Fedora 11 DomUs [...]

<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/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>The Xen solutions including installing and configuring Dom0 and DomU are summarized here. This post will be updated when our solution changes.</p>
<h3>Dom0 installation and configuration</h3>
<p>Stable Dom0 solution (recommended):</p>
<p><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/">Setting up Stable Xen Dom0 with Fedora: Xen 3.4.3 with Xenified Linux Kernel 2.6.32.13 in Fedora 12</a></p>
<p>Latest Xen 4.0.1 Dom0 solution (Fedora 11 DomUs can&#8217;t boot on top of it):</p>
<p><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/">Setting up Stable Xen Dom0 with Fedora: Xen 4.0.1 with Xenified Linux Kernel 2.6.32.13 in Fedora 12</a></p>
<h3>DomU installation and configuration</h3>
<p>Unmodified Fedora DomU with pv_ops kernel:</p>
<p>Fedora 12 (recommended):</p>
<p><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/">Setting up Stable Xen DomU with Fedora: Unmodified Fedora 12 on top of Xenified Fedora 12 Dom0 with Xen 4.0.0</a></p>
<p>Fedora 11:</p>
<p><a href="http://pkill.info/b/2418/setting-up-stable-xen-domu-with-fedora-unmodified-fedora-11-with-pv_ops-kernel/">Setting up Stable Xen DomU with Fedora: Unmodified Fedora 11 with pv_ops Kernel</a></p>
<h3>Dom0 management</h3>
<p>Dom0&#8242;s CPU and memory configuration advises:</p>
<p><a href="http://pkill.info/b/2258/managing-xen-dom0s-cpu-and-memory/">Managing Xen Dom0′s CPU and Memory</a></p>
<h3>DomU management</h3>
<p><a href="http://pkill.info/b/210/create-and-manage-virtual-machines-on-xen/">Create and manage virtual machines on Xen</a></p>
<p><a href="http://pkill.info/b/605/how-to-duplicate-xen-domu-virtual-machines/">How to Duplicate Xen DomU Virtual Machines</a></p>
<p><a href="http://pkill.info/b/824/automatically-backing-up-xen-file-backed-domu/">Automatically backing up Xen File-backed DomU</a></p>
<p><a href="http://pkill.info/b/820/unified-xen-domu-configuration-file/">Unified Xen DomU configuration file</a></p>
<h3>Problems</h3>
<p>Some problems that may happen and their solution:</p>
<p><a href="http://pkill.info/b/2354/problems-during-installing-xen-dom0-in-fedora/">Problems during Installing Xen Dom0 in Fedora</a></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/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/2367/xen-solutions/feed/</wfw:commentRss>
		<slash:comments>1</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>Finding out Linux Network Configuration Information</title>
		<link>http://pkill.info/b/2350/finding-out-linux-network-configuration-information/</link>
		<comments>http://pkill.info/b/2350/finding-out-linux-network-configuration-information/#comments</comments>
		<pubDate>Sat, 14 Aug 2010 15:01:09 +0000</pubDate>
		<dc:creator>Zhiqiang Ma</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[client config]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[server config]]></category>

		<guid isPermaLink="false">http://pkill.info/b/?p=2350</guid>
		<description><![CDATA[There various network configuration information in Linux and lots tools can be used to find out those configuration information. Finding out these network information in Fedora Linux as the example will be introduced. IP address, MAC address and netmask ifconfig will print out all the network interfaces and their information including the IP address and [...]

<b>Read more:</b><ul><li><a href='http://pkill.info/b/2218/configuration-of-linux-kernel-video-mode/' rel='bookmark' title='Permanent Link: Configuration of Linux Kernel Video Mode'>Configuration of Linux Kernel Video Mode</a></li>
<li><a href='http://pkill.info/b/1411/sending-email-from-mailx-command-in-linux-using-gmails-smtp/' rel='bookmark' title='Permanent Link: Sending Email from mailx Command in Linux Using Gmail’s Smtp'>Sending Email from mailx Command in Linux Using Gmail’s Smtp</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>
</ul>]]></description>
			<content:encoded><![CDATA[<p>There various network configuration information in Linux and lots tools can be used to find out those configuration information. Finding out these network information in Fedora Linux as the example will be introduced.</p>
<h3>IP address, MAC address and netmask</h3>
<p><em>ifconfig</em> will print out all the network interfaces and their information including the IP address and netmask.</p>
<pre>$ ifconfig</pre>
<p>A typical output is like this:</p>
<pre>eth0      Link encap:Ethernet  HWaddr 00:26:22:A1:25:0F
inet addr:143.89.135.175  Bcast:143.89.135.255  Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
RX packets:305973 errors:0 dropped:0 overruns:0 frame:0
TX packets:337971 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:196287324 (187.1 MiB)  TX bytes:134890044 (128.6 MiB)
Interrupt:30

lo        Link encap:Local Loopback
inet addr:127.0.0.1  Mask:255.0.0.0
UP LOOPBACK RUNNING  MTU:16436  Metric:1
RX packets:274 errors:0 dropped:0 overruns:0 frame:0
TX packets:274 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:37244 (36.3 KiB)  TX bytes:37244 (36.3 KiB)</pre>
<p><em>eth0 </em>is the network interface. <em>lo</em> is the loopback device.</p>
<p>The IP address is shown in <em>inet addr</em> field.</p>
<h3>DNS server, hosts file and DNS look up order</h3>
<p>The DNS server for Linux to contact is stored in <em>/etc/resolve.conf</em>. The DNS server(s) can be listed by:</p>
<pre>$ cat /etc/resolve.conf</pre>
<p>A line like this specifies the DNS server:</p>
<pre>nameserver 8.8.8.8</pre>
<p>The <em>hosts</em> file for Linux is stored in <em>/etc/hosts. </em>The first two lines (127.0.0.1 and ::1) which map the <em>localhost</em> name shouldn&#8217;t be changed since <em>localhost</em> is used for interprocess communication.</p>
<pre>127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
10.0.1.8   mysite.mydomain mysite</pre>
<p>The order of DNS look up is defined in <em>/etc/nsswitch.conf</em>. Whether the hosts file should be looked up first can be defined. The line in <em>/etc/nsswitch.conf</em> for DNS look up order is:</p>
<pre>hosts:          dns [!UNAVAIL=return] files</pre>
<h3>Gateway</h3>
<p>The gateway can be find out by looking at the rules in route table:</p>
<pre>$ ip route show</pre>
<p>A line like this defines the gateway:</p>
<pre>default via 143.89.135.254 dev eth0  proto static</pre>
<h3>Host name</h3>
<p>The host name is specified in <em>/etc/sysconfig/network.</em> The HOSTNAME variable is for the machine&#8217;s host name:</p>
<pre>HOSTNAME=localhost.localdomain</pre>


<b>Read more:</b><ul><li><a href='http://pkill.info/b/2218/configuration-of-linux-kernel-video-mode/' rel='bookmark' title='Permanent Link: Configuration of Linux Kernel Video Mode'>Configuration of Linux Kernel Video Mode</a></li>
<li><a href='http://pkill.info/b/1411/sending-email-from-mailx-command-in-linux-using-gmails-smtp/' rel='bookmark' title='Permanent Link: Sending Email from mailx Command in Linux Using Gmail’s Smtp'>Sending Email from mailx Command in Linux Using Gmail’s Smtp</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>
</ul>]]></content:encoded>
			<wfw:commentRss>http://pkill.info/b/2350/finding-out-linux-network-configuration-information/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Yum Installing Old Packages from the Repository</title>
		<link>http://pkill.info/b/2346/yum-installing-old-packages-from-the-repository/</link>
		<comments>http://pkill.info/b/2346/yum-installing-old-packages-from-the-repository/#comments</comments>
		<pubDate>Wed, 11 Aug 2010 12:07:07 +0000</pubDate>
		<dc:creator>Zhiqiang Ma</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[client config]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[server config]]></category>
		<category><![CDATA[shell]]></category>
		<category><![CDATA[yum]]></category>

		<guid isPermaLink="false">http://pkill.info/b/?p=2346</guid>
		<description><![CDATA[We may need to install some old packages such as the kernel in our Linux box. Let&#8217;s use installing a older version of Linux kernel in Fedora as the example to introduce how to install old packages from the repository using yum. By now, suppose we have install kernel-2.6.32.16-143 in the Linux box and we [...]

<b>Read more:</b><ul><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/1484/installing-nvidia-driver-on-fedora/' rel='bookmark' title='Permanent Link: Installing Nvidia Driver on Fedora'>Installing Nvidia Driver on Fedora</a></li>
<li><a href='http://pkill.info/b/2463/creating-fedora-live-usb-media/' rel='bookmark' title='Permanent Link: Creating Fedora Live USB Media'>Creating Fedora Live USB Media</a></li>
</ul>]]></description>
			<content:encoded><![CDATA[<p>We may need to install some old packages such as the kernel in our Linux box. Let&#8217;s use installing a older version of Linux kernel in Fedora as the example to introduce how to install old packages from the repository using yum.</p>
<p>By now, suppose we have install kernel-2.6.32.16-143 in the Linux box and we want to install some older kernel in the repository.</p>
<p>First find out all the kernels in the repository by:</p>
<pre># yum list --showduplicates kernel</pre>
<p>All the kernel packages will be listed like this:</p>
<pre>Installed Packages
kernel.i686                        2.6.32.16-141.fc12               @updates
Available Packages
kernel.i686                        2.6.31.5-127.fc12                fedora
kernel.i686                        2.6.32.16-150.fc12               updates</pre>
<p>We find out that 2.6.31.5-127.fc12 kernel package is available. We can install it now:</p>
<pre># yum install kernel-2.6.31.5-127.fc12</pre>
<p>Then yum will install the kernel of older version. For other packages, the method is similar with kernel. We just need to replace kernel with the package name above.</p>


<b>Read more:</b><ul><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/1484/installing-nvidia-driver-on-fedora/' rel='bookmark' title='Permanent Link: Installing Nvidia Driver on Fedora'>Installing Nvidia Driver on Fedora</a></li>
<li><a href='http://pkill.info/b/2463/creating-fedora-live-usb-media/' rel='bookmark' title='Permanent Link: Creating Fedora Live USB Media'>Creating Fedora Live USB Media</a></li>
</ul>]]></content:encoded>
			<wfw:commentRss>http://pkill.info/b/2346/yum-installing-old-packages-from-the-repository/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
