Wednesday, March 13, 2013

Extend Volume Error - "The parameter is incorrect"

Today, I had a minor issue extending a volume of a VM running Windows 2008.

I extended the drive of the VM in vCenter.  It was then extended within the OS using Disk Management.  I was then "greeted" with the following:
I wanted to extend the drive from 50 to 60GB.  Disk Manager showed 60GB:

However, Explorer still showed 50GB. (It typically extends to the appropriate size automatically):

To resolve the issue, extend the filesystem using diskpart.  Select the appropriate volume, then run the "extend filesystem" command.


As a precaution, the server was then shut down and powered back on.  The C:\ drive is now showing up as 60GB.

Sunday, February 10, 2013

ESXi Image Builder CLI: How to Add Drivers to an ESXi Image Profile

"No Network Adapters "- I recently had to build up a few ESXi 5.1 hosts procured with Broadcom 57800/57810 10GbE Network Cards.  During the install, I was met with the following message:

Back in the old 4.1 days, you just had to present the “custom drivers” ISO during the install process. 
vSphere 5 introduces the “ESXi Image Builder CLI” to create custom ESXi images.
First, we have to get familiar with some new terms:
vSphere Installation Bundle (VIB): VIBs are the building blocks of the ESXi image. A VIB is similar to a tarball or ZIP archive in that it is a collection of files packaged into a single archive.
Software Depot: Software depots are used to package and distribute VIBs. A Software Depot (sometimes referred to as a Software Bundle) is a collection VIBs specially packaged for distribution. There are two types of depots – online and offline. An online software depot is accessed remotely using HTTP. An offline software depot is downloaded and accessed locally.
Image Profile: An Image Profile is the logical collection of VMware and third-party VIBs needed to install an ESXi host. Image profiles created with the Image Builder CLI can be saved as ZIP archives or ISO files.
Ok, now lets begin the Image Profile Build process:
1. First, download the software depot files.  In my case, I downloaded the Broadcom drivers and Vmware ESXi-5.1.0 zip files to my D:\software_depot directory
2. Next, Import the software depots.  Start your PowerCLI session and import the software depots using the following comdlet: Add-EsxSoftwareDepot 
3.To view the existing Image Profiles, run the following cmdlet: Get-ESXImageProfile
 
The "s" in the profile names is "security only"
 
 


4.I then made a clone of the “standard” Image Profile.  The clone was named ESXi-5.1.0-799733_BCM
5.To view the existing Packages, run the following cmdlet: Get-ESXSoftwarePackage
6. To add VIBs, use the following cmdlet: Add-EsxSoftwarePackage. 
7. To Remove VIBs, use the following cmdlet: Remove-EsxSoftwarePackage
8. Once all the necessary changes have been made, export the Image profile to an ISO file:

 9. I attached the newly created ISO to the server via DRAC, and it recognized the new NICs without a hitch.


Wednesday, November 21, 2012

Qwinsta Rwinsta - How to find Remote Desktop (Terminal Services) Sessions

I recently had to RDP into a Windows 2003 server to make a quick change.  Unfortunately, i was met with the old "exceeded the maximum connections" prompt:







To find out who's logged in, run the following command:
 qwinsta /server:<server name or IP address>






To disconnect the session run the following command:
rwinsta <ID> /server:<server name or IP address>

Using the output of the previous command, insert the <ID> of the user you wish to disconnect

vCenter Update Manager - Check New Notifications - Queued

I recently had HEAPS of Check new notifications tasks in the Queued state.






To resolve this, just restart the VMware vCenter Update Manager Service.

 
That's it.  The task completed successfully the next run.

Friday, August 10, 2012

VMware Converter Standalone 5.0 - Slow transfer rates

I've been noticing drastically slower conversion times using Converter 5.0 vs 4.3.  It turns out, Converter 5.0 encrypts the data stream using SSL by default.   This increased the security, but decreased transfer performance.  If SSL is not required, it can be disabled quite easily.

After installing Converter 5.0, locate the converter-worker.xml file: 

Windows 7 and Windows Server 2008 (R2):
C:\ProgramData\VMware\VMware vCenter Converter Standalone 
 
Windows XP and Windows Server 2003:
%ALLUSERSPROFILE%\VMware\VMware vCenter Converter Standalone

Make a copy of the converter-worker.xml file for safe keeping.  Then use Notepad to make the following change:

<nfc>
 <readTimeoutMs>120000</readTimeoutMs>
<useSsl>true</useSsl>
<!-- Delay is specified in milliseconds, -1 denotes the default.

TO:

<nfc>
<readTimeoutMs>120000</readTimeoutMs>
<useSsl>false</useSsl>
<!-- Delay is specified in milliseconds, -1 denotes the default.

Save the file, then restart the VMware vCenter Converter Standalone Worker service.  Enjoy the new found speed!

Thursday, August 9, 2012

VMWare Converter: Converted VM fails to Boot

Recently, I performed a P2V of a Windows 7 laptop.  The destination was an ESX 4.1 host.  Per best practices,  I installed VMware Converter 5.0 within the source machine.  I used the Convert Machine wizard, and took the defaults to minimize the complexity of the conversion.  The conversion completed successfully. 

However, upon start up, I was "greeted" with a Blue Screen and later the following option:


I chose the repair option and patiently waited over an hour...

Upon closer inspection, I noticed the boot disk was setup for IDE.  The disk must be converted from IDE to SCSI for best performance.  In addition, the VM may fail to boot because the guest OS does not support the driver.  I ssh'd into the ESX host and used vi to open up the VMs .vmdk file.  I then changed the adapter from IDE to lsilogic by changing the following:

ddb.geometry.sectors = "63"
ddb.adapterType = "ide"
ddb.geometry.biosCylinders = "19457"
 
TO...

ddb.geometry.sectors = "63"
ddb.adapterType = "lsilogic"
ddb.geometry.biosCylinders = "19457"
 
I then removed the Hard disk (IDE (0:0)) from the virtual machine. (DO NOT Delete the disk)  I then added the Hard Disk back in using SCSI (0:0).   The LSI Logic SAS controller was added automatically.


After that change, the VM came up fine.  I just had to perform the usual post p2v clean up.

The CD-Rom complained about the IDE config being incorrect, but a quick Remove and Re-add took care of that.

Wednesday, June 13, 2012

How to kill a hung Windows Service

Yesterday, I was unable to stop the  vCenter Update Manager service.  It was hung at "stopping".

To kill the service, get the name of the offending service from Server Manager. In my case, it was vmware-ufad-vci:
Open a command prompt and get the PID for the hung service by running the following command:
sc queryex <service name>

Then kill the appropriate PID:
taskkill /PID <PID> /F



That's it!