Disk Consolidation Needed – Unable to access file since it is locked

If any backup running on your VM it will create a snapshot and after completion the snapshot will get removed. Sometimes it requires disk consolidation for the VM.

When we try to do disk consolidation of the VMDKs manually by right clicking on the VM and selecting Snapshot –> Consolidate.

However the consolidate operation may fail again, if the issue which caused the snapshot deletion operation to fail disk consolidation previously has not been cleared and shows an error “Unable to access file since it is locked”






I manually tried the scenarios like create another snapshot by switching off the VM and delete the snapshot manually for consolidation of VM disk and remove the VM from inventory and reregister the VM in the Vcenter which is also weird.



  1. From the VM summary identified the ESXI and do SSH login.

2. Ran the command “vmkfstools -D /vmfs/volumes/yourvolume/yourVM/yourlockedVM.vmdk

3. I could see the owner of the vmdk file which had the lock with MAC address ending “008ed

# vmkfstools -D /vmfs/volumes/VM_BLOCK_LUN0_VNX5200/VM server Folder/VM-


Lock [type 10c00001 offset 49518592 v 15, hb offset 3276800

gen 9, mode 1, owner 561795d7-66ffccd8-782c-b82a72d008ed mtime 797087

num 0 gblnum 0 gblgen 0 gblbrk 0]

Addr <4, 54, 3>, gen 4, links 1, type reg, flags 0, uid 0, gid 0, mode 600

len 107374182400, nb 102400 tbz 44371, cow 0, newSinceEpoch 102400, zla 3, bs 1048576


  1.  This is the ESXi server which has the lock on the VMDK file.
  2.  Next locate which ESXi host has a network adaptor with that MAC address.


  1.  Once confirmed I placed the host in maintenance mode, DRS vMotioned all VMs to another host in the cluster and restarted the hostd service or restart the server.

Syntax: #/etc/init.d/hostd restart

7. After restarting the host I can able to do consolidation of disk successfully and also storage migration.


“The VMRC console has disconnected…attempting to reconnect”

Error: “The VMRC console has disconnected…attempting to reconnect” unable to do open console for the VM.











  1. Exit your vsphere client
  2. Open your Task Manager (many ways to do this)
    1. Ctrl-Alt-Del -> Choose “Start Task Manager”
    2. Start -> Run -> Cmd and type “taskmgr.exe”
    3. Right-click the clock, in the pop up menu choose “Start Task Manager”
  3. Look for any vmware-vmrc.exe process(es). Select it, then click “End Process”
  4. Restart vsphere client



Trust Relationship Across forest in Active directory


I hereby enclosing the procedure in step by step pdf format for implementing trust relationship across forest in Active directory…


Trust relationship – Two different Forest

Citrix XenApp failed to connect to the Data Store

Recently ran in to an error where I couldn’t connect to any XenApp server using the AppCenter and I was getting the following errors within the system event log.

Event ID 3989
Citrix XenApp failed to connect to the Data Store. ODBC error while connecting to the database: 28000 -> [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed. The login is from an untrusted domain and cannot be used with Windows authentication.

Event ID 3632
The server running Citrix XenApp failed to connect to the data store. Invalid database user name or password. Please make sure they are correct. If not, use DSMAINT CONFIG to change them.  Error: IMA_RESULT_ACCESS_DENIED  Indirect: 0  Server:   DSN file: C:\Program Files (x86)\Citrix\Independent Management Architecture\mf20.dsn

To get round this issue (Not use the domain admin account!!!) run the following DSMAINT command and set the correct password for the administrator account.

DSMAINT CONFIG /user:domain\administrator /pwd:password

Hyper-V installation in Vsphere 5.1

To install Hyper-V in an Esx server, the following requirements to be done before the installation of Windows2012 OS.


If you are using vSphere 5 or greater then you need to modify the vmware config file on the ESXi host that will run the Hyper-V virtual machine. To edit this file, ssh to the server and vi /etc/config/vmware. Add the line vhv.allow = “TRUE” to the file and save it with “wq”.

Hyper-V cannot be installed-2

Step-2: In the .VMX config file, path /vmfs/volumes/datastores/VMfolder (HyperV-VM), adding these 4 lines:

mce.enable = "TRUE"
hypervisor.cpuid.v0 = "FALSE"
featMask.vm.hv.capable = "Min:1"
vhv.enable = "TRUE"

Alternatively, you should change the suffice guestOS line to
guestOS = "winhyperv" in the .vmx config file and save the file.

Now the Hyper-V VM can be successfully power on without any issues.


For more info : http://www.tinkertry.com/vmware-esxi-5-1-can-run-microsoft-hyper-v-server-2012-vms-nice/



Installation of Hyper-V Windows2012

When you install Hyper-V in windows 2012 in the add and remove roles you will get an error message “Hyper-V cannot be installed: A hypervisor is already running. Refer screen shot below.











The first thing you need to do is to open and change the PowerShell execution policy scripts to RemoteSigned then run the following command to install the Hyper-V :

C:\> Get-ExcutionPolicy

c:\>Enable-WindowsOptionalFeature –Online -FeatureName Microsoft-Hyper-V –All -NoRestart

The above command installs only the hypervisor but does not install the administration tools, so you can manage the Hyper-V within the virtual machine you must install RSAT for Hyper-V to do this run the following command:

c:\> Install-WindowsFeature RSAT-Hyper-V-Tools -IncludeAllSubFeature


Now I suppose you want to create a cluster then you need to install the Cluster service,  run:

c:\>Install-WindowsFeature RSAT-Clustering -IncludeAllSubFeature


Optionally you can install Multipath I/O to enable multiple paths to the storage, if this is your case follow:

c:\>Install-WindowsFeature Multipath-IO

Then restart Computer



Windows2012 Hyper-V successfully installed.

Wmic command for memorychip

To identify physical memory usage and free dim slots available in a server or desktop wmic command plays a major role

Some of the examples are given below










For more info

Wmic memorychip