<?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>/dev/zero &#187; centos</title>
	<atom:link href="http://blogs.pure-chaos.com/andrew/archives/tag/centos/feed" rel="self" type="application/rss+xml" />
	<link>http://blogs.pure-chaos.com/andrew</link>
	<description>The Life and Times of a Unix Geek</description>
	<lastBuildDate>Sun, 29 Jan 2012 08:52:03 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>CentOS domU under Debian</title>
		<link>http://blogs.pure-chaos.com/andrew/archives/764</link>
		<comments>http://blogs.pure-chaos.com/andrew/archives/764#comments</comments>
		<pubDate>Fri, 13 Jun 2008 15:00:56 +0000</pubDate>
		<dc:creator>Andrew</dc:creator>
				<category><![CDATA[geeking]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[ljxp]]></category>
		<category><![CDATA[Xen]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[lvm]]></category>
		<category><![CDATA[redhat]]></category>

		<guid isPermaLink="false">http://blogs.pure-chaos.com/andrew/?p=764</guid>
		<description><![CDATA[I finally got a CentOS 5 domU running under Debian. The xen-tools xen-create-image method didn&#8217;t work. I managed to find an appropriate build script for centos5, but it was pretty badly out of date, trying to install RPM versions that don&#8217;t exist on the mirror servers any more. Trying to bring it back up to [...]]]></description>
			<content:encoded><![CDATA[<div id="post_content_764" class="post_content">
<p>I finally got a CentOS 5 domU running under Debian.<br />
The xen-tools xen-create-image method didn&#8217;t work. I managed to find an appropriate build script for centos5, but it was pretty badly out of date, trying to install RPM versions that don&#8217;t exist on the mirror servers any more. Trying to bring it back up to date would have been a PITA. It has the RPM versions hard-coded in the script.<br />
However the instructions at http://wiki.kartbuilding.net/index.php/Create_Centos5_DomU_on_Debian_Etch_Dom0 worked a treat.<br />
After following those steps, I converted it from a file-based image, to an LVM, with the following steps:<br />
Manually create logical volumes for the filesystem and swap. I use 40G filesystem LVs and 128M swaps.</p>
<p># mkdir /mnt/loop<br />
# mkdir /mnt/cenots<br />
# mount /home/andrew/centos.5-0.img /mnt/loop -o loop<br />
# mount /dev/mapper/ember-centos5&#8211;disk /mnt/centos<br />
# cd /mnt/loop<br />
# cp -Rp bin  boot  dev  etc  home  lib media  mnt  opt root  sbin  selinux  srv  sys  tmp  usr  var ../centos<br />
# cd<br />
# umount /mnt/loop<br />
# umount /mnt/centos</p>
<p>Then edit /etc/xen/domains/centos.cfg and change the following lines:</p>
<p>kernel = &#8220;/boot/vmlinuz-2.6.18-4-xen-686&#8243;<br />
ramdisk = &#8220;/boot/initrd.img-2.6.18-4-xen-686&#8243;<br />
vif = ['bridge=xenbr0']<br />
disk = ['file:/xens/name_of_new_server_to_be/centos.5-0.img,sda1,w','file:/xens/name_of_new_server_to_be/centos.swap,sda2,w']</p>
<p>To:</p>
<p>kernel = &#8216;/boot/vmlinuz-2.6.18-6-xen-686&#8242;<br />
ramdisk = &#8220;/boot/initrd.img-2.6.18-6-xen-686&#8243;<br />
vif = [ 'ip=192.168.1.13' ]<br />
disk    = [ 'phy:ember/centos5-disk,sda1,w', 'phy:ember/centos5-swap,sda2,w' ]</p>
<p>Then &#8220;xm create centos&#8221;. Boom! Centos 5, running as a domU on a Debian Etch dom0, from a logical volume.<br />
And I still have the original centos5 image file for creating fresh domUs.</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://blogs.pure-chaos.com/andrew/archives/764/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

