<?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>ITworks &#187; virtualization</title>
	<atom:link href="http://itworks.hu/tag/virtualization/feed/" rel="self" type="application/rss+xml" />
	<link>http://itworks.hu</link>
	<description>Random musings in IT</description>
	<lastBuildDate>Mon, 09 Jan 2012 08:01:21 +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>Starting VirtualBox on boot</title>
		<link>http://itworks.hu/2009/08/06/starting-virtualbox-on-boot/</link>
		<comments>http://itworks.hu/2009/08/06/starting-virtualbox-on-boot/#comments</comments>
		<pubDate>Thu, 06 Aug 2009 14:13:50 +0000</pubDate>
		<dc:creator>csak</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[VirtualBox]]></category>
		<category><![CDATA[virtualization]]></category>

		<guid isPermaLink="false">http://itworks.hu/?p=36</guid>
		<description><![CDATA[After setting up VirtalBox based virtualization on our server, I needed a way to have it automatically started and stopped whenever the host is restarted. Also it would be for the better if the system was not simply started and &#8230; <a href="http://itworks.hu/2009/08/06/starting-virtualbox-on-boot/">Read more <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p>After setting up VirtalBox based virtualization on our server, I needed a way to have it automatically started and stopped whenever the host is restarted.</p>
<p>Also it would be for the better if the system was not simply started and stopped, but rather saved and restored when possible. I love scripting, but prefer the easy way, and since it&#8217;s a problem many have probably already tackled I sniffed around for a while.</p>
<p>There it was, new and shiny <a href="http://vboxtool.sourceforge.net/">tool</a> to make my day!</p>
]]></content:encoded>
			<wfw:commentRss>http://itworks.hu/2009/08/06/starting-virtualbox-on-boot/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Migrating from physical to virtual server with pain and tears</title>
		<link>http://itworks.hu/2009/08/05/migrating-from-physical-to-virtual-server-with-pain-and-tears/</link>
		<comments>http://itworks.hu/2009/08/05/migrating-from-physical-to-virtual-server-with-pain-and-tears/#comments</comments>
		<pubDate>Wed, 05 Aug 2009 13:45:39 +0000</pubDate>
		<dc:creator>csak</dc:creator>
				<category><![CDATA[annoyance]]></category>
		<category><![CDATA[IT]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[virtualization]]></category>

		<guid isPermaLink="false">http://itworks.hu/?p=28</guid>
		<description><![CDATA[We host the server for a legacy application in our office. Since it&#8217;s more like a favor than a real assignment we don&#8217;t care much about the server. However we had a few network issues lately, so we decided to &#8230; <a href="http://itworks.hu/2009/08/05/migrating-from-physical-to-virtual-server-with-pain-and-tears/">Read more <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p>We host the server for a legacy application in our office. Since it&#8217;s more like a favor than a real assignment we don&#8217;t care much about the server. However we had a few network issues lately, so we decided to migrate it to a virtual server running on our hosted server. Also the machine produces lot&#8217;s of heat and noise, so we&#8217;d better had it switched off.</p>
<p>This seemed like such an easy task to do, what could be hard in creating a disk image with <a href="http://clonezilla.org/">CloneZilla</a>, copy it to a server, set up a virtual machine there with <a href="http://www.linux-kvm.org/">kvm</a>, restore the image and redirect all traffic to this computer instead of the one in our office. We estimated it could be done in two to three hours tops, and we get home around 7PM.</p>
<p><span id="more-28"></span>We missed a few points though. The machine had a faulty CD drive, so booting <a href="http://clonezilla.org/">CloneZilla</a> was not so easy. We went for the network boot option, but something just didn&#8217;t work out on the PXE boot. So we switched the CD drive to a working one, well at least it used to work a few years ago&#8230; But not anymore. So we decided to scrap the swap partition boot <a href="http://clonezilla.org/">CloneZilla</a> from there, and create our image. It worked! Almost. Except that <a href="http://clonezilla.org/">CloneZilla</a> didn&#8217;t quite identify the disk partition types, and didn&#8217;t see the RAID device at all. It turned out, that the utility somehow runs in user mode and starting the partimage utility with sudo is an acceptable workaround. We then had the disk image on a different server, where we tried to restore it into a 10GB virtual disk image. As it turns out, <a href="http://clonezilla.org/">CloneZilla</a> is unable to restore images that are bigger then the target partition even if there is less data in it.</p>
<p>So we went on a quest for a <a href="http://www.gnu.org/software/parted/">parted</a> that can shrink our 100GB partition to 10GB. Well, if there was one&#8230; As we had no intention of booting from the non-working CD we popped in a disk from our jukebox server with Ubuntu on it. No wonder it worked flawlessly, until I learned that a RAID 1 device with ext3 on it is not easy to shrink. So I decided to break the RAID block, remove the incompatible ext3 flags, and resize the first partition to 10GB. Then I used partimage to create the backup, it was created with about 300MB/min.</p>
<p>The backup was quickly copied over to the eagerly waiting server, that was to host the virtual machine. We fired up the VM with a 10GB disk image and <a href="http://clonezilla.org/">CloneZilla</a> iso mounted as a CD, and went out to restore the image to our partition. We didn&#8217;t even try to use the <a href="http://clonezilla.org/">CloneZilla</a> UI, except for mounting the host with sshfs to access our backup image. The setup was a breeze, except, that the restore speed was only about 50MB/min. No worries, it&#8217;s a small application after all, we don&#8217;t need a huge server for it anyway. It was also 1 AM already, so we didn&#8217;t pay much attention to detail anymore.</p>
<p>We redirected all the network traffic, to the new virtual interface and tested it while waiting for the restore to complete. During redirect, we fired a command, that killed the network adapter under us, so we were desperately trying to reach the hosting provider, to reboot our server. We went through all numbers listed on their homepage. Good thing they have a <a href="http://cam03.deninet.hu:8080/view/view.shtml">webcam</a> in their console room, so we could see the admin passing through on the way to our server, obviously not in a good mood! Suffice to say that was the most fun we had all evening!</p>
<p>After the restore was complete and some minor fixes (make the image bootable, install the grub loader, change the root device in the loader AND the fstab as well, change network configuration, to match the setup, AND the /etc/hosts AND /etc/resolv.conf, that are easily overlooked at 3 in the morning) we had the image booting up already. And oh boy, was it slow? Painfully so! The machine doesn&#8217;t support HW virtualization, and SW virtualization just doesn&#8217;t cut it.</p>
<p>So we grit our teeth and moved the whole bunch of stuff back to where it was, rebuilt the RAID array, and redirected everything where it was originally. Also we were not happy at all. We went home at 4 AM, when the streets are empty, and the bars were about to close.</p>
<p>I could not believe, that a P4 running at 3GHz should be so slow. So today I took the backup from yesterday, installed <a href="http://www.virtualbox.org/">VirtualBox</a>, and restored the image to a new virtual machine. It took about 2 hours altogether. I&#8217;m not saying that <a href="http://www.virtualbox.org/">VirtualBox</a> is in any way superior to <a href="http://www.linux-kvm.org/">kvm</a>, but I can show that in our case it&#8217;s ten times as fast. I&#8217;m sure we made mistakes in the deployment and there might be ways to reach this speed with <a href="http://www.linux-kvm.org/">kvm</a> as well.</p>
<p>No matter how much trouble we went through, it was sure an interesting night, we learned a lot about virtualization and image cloning, that might soon become handy.</p>
]]></content:encoded>
			<wfw:commentRss>http://itworks.hu/2009/08/05/migrating-from-physical-to-virtual-server-with-pain-and-tears/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

