<?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>JJClements.co.uk &#187; VMware</title>
	<atom:link href="http://www.jjclements.co.uk/index.php/category/vmware/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jjclements.co.uk</link>
	<description>Clem&#039;s Technical Blog</description>
	<lastBuildDate>Tue, 08 Jun 2010 22:26:19 +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>vSphere convert VM IDE disk to SCSI disk</title>
		<link>http://www.jjclements.co.uk/2010/06/08/vsphere-convert-vm-ide-disk-to-scsi-disk/</link>
		<comments>http://www.jjclements.co.uk/2010/06/08/vsphere-convert-vm-ide-disk-to-scsi-disk/#comments</comments>
		<pubDate>Tue, 08 Jun 2010 17:56:19 +0000</pubDate>
		<dc:creator>James Clements</dc:creator>
				<category><![CDATA[VMware]]></category>
		<category><![CDATA[Windows XP]]></category>
		<category><![CDATA[IDE]]></category>
		<category><![CDATA[SCSI]]></category>
		<category><![CDATA[VI Client]]></category>
		<category><![CDATA[VMDK]]></category>

		<guid isPermaLink="false">http://www.jjclements.co.uk/?p=1027</guid>
		<description><![CDATA[I recently read a post by Duncan Epping over at Yellow Bricks where he tried to resize the VMDK of a Windows XP VM running on ESX\vSphere. When he used the VI Client to try and resize the VMDK he was actually unable to because it was ghosted out. By coincidence I had experienced the [...]]]></description>
			<content:encoded><![CDATA[<p>I recently read a <a rel="nofollow" href="http://www.yellow-bricks.com/2010/05/28/resizing-your-ide-virtual-harddisk" target="_blank">post</a> by Duncan Epping over at <a rel="nofollow" href="http://www.yellow-bricks.com" target="_blank">Yellow Bricks</a> where he tried to resize the VMDK of a Windows XP VM running on ESX\vSphere. When he used the VI Client to try and resize the VMDK he was actually unable to because it was ghosted out. By coincidence I had experienced the same problem a week before Duncan after building 5 Windows XP VMs for stress testing of a new SharePoint website. As Duncan mentioned, the only other time I had seen this happen was when a snapshot existed for the disk that needed to be resized. Quickly checking the VM's settings I noticed that by default, when you create a Virtual Machine using the 'Microsoft Windows XP Professional..." Guest Operating System container it actually attaches an IDE disk rather than a SCSI disk (Server 2003 and 2008 Guest Operating System containers use a SCSI disk by default.)</p>
<p><span id="more-1027"></span></p>
<p>Here are the default devices for the Windows XP Professional VM:</p>
<p><img src="http://www.jjclements.co.uk/wp-content/uploads/2010/06/idetoscsi1.png" alt="idetoscsi1.png" /></p>
<p>Since I had built the 5 Windows XP VMs from a template I had created, I decided to find a way to convert the IDE disk to a SCSI disk and update the template incase I needed to resize the OS disk in the future. The easiest way I found to do this was as follows:-</p>
<p>Firstly I made the following assumptions:</p>
<ul>
<li> I would need to add a SCSI Controller to the VM and install the drivers before booting from the VMDK (I have <a rel="nofollow" href="http://www.jjclements.co.uk/2007/11/02/moving-an-ide-hdd-to-new-hardware" target="_blank">seen cases</a> before where moving a HD to new hardware caused a BSOD)</li>
<li> If possible I would need to change the default Controller used for new VMDKs from IDE to SCSI</li>
<li> I wanted to use the LSI Logic SCSI Controller</li>
<li> I wanted to make the VMDK the first SCSI device (0:0) attached to the Controller</li>
</ul>
<p>So, with the VM powered OFF I edited the settings for it through the VI Client and added a new SCSI Device (by default it doesn't seem possible to simply add a SCSI Controller to a VM without also attaching a SCSI Device to it):</p>
<p><img src="http://www.jjclements.co.uk/wp-content/uploads/2010/06/idetoscsi2.png" alt="idetoscsi2.png" /></p>
<p>I left the SCSI Device as being a <strong>CDROM</strong> and (optionally) changed the Virtual Device Node to <strong>SCSI (0:1)</strong> so that when I converted the existing disk and added it to the SCSI Controller it would be device <strong>SCSI (0:0)</strong>. I clicked Next and Finish but I didn't click OK to commit the changes:</p>
<p><img src="http://www.jjclements.co.uk/wp-content/uploads/2010/06/idetoscsi3.png" alt="idetoscsi3.png" /></p>
<p>Before clicking OK, I selected the SCSI Controller and changed it's type as appropriate. Then I clicked OK to commit the changes to the VM:</p>
<p><img src="http://www.jjclements.co.uk/wp-content/uploads/2010/06/idetoscsi4.png" alt="idetoscsi4.png" /></p>
<p>I powered on the VM and noticed that the Windows Found New Hardware Wizard prompted me to install the driver for the SCSI controller. I knew that the controller used is a <strong>LSI20320-R</strong> so I downloaded it from here:</p>
<p><a rel="nofollow" href="http://www.lsi.com/storage_home/products_home/host_bus_adapters/scsi_hbas/lsi20320r/index.html" target="_blank">LSI20320-R - Driver Download</a> <em>(Click the Support and Downloads tab)</em></p>
<p>I downloaded the appropriate driver and extracted it (for Windows XP 32bit I used <strong>LSI20320-R_xp_50700_01034132IT_1201800_1005239.zip</strong> and within that <strong>symmpi_wXP_1201800.zip</strong>.) Then I used the Found New Hardware Wizard to browse for and install the driver. Once the hardware installation completed I shut down the VM. The VM now had the SCSI controller installed and I was confident I would be able to boot from it.</p>
<p>I then located the datastore where the VM resides. For example:</p>
<p>/vmfs/volumes/&lt;datastore&gt;/&lt;vm&gt;/</p>
<p>You can use the Service Console or an SSH\SCP application to open the &lt;vm&gt;.vmdk (not the &lt;vm&gt;-flat.vmdk). I edited the following line:</p>
<blockquote><p>ddb.adapterType = "ide"</p></blockquote>
<p>For the LSI SCSI Controller I changed it to:</p>
<blockquote><p>ddb.adapterType = "lsilogic"</p></blockquote>
<p>After saving the file I used the VI Client to edit the VM settings. I selected the IDE disk and removed it. I then clicked OK to commit the changes.</p>
<p><strong>NOTE: Remember to only 'Remove from virtual machine' and NOT 'Remove from virtual machine and delete files from disk'</strong>:</p>
<p><img src="http://www.jjclements.co.uk/wp-content/uploads/2010/06/idetoscsi5.png" alt="idetoscsi5.png" /></p>
<p>Then I used the VI Client to edit the VM settings again and add the disk back. This time, because I had edited the .vmdk file to specify that the disk uses the LSI Logic Controller, it attaches the disk to this instead of the IDE Controller used previously:</p>
<p><img src="http://www.jjclements.co.uk/wp-content/uploads/2010/06/idetoscsi6.png" alt="idetoscsi6.png" /></p>
<p><img src="http://www.jjclements.co.uk/wp-content/uploads/2010/06/idetoscsi7.png" alt="idetoscsi7.png" /></p>
<p>The disk is added as device <strong>SCSI (0:0)</strong>:</p>
<p><img src="http://www.jjclements.co.uk/wp-content/uploads/2010/06/idetoscsi8.png" alt="idetoscsi8.png" /></p>
<p>I clicked Next and Finish to complete adding the disk. I then selected the CDROM (SCSI device 1) and removed it:</p>
<p><img src="http://www.jjclements.co.uk/wp-content/uploads/2010/06/idetoscsi9.png" alt="idetoscsi9.png" /></p>
<p>I clicked OK to commit the changes to the VM. I now had a VM using the LSI Logic SCSI Controller with the System OS disk connected to the Controller as device SCSI (0:0).</p>
<p>Since the VM had already booted with the LSI Logic Controller installed, when I powered on the VM Windows booted normally and was immediately accessible. Subsequently, any new virtual disks created for the VM are automatically created as SCSI disks and attached using the next available Virtual Device Node.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jjclements.co.uk/2010/06/08/vsphere-convert-vm-ide-disk-to-scsi-disk/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>KiXtart script to shrink VMDK for smaller VCB backups</title>
		<link>http://www.jjclements.co.uk/2010/04/13/kixtart-script-to-shrink-vmdk-for-smaller-vcb-backups/</link>
		<comments>http://www.jjclements.co.uk/2010/04/13/kixtart-script-to-shrink-vmdk-for-smaller-vcb-backups/#comments</comments>
		<pubDate>Tue, 13 Apr 2010 17:00:30 +0000</pubDate>
		<dc:creator>James Clements</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[VMware]]></category>
		<category><![CDATA[VCB]]></category>
		<category><![CDATA[VMDK]]></category>

		<guid isPermaLink="false">http://www.jjclements.co.uk/?p=738</guid>
		<description><![CDATA[When I first started using VMware ESX I was testing VMware Consolidated Backup (VCB) to dump my virtual machines to a staging area before being copied offsite. I noticed that one of the VMs had a VMDK attached that as far as the OS (Windows Server 2003) was concerned with had all of the data [...]]]></description>
			<content:encoded><![CDATA[<p>When I first started using VMware ESX I was testing VMware Consolidated Backup (VCB) to dump my virtual machines to a staging area before being copied offsite. I noticed that one of the VMs had a VMDK attached that as far as the OS (Windows Server 2003) was concerned with had all of the data deleted on that volume. After initiating a VCB dump (backup) on the VM I noticed that the VMDK that was dumped to my staging area strangely appeared to contain data. The VMDK size was considerably larger than it should have been for a disk that Windows reported as containing zero data.</p>
<p><span id="more-738"></span></p>
<p>After some investigation I realised that when VCB performed a dump of the VMDK it was correctly dumping the used space. It then dawned on me that when Windows was deleting files from the disk it was actually only deleting the 'pointer' to the data and not the data itself. When VCB was dumping the VMDK it was correctly dumping all blocks of the disk that contained data. I then started looking for a way to clean blocks that were no longer being used but still contained remnants from deleted files. I found a tool called <a rel="nofollow" href="http://technet.microsoft.com/en-us/sysinternals/bb897443.aspx" target="_blank">SDelete</a> that writes zero's where the disk contains free space as seen by the Operating System.</p>
<p>I incorporated SDelete into a basic script that also uses Defrag (the Windows utility for defragmenting disks) to tidy up volumes and potentially reduce the size of backups when using VCB.</p>
<p>The script first enumerates all local drives on the VM. For each drive that Windows deems as being a local disk the script then defragments the volume and uses SDelete to zero any free space that the disk may have. The script is written in <a rel="nofollow" href="http://www.kixtart.org" target="_blank">KiXtart</a>.</p>
<p>Here is the script:</p>
<p>;=====================================================<br />
;=====================================================<br />
;<br />
; ENUMERATE LOCAL DRIVES - DEFRAG &#038; ZERO EMPTY BLOCKS<br />
;<br />
;=====================================================<br />
;=====================================================</p>
<p>;=====================Accept EULA=====================<br />
WriteValue("HKCU\Software\Sysinternals\SDelete", "EulaAccepted", "1", "REG_DWORD")</p>
<p>$Drives = GetObject("winmgmts:").ExecQuery("select Name,DriveType from Win32_LogicalDisk")</p>
<p>For Each $Drive in $Drives</p>
<p>		If $Drive.DriveType = 3</p>
<p>			SHELL "%comspec% /c " + chr(34) + "defrag.exe " + $Drive.name + " -f" + chr(34)<br />
			SHELL "%comspec% /c " + chr(34) + "sdelete.exe -c " + $Drive.name + chr(34)</p>
<p>		EndIf</p>
<p>Next</p>
<p>;=====================================================</p>
<p>I use this by placing the folder CleanDisk (download link below) in<strong> C:\Program Files</strong>. I create a Windows scheduled task to run either KIX32.exe or WKIX32.exe on say a monthly basis.</p>
<p>NOTE: If you have multiple VMs with VMDKs residing on the same physical storage you will probably want to consider staggering the schedules to reduce I/O on the physical disks.</p>
<p>Download the script and necessary files - <a rel="nofollow" href="http://www.jjclements.co.uk/wp-content/uploads/2010/04/cleandisk.zip" target="_blank">HERE</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jjclements.co.uk/2010/04/13/kixtart-script-to-shrink-vmdk-for-smaller-vcb-backups/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>vSphere host disconnects from vCenter host not responding</title>
		<link>http://www.jjclements.co.uk/2010/02/17/vsphere-host-disconnects-from-vcenter-host-not-responding/</link>
		<comments>http://www.jjclements.co.uk/2010/02/17/vsphere-host-disconnects-from-vcenter-host-not-responding/#comments</comments>
		<pubDate>Wed, 17 Feb 2010 02:02:18 +0000</pubDate>
		<dc:creator>James Clements</dc:creator>
				<category><![CDATA[VMware]]></category>
		<category><![CDATA[vCenter]]></category>

		<guid isPermaLink="false">http://www.jjclements.co.uk/?p=473</guid>
		<description><![CDATA[When vSphere 4 became available I was keen to upgrade all of my hosts and vCenter servers to start testing features like Fault Tolerance, Site Recovery Manager, and vCenter Linked Mode e.t.c. The host upgrade went smoothly using VMware Update Manager. Similarly, the upgrade of all vCenter servers was also without issue. A short while [...]]]></description>
			<content:encoded><![CDATA[<p>When vSphere 4 became available I was keen to upgrade all of my hosts and vCenter servers to start testing features like Fault Tolerance, Site Recovery Manager, and vCenter Linked Mode e.t.c. The host upgrade went smoothly using VMware Update Manager. Similarly, the upgrade of all vCenter servers was also without issue. A short while after, I needed to add RAM to a group of hosts and all was fine until I booted the first host post upgrading it's RAM.</p>
<p><span id="more-473"></span></p>
<p>When the host had finished booting it naturally tried to reconfigure HA as necessary, but within two minutes it was appearing as being disconnected from vCenter. Initially I was a little stumped because I instinctively tried to SSH onto the host and was able to do so. This immediately ruled out any form of network or connectivity problem. For the sake of speed I decided to restart the host just incase a service had failed when it was booting up. After the host restarted it appeared in vCenter as usual. I then noticed an error on the host and checked the Alarms tab. The alarm triggered was:</p>
<p><strong>Host connection and power state</strong></p>
<p>The alarm was weird since I had only upgraded the RAM on the host. I couldn't correlate the significance of the alarm and the host disconnecting from the vCenter server. I assumed I had disturbed one of the power cables on the host but a quick check revealed both PSUs in the host had a live power feed and this alarm doesn't actually monitor the power anyway.</p>
<p>I decided to use the vSphere client to connect directly to the host. As soon as it connected I received an information message explaining the host was being managed by the vCenter server, but the IP address listed (for the vCenter server) was 127.0.0.1. This was clearly incorrect.</p>
<p>When a host is added to vCenter it uses the IP address stored within vCenter located in:</p>
<p>Administration --> vCenter Server Settings --> Runtime Settings --> vCenter Server Managed IP</p>
<p>A quick look at this setting on the vCenter server revealed that the Managed IP was blank.</p>
<p><img src="http://www.jjclements.co.uk/wp-content/uploads/2010/02/runtimesettings.png" alt="runtimesettings.png" /></p>
<p>I assumed that as the Managed IP was blank hosts were trying to connect to themselves instead of the vCenter server. </p>
<p>I used nano to open <strong>/etc/opt/vmware/vpxa/vpxa.conf</strong> on the host and it contained the following:</p>
<blockquote><p>
&lt;vpxa&gt;<br />
...<br />
   &lt;serverIp&gt;127.0.0.1&lt;/serverIp&gt;<br />
...<br />
&lt;/vpxa&gt;
</p></blockquote>
<p>After changing the vCenter Server Managed IP address using the vSphere client I disconnected from both the vCenter server and the host. I then connected back onto the host using the vSphere client and it was now being managed by the vCenter server with the correct IP address. A quick check on the vCenter server itself revealed that the Host connection and power state alarm had ceased. I also verified that the vpxa.conf on the host was reporting the correct IP address.</p>
<p>I assume that this issue may have been caused during the upgrade from ESX 3.5 to vSphere 4. I had never experienced this problem before and it has not reoccured since.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jjclements.co.uk/2010/02/17/vsphere-host-disconnects-from-vcenter-host-not-responding/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>VMware VMotion CPU problem after vSphere upgrade</title>
		<link>http://www.jjclements.co.uk/2009/09/15/vmware-vmotion-cpu-problem-after-vsphere-upgrade/</link>
		<comments>http://www.jjclements.co.uk/2009/09/15/vmware-vmotion-cpu-problem-after-vsphere-upgrade/#comments</comments>
		<pubDate>Tue, 15 Sep 2009 13:12:37 +0000</pubDate>
		<dc:creator>James Clements</dc:creator>
				<category><![CDATA[VMware]]></category>
		<category><![CDATA[cpu]]></category>
		<category><![CDATA[vCenter]]></category>
		<category><![CDATA[VMotion]]></category>

		<guid isPermaLink="false">http://www.jjclements.co.uk/?p=358</guid>
		<description><![CDATA[I wanted to install some DRAC 5 cards into each of my Dell PowerEdge 2900 VMware ESX hosts, so I decided to VMotion off the Virtual Machines onto other hosts in the cluster before shutting down the node. The first Virtual Machine migrated without a problem but when I tried a second I received an [...]]]></description>
			<content:encoded><![CDATA[<p>I wanted to install some DRAC 5 cards into each of my Dell PowerEdge 2900 VMware ESX hosts, so I decided to VMotion off the Virtual Machines onto other hosts in the cluster before shutting down the node. The first Virtual Machine migrated without a problem but when I tried a second I received an error stating the there was a CPU incompatibility between the host and the Virtual Machine.</p>
<p><span id="more-358"></span></p>
<p>Here is the error:</p>
<p><img src="http://www.jjclements.co.uk/wp-content/uploads/2009/09/vmotioncpuidmaskerror.png" alt="vmotioncpuidmaskerror.png" /></p>
<p><em><br />
Host CPU is incompatible with the Virtual Machine's requirements at CPUID level 0x1 register 'ecx'.<br />
Host bits: 0000:0000:0000:0000:0010:0010:0000:0001<br />
Required: 1000:0000:0000:000x:xxx0:0x1x:xxx0:x001<br />
Mismatch detected for these features:<br />
*General incompatibilities; refer to KB article 1993 for possible solutions.<br />
</em></p>
<p>The only recent change was the upgrade to vSphere 4. The error detailed an incompatibility issue between the host and Virtual Machine CPU. The host hardware hadn't changed so I decided to investigate the Virtual Machine. After a quick look at the affected Virtual Machine's .vmx configuration file I noticed what appeared to be a CPU ID Mask. I checked the .vmx configuration against a couple of other Virtual Machines that were still able to VMotion and sure enough the CPU ID Mask was not present in these Virtual Machines.</p>
<p>The 5 lines in the non VMotion'ing Virtual Machine's .vmx file were:</p>
<blockquote><p>
cpuid.1.ecx = "R----R----R--R-0-----------H-R--"</p>
<p>cpuid.1.ecx.amd = "R---------------------------R---"<br />
cpuid.80000001.ecx.amd = "------------------RR-RR---------"<br />
cpuid.80000001.edx = "----R---------------------------"<br />
cpuid.80000001.edx.amd = "--------------------------------"
</p></blockquote>
<p>I shut the Virtual Machine in question down and removed the 5 lines above from the .vmx file. I powered on the Virtual Machine and tried to VMotion it. I still received the same error as above. I shut down the Virtual Machine again, verified that the CPU ID Mask was not present in the .vmx and then powered it back on. After the second full shutdown I could successfully VMotion the Virtual Machine again.</p>
<p>NOTE: I have noticed that if you edit a .vmx file before shutting a Virtual Machine down it appears that the changes are overwritten because the running configuration is saved over the top of the existing configuration in the .vmx file itself. The easiest way to make a change to a .vmx is to shut the Virtual Machine down before editing it.</p>
<p>The CPU ID Mask can also be modified from the vSphere client by:</p>
<p>1) Shutdown the Virtual Machine<br />
2) Right-click the Virtual Machine and select "Edit Settings..."<br />
3) Select the "Options" tab<br />
4) Click on "CPUID Mask"<br />
5) Click on the "Advanced..." button</p>
<p>This issue affected 3 of 8 Virtual Machines in my 3 node vSphere cluster and I'm unsure why it only affected certain Virtual Machines. There seems to be nothing in common (that I could think of anyway) between the 3 affected Virtual Machines that I believe could have attributed to this problem.</p>
<p>EDIT (29/10/09): It seems VMware are now aware of the problem and have issued a workaround that requires you to use the vSphere client to remove the CPU ID mask. <a href="http://kb.vmware.com/kb/1011294" target="_blank" rel="nofollow">KB1011294</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jjclements.co.uk/2009/09/15/vmware-vmotion-cpu-problem-after-vsphere-upgrade/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>VMware ESX vSphere resize disk</title>
		<link>http://www.jjclements.co.uk/2009/09/14/vmware-esx-vsphere-resize-disk/</link>
		<comments>http://www.jjclements.co.uk/2009/09/14/vmware-esx-vsphere-resize-disk/#comments</comments>
		<pubDate>Mon, 14 Sep 2009 12:38:07 +0000</pubDate>
		<dc:creator>James Clements</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[VMware]]></category>
		<category><![CDATA[extpart]]></category>
		<category><![CDATA[partition]]></category>
		<category><![CDATA[VMDK]]></category>

		<guid isPermaLink="false">http://www.jjclements.co.uk/?p=335</guid>
		<description><![CDATA[Every now and then I need to resize (usually extend/enlarge) a disk attached to a Virtual Machine. I have tried several methods to do this over the years (including combinations of VMware Converter, third party partition manager apps, diskpart etc) but none have been as efficient as the method I discovered during recent VMware training [...]]]></description>
			<content:encoded><![CDATA[<p>Every now and then I need to resize (usually extend/enlarge) a disk attached to a Virtual Machine. I have tried several methods to do this over the years (including combinations of VMware Converter, third party partition manager apps, diskpart etc) but none have been as efficient as the method I discovered during recent VMware training for my VCP4 exam.</p>
<p><span id="more-335"></span></p>
<p>One of the new features of vSphere is the ability to resize disks without having to shut down the Virtual Machine. This was previously impossible in VI3. This greatly speeds up the resizing process which can be executed in a couple of stages:</p>
<p>1) Use the vSphere Client to edit the settings of the Virtual Machine in question. Select the hard disk and modify it's provisioned size as appropriate. Click OK to apply these changes - resizing the .vmdk file.</p>
<p><img src="http://www.jjclements.co.uk/wp-content/uploads/2009/09/resize1.png" alt="resize1.png" /></p>
<p>2) Verify that the .vmdk has been resized by opening the Management Console -> Disk Management to find the unallocated space on the disk that resides in the .vmdk (distinguished by the black colour in the legend at the bottom.) In this case you can see I have increased the size by 5GB.</p>
<p><img src="http://www.jjclements.co.uk/wp-content/uploads/2009/09/resize2.png" alt="resize2.png" /></p>
<p>Right click on the disk (in this case 'Disk 0') and select properties. On the Volumes tab make a note of the unallocated space, in my case it is 5122MB.</p>
<p><img src="http://www.jjclements.co.uk/wp-content/uploads/2009/09/resize3.png" alt="resize3.png" /></p>
<p>Download Dell's <a href="http://support.dell.com/support/downloads/download.aspx?c=us&#038;cs=19&#038;l=en&#038;s=dhs&#038;releaseid=R64398&#038;formatcnt=2&#038;fileid=83929" target="_blank" rel="nofollow">EXTPART</a> and extract it on the server that contains the disk you want to resize. Navigate to c:\dell\ExtPart (the default extracted location) and run extpart.exe. When prompted enter the the Windows drive letter of the disk on the Virtual Machine e.g. c:. When prompted for the size to extend the partition by enter the number noted down earlier (I used 5122 in this example.) After doing so the disk should be resized. You can check this by opening the Management Console -> Disk Management and verifying the size of the partition.</p>
<p><img src="http://www.jjclements.co.uk/wp-content/uploads/2009/09/resize4.png" alt="resize4.png" /></p>
<p>NB - If you receive the following error:</p>
<blockquote><p>
"Unable to connect to c: or it does not exist"
</p></blockquote>
<p>There are a couple of workarounds that you could try.</p>
<p>1) Close the Management Console (if it is open) and try extpart.exe again.</p>
<p>2) Try restarting the VM in safe mode and then run extpart.exe. This is not ideal but it is still easier than other methods I have tried to resize .vmdk files.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jjclements.co.uk/2009/09/14/vmware-esx-vsphere-resize-disk/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>VMware VM hidden NIC and IP assigned to another adaptor</title>
		<link>http://www.jjclements.co.uk/2009/08/03/vmware-vm-hidden-nic-and-ip-assigned-to-another-adaptor/</link>
		<comments>http://www.jjclements.co.uk/2009/08/03/vmware-vm-hidden-nic-and-ip-assigned-to-another-adaptor/#comments</comments>
		<pubDate>Mon, 03 Aug 2009 11:48:36 +0000</pubDate>
		<dc:creator>James Clements</dc:creator>
				<category><![CDATA[VMware]]></category>
		<category><![CDATA[device manager]]></category>
		<category><![CDATA[nic]]></category>

		<guid isPermaLink="false">http://www.jjclements.co.uk/?p=290</guid>
		<description><![CDATA[Post the upgrade of a VMware infrastructure from ESX 3.5 to vSphere 4, I encountered an issue when upgrading the Virtual Machines. I had already installed the latest VMware tools and after upgrading the hardware from version 4 to version 7 I wanted to remove the standard NIC attached to each Virtual Machine and attach [...]]]></description>
			<content:encoded><![CDATA[<p>Post the upgrade of a VMware infrastructure from ESX 3.5 to vSphere 4, I encountered an issue when upgrading the Virtual Machines. I had already installed the latest VMware tools and after upgrading the hardware from version 4 to version 7 I wanted to remove the standard NIC attached to each Virtual Machine and attach the new vmxnet3 NIC.</p>
<p><span id="more-290"></span></p>
<p>I powered on the Virtual Machine after removing the old NIC and adding the new vmxnet3 NIC and logged into Windows. I could see Windows installing the relevant drivers for the new vmxnet3 adaptor that it had detected and Windows was prompting for a reboot. Before doing so I tried to set the IP address on the new NIC so that when the Virtual Machine rebooted it was immediately available on the network. When I tried to do so I was prompted with an error:</p>
<p>"The IP address you have entered for this network adapter is already assigned to another adapter"</p>
<p>Since I had 'physically' removed the original adaptor I checked device manager to try and uninstall it but it was not listed. When a device is removed from a physical server but was not uninstalled it becomes hidden in device manager. To view hidden devices you need to open a command prompt:</p>
<p>Start -> run -> cmd</p>
<p>Now type the following:</p>
<p>SET DEVMGR_SHOW_NONPRESENT_DEVICES=1<br />
START DEVMGMT.MSC</p>
<p>This will start device manager with the option to 'Show hidden devices'. To enable this option go to:</p>
<p>View -> Show hidden devices</p>
<p>Now when you browse Network Adaptors you will see the hidden NIC (it will be ghosted out) and can right click and uninstall it.</p>
<p>After uninstalling the old NIC I was able to set the IP address of the server on the new NIC with no issues. After a reboot the server was operational again.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jjclements.co.uk/2009/08/03/vmware-vm-hidden-nic-and-ip-assigned-to-another-adaptor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>VMware VirtualCenter Server service VPXD fails to start</title>
		<link>http://www.jjclements.co.uk/2009/04/09/vmware-virtualcenter-server-service-vpxd-fails-to-start/</link>
		<comments>http://www.jjclements.co.uk/2009/04/09/vmware-virtualcenter-server-service-vpxd-fails-to-start/#comments</comments>
		<pubDate>Thu, 09 Apr 2009 11:43:38 +0000</pubDate>
		<dc:creator>James Clements</dc:creator>
				<category><![CDATA[Registry]]></category>
		<category><![CDATA[VMware]]></category>
		<category><![CDATA[service]]></category>
		<category><![CDATA[vCenter]]></category>

		<guid isPermaLink="false">http://www.jjclements.co.uk/?p=207</guid>
		<description><![CDATA[I have been using VMware ESX for quite a while now and while the technology is a brilliant concept every now and then I find a small problem or pitfall that always seems to bug me! I have a 3 node ESX cluster that I implemented in my work office and was working on configuring [...]]]></description>
			<content:encoded><![CDATA[<p>I have been using VMware ESX for quite a while now and while the technology is a brilliant concept every now and then I find a small problem or pitfall that always seems to bug me! I have a 3 node ESX cluster that I implemented in my work office and was working on configuring a 5 node cluster when I noticed an issue with VCenter (formally Virtual Center) that had occurred in both environments. It seemed that for no apparent reason when I rebooted the server running VCenter the 'VMware VirtualCenter Server' (or 'vpxd' windows service name) service failed to start. This was kind of annoying, more so knowing that the new 5 node setup was going to a datacenter where people would be less likely to spot that it hadn't started after the reboot of the server running VCenter!</p>
<p><span id="more-207"></span></p>
<p>After a quick look in the application log on the server I could see that there was an error reported by the SQL instance (I use the SQL Server Express edition default installation for VCenter installations) just before the vpxd service had also logged an error. The first error appeared to be related to the vpxd service starting and establishing a connection to the SQL database. During the connection the authentication had failed and so the vpxd service had failed to start as per the second error.</p>
<p><img src="http://www.jjclements.co.uk/wp-content/uploads/2009/04/vcenter-mssql-error.png" alt="vcenter-mssql-error.png" /></p>
<p><img src="http://www.jjclements.co.uk/wp-content/uploads/2009/04/vcenter-service-error.png" alt="vcenter-service-error.png" /></p>
<p>The immediate reason for this happening seemed to be because during boot up the vpxd service was attempting to start before the SQL service, except the vpxd service was almost relying on the SQL service having started before so that it could establish a connection to the SQL database. Without the SQL service starting prior to the vpxd service there was no way that the connection could be established.</p>
<p>I found that the workaround to this issue is to make the vpxd service dependent on the SQL Server service so that it waits for the SQL Server service to start before it attempts to start itself and a connection to the SQL database is established.</p>
<p>The easiest way to do this is:</p>
<p>1) Establish the service name of the SQL instance for VCenter. If you have installed VCenter using SQL Server Express edition then by default the name is 'MSSQL$SQLEXP_VIM'. If you have used a different version of SQL Server you will need to open the computer management console services snapin (start -> run -> services.msc) and find the service called SQL Server. Right click on the service and select properties to view the service name and make a note of it.</p>
<p><img src="http://www.jjclements.co.uk/wp-content/uploads/2009/04/vcenter-service-name.png" alt="vcenter-service-name.png" /></p>
<p>2) Note: You can download the following regkey changes for SQL Server Express - <a href="http://www.jjclements.co.uk/wp-content/uploads/2009/04/vcenter-sql-dependency.reg" target="_blank" rel="nofollow">HERE</a></p>
<p>Open regedit (start -> run -> regedit) and navigate to the following key:</p>
<p>HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\vpxd</p>
<p>Open the Multi String value for DependOnService by double clicking on the value. On a new line add the service name of your SQL instance. I added the following on a new line because I use SQL Server Express edition:</p>
<p><img src="http://www.jjclements.co.uk/wp-content/uploads/2009/04/vcenter-regkey.png" alt="vcenter-regkey.png" /></p>
<p>3) Close the registry editor, open services.msc again and check that the VMware VirtualCenter Server service is now dependent on the relevant the relevant SQL Server service.</p>
<p><img src="http://www.jjclements.co.uk/wp-content/uploads/2009/04/vcenter-dependencies.png" alt="vcenter-dependencies.png" /></p>
<p>Since making the vpxd service dependent on the SQL Server service I have not had a problem rebooting a server running VCenter where the VMware VirtualCenter Server service fails to start.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jjclements.co.uk/2009/04/09/vmware-virtualcenter-server-service-vpxd-fails-to-start/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>VMware ESX date bug fix</title>
		<link>http://www.jjclements.co.uk/2008/08/20/vmware-esx-date-bug-fix/</link>
		<comments>http://www.jjclements.co.uk/2008/08/20/vmware-esx-date-bug-fix/#comments</comments>
		<pubDate>Wed, 20 Aug 2008 19:49:11 +0000</pubDate>
		<dc:creator>James Clements</dc:creator>
				<category><![CDATA[VMware]]></category>
		<category><![CDATA[vCenter]]></category>
		<category><![CDATA[VMotion]]></category>

		<guid isPermaLink="false">http://www.jjclements.co.uk/?p=67</guid>
		<description><![CDATA[I use VMware ESX 3.5 and Virtual Center 2.5 since implementing it at my current workplace. Like many sysadmins I regularly keep on top of patching. I manually patch my ESX hosts when I see fit after pulling updates through Virtual Center. Subsequently, I recently applied the latest update (3.5 u2 or update 2) to [...]]]></description>
			<content:encoded><![CDATA[<p>I use VMware ESX 3.5 and Virtual Center 2.5 since implementing it at my current workplace. Like many sysadmins I regularly keep on top of patching. I manually patch my ESX hosts when I see fit after pulling updates through Virtual Center. Subsequently, I recently applied the latest update (3.5 u2 or update 2) to all ESX hosts. As a frequent reader of <a href="http://www.theregister.co.uk" target="_blank">The Register</a> I was later surprised to learn of a bug where people had encountered issues when booting or VMotioning Virtual Machines on or after 12th August 2008.</p>
<p><span id="more-67"></span></p>
<p>Post 12th August I could not VMotion and was concerned (as people on the VMware forums were reporting they could not power on Virtual Machines that were off) that in the event of an ESX host failing High Availability (HA) would try to unsuccessfully boot the Virtual Machines on a different host.</p>
<p>I always try to distribute my Virtual Machines equally throughout a HA cluster to ensure minimum disruption to organisation services in the event of a ESX host failure, and to compensate for Virtual Machines that use more of the ESX host(s) resources. It soon became apparent though that it would have been a nightmare to shut down all Virtual Machines on any one ESX host in order to patch it with the update VMware had released (since you cannot patch until all Virtual Machines are VMotioned off of the host or shut down). On the VMware forums it was mentioned that if the date on an ESX host was changed to one prior to the bug taking effect you could successfully VMotion Virtual Machines and power them on.</p>
<p>I inevitably had to test this as it would cause the least impact to the organisation I work for. One concern I initially had was that Virtual Machines have an option of synchronizing their date with the ESX host on which they reside. If a domain controller Virtual Machine were to synchronize its date with an ESX host the time skew between the domain controller and its clients on the network would cause obvious problems. I verified that the default setting for time synchronization in VMware tools on each Virtual Machine is disabled by default:</p>
<p><img src="http://www.jjclements.co.uk/wp-content/uploads/2008/08/vmclienttimesync.png" alt="vmclienttimesync.png" /></p>
<p>I changed the date back to 10th August 2008 and disabled NTP on a couple of my ESX hosts using the VIClient through Virtual Center:</p>
<p><img src="http://www.jjclements.co.uk/wp-content/uploads/2008/08/vmhostdate.png" alt="vmhostdate.png" /></p>
<p>I was then able to VMotion the Virtual Machines from one ESX host onto the other. I corrected the date(s) and now had one ESX host (with no running Virtual Machines) I could patch using VMware Update Manager. I patched the ESX host and after it rebooted I again changed the date on another upatched ESX host to 10th August 2008 and moved all of its Virtual Machines onto the newly patched ESX host. A combination of changing dates on unpatched ESX hosts and then VMotioning Virtual Machines from them onto patched ESX hosts allowed me to patch all ESX hosts in the cluster. One thing I did notice, after changing the date to 10th August 2008 on an unpatched ESX host I would receive the error message "HA agent on (servername) in cluster (clustername) has an error" after a few minutes. When this error appears you obviously cannot initiate a VMotion but a VMotion that is already in progress remains unaffected.</p>
<p>It seems after some testing that when VMotioning a Virtual Machine from one ESX host to another the Virtual Machine can sometimes synchronise its time with the host on which it is migrating onto. My advice would be to patch ESX hosts without domain controller Virtual Machines running on them and when you do VMotion your domain controller Virtual Machines off of an unpatched ESX host onto an already patched ESX host make sure the ESX host that you are migrating the Virtual Machines onto has the correct date!</p>
<p>As a final test, a colleague took a single ESX host running a single Virtual Machine both with correct dates. He shutdown the Virtual Machine and then changed the date on the host (as though he was going to patch it). After changing the date on the host and rebooting it he then powered on the single Virtual Machine. Even though it had time synchronization disabled in the VMware tools the Virtual Machine automatically changed its date to match the host on which it resided during BIOS post. So if you do have any Virtual Machines on an ESX host that are powered off make sure you change the ESX host date back to the correct date before powering any Virtual Machines on!</p>
<p>All of my ESX hosts are now: 3.5.0 Build 110268.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jjclements.co.uk/2008/08/20/vmware-esx-date-bug-fix/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
