vSphere: Storage vMotion of a virtual machine might stop responding at 18%


For some reason a couple of storage vMotions went really slow. So I looked in the logs and found the following lines in the vmware.log:

Oct 15 11:43:37.889: Worker#0| DISKLIB-VMFS :CopyData ‘/vmfs/volumes/xxxxx/vm1/vm1_1-flat.vmdk’ : failed to move data (Cannot allocate memory:0xc0009).
Oct 15 11:43:37.890: Worker#0| DISKLIB-LIB : DiskLib_Clone: Could not perform clone using vmkernel data mover. Falling back to non-accelerated clone. Cannot allocate memory

I started a Google search and found the following thread http://communities.vmware.com/message/1545132 in the communities. A short quote from richardt his post:

"This problem is caused by the VMFS3-DM (Data Mover) having to use contiguous memory space on the host. Apparently, when host’s kernel memory usage is >50% and memory has been fragmented, the DM cannot allocate more space and throws the errors.

I couldn’t get any fix that day so a made an internal case and got focused on another case. The next day I was reading the release notes of patch ESX400-302009402-SG and found the following quote:

Storage vMotion of a virtual machine might stop responding at 18%, and might be completed after a long time, even though other Storage vMotion operations on the host might continue without any errors. If you try to cancel the Storage vMotion operation when it stops responding, the system disconnects the ESX host from the vCenter Server and automatically connects it after a few minutes.

The vmware.log file might contain the following error:
Could not perform clone using vmkernel data mover. Falling back to non-accelerated clone. Cannot allocate memory

The VMkernel log file might contain the following error:
status Out of memory copying 16777216 bytes from file offset 0 to file offset 0, bytesTransferred = 0 extentsTransferred: 0

This issue occurs because the DataMover cannot allocate contiguous physical space when the host’s kernel memory usage is around 50% and the memory is fragmented. The operation fails back to the Application layer data movement. The operation continues and succeeds, but might take more time when compared to the usual DataMove time. The DataMover requires 16MB of contiguous physical memory on the ESX host for each DataMover thread. This patch provides a fix to make DataMover work with fragmented memory.

Installing patch ESX400-302009402-SG did resolve this issue.

 

Source: KB1023759

Advertisements

VMware: Determining the correct version of sysprep to use


image `

A quote from KB1005593 

This article assumes that you have extracted the contents of the sysprep deploy.cab file to the directory C:\sysprep on the VirtualCenter Server host. You must substitute the actual directory in the instructions below.

  1. Log in to the VirtualCenter Server as Administrator.

  2. Click Start > Programs > Accessories > Windows Explorer.

  3. Navigate to the C:\sysprep directory.

  4. Right-click on the sysprep.exe file and choose Properties.

  5. Click the Version tab. Record the number at the top next to "File Version:"

The following list is a copy from: KB1005593. The list is sorted on Windows version, Download link and vCenter location.

Windows 2000 Server SP4 with Update Rollup 1

http://www.microsoft.com/downloads/details.aspx?FamilyID=0c4bfb06-2824-4d2b-abc1-0e2223133afb

C:\Documents and Settings\All Users\Application Data\VMware\VMware VirtualCenter\sysprep\1.1

Windows XP Pro SP2

http://www.microsoft.com/downloads/details.aspx?FamilyId=3E90DC91-AC56-4665-949B-BEDA3080E0F6

C:\Documents and Settings\All Users\Application Data\VMware\VMware VirtualCenter\sysprep\xp

Windows 2003 Server SP1

http://www.microsoft.com/downloads/details.aspx?familyid=A34EDCF2-EBFD-4F99-BBC4-E93154C332D6

C:\Documents and Settings\All Users\Application Data\VMware\VMware VirtualCenter\sysprep\svr2003

Windows 2003 Server SP2

http://www.microsoft.com/downloads/details.aspx?FamilyID=93f20bb1-97aa-4356-8b43-9584b7e72556

C:\Documents and Settings\All Users\Application Data\VMware\VMware VirtualCenter\sysprep\svr2003

Windows 2003 Server R2

http://www.microsoft.com/downloads/details.aspx?familyid=A34EDCF2-EBFD-4F99-BBC4-E93154C332D6

C:\Documents and Settings\All Users\Application Data\VMware\VMware VirtualCenter\sysprep\svr2003

Windows 2003 x64

http://www.microsoft.com/downloads/details.aspx?familyid=C2684C95-6864-4091-BC9A-52AEC5491AF7&displaylang=en
C:\Documents and Settings\All Users\Application Data\VMware\VMware VirtualCenter\sysprep\svr2003-64

 

Windows XP x64
http://www.microsoft.com/downloads/details.aspx?familyid=C2684C95-6864-4091-BC9A-52AEC5491AF7&displaylang=en
C:\Documents and Settings\All Users\Application Data\VMware\VMware VirtualCenter\sysprep\xp-64

VMware: Performance Overview Chart could not be loaded


After installing the new Performance Overview plugin for vCenter 2.5u4. There might be a change that the following “error” appears when you start the plugin.

image

But, VMware did a great job and  published this workaround:

Workaround: If VirtualCenter is upgraded when the VMware Infrastructure Web Access Service is running, you need to reinstall the Virtual Infrastructure Web Access feature and re-install the Performance Overview plug-in:

  1. In the Add or Remove Programs utility, change the VMware VirtualCenter Server program.
  2. Modify the VirtualCenter Server installation, and remove the Virtual Infrastructure Web Access feature.
    image
  3. In the Add or Remove Programs utility, change the VMware VirtualCenter Server program.
  4. Modify the VirtualCenter Server installation, and install the Virtual Infrastructure Web Access feature on the local hard drive.
    image
  5. Re-install the Performance Overview plug-in:
    1. In the command window goto to the folder vpx/perfCharts, the location where the Performance Overview plug-in is available.
      If you are using the ZIP file, go to the bin\perfCharts folder.
    2. Run uninstall.bat <VirtualCenter_Username> <VirtualCenter_Password>
    3. Run install.bat <VirtualCenter_Username> <VirtualCenter_Password>
  6. Connect the VI Client to the VirtualCenter Server, and enable the Performance Overview plug-in:
  1. In the VirtualCenter Server, click Plugins > Manage Plugins.
  2. In the Installed tab of the Plugin Manager window, for com.vmware.vim.stats.report select Enabled.

Source: KB1008330

Powershell: Check if KB patch is installed


Ik wilde weten of een bepaald KB nummer was geïnstalleerd op mijn VM’s. Dit wilde ik natuurlijk niet met het handje nakijken en heb hiervoor een script bij elkaar geraapt.

Het onderstaande script kun je gebruiken in een VMware VI omgeving.

#Add-PSSnapIn VMware.VimAutomation.Core

# Connect to vCenter
$VC = Connect-VIServer (Read-Host "Enter vCenter server")

# Enter the KB#
$HotFixID = (Read-Host "Enter KB#")
Write-Host

# Get all VM’s with powerstate = PoweredOn
$VMS = Get-VM | Where {$_.PowerState -eq "PoweredOn"} | Sort Name

ForEach ($VM in $VMS)

{
# Process only Windows Server VM’s
if ($VM.Guest.OSFullName -match "Microsoft Windows Server*")
  { 
 
# Get all the info using WMI
  $results = get-wmiobject -class "Win32_QuickFixEngineering" -namespace "root\CIMV2" -ComputerName $VM 
  
    # Loop through $results and look for a match then output to screen
    foreach ($objItem in $results)
            {
                # Do the match
                if ($objItem.HotFixID -match $HotFixID)
                    {
                    write-host $objItem.CSName
                    write-host "Hotfix "$HotFixID" installed"
                    write-host
                    }
            } 
   }
}
# Disconnect from vCenter
Disconnect-VIServer -Confirm:$False

 

Zodra je het script start, word er gevraagd naar de vCenter server en het KB nummer wat je wilt nakijken.

image

De volgende output wordt gegenereerd:

image

 

Je kunt het onderstaande script gebruiken in een omgeving zonder VI3:

# Get content
$computers = get-content c:\computers.txt

# Get all the info using WMI
$results = get-wmiobject -class “Win32_QuickFixEngineering” -namespace “root\CIMV2″ -computername $computers

# Loop through $results and look for a match then output to screen
foreach ($objItem in $results)
{
    if ($objItem.HotFixID -match “KB932168″)
    {
        write-host $objItem.CSName
        write-host “Hotfix KB932168 installed”
        write-host
    }
}

 

Source: http://techittome.wordpress.com/2007/04/12/windows-powershell-script-to-check-for-specific-hotfix/

VMware: KB articles about Time(keeping)