VMware View Space Reclamation Problem

In setting up our new View infrastructure, we’ve definitely had to work though many little issues with all the various moving parts. One issue that wasn’t a show-stopper, but was quite annoying was that after we set up a new pool, it was unable to do space reclamation on the desktops. After about 24 hours or so, we’d start getting these messages in the View Administrator event log:

Failed to perform space reclamation on machine desktop1 in Pool mypool

Once these started, we’d get them about once per hour for every desktop.

Back over on the View Connection server, we’d see the corresponding entries in its log (C:\ProgramData\VMware\VDM\logs\log-yyyy-mm-dd.txt):

WARN (08CC-09B8) [ServiceConnection25] Problem while performing VC operation: ‘Permission to perform this operation was denied.’ [com.vmware.vim25.NoPermission]
ERROR (08CC-09B8) [ServiceConnection25] Permission to perform this operation was denied.
ERROR (08CC-09B8) [PendingOperation] Error reclaiming space for VM /View/vm/view-pool-storage/mypool/desktop1 :com.vmware.vdi.vcsupport25.VmException25: Permission to perform this operation was denied.

We’d followed the instructions for giving permissions to the vCenter user used by the Connection server outlined on View Manager Privileges Required for the vCenter Server User, but there was obviously something missing. As an aside, some of the permissions given in the View documentation needed some “translating” for vSphere 5.1 – thanks to Terence Luk for his blog outlining this: Configuring vCenter role permissions for VMware vSphere 5.1 and VMware Horizon View 5.2 (View Manager and View Composer)

To figure out what was missing, we gave Administrator privileges to the vCenter user for one desktop and then initiated a manual reclamation from the View Connection server:

C:\Program Files\VMware\VMware View\Server\tools\bin>vdmadmin -M -d mypool -m desktop1 -markForSpaceReclamation

The reclamation worked, and in the event log on the vCenter server, we could see Flex-SE wipe and shrink operations for that desktop. Looking at the role permissions in vCenter, we found the culprit. The vCenter user needed to have this permission added to work properly:

Virtual Machine -> Interaction -> Perform wipe or shrink operations

Once this was added to the role for the vCenter user, all desktops were able to perform reclamation happily, and there are no more errors in the event log.