<?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>olivetalks &#187; p2v</title>
	<atom:link href="http://www.olivetalks.com/tag/p2v/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.olivetalks.com</link>
	<description>The Olive has arrived and it has things to say…</description>
	<lastBuildDate>Tue, 20 Jul 2010 06:27:21 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Xen and CentOS 5.1 on PowerEdge 2950</title>
		<link>http://www.olivetalks.com/2008/04/14/xen-centos-pe2950/</link>
		<comments>http://www.olivetalks.com/2008/04/14/xen-centos-pe2950/#comments</comments>
		<pubDate>Mon, 14 Apr 2008 06:41:06 +0000</pubDate>
		<dc:creator>ZoltarStark</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[cruisecontrol]]></category>
		<category><![CDATA[p2v]]></category>
		<category><![CDATA[raid]]></category>
		<category><![CDATA[xen]]></category>

		<guid isPermaLink="false">http://www.olivetalks.com/2008/04/14/xen-centos-pe2950/</guid>
		<description><![CDATA[I've installed CentOS 5.1 on PowerEdge 2950. The installation includes Xen 3.0.3. The new server is running multiple Xen guests.]]></description>
			<content:encoded><![CDATA[<p>A few months ago I got my hands on a new server at work. It&#8217;s a Dell PowerEdge 2950. I was going to post a link but it seems Dell is having some problems with their website and half of the links I find in Google do not work.</p>
<p>The server has a Quad Core Xeon CPU E5440 and 4 GB of RAM. The storage needs are covered by a MD1000 disk array connected to a Perc5/E controller. The controller supports different RAID configurations: 0, 1, 10 and 50. I&#8217;ve tried most of them plus different combinations of software raid and hardware plus software raid. In the end I&#8217;ve settled on RAID-5 on 3 disks.</p>
<p>As the operating system I&#8217;ve installed <a href="http://www.centos.org/">CentOS 5.1</a> which is basically a free copy of RHEL 5.1. It comes with Xen 3.0.3 and of course I&#8217;ve installed that too. I want to convert the existing servers we have at work to Xen guests and have them running on this new machine. This will let me update OS on all the servers to the same version without bringing the whole office to halt. And once the servers are virtualized it will be much easier to deal with maintenance of the physical servers. Maybe I will even set up some cluster to host all these Xen guests. I didn&#8217;t have time to fully explore this idea but it sounds like it could offer further advantages.</p>
<p>So far I was able to convert one physical server to a virtual one with rather short downtime. I followed the instructions described in my <a href="/2008/02/16/xen-p2v-conversion-in-seven-simple-steps/" title="Xen p2v conversion">Xen p2v</a> post. The virtual server has been running fine for several months already. In terms of performance there are no problems &#8211; it helps that the Xen host has more powerful hardware and this server doesn&#8217;t need much I/O.</p>
<p>Besides this P2V conversion I&#8217;ve also created a Xen guest with Fedora Core 8 to run our CruiseControl server. The previous installation was running on a Fedora Core 5 host. I&#8217;ve used the occasion and upgraded CruiseControl to the latest version. Installing CruiseControl took me a long time. Mostly because I couldn&#8217;t find proper instructions. I&#8217;ve tried few different ones from the <a href="http://cruisecontrol.sourceforge.net/gettingstartedsourcedist.html">CruiseControl</a> website, from <a href="http://www.ibm.com/developerworks/java/library/j-cc/">IBM</a> and some others. Unfortunately I just couldn&#8217;t get it to work. So in the end I&#8217;ve just duplicated the setup we had before. It&#8217;s not perfect but it works and I don&#8217;t want to spend a week on that.</p>
<p>Third Xen guest I&#8217;ve created is a very small installation of CentOS 5.1 running with only 64 MB of RAM. It serves as a license server for some applications we use. I&#8217;ve minimized the amount of the services running to reduce the memory footprint and the virtual machine uses only 41 MB of RAM.</p>
<p>So far all three guests are running nicely together. I&#8217;ll be adding more of them in the future.</p>
<h3>Related post(s)</h3><ul class="related_post"><li><a href="http://www.olivetalks.com/2008/02/16/xen-p2v-conversion-in-seven-simple-steps/" title="Xen p2v conversion in seven simple steps">Xen p2v conversion in seven simple steps (0)</a></li><li><a href="http://www.olivetalks.com/2008/01/24/usb-forwarding-on-xen/" title="USB forwarding on Xen">USB forwarding on Xen (0)</a></li><li><a href="http://www.olivetalks.com/2009/02/21/ups-on-centos-with-selinux-part-2/" title="Setting up UPS on CentOS 5.2 with SELinux, part 2">Setting up UPS on CentOS 5.2 with SELinux, part 2 (1)</a></li><li><a href="http://www.olivetalks.com/2009/02/19/ups-on-centos-with-selinux-part-1/" title="Setting up UPS on CentOS 5.2 with SELinux, part 1">Setting up UPS on CentOS 5.2 with SELinux, part 1 (0)</a></li><li><a href="http://www.olivetalks.com/2009/02/15/find-changes-with-rpm-verify/" title="What files did I change?">What files did I change? (2)</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.olivetalks.com/2008/04/14/xen-centos-pe2950/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Xen p2v conversion in seven simple steps</title>
		<link>http://www.olivetalks.com/2008/02/16/xen-p2v-conversion-in-seven-simple-steps/</link>
		<comments>http://www.olivetalks.com/2008/02/16/xen-p2v-conversion-in-seven-simple-steps/#comments</comments>
		<pubDate>Sat, 16 Feb 2008 11:18:20 +0000</pubDate>
		<dc:creator>ZoltarStark</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[CentOS]]></category>
		<category><![CDATA[fully virtualized]]></category>
		<category><![CDATA[HVM]]></category>
		<category><![CDATA[IDE]]></category>
		<category><![CDATA[p2v]]></category>
		<category><![CDATA[RHEL]]></category>
		<category><![CDATA[SCSI]]></category>
		<category><![CDATA[xen]]></category>
		<category><![CDATA[Xen guest]]></category>

		<guid isPermaLink="false">http://www.olivetalks.com/2008/02/16/xen-p2v-conversion-in-seven-simple-steps/</guid>
		<description><![CDATA[Easily convert a physical Linux machine to a HVM guest running under Xen. Follow seven simple steps.]]></description>
			<content:encoded><![CDATA[<p>Xen is one of the currently available virtualization technologies. The commercially supported version is now owned by Cytrix while the Open Source community edition is available at<a href="http://xen.org/"> xen.org</a>. In this article I&#8217;ll be referring to the Open Source edition of Xen, version 3.0.3 which is available by default on CentOS 5.1.</p>
<p>I&#8217;ve recently performed two conversions of physical hosts to Xen guests running on CentOS 5.1 host. The physical hosts were running RHEL 3.7 and CentOS 4.6. It is important to know that after the conversion you end up with a fully virtualized guest &#8211; HVM. This has its effect on the performance, especially when it comes to I/O. It is a general limitation of fully virtualized Xen guests and not of this particular P2V method. I don&#8217;t recommend using it for virtualizing for example a file server. In such a case your only real choice is to create a new paravirtualized guest and migrate the services. This article won&#8217;t be describing that approach.</p>
<p>These instructions are based on the <a href="http://www.linuxjournal.com/article/9942">article</a> by Kyle Rankin. I&#8217;ve adapted it for Xen and added comments on those things which did cause me trouble. The instructions have been used to virtualize RHEL and CentOS servers to run as Xen guests on CentOS 5.1 but you should be able to use most of them for other distributions.</p>
<p><strong>First step</strong> in the conversion is to create LVM volume(s) in the Xen host to be used by the guest. To figure out how much space you need,   have a look at the physical server you want to virtualize. Each LVM volume will be visible in the guest as a separate hard disk. Note that HVM guests support only up to four disks. You will partition the disks from inside the guest in step two.</p>
<p><strong>Second step</strong> is to create a new HVM guest and boot it from a bootable rescue CD/DVD. You should use a rescue CD which matches the architecture of the physical host being virtualized. In step four you need to run <code>chroot</code> command on the guest and it won&#8217;t work if you try for example a 32 bit rescue CD on a 64 bit system. After you have already booted the guest from a rescue CD you need to create partitions to match the physical host. The easiest thing is to match exactly the number and sizes of partitions on the physical system. You can also put several file systems which were on separate partitions on the physical server on a single partition on the guest as long as you prepare enough space.</p>
<p><strong>Third step</strong> is to copy files from the physical server to the guest. This can take some time, so depending on whether you want to minimize the downtime you can do it either in one step or in two. Both methods use <code>rsync</code> command.  The second method is described by Kyle in his <a href="http://www.linuxjournal.com/article/9942">article</a>. The first method is basically the same but you only do the final synchronization. If you use a single transfer method you don&#8217;t need to use the <code>--delete</code> parameter for the final (and in this case the only) synchronization. The single transfer method is faster but it might not be available for you if you need to minimize the downtime.</p>
<p><strong>Fourth step</strong> is to adjust the boot settings in the guest. Without that the guest won&#8217;t boot. To do that make sure all the guest file systems are mounted and <code>chroot</code> into the guest root file system. From there you need to adjust the boot loader configuration. I use GRUB on my systems. For instructions on adjusting LILO you&#8217;ll have to look elsewhere.</p>
<p>First you need to change the file <code>/boot/grub/device.map</code>. If you see <code>/dev/sda</code> there you need to replace it with <code>/dev/hda</code>. This should represent your boot drive. Also verify that the guest boot partition is in <code>/etc/mtab</code>. After that you execute <code>grub-install /dev/hda</code>.</p>
<p>Another file which needs modifications is <code>/etc/grub.conf</code>. Pay attention to the lines starting with <code>boot=</code> and <code>splashimage=</code> as they probably need adjusting. The boot parameters need to be updated as appropriate. The important entries are <code>root (hd0,0)</code> and <code>root=</code> kernel parameter. Note that the first one selects the boot partition while the second selects the partition for the root file system. So for example if the boot partition is in <code>/dev/hda3</code> and root partition is <code>/dev/hda1</code> these entries should look <code>root (hd0,2)</code> (here the partitions are counted starting from zero) and <code>root=/dev/hda1</code> (here they are counted from one).</p>
<p><strong>Fifth step</strong> is to generate a new initrd file for the guest. First copy the existing initrd file somewhere in case you need it later. Then adjust the <code>/etc/modules.conf</code> or <code>/etc/modprobe.conf file</code> (only one will be present depending on the distribution and OS version). Remove all entries starting with <code>alias scsi_hostadapter</code>. After that you can run <code>mkinitrd</code> command. I recommend you use <code>-v</code> parameter for <code>mkinitrd</code>. This will list all the modules which will be included in the initrd. You will probably need at least libata and ata_piix &#8211; even if the physical server uses SCSI disks the HVM guest will use IDE. This depends on the OS of the physical machine you&#8217;re virtualizing because it was only important when I was converting the RHEL 3.7 server but not with CentOS 4.6. If they&#8217;re missing you can add them using <code>--with=</code> parameter. Another advice in case you need to verify the content of initrd file (probably because the guest doesn&#8217;t boot): take into account that older versions of <code>mkinitrd</code> produce just a gzipped ext2 filesystem while the newer ones create a gzipped cpio archive.</p>
<p><strong>Sixth step</strong> is to adjust the network settings and mount points for the guest. The configuration files you need to edit to change network settings are in <code>/etc/sysconfig/network-scripts</code>. Most likely you will have at least <code>ifcfg-eth0</code>. RHEL and CentOS usually specify the MAC address of the network adapter there so you need to change it to match with the MAC address of your guest. Otherwise when the guest boots the interface might not get activated. If you want to change the IP address of the guest you can also do it although I&#8217;d recommend to leave it for later when you already know the guest works. For the initial boot it should be easier if the guest runs with the same IP address as was used before by the physical server.</p>
<p>You also need to edit file <code>/etc/fstab</code> to match with the partition scheme defined for the guest.</p>
<p><strong>Seventh step</strong> is to boot the HVM guest which will be now able to replace the physical server. In order to avoid conflicts you should either power down the physical server, disconnect it from the network or change its IP address(es). After that you can reboot the Xen guest. If you followed the instructions and if the initrd file contains all required modules the system should boot and start all the configured services. If you&#8217;re using <code>kudzu</code> it will ask you a few questions about removed/added hardware. Kyle suggests to select &#8220;Keep Configuration&#8221; for any removed SCSI or network hardware, and select &#8220;Ignore&#8221; for any added SCSI or network hardware. If you are prompted about any removed video, sound, USB and similar hardware you can safely select &#8220;Remove Configuration&#8221;. When booting finishes verify that all required service are running and that you have network connectivity from within the guest.</p>
<p>That&#8217;s it. You should have now a fully virtualized guest running on the Xen host which has the same configuration as the physical server it replaces. It would be a good idea to perform this process first on a test physical server so you have more time to figure out solutions to any problems you may encounter.</p>
<hr align="left" width="20%" /> <a href="/category/computers/feed" title="rss feed to post"><img src="/wp-content/uploads/2008/01/feed-icon-14x14.png" alt="rss feed to post" /></a> Subscribe to the Computers posts of olivetalks, if you found this article interesting, thank you!</p>
<h3>Related post(s)</h3><ul class="related_post"><li><a href="http://www.olivetalks.com/2008/04/14/xen-centos-pe2950/" title="Xen and CentOS 5.1 on PowerEdge 2950">Xen and CentOS 5.1 on PowerEdge 2950 (2)</a></li><li><a href="http://www.olivetalks.com/2008/02/03/usb-forwarding-on-xen-it-just-does-not-work/" title="USB forwarding on Xen &#8211; it just does not work">USB forwarding on Xen &#8211; it just does not work (3)</a></li><li><a href="http://www.olivetalks.com/2008/01/24/usb-forwarding-on-xen/" title="USB forwarding on Xen">USB forwarding on Xen (0)</a></li><li><a href="http://www.olivetalks.com/2009/02/15/find-changes-with-rpm-verify/" title="What files did I change?">What files did I change? (2)</a></li><li><a href="http://www.olivetalks.com/2009/02/21/ups-on-centos-with-selinux-part-2/" title="Setting up UPS on CentOS 5.2 with SELinux, part 2">Setting up UPS on CentOS 5.2 with SELinux, part 2 (1)</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://www.olivetalks.com/2008/02/16/xen-p2v-conversion-in-seven-simple-steps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
