Citrix XenApp

Your Journey towards cloud.

Virtualization Picking up Speed

Are your Skills keeping up? Skill up. Be Relevant

Are you a System Admin

Learn Citrix XenApp, Its future.

Citrix XenApp

Industry-leading virtualization platform for building cloud.

Cloud Computing in Demand

Learn how to build cloud on Citrix XenApp.

Monday, 16 April 2012

Could not power on VM - lock was not free

The other day we experienced an incident on the SAN storage with high latency and even loss of connection to the SAN. This can generate a lot of really unpleasant errors on the ESX hosts. Even after the SAN is brought back to a stable state we've seen hosts that won't boot, VM's that won't vMotion and VMs that won't power on due to file locks. 

If you receive a 'locked file error' (like screendump below) and your VM won't boot there are a couple of ways to go about it. This VMware KB article explains it quite well. Either you can cold migrate the VM to the  other hosts in the cluster (to find the ESX host with the lock) and then try to boot it from there or you can try to locate specifically which host has the lock.


If the vCenter log does not tell you specifically which files are locked, this can be viewed in the vmware.log which is located in the VM folder. If you just tried to power on the VM, then relevant info should be at the end of the log file.

In the example below, it is the swap that is still locked.


This can be verified by running the touch command on the locked file.
With vmkfstools you can get the mac address that has the lock:

# vmkfstools -D /vmfs/volumes///


In the screendump below, the MAC address has been highlighted.


The same info can be found in the /var/log/vmkernel log


Once you have the MAC address you can find a match by, for example, logging in to vCenter or onto the Blade enclosure. When you have a match, cold migrate the VM to the relavant ESX host and boot it.

Sunday, 15 April 2012

Remove Properties from My Computer

This restriction remove the properties option from My Computer and hides the "System Properties" screen.
Navigate the following key:
HKEY_CURRENT_USERS\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer and create Dword value NoPropertiesMyComputer give the value 1.

Saturday, 14 April 2012

Remove the Ability to Modify File Types

This setting allows you to remove the ability to change, add or delete file types using explorer the Folder Options interface.
Navigate the following key:
HKEY_CURRENT_USERS\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer and create Dword value NoFileAssociate and give the value 1.

Friday, 13 April 2012

Show Hidden Operating System Files

This setting controls whether the normally hidden operating system files should be displayed when using explorer to browse the file system.

Navigate the following key:
HKEY_CURRENT_USERS\Software\Microsoft\Windows\CurrentVersion\Explorer\Advance 
and create Dword 
value ShowSuperHidden 
and give 1 to show the files

Thursday, 12 April 2012

Unload Unused DLLs

After an application is closed in widows XP, it has the bad habit of leaving the associated DLL files in memory. This can hog precious resources and memory, and also cause stability problems. To makethe DLLs unload themselves from memory after the program is closed,
Navigate to: HLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AlwaysUnloadDLL
If the DWORD AlwaysUnloadDLL is not present, you will need to create it. Set the Value of the (Default) setting to 1. Application associated DLLs will get unloaded when the application is closed.

Wednesday, 11 April 2012

Remove the Hardware Tab

This restriction removes the hardware tab from applicable items in the Control Panel and from the local drive properties. This prevents users from changing the hardware device properties.
Navigate the following key:
HKEY_CURRENT_USERS\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer and create Dword value NoHardwareTab and give the value 1.

Boot directly into BIOS - Workstation 8

In Workstation 8, there's a nice new little feature that let's you boot directly into BIOS from the power on button. Instead of having this option under edit settings it has been moved to the power on button itself.

A small thing perhaps, but quite practical.