<?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>Tork Wrench &#187; p2v</title>
	<atom:link href="http://www.torkwrench.com/tag/p2v/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.torkwrench.com</link>
	<description>Things I learnt today, working on IBM Lotus Web Content Management.</description>
	<lastBuildDate>Wed, 04 Jan 2012 22:33:20 +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>Offline Physical 2 Virtual conversion (p2v) using free tools</title>
		<link>http://www.torkwrench.com/2010/02/23/offline-physical-2-virtual-conversion-p2v-using-free-tools/</link>
		<comments>http://www.torkwrench.com/2010/02/23/offline-physical-2-virtual-conversion-p2v-using-free-tools/#comments</comments>
		<pubDate>Tue, 23 Feb 2010 05:10:54 +0000</pubDate>
		<dc:creator>Graham</dc:creator>
				<category><![CDATA[howto]]></category>
		<category><![CDATA[p2v]]></category>
		<category><![CDATA[VMware]]></category>

		<guid isPermaLink="false">http://www.torkwrench.com/?p=200</guid>
		<description><![CDATA[How to convert a Physical Linux server to a Virtual Linux Server using free tools. <a href="http://www.torkwrench.com/2010/02/23/offline-physical-2-virtual-conversion-p2v-using-free-tools/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m a bit confused about VMware&#8217;s Converter and when you can use it. Which offering is free? Which is paid? From the last time I looked, I think you need the enterprise product to do an offline conversion. And call me old school, but online conversion just seems like voodoo to me. I was in the office this weekend, trying to convert an important physical machine to a virtual one and it failed for all sorts of reasons:</p>
<p>1. SSH keys. If you have a heavily locked down machine with ssh key logins, you cannot use the online converter.</p>
<p>2. Network. If you can&#8217;t hit the &#8216;source&#8217; machine with ssh, you can&#8217;t convert it. Maybe it&#8217;s on another network, or has a firewall running on it. </p>
<p>3. So since all that didn&#8217;t work, you&#8217;re forced to install the converter on the same machine you are converting. Except you don&#8217;t want to do that because you will have to fill out lots of forms because you are installing a new piece of software on a production machine.</p>
<p>This is a fail safe method of converting a physical Linux server into a virtual one. I converted my physical machine to an ESX 4.0 host, but this method would probably work for other versions of VMware as well.</p>
<p>1. Power down the server.</p>
<p>2. Boot up the server using a linux live cd . <a href="http://www.slax.org/">(I like Slax)</a></p>
<p>3. At the command line, run:</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">dd if=/dev/sda | ssh user@server 'dd of=sda.img'</div></div>
<p>Where server is a (linux) server with about twice as much disk space as you have, and /dev/sda is the address of the disk you would like to convert. You could probably do more that one disk using this howto, but I only did one.</p>
<p>4. Install Qemu on the Linux server. You should be able to find it in your yum repo, or apt-get repo.</p>
<p>5. Run this to convert the raw dd image to a vmdk.</p>
<div class="codecolorer-container text dawn" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">qemu-img convert sda.img -O vmdk sda.vmdk</div></div>
<p>6. Copy the sda.vmdk to your datastore, using scp if you have ssh enabled on your VMware host, or using the Datastore browser if you don&#8217;t. Make sure to create a folder for the new machine.</p>
<p>7. Create a new VM in the vSphere Console, using values similar to the physical machine you are replacing. Make sure to select Custom at the first screen, not typical.</p>
<p>8. When it comes time to create a new disk, point vSphere at your newly converted vmdk file.</p>
<p>9. Boot up the server, and you&#8217;re done!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.torkwrench.com/2010/02/23/offline-physical-2-virtual-conversion-p2v-using-free-tools/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

