<?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>virtualisation &#8211; Everything is Broken</title>
	<atom:link href="https://play.datalude.com/blog/tag/virtualisation/feed/" rel="self" type="application/rss+xml" />
	<link>https://play.datalude.com/blog</link>
	<description>Efficiency vs. Inefficiency, in a no-holds barred fight.</description>
	<lastBuildDate>Fri, 18 Jul 2008 01:34:10 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.1</generator>
	<item>
		<title>Big Switch 6: Virtually there.</title>
		<link>https://play.datalude.com/blog/2008/02/the-big-switch-part-6/</link>
					<comments>https://play.datalude.com/blog/2008/02/the-big-switch-part-6/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Sat, 23 Feb 2008 06:14:38 +0000</pubDate>
				<category><![CDATA[General IT]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[partitioning]]></category>
		<category><![CDATA[thinkpad]]></category>
		<category><![CDATA[virtualisation]]></category>
		<category><![CDATA[vmware]]></category>
		<guid isPermaLink="false">http://play.datalude.com/blog/?p=12</guid>

					<description><![CDATA[OK a quick recap from my last post, where I realised that then next step was going to take some explaining &#8230; A week or so went by without incident and it was time to consider the final stage: moving Windows to a virtual machine and getting rid of the old Windows partition. Here are ... <a title="Big Switch 6: Virtually there." class="read-more" href="https://play.datalude.com/blog/2008/02/the-big-switch-part-6/" aria-label="Read more about Big Switch 6: Virtually there.">Read more</a>]]></description>
										<content:encoded><![CDATA[<p>OK a quick recap from my <a href="http://play.datalude.com/blog/?p=9">last post</a>, where I realised that then next step was going to take some explaining &#8230; A week or so went by without incident and it was time to consider the final stage: moving Windows to a virtual machine and getting rid of the old Windows partition. Here are the main stages.</p>
<ol>
<li>Make a windows install CD from the install files on the windows partition (Thinkpads don’t have an install CD, they use an Install partition)</li>
<li>Install vmware on Ubuntu and make a Windows Virtual Machine.</li>
<li>Delete the old Windows and IBM Install partitions</li>
<li>Re-arrange the remaining partitions to suit the new arrangement.<span id="more-12"></span></li>
</ol>
<p><strong>Making the Windows Install CD.</strong></p>
<p>This is a little bit complex because I have an IBM Thinkpad. The OS on these comes as a 4Gb rescue partition which you can boot into and restore your Thinkpad to factory condition. I made the DVDs and CDs to complete this, but actually I didn't want to use these, as it a) reformats the hard disk into a single partition + recovery partition, and b) installs a whole raft of IBM drivers widgets and bloatware that I don't want. Nevertheless I have an OEM license for Windows XP home which I'm entitled to use on this machine, so the question is how to get it installed in a Virtual machine.</p>
<p>The answer I found in several blog posts and howto articles, which I've subsequently lost. You can get most of the info here http://www.howtohaven.com/system/createwindowssetupdisk.shtml</p>
<p>Here is how I modified that info and the main steps I took:.</p>
<ol>
<li>Start with the files installed in c:\i386. Copy these to another location so you can work on them without breaking anything (despite the fact you're going to vape your windows install in a couple of hours anyway)</li>
<li>With the files in the new location (say d:\xpinstall) you need to add some plain text files to tell it that the install is an OEM install (see reference article above)</li>
<li>Slipstream in Service Pack 2.</li>
<li>Use nLite to slim down the installation to the essentials, (we don't need no stinkin' helpfiles!) and then build you a boot CD iso image.</li>
</ol>
<p><strong>VMware Install and setup</strong></p>
<p>Meanwhile, back in Linux Mint / Ubuntu, we have to install vmware server. This is done pretty easily through Synaptic. If you don't see it in there, you'll have to enable the third party software repositories. I chose VMware server as opposed to Workstation or Player because it was freer than Workstation, and it had more functionality than the Player.</p>
<p>Once vmware Server is set up, you need to start it from the item it put in your Start Menu, and connect to localhost. From here you can create a new machine. I opted to use a dynamic container with a max size of 8Gb, although I could have got away with less. I set the CD Drive to point to the .iso image I created above (brilliant feature!), and then booted it up. Windows installed like a charm, and using the OEM licence key on the bottom of my Thinkpad, it was all legal. I also set up the Network connection to NAT to my network so that the Windows machine is never directly exposed to the Network / Internet and the Ubuntu install effectively acts as a router. VMware takes care of all this for you, so you don't have to think about it too much. However if you want to run a server in VMware, you'd probably use the direct, non-NAT connection.</p>
<p>The final setting you may want to play with is the memory allocation. I have 1Gb of RAM, and I allocated half of that to the virtual machine. Windows runs fine in that, and this is a very low spec machine.</p>
<p>Once Windows is installed, obviously you have to do all that updating, and installing of AntiVirus. I also installed a couple of tools I use and my accounting software. Within the virtual machine, I set up a Truecrypt container for my accounts data, and then wrote a quick script to sync this back up to my Ubuntu installation using scp. This means once I've finished doing my monthly accounts I can just hit the button and it backs it up for me.</p>
<p>Having set all this up, I took a snapshot, and backed up the entire VM to an external hard disk, so if I ever need to recover it, I can do so in minutes. Very cool.</p>
<p><strong>Deleting the old partitions</strong></p>
<p>Once again, I left this for a week or so until I was sure things were working smoothly. During that time I also experimented with a couple of other VM images &#8211; I built one of Centos 5 server so I could prototype some development, and tried out Zimbra mail server. Unfortunately the Zimbra server comes as an rPath device, so you don't really get to play with it properlly. Anyway, this virtualization stuff is great. I wish I'd done it properly sooner.</p>
<p>The trouble with having all these virtual images is they take up a lot of space, so I was now beginning to run out of disk space. Time to get rid of those unused partitions.</p>
<p>The tool for the job is the gparted live CD, which I hadn't used for about a year. I was pleased to see that the latest version, despite a modest increment in its version number, is streets ahead of the last one I used. Great job guys!</p>
<p>So here's what we do.</p>
<ol>
<li>Plug in an external USB drive to back up onto.</li>
<li>Boot from the gparted Live CD, and make sure the USB drive is mounted. eg.
<ul>
<li>mount -t vfat /mnt/sda1 /mount/usb</li>
</ul>
</li>
<li>Start partimage from the menu, and use it to back up the partitions we're going to delete. Hack them into 2Gb chunks as suggested by partimage, as we're backing up to a VFAT drive. A 20Gb partition took about 20 mins. That's fast if you've ever used something like Encase &#8230;</li>
<li>Back up any live data partitions you've got as well, just for good measure. You can delete them if all goes well</li>
<li>Use Gparted to delete the partitions on the disk that you don't want.</li>
<li>Reboot the computer and check you got rid of the correct ones &#8230;</li>
<li>OK now to organise them</li>
</ol>
<p><strong>Rearranging the partitions on the disk</strong></p>
<p>Reboot into the Gparted CD. In my case what I now have is</p>
<ul>
<li>a 10 Gb root Linux partition (/) on /dev/hda5</li>
<li>a 1 Gb swap partition on /dev/hda6</li>
<li>a 100Mb /boot partition on /dev/hda7</li>
<li>a 15Gb vfat data partition on /dev/hda3 which is in an extended partition, /dev/hda4</li>
<li>Two chunks of free space.</li>
</ul>
<p>Moving partitions around in gparted is just a case of copying and pasting. Really. The potential for disaster is high, but if you're all backed up, then there's nothing to lose right? I cut and pasted, and re-sized and re-organized, until I was left with this:</p>
<ul>
<li> /dev/hda1 &#8211; 20Gb &#8211; Linux main system (moved and enlarged)</li>
<li>/dev/hda2 &#8211; 100Mb &#8211; /boot partition (moved)</li>
<li>/dev/hda4 &#8211; 1 Gb &#8211; swap partition (moved)</li>
<li>/dev/hda3 &#8211; Extended partition containing
<ul>
<li>/dev/hda5 &#8211; 17 Gb Data partition (enlarged)</li>
<li>/dev/hda6 &#8211; 17Gb /home partition (newly created to house all the VMs)</li>
</ul>
</li>
</ul>
<p>Having done such major reconstructive surgery I knew I was in for a few glitches on boot up, but I knew I could get around them eventually.</p>
<p>This post has got a bit long &#8230; its continued <a href="http://play.datalude.com/blog/?p=18">here</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://play.datalude.com/blog/2008/02/the-big-switch-part-6/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Big Switch 5: Unplugged</title>
		<link>https://play.datalude.com/blog/2008/02/the-big-switch-part-5/</link>
					<comments>https://play.datalude.com/blog/2008/02/the-big-switch-part-5/#respond</comments>
		
		<dc:creator><![CDATA[admin]]></dc:creator>
		<pubDate>Wed, 20 Feb 2008 07:02:25 +0000</pubDate>
				<category><![CDATA[General IT]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[virtualisation]]></category>
		<category><![CDATA[wireless]]></category>
		<guid isPermaLink="false">http://play.datalude.com/blog/?p=9</guid>

					<description><![CDATA[So now I had all the software installed and working correctly I could catch up with work, and just get used to using Linux on a day to day basis. I also had the security of a fully functional Windows installation to fall back on, should everything go wrong, or should I have forgotten to ... <a title="Big Switch 5: Unplugged" class="read-more" href="https://play.datalude.com/blog/2008/02/the-big-switch-part-5/" aria-label="Read more about Big Switch 5: Unplugged">Read more</a>]]></description>
										<content:encoded><![CDATA[<p>So now I had all the <a href="http://play.datalude.com/blog/?p=8">software installed and working correctly</a> I could catch up with work, and just get used to using Linux on a day to day basis. I also had the security of a fully functional Windows installation to fall back on, should everything go wrong, or should I have forgotten to copy something across.</p>
<p>But up until now, I'd only been using a Wired connection. The built-in wireless on my Thinkpad R51e didn't work with Ubuntu, and a few attempts to fix it were not rewarded with success. I decided to wait until I had a weekend free to sort it all out. In the interim, if I needed wireless, I had a Buffalo Airport PCMCIA card which worked perfectly when I plugged it in.<span id="more-9"></span></p>
<p><strong>Fixing Wireless. </strong></p>
<p>The truth of the matter is that by the time I actually fixed the wireless, I'd tried so many things that I'm not entirely sure which one worked. After install, the installer had found the wireless hardware &#8212; a built in Intel chipset, based around an Atheros chip. The <strong>lspci</strong> command identified this as the Atheros Communications, Inc. AR5212/AR5213 Multiprotocol MAC/baseband processor (rev 01) . Based on this, the installer had chosen the madwifi drivers.</p>
<p>My attempts to connect with my Access point were not successful. I unplugged the ethernet cable, and then tried to connect with the Access point running WPA2, using the Network Manager which is present in the bottom right corner of the menubar. Guessing that WPA2 was the problem, I changed the encryption down to WEP, which although it isn't a very secure protocol, is supported by almost all hardware, and is at least better than nothing. Finally I dropped all encryption and tried to connect to the AP with no encryption. Still no luck.</p>
<ul>
<li> iwconfig reported all the right things, but</li>
<li>dhclient couldn't get me an IP address, and</li>
<li>/etc/init.d/networking restart also had no effect.</li>
</ul>
<p>I thought there might be a problem with the drivers, so I upgraded to the latest version of the madwifi drivers, grabbed directly from the madwifi site, rather than the slightly older ones which the repository had installed for me. Still no luck.</p>
<p>I then tried using the Windows drivers which had worked previously in windows. I mounted my Windows partition and used the "Windows Wireless Drivers" applet supplied with Linux Mint (essentially a front end to ndiswrapper) to install them. No luck. I then found some more recent drivers on the Lenovo support site. I uninstalled the previous drivers and installed the new ones. No luck.</p>
<p>I then tried upgrading ndiswrapper to a more recent version and tried some other drivers from a step-by-step guide which someone else had created on the Internet. Maybe this one worked, maybe not. I'd tried so many things by now I'd lost track of where I was. Eventually I got it working with a combination of ndiswrapper and Windows drivers, and had probably spent a whole day trying to get it going. Irritating. And the best I could do was use WEP. I decided not to experiment with WPA2. I have</p>
<ul>
<li> ndiswrapper version 1.45</li>
<li>Unknown windows net5211 driver</li>
</ul>
<p>Having said that, there are a few problems with this current setup. Occasionally it forgets its WEP key and asks for it again. Changing from wired to wireless networks usually confuses it, so a reboot is the best way to do that. Changing networks from one AP to another is also problematic. A bad job all round, but I'm limping along with it.</p>
<p><strong>Virtualization</strong></p>
<p>A  week or so went by without incident and it was time to consider the final stage: moving Windows to a virtual machine and getting rid of the old Windows partition. Here are the main stages.</p>
<ol>
<li>Make a windows install CD from the install files on the windows partition (Thinkpads don't have an install CD, they use an Install partition)</li>
<li>Install vmware on Ubuntu and make a Windows Virtual Machine.</li>
<li>Delete the old Windows and IBM Install partitions</li>
<li>Re-arrange the remaining partitions to suit the new arrangement.</li>
</ol>
<p>These will take some time to explain, so I'll do it in the <a href="http://play.datalude.com/blog/?p=12">next post</a>.</p>
<p>Update 2nd April 2008: Got WPA2 working. Didn't change anything, but it just decided to work. Maybe an update in the background updated some critical files. Lets see if it still forgets the WPA key.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://play.datalude.com/blog/2008/02/the-big-switch-part-5/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
