Friday, December 25, 2015

How to create 32-bit or 64-bit SQL DSN

I wrote this post around one year back but never posted here, no specific reason..somehow missed it. Today when I was checking the uncompleted posts on my blog, came across this, as this was already a complete post so thought of posting it.... :)
As most of us would be aware, for VMware Update Manager and some other applications, we still need 32-bit Database Source Name (DSN)/ODBC connection to point the application database.
Nowadays for various reasons you will get/choose a 64-bit OS/system to install and configure your application, so here the question is how one would create a 32-bit DSN on a 64-bit System.

A 64-bit Windows operating system has two odbcad32.exe files:
  • %SystemRoot%\system32\odbcad32.exe is used to create and maintain data source names for 64-bit applications. 
  • %SystemRoot%\SysWOW64\odbcad32.exe is used to create and maintain data source names for 32-bit applications, including 32-bit applications that run on 64-bit operating systems.
To set up a 32-bit DSN, launch the 32bit version of the ODBC Data Source Administrator (to create a 64-bit DSN open the 64-bit ver of ODBC Data Sourse Administrator).

From here you can create a 32-bit ODBC connection.

For detailed step by step guide, click HERE.

Reference: VMware vSphere 5.5 Documentation, MSDN.

That's it.... :)


Thursday, December 24, 2015

Open VM Console "Unable to connect to the MKS: ......" errors

You may have seen one of this kind of MKS errors while trying to open VM console, 
                
                
First of all you may be wondering what the ‘MKS’ part of the error message stands for, well you’ll be disappointed to know that it isn’t an acronym for something high tech and very complicated but rather is stands for; mouse, keyboard, screen and the error is your vSphere installed system simply unable to map this to the guest OS, hence the open VM console failed.

Most of the time "Unable to connect to the MKS:” errors are network issues (DNS/firewall, port 902 issue). Either your system (where the vSphere client is installed) is not able to resolve host/VM name or port 902 is not open.

You can check the name resolution easily by using ping command, just open the CMD and try to ping the esxi host/VM and see if the name resolution is happening.
If system is unable to resolve the name, check your network setup/firewall config. This error is caused by your vSphere client not able to communicate with the ESXi host directly.
After verifying DNS, open a command prompt on the vSphere Client machine and run these commands:
ipconfig /flushdns
ipconfig /registerdns
If name resolution is not happening, as a workaround of dns issue you may edit the C:\Windows\System32\drivers\etc\hosts file and add esxi host's dns entry there. 
If it’s not DNS then:

Before doing anything else first vMotion the affected VM to any other and see if the issue still persist.
Verify that the ESXi/ESX host and the workstation running the vSphere Client are correctly synced to an NTP service. This is required to satisfy SSL handshaking between the vSphere Client or and the ESXi/ESX host.

A restart of the esxi host management agents would also fix any of the below error.
 

In case you are using Esxi 6.0.x and getting following error “Unable to open MKS: Internal Error” while opening VM console for any VM then as listed in kb# 2116542,
This issue is caused by the SSL certificates are updated by the ESXi host when connecting to the new vCenter Server.  These certificates are used by the console and may not be updated with the virtual machine running.
This is a known issue affecting ESXi 6.0.

To resolve this issue, use one of these options:
  • Power off and Power on the virtual machine.
  • Migrate the virtual machine to another ESXi host using vMotion.
  • Suspend and then Resume the virtual machine.
Note: The virtual machine must be powered off for the changes to take effect.  A warm reboot will not resolve the issue.
In earlier versions of Esxi you may also try this for above error, 
Select affected Esxi Host => Configuration > Advanced Setting
Now Go to Config => Security => host
Uncheck the Config.Defaults.security.host.ruissl

In case you are using HP ProLiant server and getting open VM console errors like,

Unable to contact the MKS: Could not connect to pipe\\.\pipe\vmware-authdpipe
                                                    or
 Unable to connect to the MKS: connection terminated by server.
                                                    or
or
 It could be related to hp-ams related bug, if above didn't work then check if a latest version of hp-ams is available and update the same if available using below command.
esxcli software vib install -d /datastore/directory/hp-ams-esxi5.5-bundle-10.0.1-2.zip 

Or as a workaround for the time being you may stop the hp-ams process,

/etc/init.d/hp-ams.sh stop 

or Uninstall the hp-ams by using the below command,


esxcli software vib remove -n hp-ams

Note: for any of the above open VM console error, not necessarily all VM running on the host would be affected by this issue. 
If anyone came across any of the MKS error not listed here please let me know in comment area.

Reference: kb# 749640.

That's it... :)


Sunday, December 20, 2015

Snapshot Disk Consolidation fails with a file lock error message

This is common in an environment where you are using VM backup solutions like vRanger, Veem backup, Avamar etc which takes backup at Esxi's level and uses hot-add technology to take back up of a VM.

Cause: During the backup of the VM a snapshot was made, then the base disk of target VM was hot-added to the VM that handles the backup (vRanger/Veem or any other backup solution uses hot add technology). Now the backup was made. After the backup however the backup solution somehow did not manage to hot-remove the disks from the backup software VM. This meant the base disks of the VM being backed up were still locked, hence the failure when trying to consolidate.

In VM summary you would see this,
And when you try to consolidate the snapshot disks, you would get this error,

One can fix this issue by using one of these methods:
1. Go to the settings of your backup software Virtual Machine's settings and check for the attached disk, you would find some extra disks there (affected VMs disks), now you need to unlink your vmdk files from his virtual machine (Do Not Delete the Disks, Only remove them from this Virtual Machine).

Once disks are unlinked from the backup software VM then you need to run Snapshot consolidation on affected and this time it will consolidate all snapshots to base disk and complete without any issue.

2. In this method Storage vMotion the affected VM to another datastore (Right click on VM => Migrate => now you need choose migrate disks to another available datastore – this will clear lock on disk files of the virtual machine.
Now run the Snapshot consolidation and it will complete without any issue.

Note: However the Snapshot consolidation completed successfully but you may still need to remove the base disk from Backup Software Virtual Machine(Do Not Delete the Disks, Only remove them from this Virtual Machine).

Related Issue: VM backup failed with an error like, "one or more disks from virtual machine ******* is alreadymounted to the backup software VM. You must unmount these disks before attempting to bakup the virtual machine".
 
The fix of this issue lies in the first part of above solution.

That's it... :)


Thursday, December 3, 2015

vSphere Web client and latest version of Chrome, IE11

Last week one of my friend pinged me to take a look at vSphere Web client as he was not able to open virtual machine console, this option was greyed out,
My first question was to him, have he installed wcb client client integration plugin before trying to open VM console using Chrome Browser and he said yes. On checking I found pop-up blocker was enabled but even after disabling, VM console option was still greyed out.

We re-installed client integration plugin, restarted browser but nothing worked.

Then I suggested it seems a browser issue lets try with ie, he had ie 11 installed when he logged in using IE11 browser, we were amazed to see we had all vm folders but no VM was available when clicking on VM folder.
 Its then when I started looking about this issue.

Lets start with Chrome:- After some digging we found VMware kb# 2114800, As per this kb, after updating Google Chrome to Version 42 or later, vSphere Web Client Integration Plugin 5.x no longer functions.
This issue occurs because the Netscape Plug-in API (NPAPI) is deprecated(no longer available) in Google Chrome 42 and later. The NPAPI is deprecated by all modern browsers.

Resolution:- This is a known issue affecting VMware vSphere Web Client 5.x, this issue is resolved in vCenter Server 5.5 Update 3a. 

Currently, there is no resolution for 5.0 and 5.1.

To work around this issue:
  • Enabling the NPAPI feature within Google Chrome 42 through 44.

    Note: These steps are not applicable to Google Chrome 45 and later.

    To enable NPAPI in Google Chrome:
  1. Open a new browser tab in Google Chrome
  2. In the address bar, enter this:

    chrome://flags/#enable-npapi
  3. Under the Enable NPAPI section, click Enable.
  4. Refresh or launch the vSphere Web Client landing page and attempt to use the CIP features.
  • Use Mozilla Firefox version 39.x or later in to access the CIP-integrated features of the vSphere Web Client.
  • Use the vSphere Client.
Note: For virtual machine control due to the deprecation of NPAPI, the VMware Remote Console (VMRC) is released to take its place. 

IE11:-  I was not able to reproduce the issue for ie11 in my homelab as he had vSphere web client version 5.5.0 build 2414847 and I have a different build.
Microsoft Internet Explorer 11 is Supported in vSphere 5.5 Update 1 and later versions, for later versions,
Fixing the client integration issue for ie11 is quite simple, After logging to the vSphere web client, hit the Alt key within your IE11 session and select “Tools” followed by “Compatibility view settings”, and add the vSphere url to the approved compatibility view list. Then click OK and its all set.
Now vSphere web client integration for ie should work.

NoteFor virtual machine control due to the deprecation of NPAPI, the VMware Remote Console (VMRC) is released to take its place. To open with VM remote console, go to VM Summary 

It would work for any browser.

Reference: kb# 21148002005083

That's it... :)