Thursday, January 7, 2010

Duplicate File Drive Mappings in VMware View

When you are deploying virtual desktops using VMware View the login script and default behaviour of the Remote Desktop Protocol can lead to duplicate drive mappings that can often confuse users.  When a Virtual Desktop Environment is setup for access within the organization a user logging on from a corporate PC will have already run their login scripts and have their drive mappings on the physical PC.  When they launch their VDI environment the default behaviour of RDP is to map all drives defined on the physical PC.  This leads to the previously mapped drives showing up on the virtual desktop in addition to the drives mapped by the login scrip.  The problem becomes how do you switch off this behaviour so that only the virtual desktop login scripts runs?

The resolution can be found by adjusting the local Terminal Services registry keys (Windows XP) or the Remote Desktop Session Host keys (Windows 7).  While this can be adjusted using a Group Policy, I have found it easiest to set it in the virtual machine template.  You do have to be aware that policies are applied locally and then through the AD so if the policy is configured in AD it will overwrite the local policy (An un-configured policy has no effect).  As we typically recommend that virtual desktops have separate OUs in the AD this does not happen often.  The exact process for windows XP is as follows:

From the start and run option type gpedit.msc and click OK.  Open the Computer Configuration, Administrative Templates, Terminal Services, Client/Server data redirection folder.

xp_reg_1

Enable the Do not allow drive redirection Properties and click Apply

xp_reg_2

For Windows 7 from the start menu type gpedit.msc in the search bar and browse to Computer Configuration, Administrative Templates, Windows Components, Remote Desktop Services, Remote Desktop Session Host, Device and Resource Redirection.

reg_set_do_not_allow_drive_redirection1 

Enable the Do not allow drive redirection policy

win7_reg_1

Your Windows 7 or Windows XP virtual desktop template will now block the default behaviour or the RDP protocol and ensure the drives are not mapped twice in the users virtual desktop session.

1 comment:

  1. In this situation I used DuplicateFilesDeleter for great effect. It searches two or more duplicate files in one or more selected search paths and removes them.

    ReplyDelete