Pages

Friday, October 12, 2012

Preventing VMware View users from accidentally ejecting USB devices

For those who may have come across my previous posts:

Disappearing network adapter with VMware View 5.0 and vSphere 5.0
http://terenceluk.blogspot.com/2012/10/disappearing-network-adapter-with.html

… would know that I recently ran into a strange incident where a user accidentally ejects the network adapter within their virtual desktop and subsequently gets cut off from their desktop because the virtual network adapter simply vanishes from the virtual machine’s properties in vSphere.  While I have yet to find a method of apply this to multiple virtual machines, one of the fixes available is to manually edit the properties of the virtual machine’s settings in vSphere or the VMX file.  The following is the KB that provides the instructions to do it:  http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1012225

I went through the process with the vSphere client earlier this morning so I’ll include it into this post in case someone is looking for something more visual:

Shutdown the virtual desktop and edit the settings of the virtual machine:

image

Within the virtual machine’s properties, click on the Options tab, then General (under Advanced):

image

Click on the Configuration Parameters… button:

image

Within the configuration parameters window, click on the Add Row button:

image

In the Name field, type in devices.hotplug and in the Value field, type in false:

clip_image002

Exit out of the properties and start the desktop.  You’ll notice that when you connect to the desktop with the View client, the USB icon in the system tray will no longer be displayed:

image

-------------------------------------------------------------------------------------------------------------------------------------------------------------------

The problem with this solution is that it would be too much manual labor to perform when there is more than 10 virtual desktops in the environment.  I’ve tried multiple ways to make the change in the master template but haven’t had any luck with getting the configuration to stick so I’ll update this post when I find a better solution that scales better with large environments.

No comments: