<?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>ukstokes.com &#187; VMware</title>
	<atom:link href="http://ukstokes.com/blog/category/vmware/feed/" rel="self" type="application/rss+xml" />
	<link>http://ukstokes.com/blog</link>
	<description>tech stuff from a tech bloke</description>
	<lastBuildDate>Tue, 31 Aug 2010 15:03:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Working with Logical Volumes</title>
		<link>http://ukstokes.com/blog/2009/04/01/working-with-logical-volumes/</link>
		<comments>http://ukstokes.com/blog/2009/04/01/working-with-logical-volumes/#comments</comments>
		<pubDate>Wed, 01 Apr 2009 21:20:48 +0000</pubDate>
		<dc:creator>ben</dc:creator>
				<category><![CDATA[Enterprise Linux]]></category>
		<category><![CDATA[VMware]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Logical Volumes]]></category>
		<category><![CDATA[LVM]]></category>

		<guid isPermaLink="false">http://ukstokes.com/blog/?p=221</guid>
		<description><![CDATA[I'm actually coming around to Linux LVM - once you get the hang of the concepts and the associated commands it can be a straightforward exercise to extend your existing volumes after adding new physical disks. This differs from software RAID, as you have the ability to lay an LVM filesystem over a single disk [...]]]></description>
			<content:encoded><![CDATA[<p>I'm actually coming around to Linux LVM - once you get the hang of the concepts and the associated commands it can be a straightforward exercise to extend your existing volumes after adding new physical disks. This differs from software RAID, as you have the ability to lay an LVM filesystem over a single disk and later take advantage of the LVM commands to resize your volumes if you so desire.</p>
<p>I recently was confronted with a VM that was out of space on /usr/local. The filesystem was already using LVM so I just added a new virtual disk and stretched the /usr/local volume over the new disk. The whole process is even easier in VMware as you can add the new disk while the machine is running and run through the whole process without a reboot, providing you don't have daemons or processes running in /usr/local that stop it from being unmounted. Here's how I did it:</p>
<pre class="brush: plain;">init 1
umount /usr/local</pre>
<p>Going to runlevel 1 may not always be necessary but was in my case.<strong> pvcreate </strong>enables the new physical disk for use with LVM. Then <strong>vgextend </strong>extends the volume group, and <strong>lvresze</strong> resizes the logical volume. In my case the new disk that was added became known to the system as /dev/sdc.</p>
<pre class="brush: plain;">pvcreate /dev/sdc
vgextend VolGroup00 /dev/sdc
lvresize /dev/VolGroup/lvol0 -L 12.7G</pre>
<p>Then use <strong>resize2fs </strong>to extend the file system into the free space. You are required to fun a filesystem check first.</p>
<pre class="brush: plain;">e2fsck -f /dev/VolGroup/lvol0
resize2fs /dev/VolGroup00/lvol0 12700M
mount -a
init 3</pre>
<p>In my example the previous size was 7.7Gb, I added a 5Gb disk and extended to 12.7Gb.</p>
]]></content:encoded>
			<wfw:commentRss>http://ukstokes.com/blog/2009/04/01/working-with-logical-volumes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A quick mention for 2 useful tools</title>
		<link>http://ukstokes.com/blog/2009/02/10/a-quick-mention-for-useful-tools/</link>
		<comments>http://ukstokes.com/blog/2009/02/10/a-quick-mention-for-useful-tools/#comments</comments>
		<pubDate>Tue, 10 Feb 2009 23:34:55 +0000</pubDate>
		<dc:creator>ben</dc:creator>
				<category><![CDATA[Random stuff]]></category>
		<category><![CDATA[VMware]]></category>

		<guid isPermaLink="false">http://ukstokes.com/blog/?p=134</guid>
		<description><![CDATA[Here's just a quick mention for a couple of decent tools. Syntax Highlighter plus (plugin for wordpress). Link IMO this is the best code highlighting plugin for WordPress. Here's a quick example:  [lang='bash']ls -la apt-get update apt-get upgrade[/lang] Does exactly what is says on the tin and has the 'view source' button to you to copy and paste [...]]]></description>
			<content:encoded><![CDATA[<p>Here's just a quick mention for a couple of decent tools.</p>
<p><strong>Syntax Highlighter</strong> <strong>plus</strong> (plugin for wordpress). <a href="http://www.beyondcoding.com/2007/12/16/release-wordpress-plugin-syntaxhighlighter-plus/">Link</a></p>
<p>IMO this is the best code highlighting plugin for WordPress. Here's a quick example: </p>
<p>[lang='bash']ls -la<br />
apt-get update<br />
apt-get upgrade[/lang]</p>
<p>Does exactly what is says on the tin and has the 'view source' button to you to copy and paste the plain text version of your code into notepad or Putty sessions.</p>
<p>Second quick mention is<strong> EasyVMX</strong>. <a href="http://www.easyvmx.com/easyvmx.shtml">Link</a></p>
<p>Ever wondered how to create a new VM for VMware player? Just visit the EasyVMX site, fill in the form and click go, and your VMX file is created. Then just give the file to VMware player and you can boot into your new machine. Genius!</p>
]]></content:encoded>
			<wfw:commentRss>http://ukstokes.com/blog/2009/02/10/a-quick-mention-for-useful-tools/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to migrate a VM using SCP</title>
		<link>http://ukstokes.com/blog/2008/03/17/how-to-migrate-a-vm-using-scp/</link>
		<comments>http://ukstokes.com/blog/2008/03/17/how-to-migrate-a-vm-using-scp/#comments</comments>
		<pubDate>Mon, 17 Mar 2008 17:13:47 +0000</pubDate>
		<dc:creator>ben</dc:creator>
				<category><![CDATA[VMware]]></category>

		<guid isPermaLink="false">http://ukstokes.com/blog/?p=87</guid>
		<description><![CDATA[ESX Starter and Foundation editions do not provide a built in function to migrate a virtual machine to another ESX host. In the absence of these options, you can do this by logging on to the console operating system using Putty, and then using the SCP utility to copy the VM files. Then on the [...]]]></description>
			<content:encoded><![CDATA[<p>ESX Starter and Foundation editions do not provide a built in function to migrate a virtual machine to another ESX host. In the absence of these options, you can do this by logging on to the console operating system using Putty, and then using the SCP utility to copy the VM files. Then on the destination server, add the server to the inventory and mount the VM.</p>
<p>The software y<a title="View of /vmfs/volumes" href="http://ukstokes.com/blog/wp-content/uploads/2008/03/esx_screen1.GIF"></a>ou need to do this is already installed on the source and destination server, but has to be enabled in the virtual infrastructure client first on both servers:</p>
<ul>
<li>Log into VIC as root</li>
<li>Click on ESX Server in the tree (top level)</li>
<li>On the Security tab, click on Security (may be called Security Profile)</li>
<li>Click on the "Properties ..." link</li>
<li>Tick the boxes for SSH Client and SSH Server</li>
<li>Click OK</li>
</ul>
<p>Log on to the destination server using Putty. We need to find out the real name of the data store directory.</p>
<pre class="brush: bash;">ls /vmfs/volumes</pre>
<p>It should look something like this:</p>
<p align="center"><a title="View of /vmfs/volumes" rel="lightbox" href="http://ukstokes.com/blog/wp-content/uploads/2008/03/esx_screen1.GIF"><img src="http://ukstokes.com/blog/wp-content/uploads/2008/03/esx_screen1.GIF" alt="View of /vmfs/volumes" width="460" height="42" /></a><br />
<em>View of /vmfs/volumes</em></p>
<p>The dark blue text is the real name of the directory. The light blue is a symbolic link to that directory. Make a note of the full path of the data store you want to migrate to, e.g:</p>
<pre class="brush: bash;">/vmfs/volumes/47cd0bf3-b4b7eef9-5985-0017a4f6b9f1</pre>
<p>Now log on to the source server using Putty.</p>
<ul>
<li>Before you do anything, remember to shut down the guest VM you are copying</li>
<li>Navigate into your data store where the source VM is held, e.g:</li>
</ul>
<pre class="brush: bash;">cd /vmfs/volumes/ SERVERNAME\ Storage</pre>
<ul>
<li>Pull up the directory listing using ll (this is an alias of ls -l)</li>
<li>Again, make sure this VM is powered off</li>
<li>Use SCP to copy the whole directory to the destination server. The syntax is as follows below.</li>
<li>Note that your <em>source_directory</em> will typically be the name of your VM</li>
<li>Your destination is the name of your target ESX server</li>
</ul>
<pre class="brush: bash;">scp -r -C -o CompressionLevel=6 source_directory root@destination: /vmfs/volumes/data_store_name</pre>
<p>Using compression is optional, but it will speed things up a bit. You can leave this bit out if you want: <strong>-C -o CompressionLevel=6</strong></p>
<p>If you receive this message, say yes:</p>
<blockquote><p>The authenticity of host 'server (10.11.2.120)' can't be established.<br />
RSA key fingerprint is 49:04:65:6e:20:40:e0:fc:a6:75:14:10:bf:6e:a7:70.<br />
Are you sure you want to continue connecting (yes/no)?</p></blockquote>
<ul>
<li>Once finished, log on to the destination ESX using VIC</li>
<li>On the summary tab browse the datastore where the VM was copied to</li>
<li>Right-Click on the vmx file and select 'Add to inventory'</li>
<li>Fill in the form with relevant values</li>
<li>Power up the VM and create a new identifier for the VM if prompted</li>
<li>Check if everything is working correctly</li>
<li>Backup the VM on the source server before deleting the files</li>
</ul>
<p>Technorati Tags: <a href="http://technorati.com/tag/ESX+Server" rel="tag">ESX Server</a></p>
]]></content:encoded>
			<wfw:commentRss>http://ukstokes.com/blog/2008/03/17/how-to-migrate-a-vm-using-scp/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Cheating with ESX Server Starter Edition</title>
		<link>http://ukstokes.com/blog/2008/01/06/cheating-with-esx-server-starter-edition/</link>
		<comments>http://ukstokes.com/blog/2008/01/06/cheating-with-esx-server-starter-edition/#comments</comments>
		<pubDate>Sun, 06 Jan 2008 10:07:51 +0000</pubDate>
		<dc:creator>ben</dc:creator>
				<category><![CDATA[VMware]]></category>

		<guid isPermaLink="false">http://ukstokes.com/blog/?p=82</guid>
		<description><![CDATA[ESX Starter Edition is a standalone ESX server (i.e. no Virtual Centre), available at a lower cost than the ESX Infrastructure editions but missing some useful functions. Some of those functions are the ability to convert virtual machines to templates simply by right-clicking on them, and deploying VM templates with a single mouse click. With [...]]]></description>
			<content:encoded><![CDATA[<p>ESX Starter Edition is a standalone ESX server (i.e. no Virtual Centre), available at a lower cost than the ESX Infrastructure editions but missing some useful functions. Some of those functions are the ability to convert virtual machines to templates simply by right-clicking on them, and deploying VM templates with a single mouse click. With the Starter Edition this is how you can get around it:</p>
<p><strong>Create template</strong><br />
Install and configure your virtual machine exactly how you want it. Give it a generic name like "TEMPLATE" and leave it in a workgroup. If your template is a Windows 2003 server "sysprep it" by following <a href="http://support.microsoft.com/kb/926028/">this article</a>. Power your VM down and your template is now ready.</p>
<p><strong>Deploy the template</strong><br />
This is how it works:</p>
<ul>
<li>Create a new Windows 2003 VM, configure the disk to be as small as possible</li>
<li>After creation, edit the VM settings and delete the disk</li>
<li>Open an SSH session to the ESX server using Putty
<ul>
<li>cd /vmfs/volumes/<em>ESXservername\ storage</em>/TEMPLATE</li>
</ul>
</li>
<li>Copy the VM disk to the new machine:
<ul>
<li>cp *.vmdk ../<em>new_server_name</em></li>
</ul>
</li>
<li>In 	VIC, edit the settings of the VM, add a new disk, point it to /storage/<em>new_server_name/disk_file.vmdk</em></li>
<li>Boot the VM up run through sysprep</li>
<li>Let 	it run for about five minutes while sysprep takes place, set 	computer name and NIC details etc when prompted</li>
<li>The 	server will then restart.</li>
<li>The 	server is now ready and just needs to be joined to the domain.</li>
</ul>
<p>The whole process should take no longer than half an hour.</p>
<p>Technorati Tags: <a href="http://technorati.com/tag/ESX+Server" rel="tag">ESX Server</a>, <a href="http://technorati.com/tag/VMWare" rel="tag"> VMWare</a></p>
]]></content:encoded>
			<wfw:commentRss>http://ukstokes.com/blog/2008/01/06/cheating-with-esx-server-starter-edition/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Upgrade ESX from 3.0.0 to 3.0.1</title>
		<link>http://ukstokes.com/blog/2007/07/14/upgrade-esx-from-300-to-301/</link>
		<comments>http://ukstokes.com/blog/2007/07/14/upgrade-esx-from-300-to-301/#comments</comments>
		<pubDate>Sat, 14 Jul 2007 15:11:22 +0000</pubDate>
		<dc:creator>ben</dc:creator>
				<category><![CDATA[VMware]]></category>

		<guid isPermaLink="false">http://ukstokes.com/blog/?p=76</guid>
		<description><![CDATA[There seems to be some debate on whether in-place upgrades of ESX server are a good idea, or whether it's better to abandon old versions and go for clean installs. My opinion is that if your server is healthy and you don't have any issues or problems, then there's no need to be scared about [...]]]></description>
			<content:encoded><![CDATA[<p>There seems to be some debate on whether in-place upgrades of ESX server are a good idea, or whether it's better to abandon old versions and go for clean installs. My opinion is that if your server is healthy and you don't have any issues or problems, then there's no need to be scared about upgrading your existing installation.</p>
<p>First download it from vmware and untar it:</p>
<pre class="brush: bash;">tar zxfv 3.0.1-32039-full.tgz
cd 32039
ls</pre>
<p>You will the tarball contains a load of .rpm files. Updating from this directory should then be as easy as:</p>
<pre class="brush: bash;">/usr/sbin/esxupdate -n update</pre>
<p>However if you have already done some patching on your server you may receive the following error:</p>
<blockquote><p>INFO: 1 packages need to be downgraded.<br />
Please use the --force option and try again.</p></blockquote>
<p>Do not use the --force option in this situation as doing so will downgrade your previously installed patches. Instead, check your update log and see which packages are flagging the errors.</p>
<pre class="brush: bash;">grep -i downgrade /var/log/vmware/esxupdate.log</pre>
<p>Then use the <strong>-x</strong> switch to exclude those patches from the esxupdate.</p>
<pre class="brush: bash;">/usr/sbin/esxupdate -x VMware-esx-scripts.i386 -x krb5-libs.i386 -n update</pre>
<p>The<strong> -n</strong> switch supresses an automatic reboot so you can review the output of the command, but you will need to restart your server when the update has finished.</p>
<p>Technorati Tags: <a href="http://technorati.com/tag/ESX+Server" rel="tag">ESX Server</a>, <a href="http://technorati.com/tag/Server+Administration" rel="tag"> Server Administration</a></p>
]]></content:encoded>
			<wfw:commentRss>http://ukstokes.com/blog/2007/07/14/upgrade-esx-from-300-to-301/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Patch ESX Server, the easy way</title>
		<link>http://ukstokes.com/blog/2007/07/14/patch-esx-server-the-easy-way/</link>
		<comments>http://ukstokes.com/blog/2007/07/14/patch-esx-server-the-easy-way/#comments</comments>
		<pubDate>Sat, 14 Jul 2007 14:00:21 +0000</pubDate>
		<dc:creator>ben</dc:creator>
				<category><![CDATA[VMware]]></category>

		<guid isPermaLink="false">http://ukstokes.com/blog/?p=70</guid>
		<description><![CDATA[I've discovered a really great tool for patching ESX servers from Windows: VMTS Patch Manager. It's a bit like WSUS in that all patches are downloaded once to a central repository and you select what you want pushed out from there. You don't need to log on to any ESX servers or spend any time [...]]]></description>
			<content:encoded><![CDATA[<p>I've discovered a really great tool for patching ESX servers from Windows: <a href="http://www.vmts.net/VMTSPatchManager.htm">VMTS Patch Manager</a>. It's a bit like WSUS in that all patches are downloaded once to a central repository and you select what you want pushed out from there. You don't need to log on to any ESX servers or spend any time at the command line, and it integrates with Virtual Centre which enables you to manage the patching of your whole virtual infrastructure by connecting to one place. All this is packaged in an easy-to-use GUI and available to download for free.</p>
<p><a title="Direct link to file" onclick="return false;" rel="lightbox" href="http://ukstokes.com/blog/wp-content/uploads/2007/07/esxpatchmanager.jpg"></a></p>
<p style="text-align: center"><a title="Direct link to file" onclick="return false;" rel="lightbox" href="http://ukstokes.com/blog/wp-content/uploads/2007/07/esxpatchmanager.jpg"><img src="http://ukstokes.com/blog/wp-content/uploads/2007/07/esxpatchmanager.jpg" alt="ESX Patch Manager" width="170" height="128" /><br />
<em>VMTS Patch Manager</em></a></p>
<p>It's also clever enough to recognise patches that will downgrade your system or are not required, and it will not install them for you. It's not quite perfect and does have a few quirks and rough edges, but I would definitely recommend the download if you have an ESX deployment that needs patching. I've seen a few alternatives to VMTS Patch Manager that are basically perl scripts and http repositories, but nothing else I've seen is as good as this.</p>
<p>Technorati Tags: <a href="http://technorati.com/tag/ESX+Server" rel="tag">ESX Server</a>, <a href="http://technorati.com/tag/Administration" rel="tag"> Administration</a>, <a href="http://technorati.com/tag/ESX+Patching" rel="tag"> ESX Patching</a></p>
]]></content:encoded>
			<wfw:commentRss>http://ukstokes.com/blog/2007/07/14/patch-esx-server-the-easy-way/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Extending virtual disks in ESX Server 3.01</title>
		<link>http://ukstokes.com/blog/2007/07/03/extending-virtual-disks-in-esx-server-301/</link>
		<comments>http://ukstokes.com/blog/2007/07/03/extending-virtual-disks-in-esx-server-301/#comments</comments>
		<pubDate>Tue, 03 Jul 2007 12:34:13 +0000</pubDate>
		<dc:creator>ben</dc:creator>
				<category><![CDATA[VMware]]></category>

		<guid isPermaLink="false">http://ukstokes.com/blog/?p=74</guid>
		<description><![CDATA[Below is the procedure on how to extend the disk of a Windows 2003 virtual server. Before starting please note the following: Microsoft's diskpart utility can only be used to extend dynamic disks. Before using this utility you will need to convert your disks to dynamic using the Disk Management utility in the Computer Management [...]]]></description>
			<content:encoded><![CDATA[<p>Below is the procedure on how to extend the disk of a Windows 2003 virtual server.</p>
<p>Before starting please note the following:</p>
<ul>
<li>Microsoft's diskpart utility can only be used to extend dynamic disks. Before using this utility you will need to convert your disks to dynamic using the Disk Management utility in the Computer Management console.</li>
<li>System or boot volumes cannot be extended using diskpart.</li>
<li>GParted cannot manage dynamic disks. If you are resizing a system or boot disk, configure it as a dynamic disk after it has been resized. If you convert to dynamic first, you may not be able to convert it back to a basic disk.</li>
<li>Before making any changes ensure you have a backup of your server, or at the least a snapshot of your VM.</li>
</ul>
<p><strong>1. </strong>Power down your VM gracefully<br />
<strong>2.</strong> SSH to the ESX Server hosting the VM<br />
<strong>3. </strong>cd to the directory containing your .vmdk disk file (you can check the name and location on the Hardware tab of your VM in Virtual Infrastructure Manager). e.g.</p>
<p>cd /vmfs/volumes/vmStore</p>
<p><strong>4. </strong>Use vmkfstools to extend the disk using the following syntax: (Please use a double dash, not a single dash. WordPress automatically reformats this from a double to single dash)</p>
<p>vmkfstools --extendvirtualdisk [size] [vmdk filename]</p>
<p>Size can be in Mb, for example 5000m, or in Gb, for example 5g. e.g.</p>
<p>vmkfstools --extendvirtualdisk 11g S05010094.vmdk</p>
<p>If you are resizing your C: drive or system/boot partition, continue at step 9. Otherwise, continue below:</p>
<p><strong>5. </strong>Power up your VM<br />
<strong>6.</strong> In Computer Management ? Disk Management you should now see the unallocated space on the disk.<br />
<strong>7. </strong>Open a command prompt window and use the diskpart utility to extend the partition.</p>
<p>Diskpart<br />
List volume<br />
Select volume z<br />
Extend size=x disk=y</p>
<p>Where z = the volume number, x= the size <span class="kw1">in</span> MB and y= the disk number <span class="kw1">in</span> Disk Management</p>
<p><strong>8.</strong> Your server may need a restart for the changes to take effect.</p>
<p>If you are resizing your C: drive , follow steps 1-4 above. Then:</p>
<p><strong>9. </strong>Obtain a copy of the <a href="http://gparted.sourceforge.net/livecd.php">GParted live CD iso</a>, copy it to your ESX server and configure it as your CD ROM drive on your VM.</p>
<p><strong>Note:</strong> GParted will only recognize your disks if your VM's SCSI Controller is configured to emulate a BUS Logic SCSI controller. Changing type from LSI Logic to BUS Logic is dangerous. Make sure you know what you are doing or you could make your disk inaccessible to Windows.</p>
<p><strong>10. </strong>Change SCSI Controller type from BUS Logic to LSI Logic.<br />
<strong>11. </strong>Boot your VM from the ISO image.<br />
<strong>12.</strong> Use GParted to delete the extra space and extend your volume into the unallocated space.<br />
<strong>13.</strong> Power down VM. Change SCSI Controller type from LSI Logic to BUS Logic. Configure VM to boot from hard disk.<br />
<strong>14. </strong>Power on VM, chkdsk should run as part of the startup proces and your disk should then be extended.</p>
]]></content:encoded>
			<wfw:commentRss>http://ukstokes.com/blog/2007/07/03/extending-virtual-disks-in-esx-server-301/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
